/* ==========================================================================
   Features page — per-screen mockup treatments.
   Extends the shared .mockup-* components (styles.css) so each panel reads
   like a different screen of the product rather than the same card seven
   times. No inline styles — widths/heights live here (CSP-safe).
   ========================================================================== */

/* ----- Shared mockup extras ----- */
.mockup-btn {
    display: block;
    width: 100%;
    text-align: center;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.88rem;
    line-height: 1.2;
    color: var(--cream);
    background: var(--forest);
    border-radius: var(--radius-md);
    padding: 0.7em 1em;
    margin-top: 1.1rem;
}

.mockup-btn--ghost {
    background: transparent;
    color: var(--forest);
    border: 1.5px solid var(--sage-mist);
}

.mockup-footnote {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    text-align: center;
    margin: 0.9rem 0 0;
}

/* ----- 1. Intake / add-item form ----- */
.mockup-form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.mockup-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

.mockup-field__label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.28rem;
}

.mockup-field__box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--charcoal);
    background: var(--cream);
    border: 1px solid var(--cream-dark);
    border-radius: var(--radius-sm);
    padding: 0.45em 0.7em;
    white-space: nowrap;
    overflow: hidden;
}

.mockup-field__box--select::after {
    content: "\25BE"; /* ▾ */
    color: var(--sage);
    font-size: 0.85em;
    flex: 0 0 auto;
}

.mockup-field__box--success {
    color: var(--forest-light);
}

/* printed barcode label preview */
.mockup-ticket {
    margin-top: 1.1rem;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.35rem 1rem;
    border: 1.5px dashed var(--sage-light);
    border-radius: var(--radius-sm);
    background: var(--cream);
    padding: 0.75rem 0.95rem;
}

.mockup-ticket__name {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
}

.mockup-ticket__price {
    grid-column: 2;
    grid-row: 1 / span 2;
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--charcoal);
}

.mockup-ticket__barcode {
    grid-column: 1;
    height: 15px;
    width: min(140px, 100%);
    background: repeating-linear-gradient(
        90deg,
        var(--charcoal) 0 2px,
        transparent 2px 4px,
        var(--charcoal) 4px 5px,
        transparent 5px 9px,
        var(--charcoal) 9px 11px,
        transparent 11px 13px
    );
}

/* ----- 2. Gift Aid claim (gold = HMRC money only) ----- */
.mockup-progress {
    margin-top: 1rem;
}

.mockup-bar__fill--gold {
    background: var(--gold);
}

.mockup-bar__fill--w74 {
    width: 74%;
}

.mockup-progress__caption {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    margin: 0.5rem 0 0;
}

/* ----- 3. Donor profile header ----- */
.mockup-person {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.85rem;
    align-items: center;
    padding-bottom: 0.85rem;
    border-bottom: 1.5px dashed var(--cream-dark);
    margin-bottom: 0.25rem;
}

.mockup-person__avatar {
    grid-row: 1 / span 2;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--sage-mist);
    color: var(--forest);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mockup-person__name {
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.3;
    color: var(--forest);
}

.mockup-person__meta {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
}

/* ----- 4. Reports bar chart ----- */
.mockup-chart {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    margin-top: 1.1rem;
}

.mockup-chart__col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.35rem;
}

.mockup-chart__bar {
    display: block;
    background: var(--sage);
    border-radius: 3px 3px 0 0;
}

.mockup-chart__col:nth-child(1) .mockup-chart__bar { height: 44px; }
.mockup-chart__col:nth-child(2) .mockup-chart__bar { height: 30px; }
.mockup-chart__col:nth-child(3) .mockup-chart__bar { height: 56px; }
.mockup-chart__col:nth-child(4) .mockup-chart__bar { height: 40px; }
.mockup-chart__col:nth-child(5) .mockup-chart__bar { height: 64px; }
.mockup-chart__col:nth-child(6) .mockup-chart__bar { height: 88px; }
.mockup-chart__col:nth-child(7) .mockup-chart__bar { height: 26px; }

.mockup-chart__col--peak .mockup-chart__bar {
    background: var(--forest);
}

.mockup-chart__label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    color: var(--text-secondary);
}

/* export chips */
.mockup-chips {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.1rem;
    padding-top: 0.95rem;
    border-top: 1.5px dashed var(--cream-dark);
}

.mockup-chips__label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-right: auto;
}

.mockup-chip {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--forest-light);
    background: var(--cream);
    border: 1px solid var(--sage-mist);
    border-radius: 999px;
    padding: 0.3em 0.85em;
}

/* ----- 5. Multi-shop rows with mini bars ----- */
.mockup-shop {
    padding: 0.65rem 0;
}

.mockup-shop:first-child {
    padding-top: 0.1rem;
}

.mockup-shop + .mockup-shop {
    border-top: 1.5px dashed var(--cream-dark);
}

.mockup-shop .mockup-row {
    padding: 0 0 0.35rem;
}

.mockup-shop__bar {
    height: 6px;
    background: var(--cream-dark);
    border-radius: 999px;
    overflow: hidden;
}

.mockup-shop__fill {
    display: block;
    height: 100%;
    background: var(--sage);
    border-radius: 999px;
}

.mockup-shop:nth-child(1) .mockup-shop__fill { width: 85%; }
.mockup-shop:nth-child(2) .mockup-shop__fill { width: 68%; }
.mockup-shop:nth-child(3) .mockup-shop__fill { width: 100%; }

.mockup-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-top: 0.9rem;
    padding-top: 0.85rem;
    border-top: 2px solid var(--forest);
}

.mockup-total__label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--charcoal);
}

.mockup-total__value {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--forest);
}

/* ----- 6. Training mode banner ----- */
.mockup-banner {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-align: center;
    color: var(--forest);
    padding: 0.6em 0.8em;
    background: repeating-linear-gradient(
        -45deg,
        var(--sage-mist) 0 12px,
        rgba(220, 230, 225, 0.4) 12px 24px
    );
    border-bottom: 1px solid var(--sage-mist);
}

/* ----- 7. Tap-to-Donate — dark customer-facing screen ----- */
.mockup-content--dark {
    background: linear-gradient(170deg, var(--forest-mid) 0%, var(--ink) 92%);
    text-align: center;
    padding: 1.7rem 1.4rem 1.6rem;
}

.donate-heading {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--cream);
    margin-bottom: 0.25rem;
}

.donate-sub {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--sage-light);
    margin-bottom: 1.3rem;
}

.donate-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}

.donate-tile {
    font-family: var(--font-display);
    font-size: 1.45rem;
    line-height: 1;
    color: var(--cream);
    border: 1.5px solid rgba(248, 246, 240, 0.35);
    border-radius: var(--radius-md);
    padding: 0.95em 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donate-tile--active {
    background: var(--cream);
    border-color: var(--cream);
    color: var(--forest);
}

.donate-custom {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    color: rgba(248, 246, 240, 0.6);
    margin-bottom: 1.25rem;
}

.donate-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.55em;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--cream);
    margin: 0;
}

.donate-hint svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

/* ----- Photo slot spacing (used when photography lands) ----- */
.feature-section__figure {
    margin-top: clamp(2rem, 4vw, 3rem);
}

/* ==========================================================================
   Offline-first loop (section #offline) — till -> in-shop server -> cloud.
   Pure CSS keyframes; timeline is a 12s loop (--ks-loop). With
   prefers-reduced-motion the base states form the static "internet down,
   still selling" frame: queued receipts at the server, greyed cloud line.
   ========================================================================== */
.ks-offline-loop {
    width: min(400px, 100%);
    margin: 0;
}

.ks-flow {
    display: block;
    width: 100%;
    height: auto;
    background: var(--paper);
    border: 1px solid var(--sage-mist);
    border-radius: var(--radius-lg);
}

.ks-flow text {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-anchor: middle;
    fill: var(--text-secondary);
}

.ks-till,
.ks-server {
    fill: var(--paper);
    stroke: var(--forest);
    stroke-width: 2;
}

.ks-cloud {
    fill: var(--paper);
    stroke: var(--sage-mist);
    stroke-width: 2;
    animation-name: ks-cloud;
}

.ks-till-screen,
.ks-till-home,
.ks-server-slot {
    fill: none;
    stroke: var(--sage);
    stroke-width: 1.5;
    stroke-linecap: round;
}

.ks-wifi {
    fill: none;
    stroke: var(--sage);
    stroke-width: 1.75;
    stroke-linecap: round;
}

.ks-wifi-outer {
    animation: ks-wifi 2.4s ease-in-out infinite;
}

.ks-wifi-dot,
.ks-led {
    fill: var(--forest);
}

.ks-chit,
.ks-dot {
    fill: var(--paper);
    stroke: var(--charcoal);
    stroke-width: 1.25;
}

.ks-chit-line {
    stroke: var(--charcoal);
    stroke-width: 0.75;
}

.ks-line {
    stroke: var(--sage);
    stroke-width: 1.5;
    stroke-dasharray: 4, 6;
}

.ks-line-b {
    stroke: var(--sage-mist);
    animation-name: ks-net;
}

.ks-gap {
    fill: var(--paper);
    animation-name: ks-gap;
}

.ks-dot,
.ks-line-b,
.ks-cloud,
.ks-gap,
.ks-phase {
    animation-duration: var(--ks-loop, 12s);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.ks-dot-a { transform: translate(38px, 0); animation-name: ks-dot-a; }
.ks-dot-b { animation-name: ks-dot-b; }
.ks-dot-c { transform: translate(144px, -24px); animation-name: ks-dot-c; }
.ks-dot-d { transform: translate(144px, -12px); animation-name: ks-dot-d; }
.ks-dot-e { transform: translate(144px, 0); animation-name: ks-dot-e; }
.ks-dot-g1 { animation-name: ks-dot-g1; }
.ks-dot-g2 { transform: translate(210px, 0); animation-name: ks-dot-g2; }

.ks-phase-1 { opacity: 0; animation-name: ks-phase-1; }
.ks-phase-2 { animation-name: ks-phase-2; }
.ks-phase-3 { opacity: 0; animation-name: ks-phase-3; }

@keyframes ks-dot-a {
    0%, 1.67% { transform: translate(0, 0); }
    21.67%, 100% { transform: translate(210px, 0); }
}

@keyframes ks-dot-b {
    0%, 11.67% { transform: translate(0, 0); }
    31.67%, 100% { transform: translate(210px, 0); }
}

@keyframes ks-dot-c {
    0%, 23.33% { transform: translate(0, 0); }
    37.17%, 48.8% { transform: translate(144px, 0); }
    51.3%, 63% { transform: translate(144px, -12px); }
    65.5%, 70.83% { transform: translate(144px, -24px); }
    75%, 100% { transform: translate(210px, 0); }
}

@keyframes ks-dot-d {
    0%, 37.5% { transform: translate(0, 0); }
    51.31%, 63% { transform: translate(144px, 0); }
    65.5%, 73.33% { transform: translate(144px, -12px); }
    77.5%, 100% { transform: translate(210px, 0); }
}

@keyframes ks-dot-e {
    0%, 51.67% { transform: translate(0, 0); }
    65.48%, 75.83% { transform: translate(144px, 0); }
    80%, 100% { transform: translate(210px, 0); }
}

@keyframes ks-dot-g1 {
    0%, 86.67% { transform: translate(0, 0); }
    100% { transform: translate(140px, 0); }
}

@keyframes ks-dot-g2 {
    0% { transform: translate(140px, 0); }
    6.67%, 100% { transform: translate(210px, 0); }
}

@keyframes ks-net {
    0%, 33.3% { stroke: var(--sage); }
    34.5%, 68.3% { stroke: var(--sage-mist); }
    69.6%, 100% { stroke: var(--sage); }
}

@keyframes ks-cloud {
    0%, 33.3% { stroke: var(--forest); }
    34.5%, 68.3% { stroke: var(--sage-mist); }
    69.6%, 100% { stroke: var(--forest); }
}

@keyframes ks-gap {
    0%, 33.4% { opacity: 0; }
    34%, 68.3% { opacity: 1; }
    68.9%, 100% { opacity: 0; }
}

@keyframes ks-phase-1 {
    0%, 32.5% { opacity: 1; }
    33.8%, 80.2% { opacity: 0; }
    81.5%, 100% { opacity: 1; }
}

@keyframes ks-phase-2 {
    0%, 33.8% { opacity: 0; }
    35.1%, 67.8% { opacity: 1; }
    69.1%, 100% { opacity: 0; }
}

@keyframes ks-phase-3 {
    0%, 68.8% { opacity: 0; }
    70%, 79% { opacity: 1; }
    80.2%, 100% { opacity: 0; }
}

@keyframes ks-wifi {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
    .ks-offline-loop * {
        animation: none !important;
    }
}
