/*
 * OKOA Food — public site.
 *
 * Light. It was drawn dark first, because the logo's arc reads as peach on
 * ink and that is the pairing the brand was designed around — but a dark page
 * asks something of a visitor before it tells them anything, and this one has
 * to persuade a stranger that near-expiry food is safe.
 *
 * The tokens are named for the job they do rather than the colour they are.
 * The last set were called --ink and --cream and used as background and text,
 * which stopped being true the moment either changed.
 *
 * Peach and sage survive as fills. Anything that has to be READ uses the
 * darker pair: peach on white is about 1.8:1, which is a decoration, not a
 * word somebody can make out.
 */
:root {
    /* The page reads light now. The tokens are named for the job they do
       rather than the colour they happen to be, because the last set were
       called --ink and --cream and then used as background and text, which
       stopped being true the moment either changed. */
    --bg: #FBF7F1;
    --surface: #FFFFFF;
    --line: rgba(32, 30, 29, 0.13);

    --text: #201E1D;
    --text-dim: #57514A;
    --text-faint: #837B72;

    /* Text placed ON a dark brand fill — sage-dark, orange — where the page
       colour would vanish. */
    --on-accent: #FBF7F1;

    /* Brand. Peach and sage are light: lovely as fills, unreadable as text on
       a light page, so the darker pair carry anything that has to be read. */
    --orange: #B15C2A;
    --peach: #F6A06B;
    --sage: #AEBF92;
    --sage-light: #CCDBB2;
    --sage-dark: #46523A;

    --wrap: 1120px;
    --radius: 16px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--orange); }

/* Fraunces for the two display sizes and Inter for everything else. The
   headline face carries the warmth a food brand needs; the body face is the
   one that stays legible at 15px on a cheap Android screen, which is most of
   the audience. h3 stays sans so a card title never competes with an h2. */
h1, h2 {
    font-family: Fraunces, Georgia, 'Times New Roman', serif;
    font-weight: 600;
    font-optical-sizing: auto;
    line-height: 1.1;
}

h1 { font-size: clamp(38px, 6.4vw, 66px); margin: 0 0 18px; letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 14px; letter-spacing: -0.015em; }
h3 { font-size: 20px; margin: 0 0 8px; font-family: inherit; font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0 0 18px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sage-dark);
    margin: 0 0 14px;
}

.lead { font-size: 19px; color: var(--text-dim); }
.muted { color: var(--text-dim); }
.rw { color: var(--sage-dark); font-style: italic; }

section { padding: 84px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }

/* ------------------------------------------------------------------ header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(251, 247, 241, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 72px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 34px; width: auto; display: block; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }

.nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.nav a:hover { color: var(--orange); }

/* The menu is a checkbox so it works with scripting off; nothing on this page
   needs JavaScript to be readable. */
.nav-toggle, .nav-toggle-label { display: none; }

/* ------------------------------------------------------------------ buttons */

.btn {
    display: inline-block;
    padding: 14px 26px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary { background: var(--peach); color: var(--text); }
.btn-primary:hover { background: var(--orange); color: var(--on-accent); }

.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--sage-dark); color: var(--sage-dark); }

.btn[aria-disabled="true"] {
    background: rgba(32, 30, 29, 0.07);
    color: var(--text-faint);
    cursor: not-allowed;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* --------------------------------------------------------------------- hero */

.hero { padding: 76px 0 84px; }

.hero h1 .accent { color: var(--orange); }

.hero .tagline {
    font-size: 17px;
    color: var(--sage-dark);
    margin: 0 0 24px;
}

/* A claim, not a decoration: it is the first thing someone deciding whether
   this is a shop or a bin will read. */
.safety {
    display: block;
    border-left: 3px solid var(--sage);
    background: rgba(174, 191, 146, 0.08);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 12px 16px;
    margin: 0 0 22px;
    font-size: 15px;
    color: var(--text);
}

.safety strong { display: block; color: var(--sage-dark); }

/* ------------------------------------------------------------- the deal */

.deal {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
}

/* Wraps, because the date inside it must not. Keeping the name and the date
   on one unbreakable row gave this card a 292px floor, which on a 320px phone
   pushed the whole hero 20px wider than the screen — invisible only because
   the hero clips, so the right edge of the card was being quietly cut off. */
.deal-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.deal-head strong { font-size: 18px; }
.deal-date { font-size: 13px; color: var(--sage-dark); white-space: nowrap; }

.deal-prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding: 24px 0 6px;
}

.deal-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 8px;
}

.deal-was .deal-amount {
    position: relative;
    font-size: 21px;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
}

/* Struck through by a line that is drawn rather than typed, so the markdown
   is something the card does rather than something it states. Fully drawn
   with scripting off — see the .js rules in the motion section. */
.deal-was .deal-amount::after {
    content: "";
    position: absolute;
    left: -3px;
    right: -3px;
    top: 53%;
    height: 2px;
    border-radius: 2px;
    background: var(--peach);
}

.deal-now {
    display: block;
    font-family: Fraunces, Georgia, serif;
    font-weight: 600;
    font-optical-sizing: auto;
    font-size: clamp(26px, 2.6vw, 34px);
    line-height: 1.05;
    color: var(--orange);
    font-variant-numeric: tabular-nums;
    /* The price is the point; breaking it across two lines makes it a
       sentence instead of a number. */
    white-space: nowrap;
}

.deal-save {
    margin: 14px 0 0;
    font-size: 15px;
    color: var(--text-dim);
}

.deal-save strong { color: var(--text); }

.deal-end {
    display: flex;
    gap: 10px;
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--text-dim);
}

.deal-dot {
    flex: none;
    width: 9px;
    height: 9px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--sage);
}

.deal-foot { margin: 16px 0 0; font-size: 13px; color: var(--text-faint); }

/* -------------------------------------------------------------------- facts */

.facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.fact {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
}

.fact .figure {
    font-family: Fraunces, Georgia, serif;
    font-weight: 600;
    font-optical-sizing: auto;
    font-size: 38px;
    line-height: 1;
    color: var(--orange);
    display: block;
    margin-bottom: 10px;
}

.fact p { margin: 0; font-size: 15px; color: var(--text-dim); }

/* -------------------------------------------------------------------- steps */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 40px; }

.step .num {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--sage-dark);
    color: var(--on-accent);
    font-weight: 700;
    margin-bottom: 14px;
}

.step p { font-size: 15px; color: var(--text-dim); margin: 0; }

/* ------------------------------------------------------------------ split */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
}

.card h3 { color: var(--sage-dark); }

.ticks { list-style: none; margin: 0; padding: 0; }

.ticks li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    font-size: 16px;
    color: var(--text-dim);
}

.ticks li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 9px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--sage);
}

/* --------------------------------------------------------------------- app */

.app-band { background: var(--surface); }

.app-note { font-size: 14px; color: var(--text-faint); margin: 18px 0 0; }

/* --------------------------------------------------------------------- faq */

.faq { max-width: 760px; }

.faq details {
    border-top: 1px solid var(--line);
    padding: 18px 0;
}

.faq details:last-of-type { border-bottom: 1px solid var(--line); }

.faq summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 17px;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: "+";
    color: var(--orange);
    font-size: 22px;
    line-height: 1;
    flex: none;
}

.faq details[open] summary::after { content: "–"; }

.faq details p { margin: 12px 0 0; color: var(--text-dim); font-size: 16px; }

/* ----------------------------------------------------------------- contact */

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }

.field { margin-bottom: 16px; }

.field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.field input, .field select, .field textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 16px;
}

.field input:focus, .field select:focus, .field textarea:focus {
    outline: 2px solid var(--sage);
    outline-offset: 1px;
}

.field textarea { min-height: 130px; resize: vertical; }

.field .error { color: var(--orange); font-size: 14px; margin-top: 6px; display: block; }

/* Bots fill everything; people never see this. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice {
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 15px;
    border: 1px solid var(--sage-dark);
    background: rgba(174, 191, 146, 0.1);
    color: var(--sage-dark);
}

.channels { list-style: none; margin: 22px 0 0; padding: 0; }
.channels li { margin-bottom: 14px; font-size: 16px; }
.channels .what { display: block; font-size: 13px; color: var(--text-faint); }

/* ------------------------------------------------------------------ footer */

.site-footer {
    border-top: 1px solid var(--line);
    padding: 48px 0 40px;
    font-size: 15px;
    color: var(--text-dim);
}

.footer-grid { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }

.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); text-decoration: none; }
.footer-links a:hover { color: var(--orange); }

.legal {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--text-faint);
    display: flex;
    flex-wrap: wrap;
    gap: 12px 26px;
    justify-content: space-between;
}

/* ------------------------------------------------------------------ mobile */

@media (max-width: 900px) {
    .split, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .facts, .steps { grid-template-columns: 1fr; }
    section { padding: 64px 0; }
    .hero { padding: 48px 0 60px; }

    .nav-toggle-label {
        display: block;
        margin-left: auto;
        padding: 8px 14px;
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
    }

    .nav {
        display: none;
        order: 3;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 8px 0 20px;
        margin-left: 0;
    }

    /* The button keeps its own padding, or the label sits on its left edge. */
    .nav a:not(.btn) { padding: 10px 0; font-size: 17px; }
    .nav .btn { margin-top: 10px; }

    .nav-toggle:checked ~ .nav { display: flex; }

    .site-header .wrap { flex-wrap: wrap; }
}

/* -------------------------------------------------------- prose documents */

.doc { max-width: 720px; padding: 64px 0 90px; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); }
.doc h2 { font-size: 24px; margin: 38px 0 10px; font-family: Figtree, sans-serif; font-weight: 800; }
.doc p, .doc li { color: var(--text-dim); font-size: 16px; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 8px; }

.doc .stamp {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
    background: var(--sage);
    border-radius: 999px;
    padding: 4px 12px;
    margin-bottom: 20px;
}

/* ===================================================================== motion
 *
 * Two rules govern everything below.
 *
 * Nothing here may be load-bearing. Every animated element is readable and
 * complete with scripting off, because the reveal styles only exist under
 * `.js`, which only appears when the observer does.
 *
 * And motion is a setting, not a taste. The reduced-motion block at the end
 * puts every animation into its finished state rather than merely speeding it
 * up — a vestibular disorder is not a reason to see less of the page.
 */

/* ------------------------------------------------------------ the reveal */

.js .reveal,
.js .deal,
.js .track,
.js .split > *,
.js .facts .fact,
.js .steps .step {
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 0.6s cubic-bezier(0.22, 0.61, 0.24, 1),
        transform 0.6s cubic-bezier(0.22, 0.61, 0.24, 1);
}

.js .reveal.is-in,
.js .deal.is-in,
.js .track.is-in,
.js .split.is-in > *,
.js .facts.is-in .fact,
.js .steps.is-in .step {
    opacity: 1;
    transform: none;
}

/* Staggered, so a row reads left to right rather than arriving as a slab. */
.js .split.is-in > *:nth-child(2),
.js .facts.is-in .fact:nth-child(2),
.js .steps.is-in .step:nth-child(2) { transition-delay: 0.1s; }

.js .facts.is-in .fact:nth-child(3),
.js .steps.is-in .step:nth-child(3) { transition-delay: 0.2s; }

/* --------------------------------------------------- the deal, demonstrated
 *
 * One markdown, drawn once. The old card animated a discount deepening down a
 * ladder of dates; that is not what happens, so the animation went with it.
 * All this does is strike the shelf price and bring ours in behind it.
 */

.js .deal-was .deal-amount::after { right: 100%; }

.js .deal.is-in .deal-was .deal-amount::after {
    animation: deal-strike 0.45s cubic-bezier(0.22, 0.61, 0.24, 1) 0.3s forwards;
}

@keyframes deal-strike {
    to { right: -3px; }
}

.js .deal .deal-now { opacity: 0; transform: translateY(6px); }

.js .deal.is-in .deal-now {
    animation: deal-land 0.5s cubic-bezier(0.22, 0.61, 0.24, 1) 0.55s forwards;
}

@keyframes deal-land {
    to { opacity: 1; transform: none; }
}

/* ------------------------------------------------ the delivery, demonstrated
 *
 * Tracking is the one feature on this page a sentence genuinely cannot show.
 * The rider moves and the line fills in behind them, which is exactly what
 * the buyer sees.
 */

.track {
    margin-top: 40px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 26px 18px;
}

.track-head {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    margin-bottom: 6px;
}

.track-head strong { font-weight: 700; }

.track-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sage-dark);
}

/* Solid, not blinking. The moto is the only thing in this card that should
   move: a pulsing dot beside it was a second animation competing for the eye
   with the one that actually demonstrates something. */
.track-live i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sage);
}

.track-map { display: block; width: 100%; height: auto; }

.track-map .route {
    fill: none;
    stroke: rgba(32, 30, 29, 0.14);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.track-map .route-done {
    fill: none;
    stroke: var(--peach);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
}

.js .track-map .route-done { stroke-dashoffset: 100; }

.js .track.is-in .route-done {
    animation: route-fill 9s linear infinite;
}

@keyframes route-fill {
    0%        { stroke-dashoffset: 100; }
    80%, 100% { stroke-dashoffset: 0; }
}

.track-map .pin circle { fill: var(--sage-dark); stroke: var(--sage); stroke-width: 2; }
.track-map .pin-home circle { fill: rgba(246, 160, 107, 0.2); stroke: var(--peach); }
.track-map .pin text { fill: var(--text-faint); font-size: 13px; font-weight: 600; text-anchor: middle; }

/* Was a dot with a halo round it. A halo says "something is here"; a moto
   with a box on the back says what is here and which way it is going. The
   halo survives as the shadow it always half looked like. */
.track-map .rider-halo { fill: rgba(246, 160, 107, 0.22); }

.track-map .moto-tyre { fill: #201E1D; }
.track-map .moto-rim { fill: var(--surface); }
.track-map .moto-body { fill: var(--orange); }
.track-map .moto-box { fill: var(--peach); }
.track-map .moto-helmet { fill: var(--orange); }
.track-map .moto-lamp { fill: #FFE7C4; stroke: var(--orange); stroke-width: 1; }

.track-map .moto-strap,
.track-map .moto-strut,
.track-map .moto-fork,
.track-map .moto-bar,
.track-map .moto-leg,
.track-map .moto-torso,
.track-map .moto-arm,
.track-map .moto-visor {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.track-map .moto-strap { stroke: rgba(32, 30, 29, 0.22); stroke-width: 1.4; }
.track-map .moto-strut { stroke: var(--orange); stroke-width: 2.2; }
.track-map .moto-fork { stroke: #201E1D; stroke-width: 2.6; }
.track-map .moto-bar { stroke: #201E1D; stroke-width: 2.4; }
.track-map .moto-leg { stroke: var(--sage-dark); stroke-width: 3.6; }
.track-map .moto-torso { stroke: var(--sage-dark); stroke-width: 6.6; }
.track-map .moto-arm { stroke: var(--sage-dark); stroke-width: 3.2; }
.track-map .moto-visor { stroke: var(--bg); stroke-width: 1.6; }

/* Parked at the door until the section is on screen, so the loop starts where
   the eye arrives rather than halfway along. */
.track-map .rider { transform: translate(56px, 84px); }

.js .track.is-in .rider { animation: rider-run 9s linear infinite; }

/* The turns of the route, timed by how far apart they are, so the speed is
   constant and the dot never skates through a corner. */
@keyframes rider-run {
    0%        { transform: translate(56px, 84px); }
    17.3%     { transform: translate(196px, 84px); }
    26.2%     { transform: translate(256px, 44px); }
    43%       { transform: translate(392px, 44px); }
    53.4%     { transform: translate(462px, 92px); }
    70.7%     { transform: translate(602px, 92px); }
    80%, 100% { transform: translate(664px, 50px); }
}

/* Kigali is hills, and a moto held level through them would read as a
   sticker sliding over the drawing rather than something on the road. It
   leans to the gradient of the leg it is on.
 *
 * The pivot is the group's own origin, which is the point riding the route —
 * so the wheels stay on the line through the tilt instead of swinging off it.
 *
 * Angles are the segments' own: atan2 of each leg of the path above, which is
 * why they are not round numbers. The pairs of percentages hold an angle for
 * the length of a leg and then turn over about a fifth of a second, so the
 * moto turns AT the corner rather than easing across the whole straight. */
.track-map .rider-lean { transform-origin: 0 0; }

.js .track.is-in .rider-lean { animation: rider-lean 9s linear infinite; }

@keyframes rider-lean {
    0%, 16.4%    { transform: rotate(0deg); }
    18.2%, 25.3% { transform: rotate(-33.69deg); }
    27.1%, 42.1% { transform: rotate(0deg); }
    43.9%, 52.6% { transform: rotate(34.44deg); }
    54.4%, 69.9% { transform: rotate(0deg); }
    71.7%, 79.1% { transform: rotate(-34.11deg); }
    80.9%, 100%  { transform: rotate(0deg); }
}

.track-foot { margin: 10px 0 0; font-size: 13px; color: var(--text-faint); }

/* ------------------------------------------------------ small interactions */

.btn {
    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn[aria-disabled="true"]:hover { transform: none; }

.card, .fact {
    transition:
        transform 0.28s cubic-bezier(0.22, 0.61, 0.24, 1),
        border-color 0.28s ease;
}

.card:hover, .fact:hover {
    transform: translateY(-3px);
    border-color: rgba(174, 191, 146, 0.32);
}

.nav a, .footer-links a { transition: color 0.18s ease; }

.faq summary::after { transition: transform 0.2s ease, color 0.2s ease; }
.faq summary:hover::after { color: var(--sage-dark); }
.faq details[open] summary::after { transform: rotate(180deg); }

@keyframes faq-open {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: none; }
}

.faq details[open] p { animation: faq-open 0.26s ease both; }

/* --------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    /* Finished, not merely fast. Everything below is the last frame. */
    .js .reveal,
    .js .deal,
    .js .track,
        .js .split > *,
    .js .facts .fact,
    .js .steps .step,
    .js .deal .deal-now {
        opacity: 1;
        transform: none;
    }

    .js .deal-was .deal-amount::after { right: -3px; }

    /* A hero that cycles photographs for as long as somebody is on the page
       is precisely what this setting is asking us not to do. It becomes one
       still picture with one message: the first of each, held.
       
       The words have to freeze with the picture. Stopping only the slides
       would leave the second message sitting over the first photograph,
       which is worse than either moving. */
    .hero-slide,
    .hero-message {
        animation: none !important;
        transform: none !important;
        opacity: 0;
    }

    .hero-slide:first-child,
    .hero-message:first-child { opacity: 1; }
    .js .track-map .route-done { stroke-dashoffset: 0; }
    .track-map .rider { transform: translate(664px, 50px); }

    .btn:hover, .card:hover, .fact:hover { transform: none; }
}

/* The marker needs room only where there is room. */
@media (max-width: 560px) {
    .deal-prices { grid-template-columns: 1fr; gap: 20px; }
    /* 28px each side is a fifth of a small phone's screen. */
    .deal { padding: 22px; }
}

/* ================================================================= surfaces
 *
 * Depth without photography.
 *
 * The honest problem with a photograph here is that OKOA has none of its own
 * yet, and a stock picture of somebody else's supermarket tells a visitor
 * something untrue on the one page where trust is the whole product. So the
 * background is built rather than shot: two brand-coloured glows, a little
 * grain, and a slot the day a real store is photographed.
 */

body {
    background-color: var(--bg);
    background-image:
        radial-gradient(1100px 680px at 84% -8%, rgba(246, 160, 107, 0.16), transparent 64%),
        radial-gradient(900px 620px at -8% 38%, rgba(174, 191, 146, 0.14), transparent 62%);
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Film grain. Flat dark panels band badly on cheap screens; a little noise
   breaks the gradient up and costs one inlined SVG. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------- the hero slides
 *
 * Photographs behind the words, cross-fading on a loop.
 *
 * Done in CSS rather than script, because a slideshow driven by JavaScript is
 * an empty box to anyone without it — and here the first frame is painted
 * before anything runs. Each slide holds for a third of the cycle and fades
 * across the boundary, which is why the keyframes overlap.
 */

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    /* Room for the photographs. Squeezed into the old padding they were a
       strip behind the text rather than the thing carrying the section. */
    display: flex;
    align-items: center;
    min-height: 78vh;
}

@media (max-width: 900px) {
    .hero { min-height: 0; }
}

.hero-slides {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    /* A slow pan to the left. It was a zoom, which on a photograph of food
       reads as a camera pushing in on somebody's dinner; a pan just moves
       the eye across the frame and gets out of the way. */
    animation:
        hero-fade calc(var(--slides, 3) * 7s) infinite,
        hero-pan calc(var(--slides, 3) * 7s) infinite;
    animation-delay: calc(var(--i) * 7s);
}

/* A single photograph is a still, not a slideshow: without this the one slide
   fades out at the end of its turn and never comes back. */
.hero-slides.single .hero-slide { animation: none; opacity: 1; }

/* The first one is painted immediately, so there is never a blank hero while
   the cycle starts. */
/* The picture fills its slide the way the background used to. */
.hero-slide picture,
.hero-slide img {
    position: absolute;
    top: 0;
    left: 0;
    /* Wider than the box it sits in, because a frame that travels left would
       otherwise drag a strip of blank page in behind its right edge. */
    width: 106%;
    height: 100%;
    object-fit: cover;
    object-position: center 55%;
}

.hero-slide:first-child { opacity: 1; }

@keyframes hero-fade {
    0%   { opacity: 0; }
    3%   { opacity: 1; }
    30%  { opacity: 1; }
    36%  { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes hero-pan {
    0%   { transform: translateX(0); }
    36%  { transform: translateX(-4.5%); }
    100% { transform: translateX(-4.5%); }
}

/* The veil. Paper-coloured, because the words over it are ink — heavy on the
   left where they are, thin on the right where the price card sits and the
   photograph can be a photograph. */
.hero.has-slides::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        /* A wash rather than a wall. The words carry their own shadow and
           the price card its own glass, so this only has to take the edge
           off the photograph rather than bury it. */
        linear-gradient(96deg,
            rgba(251, 247, 241, 0.82) 0%,
            rgba(251, 247, 241, 0.58) 26%,
            rgba(251, 247, 241, 0.34) 50%,
            rgba(251, 247, 241, 0.3) 100%),
        linear-gradient(to bottom,
            rgba(251, 247, 241, 0.4),
            transparent 18%,
            rgba(251, 247, 241, 0.5) 86%,
            var(--bg));
}

/* --------------------------------------------------- the rotating words */

/* Everything sits on the pictures: the rotating words on the left, the price
   on the right, one continuous background running behind the lot. */
.hero-stage {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 52px;
    align-items: center;
    max-width: var(--wrap);
}

@media (max-width: 900px) {
    .hero-stage { grid-template-columns: 1fr; gap: 34px; }
}

/* The messages are stacked, so the stage has to hold the tallest of them or
   the page would jump every seven seconds. */
.hero-messages {
    position: relative;
    min-height: 15.5em;
    margin: 6px 0 4px;
}

.hero-message {
    position: absolute;
    inset: 0;
    opacity: 0;
    animation: hero-fade calc(var(--slides, 3) * 7s) infinite;
    animation-delay: calc(var(--i) * 7s);
}

/* Same reason as the slides: something has to be on screen before the
   animation gets its first turn. */
.hero-message:first-child { opacity: 1; }

/* And the same fix: one message is a headline, not a rotation. The animation
   would otherwise override the rule above and blink the only frame away a
   couple of seconds in — which is what happens with a single photograph, or
   with none at all. */
.hero-messages.single .hero-message { animation: none; opacity: 1; }

.hero-message h1 { margin-bottom: 14px; }
.hero-message .tagline { margin: 0; max-width: 30ch; }

@media (max-width: 900px) {
    .hero-messages { min-height: 13.5em; }
}

@media (max-width: 560px) {
    .hero-messages { min-height: 12em; }
}

/* ------------------------------------------------------ the price, below */

/* The hero has no top border: the pictures start where the header ends. */
.hero.has-slides { border-top: 0; }

.hero.has-slides .eyebrow,
.hero.has-slides h1,
.hero.has-slides .tagline,
.hero.has-slides .lead {
    text-shadow: 0 1px 10px rgba(251, 247, 241, 0.95), 0 1px 2px rgba(251, 247, 241, 0.85);
}

.hero.has-slides .safety {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(6px);
}

/* The price card floats on a moving picture, so it needs to be opaque enough
   to stop the picture reading through the numbers. */
.hero.has-slides .deal {
    background-color: rgba(255, 255, 255, 0.86);
    background-image: none;
    backdrop-filter: blur(14px) saturate(1.1);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 24px 60px -30px rgba(32, 30, 29, 0.55);
}

/* One column on a phone: the pictures are behind everything rather than
   beside anything, so the veil has to cover the lot. */
@media (max-width: 900px) {
    .hero.has-slides::after {
        background:
            linear-gradient(to bottom,
                rgba(251, 247, 241, 0.93) 0%,
                rgba(251, 247, 241, 0.88) 45%,
                rgba(251, 247, 241, 0.95) 80%,
                var(--bg));
    }
}

/* Panels lift off the background rather than sitting flat on it. */
.deal, .card, .fact, .track {
    background-image: linear-gradient(160deg, rgba(32, 30, 29, 0.02), transparent 46%);
    box-shadow: 0 1px 0 rgba(32, 30, 29, 0.04) inset, 0 18px 40px -28px rgba(0, 0, 0, 0.9);
}

.app-band {
    background-image: linear-gradient(to bottom, rgba(32, 30, 29, 0.02), transparent);
}


/* ==================================================================== more
 *
 * The page said too much at once. The detail is still here — a shop deciding
 * whether to trust us with stock will want it — but it is a click away
 * instead of in front of everyone.
 *
 * A <dialog> is hidden until script opens it, which would lose the content
 * entirely for anyone without JavaScript. So without `.js` it is not a dialog
 * at all: it renders as ordinary text where it stands, and the button that
 * would have opened it disappears.
 */

.more {
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    margin-top: 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--orange);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.more::after { content: "→"; transition: transform 0.18s ease; }
.more:hover::after { transform: translateX(3px); }

/* No script: the button is meaningless and the detail is simply on the page. */
.more { display: none; }
.js .more { display: inline-flex; }

dialog.sheet {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0;
    max-width: 540px;
    width: calc(100% - 40px);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.45);
}

dialog.sheet::backdrop { background: rgba(32, 30, 29, 0.45); }

.sheet-body { padding: 26px 26px 22px; }
.sheet-body h3 { margin-bottom: 10px; }
.sheet-body p { color: var(--text-dim); font-size: 16px; }
.sheet-body p:last-of-type { margin-bottom: 0; }
.sheet-body .ticks { margin-top: 14px; }

.sheet-close {
    appearance: none;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    margin: 0 26px 24px;
    cursor: pointer;
}

.sheet-close:hover { border-color: var(--sage-dark); color: var(--sage-dark); }

/* Without script the dialog is not a dialog: no overlay, no chrome, just the
   words in the place they were written. */
html:not(.js) dialog.sheet {
    display: block;
    position: static;
    max-width: none;
    width: auto;
    border: 0;
    box-shadow: none;
    background: none;
}

html:not(.js) .sheet-body { padding: 0; }
html:not(.js) .sheet-body h3 { display: none; }
html:not(.js) .sheet-close { display: none; }


/* The card's quiet lines — the donation note and the footnote — are the ones
   a photograph shows through first, so on the pictures they stop being quiet. */
.hero.has-slides .deal-end,
.hero.has-slides .deal-foot { color: var(--text-dim); }

.hero.has-slides .deal-foot { font-size: 13.5px; }

/* The three things OKOA is not. They sit under the guarantee cards because
   that is where somebody who is still unsure will be looking. */
.guarantee-list {
    margin-top: 30px;
    max-width: 62ch;
}

.guarantee-list li { font-size: 16px; }
.guarantee-list li strong { color: var(--text); }


/* ================================================================ app art
 *
 * The download band was two columns of words. The drawing carries the one
 * thing the words cannot: what the screen actually says when a delivery is on
 * its way — a plate, a countdown, and the button that closes the sale.
 *
 * It is narrower than the copy column because it is an illustration, not a
 * screenshot, and giving it equal weight makes the section about the picture.
 */

.app-split { grid-template-columns: 0.78fr 1fr; align-items: center; }

.app-art { display: flex; justify-content: center; }

.app-art img {
    width: 100%;
    max-width: 400px;
    height: auto;
}

.app-card { margin-top: 30px; }

@media (max-width: 900px) {
    /* Stacked, the drawing goes second: somebody on a phone came here for the
       download button, not the artwork. 900px, not a value of its own: the
       rest of the page breaks there, and .app-split is declared after that
       rule so a narrower one would have left this band two-up on its own. */
    .app-split { grid-template-columns: 1fr; }
    .app-art { order: 2; }
    .app-art img { max-width: 290px; }
}


/* =================================================================== impact
 *
 * The Sustainable Development Goals, in the official colours and numbering —
 * the part that makes a goal recognisable at a glance — with pictograms drawn
 * here rather than the UN's own set, which a commercial entity needs
 * permission for.
 *
 * White on every tile, which is how the goals are actually represented, at
 * full strength rather than toned down to suit the page.
 *
 * An earlier pass used dark ink on the three light tiles because white on
 * Goal 2's gold is only about 2.2:1. That was the right instinct applied to
 * the wrong element. Contrast rules bite on text that is the only way to get
 * a piece of information — and here it is not: every tile is aria-hidden,
 * the goal number is printed beside it in ink at 12:1, and the goal's name
 * is a heading. The tile identifies; it does not inform on its own.
 *
 * What that does oblige is glyphs that survive a weak ratio: solid white
 * shapes and a heavy numeral, never a hairline. A thin stroke on #DDA63A
 * disappears where a fat one reads fine.
 */

.sdg-1  { --goal: #E5243B; }
.sdg-2  { --goal: #DDA63A; }
.sdg-8  { --goal: #A21942; }
.sdg-11 { --goal: #FD9D24; }
.sdg-12 { --goal: #BF8B2E; }

.sdgs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 34px 0 0;
}

.sdg {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

/* Square, because that is the shape a goal comes in. */
.sdg-tile {
    flex: 0 0 auto;
    width: 104px;
    height: 104px;
    padding: 12px;
    border-radius: 10px;
    background: var(--goal);
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sdg-num { font-size: 31px; font-weight: 800; line-height: 1; letter-spacing: -0.01em; }
.sdg-tile svg { width: 50px; height: 50px; align-self: flex-end; }

/* The number again, in ink. This is the copy that has to be readable, which
   frees the tile to be the full-strength colour it should be. */
.sdg-goal {
    margin: 0 0 4px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.sdg-body h3 { margin: 0 0 8px; font-size: 19px; color: var(--sage-dark); }
.sdg-body p { margin: 0; font-size: 16px; color: var(--text-dim); }

.sdg-count {
    margin-top: 12px !important;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 15px !important;
}

.sdg-count strong { color: var(--text); }

.sdg-also-label {
    margin: 34px 0 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.sdg-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    margin: 14px 0 0;
}

.sdg-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 20px 6px 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 15px;
}

/* Same bargain as the tiles: the badge is aria-hidden and the goal is named
   in ink right beside it, so a reader who cannot pick out the 11 on orange
   has lost nothing — they can still read "Sustainable cities and
   communities". */
.sdg-badge {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: var(--goal);
    color: #FFFFFF;
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
}

.sdg-note {
    margin: 26px 0 0;
    max-width: 62ch;
    font-size: 13.5px;
    color: var(--text-faint);
}

/* Read aloud, not drawn: the tiles are aria-hidden because "12" on its own
   tells a screen reader nothing, so the goal number is spoken here instead. */
.vh {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 900px) {
    .sdgs { grid-template-columns: 1fr; }
    .sdg { padding: 20px; gap: 16px; }
    .sdg-tile { width: 80px; height: 80px; padding: 10px; }
    .sdg-num { font-size: 24px; }
    .sdg-tile svg { width: 38px; height: 38px; }
}


/* ------------------------------------------------------------- step scenes
 *
 * A little stage under each of the three ways in. The tint is what makes
 * them read as one set rather than three loose drawings, and it gives the
 * pale parts of each scene — the paper, the tin's label — something to sit
 * against on a near-white page.
 */

.step-art {
    background: rgba(204, 219, 178, 0.3);
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 18px;
}

.step-art svg { display: block; width: 100%; height: auto; }

@media (max-width: 900px) {
    /* Stacked, the scenes would each be as wide as the column and tower over
       their own captions. */
    .step-art { max-width: 230px; padding: 10px 14px; }
}


/* ---------------------------------------------------------- the drawn hero
 *
 * An alternative to the photographs, behind SITE_HERO=art. Anchored to the
 * bottom rather than centred: the picture is a landscape with everything
 * that matters along the horizon, so cropping it from the top loses sky and
 * cropping it from the bottom loses the whole scene.
 */

.hero-art {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    display: block;
}

/* The drawing needs more height than a photograph does: a photograph is
   cropped wherever it is cropped, but this one has a horizon, and squeezing
   it puts the shop behind the buttons. */
.hero-drawn { min-height: 86vh; }

@media (max-width: 900px) {
    .hero-drawn { min-height: 0; }
}

@media (max-width: 900px) {
    /* A band along the bottom at its own proportions, with the sky carried on
       in flat colour above it. Cropping cannot rescue a 2:1 drawing inside a
       0.38:1 box — there is no framing of it that still contains the scene. */
    .hero-art { background: #FBF7F1; }

    .hero-art picture,
    .hero-art img {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        height: auto;
        object-fit: contain;
        object-position: center bottom;
    }
}
