/* ==========================================================================
   Design tokens — Joseph Stallmeyer portfolio
   Distilled from the 2020–22 site (_legacy/style.css). Change values here,
   not in site.css, so every page stays consistent.
   ========================================================================== */

:root {
  /* ---- Color: brand ---------------------------------------------------- */
  --orange: #FF8853;            /* primary accent, gradient base            */
  --coral:  #FB5F5F;            /* gradient mid                             */
  --pink:   #F84467;            /* gradient hot spot, hover                 */

  /* Signature gradients (from the banner + nav strips) */
  --gradient-hero:  radial-gradient(ellipse 42% 80% at 60% 28%,
                      var(--pink) 0%, var(--coral) 45%, var(--orange) 100%);
  --gradient-strip: radial-gradient(circle at 60% 110%, var(--orange), var(--coral));
  --gradient-strip-hover: radial-gradient(circle at 40% 240%, var(--coral), var(--orange));

  /* ---- Color: neutrals ------------------------------------------------- */
  --ink:        #1D1D21;        /* body text, headings                      */
  --ink-muted:  #808088;        /* subtitles (was #aaaaaa — darkened for
                                   readability; passes AA at heading sizes) */
  --on-accent:  #FAFAFA;        /* text on gradient / dark                  */
  --paper:      #FFFFFF;        /* default background                       */
  --paper-alt:  #F8F8F8;        /* alternating case-study bands             */
  --paper-dark: #1E1E1E;        /* dark band (from the MTH page)            */
  --fox-red:    rgb(183 8 21);  /* Foxy band: glow edge + flat fallback (matched by eye to the video) */
  --fox-glow:   rgb(151 21 52); /* Foxy band: glow centre (matched by eye to the video)          */
  --line:       #DDDDDD;        /* rules, table borders, footer text        */
  --logo-tile:  #F8F8F8;        /* light tile behind black logo marks in dark mode */
  /* Illustration & Animation bands — sampled from the artwork */
  --stamp-green:  rgb(80 136 111);  /* circuit-board green on the stamps   */
  --poster-blue:  rgb(0 128 255);   /* "Why not one?" poster background     */
  --off-white:    #F5F1E8;          /* behind the booby illustration        */
  --ink-on-light: #1D1D21;          /* text on off-white (stays dark in dark mode) */

  /* ---- Type ------------------------------------------------------------ */
  --font: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --fs-display: clamp(2rem, 5.5vw, 2.75rem);    /* project title          */
  --fs-h1:      clamp(1.6rem, 3.4vw, 1.9rem);   /* home greeting          */
  --fs-h2:      clamp(1.3rem, 2.8vw, 1.7rem);   /* section headings (CAPS)*/
  --fs-h3:      clamp(0.95rem, 1.8vw, 1.15rem); /* subtitles              */
  --fs-body:    clamp(0.9rem, 1.4vw, 0.95rem);
  --fs-small:   0.8rem;

  --fw-light: 300;
  --fw-regular: 400;
  --fw-semibold: 600;
  --fw-bold: 700;

  --lh-tight: 1.1;
  --lh-body: 1.6;

  /* ---- Space & layout -------------------------------------------------- */
  --gutter:      clamp(1.25rem, 6vw, 5rem);   /* page side padding        */
  --section-y:   clamp(2rem, 5.5vw, 4.25rem); /* band top/bottom padding  */
  --gap:         clamp(1.25rem, 3vw, 2.75rem);/* split + card grid gap    */
  --gap-tight:   clamp(0.75rem, 2vw, 1.25rem);/* media grid gap           */
  --stack-gap:   2rem;                        /* space between stacked blocks */
  --sheet-overlap: 6px;                       /* stamp sheet overlap      */
  --hero-h:      clamp(230px, 36vh, 340px);  /* home header height        */
  --hero-peek:   6px;                         /* header strip left showing after scrolling */
  --viewer-gap:  1rem;                        /* black gap between photos in the viewer */
  --strip-h: calc(1.6rem + var(--fs-body) * var(--lh-body)); /* orange bar height
                                                 (0.8rem padding x2 + one line) */
  --content-max: 820px;                       /* grid + split width       */
  --cards-max:   700px;                       /* home page card grid width */
  --card-gap-phone: 2.5rem;                   /* space between home cards on phones (40px) */
  --wide-max:    1000px;                      /* photography gallery      */
  --gallery-gap: 1rem;                        /* photo grid: above the grid + between photos (16px) */
  --prose-max:   36rem;                       /* comfortable reading width*/
  --media-scale: 85%;                         /* .narrow column: videos + the
                                                 titles/text aligned to them  */

  /* ---- Shape & motion -------------------------------------------------- */
  --radius:     10px;
  --thumb-ratio: 1 / 1;         /* home cards — square, like the old site   */
  --dur-zoom:   0.5s;           /* thumbnail zoom                           */
  --dur-strip:  1s;             /* nav strip hover fade                     */
  --ease:       ease;
  --zoom-scale: 1.12;           /* was 1.2 — a touch calmer                 */
}

/* ---- Dark mode: follows the device setting (Settings → Appearance) ------------
   The toggle in the bottom bar (js/theme.js) can force light or dark instead.
   Only the neutrals change; orange gradients, strips and the coloured bands
   stay the same. Letterforms flip to white; black logo marks get a light tile
   (see site.css). Pages with <body class="dark-swap"> reverse the two blacks (below). */
:root { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:        #EDEDEF;      /* text                                     */
    --ink-muted:  #9A9AA2;      /* subtitles, footer                        */
    --paper:      #000000;      /* default background (true black)          */
    --paper-alt:  #121214;      /* alternating bands                        */
    --line:       #333338;      /* rules                                    */
  }
}
/* Forced theme, set by the toggle in the bottom bar (js/theme.js). */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
    --ink:        #EDEDEF;      /* text                                     */
    --ink-muted:  #9A9AA2;      /* subtitles, footer                        */
    --paper:      #000000;      /* default background (true black)          */
    --paper-alt:  #121214;      /* alternating bands                        */
    --line:       #333338;      /* rules                                    */
}
/* Pages with <body class="dark-swap"> reverse the two blacks in dark mode:
   alternating bands go true black, plain bands go #121214. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dark-swap { --paper: #121214; --paper-alt: #000000; }
}
:root[data-theme="dark"] .dark-swap { --paper: #121214; --paper-alt: #000000; }

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-zoom: 0s;
    --dur-strip: 0s;
    --zoom-scale: 1;
  }
}

/* ---- Page accent: potion (blue → purple) ---------------------------------------
   <body class="accent-potion"> swaps the orange family for the Token Flask icon's
   blue → purple on that page (strips, buttons, hero). The gradients are redeclared
   here because they're worked out from the colours where they're defined. */
.accent-potion {
  --orange: #3A8DFF;            /* gradient base  → bright blue             */
  --coral:  #6B4BEF;            /* gradient mid   → indigo                  */
  --pink:   #A62FDB;            /* hot spot/hover → deep purple             */
  --gradient-hero:  radial-gradient(ellipse 42% 80% at 60% 28%,
                      var(--pink) 0%, var(--coral) 45%, var(--orange) 100%);
  --gradient-strip: radial-gradient(circle at 60% 110%, var(--orange), var(--coral));
  --gradient-strip-hover: radial-gradient(circle at 40% 240%, var(--coral), var(--orange));
}
