/* GLOW theme tokens. Every colour, font, size, radius, shadow, spacing and motion value the theme uses lives here.
   glow.css reads these and nothing else. Change a value here to restyle the whole theme. */

@font-face { font-family: "Cabinet Grotesk"; src: url("../../media/fonts/cabinet-grotesk-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cabinet Grotesk"; src: url("../../media/fonts/cabinet-grotesk-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cabinet Grotesk"; src: url("../../media/fonts/cabinet-grotesk-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cabinet Grotesk"; src: url("../../media/fonts/cabinet-grotesk-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  color-scheme: dark;

  /* surfaces, darkest first */
  --ink-0: #08080a;            /* page */
  --ink-1: #0e0e11;            /* panels */
  --ink-2: #141418;            /* cards */
  --ink-3: #1c1c22;            /* raised: chips, inputs */
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --line-3: rgba(255, 255, 255, .24);

  /* text. text-3 is 5.4:1 on ink-1, so it is fine for small print */
  --text: #f4f4f5;
  --text-2: #b0b0b8;
  --text-3: #8a8a93;

  /* the one accent: the orange of Kim's logo, favicon and social profile pictures (#FF4D17, sampled from
     media/apple-touch-icon-km-orange.png). accent-ink on accent is 5.6:1. White on accent is 3.3:1, so white text
     never sits on orange; ink does.
     80/20 (Kim, 17 Nov): about 80% of the page is dark neutrals, about 20% is this orange. Orange means one of three
     things: something to click, a number that proves something, or the logo (plus the small dot on each section
     label). Nothing else gets it. */
  --accent: #ff4d17;
  --accent-hi: #ff6a3d;
  --accent-ink: #15120d;
  --accent-glow: rgba(255, 77, 23, .45);
  --accent-soft: rgba(255, 77, 23, .14);
  --on-accent-line: rgba(21, 18, 13, .2);
  --spot-accent: radial-gradient(60% 70% at 50% 0%, rgba(255, 255, 255, .24), rgba(255, 255, 255, .06) 50%, transparent 75%);
  --r-tile: 12px;                 /* the logo tile, like the profile picture */

  /* headings fade from white to grey, one hue only */
  --head-top: #ffffff;
  --head-bottom: #8f8f98;
  --head-grad: linear-gradient(180deg, var(--head-top) 28%, var(--head-bottom) 100%);

  /* light: the spotlight from the top of a panel, the bright edge above it */
  --spot: radial-gradient(60% 55% at 50% 0%, rgba(255, 255, 255, .11), rgba(255, 255, 255, .03) 45%, transparent 72%);
  --spot-soft: radial-gradient(50% 60% at 50% 0%, rgba(255, 255, 255, .07), transparent 70%);
  --spot-card: radial-gradient(130% 70% at 50% 0%, rgba(255, 255, 255, .055), transparent 65%);   /* cards: a wide soft top light */
  --beam: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7) 50%, transparent);
  --beam-w: min(46%, 560px);
  --glow-under: radial-gradient(50% 50% at 50% 50%, var(--accent-glow), transparent 70%);

  /* dark glass */
  --glass: rgba(22, 22, 27, .62);
  --glass-strong: rgba(14, 14, 17, .82);
  --glass-blur: 14px;
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, .09);

  /* type */
  --font: "Cabinet Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --w-body: 400;
  --w-mid: 500;
  --w-bold: 700;
  --w-head: 800;
  --fs-xs: .78rem;
  --fs-sm: .9rem;
  --fs-md: 1.0625rem;
  --fs-lg: clamp(1.1rem, .9rem + .7vw, 1.3rem);
  --fs-h3: clamp(1.2rem, 1rem + .6vw, 1.45rem);
  --fs-h2: clamp(2rem, 1.1rem + 3.4vw, 3.9rem);
  --fs-h1: clamp(2.6rem, 1.2rem + 5.2vw, 5.4rem);
  --fs-statement: clamp(1.6rem, 1rem + 2.4vw, 3rem);
  --lh-tight: 1.0;
  --lh-head: 1.06;
  --lh-body: 1.55;
  --track-h1: -.045em;
  --track-h2: -.035em;
  --track-label: .02em;

  /* shape: one radius family, soft */
  --r-panel: 28px;
  --r-card: 22px;
  --r-media: 14px;
  --r-pill: 999px;

  /* depth: one shadow language, light from above */
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 30px 60px -30px rgba(0, 0, 0, .8);
  --shadow-screen: 0 40px 80px -24px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .1);
  --shadow-cta: 0 10px 30px -8px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .35);
  --shadow-ink-btn: 0 14px 30px -12px rgba(21, 18, 13, .7), inset 0 1px 0 rgba(255, 255, 255, .12);   /* dark button on the orange panel */
  --tile-edge: inset 0 1px 0 rgba(255, 255, 255, .3);
  --glare: linear-gradient(165deg, rgba(255, 255, 255, .13), transparent 38%);   /* light across each screen */
  --sheen: rgba(255, 255, 255, .075);   /* the pointer light on a card */

  /* space: 4px unit */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --gutter: clamp(16px, 4vw, 40px);
  --inset: clamp(8px, 1.2vw, 14px);       /* how far the big panels sit from the window edge */
  --wrap: 1240px;
  --sec: clamp(72px, 9vw, 140px);          /* space between sections */
  --nav-h: 68px;
  --hero-pad-top: clamp(24px, 3.4vw, 48px);   /* under the nav, above the headline */
  --stage-gap: clamp(32px, 3.4vw, 48px);      /* between the hero buttons and the carousel */

  /* the stage: a 3D carousel of Kim's mockups. Steps and depth are fractions of one slide's width (app.js reads them) */
  --stage-persp: 1800px;
  --deck-w: min(54%, 800px);                /* the slide in the middle */
  --deck-step-1: .64;                       /* how far the first slide on each side sits from the middle */
  --deck-step-2: 1.12;
  --deck-depth: .45;                        /* how far back each step sits */
  --deck-turn: 32deg;                       /* side slides turn toward the middle */
  --deck-shade-1: .45;                      /* side slides sit in shadow */
  --deck-shade-2: .72;
  /* one step: the slide leaving the middle moves out a touch ahead of the arriving one, so their edges pass each other
     (at most 4 px apart, 135-195 ms in) instead of cutting through each other. At --deck-swap the arriving slide is drawn
     on top (app.js reads it and times the swap). Phones space the slides wider, so they get their own pair below. Worked out in the scratchpad deck_search2.py */
  --deck-out-dur: .8s;
  --deck-out-ease: var(--ease-out);
  --deck-in-dur: 1.1s;
  --deck-in-ease: cubic-bezier(.1, 0, .2, 1);
  --deck-swap: .165s;
  --deck-fade: var(--t-mid);                /* slides fade in and out at the far ends faster than they move, so fast clicks
                                               never put a see-through slide in the middle */
  --deck-ctrl-gap: clamp(20px, 2.6vw, 32px);   /* between the slides and the arrows/dots row */
  --deck-ctrl-h: 40px;                         /* the arrows/dots row */
  /* the control row's tap targets. A dot is a 6 px mark inside a button that never drops below 24 px wide, the WCAG 2.5.8
     minimum Lighthouse checks; the current dot is wider and holds the filling pill */
  --deck-btn: 40px;
  --deck-dot-w: 24px;
  --deck-dot-cur: 40px;
  --deck-pill: 28px;
  --deck-play-gap: var(--s-2);                 /* extra room before the pause button */
  /* the eye (vanishing point) sits 40% down the whole stage, slides plus control row, as it did when the stage held the
     perspective. Written against the deck's height, so it holds at every width */
  --deck-eye-y: calc(40% + (var(--deck-ctrl-gap) + var(--deck-ctrl-h)) * .4);
  --deck-interval: 5.2s;                    /* autoplay, paused on hover, on focus and by the pause button */
  /* pointer parallax over the whole window: the deck turns toward the pointer, the slides behind it and the glow drift the
     other way. Follow, far and home are decay rates per second, timed in seconds not frames, so 60 Hz and 144 Hz screens
     feel the same. Half-life is 0.69 / rate: follow 5 = 0.14 s (the deck), far 2.6 = 0.27 s (the glow lags, so it reads as
     farther back), home 2.4 = 0.29 s (the glide back when the pointer leaves the window, a case study opens or focus goes) */
  --par-turn-x: 2.5deg;
  --par-turn-y: 4deg;
  --par-eye: 70px;
  --par-glow: 26px;
  --par-follow: 5;
  --par-follow-far: 2.6;
  --par-home: 2.4;
  --tilt-start: 12deg;                      /* the deck leans back at the top of the page */
  --tilt-end: 2deg;                         /* after scrolling past the hero */
  --tilt-static: 6deg;                      /* when motion is off */

  /* texture: a fine dot grid that fades out. Dots, not grain or noise (the no-grain rule), and always under the content */
  --dot: rgba(255, 255, 255, .075);
  --dot-gap: 22px;
  --dot-grid: radial-gradient(circle at center, var(--dot) 1px, transparent 1.5px);
  --dot-mask-hero: radial-gradient(75% 65% at 50% 22%, #000 15%, transparent 78%);
  --dot-mask-page: radial-gradient(90% 70% at 50% 50%, #000 10%, transparent 75%);

  /* orange glow: behind the headline, behind the carousel, and slow drifting light on the page */
  --glow-head: radial-gradient(closest-side, rgba(255, 77, 23, .2), rgba(255, 77, 23, .07) 55%, transparent);
  --glow-deck: radial-gradient(closest-side, rgba(255, 77, 23, .3), rgba(255, 77, 23, .09) 55%, transparent);
  --glow-page: radial-gradient(closest-side, rgba(255, 77, 23, .12), rgba(255, 77, 23, .035) 55%, transparent);
  --glow-page-size: 64vmax;
  --drift-dur: 42s;
  --drift-x: 9vw;
  --drift-y: 6vh;

  /* client logos: Kim's real files, grey until you point at one, on a slow loop */
  --logo-h: 38px;
  --logo-gap: clamp(44px, 6vw, 96px);
  --logo-dim: .72;
  --logo-mute: grayscale(1) brightness(1.8);
  --marquee-dur: 48s;
  --fade-x: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);

  /* service icons: a raised dark tile with an orange line icon */
  --icon-tile: 48px;
  --icon-tile-bg: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015));
  --icon-tile-glow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 10px 26px -12px var(--accent-glow);
  --icon-tile-hot: 0 0 0 1px rgba(255, 77, 23, .35), 0 12px 32px -10px var(--accent-glow);

  /* light that crosses the orange buttons */
  --shine: linear-gradient(110deg, transparent 36%, rgba(255, 255, 255, .45) 50%, transparent 64%);
  --shine-dur: .9s;
  --shine-every: 7s;

  /* motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: .18s;
  --t-mid: .4s;
  --t-slow: .9s;
  --reveal-dist: 24px;
  --word-dist: .42em;                       /* headline words rise into place one by one */
  --word-step: 60ms;
  --count-dur: 1.5s;                        /* the proof numbers count up */
  --beam-dur: 9s;                           /* the light along the top edge of a lit panel */
}

/* phones: the middle slide fills most of the width and the sides peek in */
@media (max-width: 759px) {
  :root { --deck-in-dur: .85s; --deck-in-ease: cubic-bezier(0, 0, .1, 1); --deck-swap: .18s;   /* edges at most 2 px apart, 155-210 ms */
    --stage-persp: 1100px; --deck-w: 80%; --deck-step-1: .8; --deck-step-2: 1.5; --deck-depth: .4; --deck-turn: 26deg; --logo-h: 30px; --icon-tile: 44px; }
}
/* phones: smaller arrows and a shorter current dot; the dots stay 24 px wide so every one is still a full tap target */
@media (max-width: 599px) {
  :root { --deck-btn: 36px; --deck-dot-cur: 30px; --deck-pill: 20px; }
}
/* under 360 px the row (3 buttons, 8 dots) only fits with 30 px arrows and no extra gap before pause */
@media (max-width: 359px) {
  :root { --deck-btn: 30px; --deck-play-gap: 0px; }
}
