/* ============================================================
   ADAM GALANTE — DESIGN TOKENS
   The single source of truth for the site's look. Every page loads
   this file first; every other stylesheet reads from it with var().
   Change a value here and it changes everywhere it is used.

   Layers (use the highest layer that fits):
     1. Primitives  — raw palette / scale values (--palette-*, --space-*)
     2. Semantic    — what a value is FOR (--color-bg, --color-text-muted)
     3. Legacy      — older names kept as aliases so nothing breaks
                      (--white, --footer-base, --td-bg …). Prefer the
                      semantic names in new work.

   Figma mirror: the "Portfolio · Tokens" variable collections in the
   Capstone I file use these same names (slashes instead of dashes,
   e.g. color/bg  <->  --color-bg).
   ============================================================ */
:root{

  /* ---------- 1. PRIMITIVES · palette ---------- */
  --palette-black:#000000;
  --palette-white:#ffffff;
  --palette-ink-900:#0C0F0F;     /* deepest dark (lightbox, menu panel, gallery tiles) */
  --palette-ink-800:#111718;     /* title / facts bands */
  --palette-ink-700:#1A2223;     /* page background */
  --palette-ink-600:#1f1f1f;     /* footer + dark sections */
  --palette-ink-500:#141414;     /* dark media plate */
  --palette-grey-300:#bebebe;    /* rail icons */
  --palette-grey-200:#b7b7b7;    /* nav hover */
  --palette-grey-100:#d8d8d8;    /* image placeholder plate */
  --palette-teal-400:#9DBCBF;    /* secondary copy */
  --palette-moss-200:#D7D4CC;    /* eyebrow tags, captions */
  --palette-green-500:#8FA574;   /* accent */
  --palette-indigo-500:#2d37af;  /* aurora glow, near */
  --palette-indigo-900:#151a5a;  /* aurora glow, far */

  /* ---------- 1. PRIMITIVES · scale ---------- */
  --space-1:calc(4 * var(--u));   --space-2:calc(8 * var(--u));   --space-3:calc(12 * var(--u));  --space-4:calc(16 * var(--u));
  --space-5:calc(24 * var(--u));  --space-6:calc(32 * var(--u));  --space-7:calc(48 * var(--u));  --space-8:calc(64 * var(--u));
  --space-9:calc(96 * var(--u));  --space-10:calc(128 * var(--u));

  /* ---------- 2. SEMANTIC · color ---------- */
  --color-bg:var(--palette-ink-700);            /* dark page background */
  --color-bg-deep:var(--palette-ink-900);       /* overlays, menu, tiles */
  --color-bg-band:var(--palette-ink-800);       /* bands inside a dark page */
  --color-surface-dark:var(--palette-ink-600);  /* footer, dark sections */
  --color-surface-plate:var(--palette-ink-500); /* dark media plate */
  --color-surface-placeholder:var(--palette-grey-100);
  --color-text:var(--palette-white);
  --color-text-on-light:var(--palette-black);
  --color-text-soft:rgba(255,255,255,.82);      /* body copy on dark */
  --color-text-muted:rgba(255,255,255,.55);     /* labels, eyebrows */
  --color-text-faint:rgba(255,255,255,.45);     /* years, meta */
  --color-text-hover:var(--palette-grey-200);
  --color-accent-teal:var(--palette-teal-400);
  --color-accent-moss:var(--palette-moss-200);
  --color-accent-green:var(--palette-green-500);
  --color-rail:var(--palette-grey-300);
  --color-line:rgba(255,255,255,.14);           /* hairlines on dark */
  --color-line-strong:rgba(255,255,255,.18);
  --color-overlay:rgba(12,15,15,.97);           /* full-screen menu panel */
  --color-glow-near:var(--palette-indigo-500);
  --color-glow-far:var(--palette-indigo-900);

  /* ---------- 2. SEMANTIC · typography ---------- */
  --font-sans:"Roboto Condensed","Arial Narrow",Arial,sans-serif;
  --fw-light:300;  --fw-regular:400;  --fw-medium:500;  --fw-bold:700;

  /* sizes: fluid clamp() values from the 1440 canvas. Pick a role, not a number. */
  --fs-display:clamp(calc(62.4 * var(--u)),12.336vw,calc(177.6 * var(--u)));  /* hero wordmark */
  --fs-title-xl:clamp(calc(40 * var(--u)),6.4vw,calc(92 * var(--u)));         /* case-study title */
  --fs-title-lg:clamp(calc(44 * var(--u)),5.28vw,calc(76 * var(--u)));        /* footer "Get in touch" */
  --fs-title-md:clamp(calc(40 * var(--u)),4.44vw,calc(64 * var(--u)));        /* page titles (Gallery) */
  --fs-heading:clamp(calc(28 * var(--u)),3.4vw,calc(48 * var(--u)));          /* section headings */
  --fs-subheading:clamp(calc(22 * var(--u)),2.22vw,calc(32 * var(--u)));
  --fs-lede:clamp(calc(16 * var(--u)),1.39vw,calc(20 * var(--u)));
  --fs-brand:calc(18 * var(--u));                              /* nav wordmark, top left */
  --fs-nav:calc(16 * var(--u));                                /* nav links, top right */
  --fs-body-lg:calc(20 * var(--u));
  --fs-body:calc(16 * var(--u));
  --fs-caption:calc(14 * var(--u));
  --fs-label:calc(13 * var(--u));
  --fs-menu:calc(34 * var(--u));                                /* mobile menu links */

  --ls-tight:-.04em;  --ls-snug:-.02em;  --ls-label:.06em;  --ls-caps:.14em;
  --lh-tight:1;       --lh-snug:1.2;     --lh-body:1.6;

  /* ---------- 2. SEMANTIC · layout ---------- */
  --ua:calc(100vw / 1440);               /* aura blur: scales with width at EVERY size so the glow keeps one look */
  --u:1px;                              /* 1 design px; above 1440 it grows with the viewport (see bottom of file) */
  --canvas:calc(1440 * var(--u));                       /* reference frame; the page caps + centers here */
  --gutter:calc(24 * var(--u));
  --content:calc(1392 * var(--u));                      /* canvas - 2 * gutter */
  --gutter-fluid:max(var(--gutter), calc(50vw - var(--canvas) / 2 + var(--gutter)));
                                          /* gutter that keeps fixed UI on the content column past 1440 */
  /* breakpoints (custom properties can't sit inside @media, so these are the
     numbers to use there):  phone-small 560 · phone 600 · tablet 900 (hamburger) ·
     gallery 1100 · desktop 1440 */

  /* ---------- 2. SEMANTIC · shape ---------- */
  --radius-sm:calc(2 * var(--u));  --radius-pill:50%;
  --border-hair:1px solid var(--color-line);

  /* ---------- 2. SEMANTIC · motion ---------- */
  --ease-site:cubic-bezier(.16,.84,.44,1);   /* the site's signature settle */
  --ease-standard:cubic-bezier(.4,0,.2,1);
  --ease-inout:cubic-bezier(.45,0,.2,1);
  --dur-fast:.2s;  --dur-base:.3s;  --dur-slow:.6s;  --dur-reveal:1s;
  --stagger:70ms;                            /* per-column ripple on grids */

  /* ---------- 2. SEMANTIC · layers ---------- */
  --z-base:1;  --z-raised:2;  --z-nav:120;  --z-lightbox:200;  --z-cursor:9999;

  /* ---------- 3. LEGACY aliases (kept so existing rules keep working) ---------- */
  --black:var(--palette-black);
  --white:var(--palette-white);
  --ink:var(--palette-black);
  --page-bg:var(--color-bg);
  --footer-base:var(--color-surface-dark);
  --rail:var(--color-rail);
  --glow-near:var(--color-glow-near);
  --glow-far:var(--color-glow-far);
  --td-bg:var(--color-bg);
  --td-band:var(--color-bg-band);
  --td-teal:var(--color-accent-teal);
  --td-moss:var(--color-accent-moss);
  --td-line:var(--color-line);
}

/* Above the 1440 reference width the whole site scales up proportionally
   (every length is calc(N * var(--u))), so a big monitor shows the same
   design as 1440, just larger, instead of a 1440 column floating in the
   middle with the hero at its original size. Below 1440 nothing changes. */
@media (min-width:1441px){
  :root{--u:calc(100vw / 1440);}
}

/* desktop side margin is 40px (phones and tablets keep 24px) */
@media (min-width:901px){
  :root{
    --gutter:calc(40 * var(--u));
    --content:calc(1360 * var(--u));   /* canvas - 2 * gutter */
  }
}
