/* ============================================================
   HCM — Colors + Typography Foundation
   
   A PR + Communications agency for consumer tech.
   Bold. Directional. Intentional.
   ============================================================ */

/* ---------- Typography: Local brand fonts ---------- */

@font-face {
  font-family: 'Anton';
  src: url('fonts/Anton-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ABC Monument Grotesk';
  src: url('fonts/ABCMonumentGrotesk-Regular-Trial.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ABC Monument Grotesk';
  src: url('fonts/ABCMonumentGrotesk-Medium-Trial.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Mono fallback — JetBrains Mono from Google Fonts (no paid mono supplied).
   Flag: replace with licensed mono if HCM standardizes on one. */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ============================================================
     COLOR — Core palette
     Deep black, off-white, high-contrast neutrals,
     electric accents used sparingly.
     ============================================================ */

  /* Anchors — the only two colors most surfaces ever see */
  --hcm-black:        #0A0A0A;   /* near-black; never pure #000 */
  --hcm-ink:          #111111;   /* deepest type color */
  --hcm-off-white:    #F5F2EC;   /* warm bone — primary light surface */
  --hcm-paper:        #FAF8F3;   /* lighter paper variant */
  --hcm-white:        #FFFFFF;   /* pure white — used rarely, for photo contrast */

  /* Neutrals — sharp, high-contrast, no muddy mids */
  --hcm-stone-100:    #E8E4DB;
  --hcm-stone-200:    #D4CFC3;
  --hcm-stone-400:    #8A8478;
  --hcm-stone-600:    #3D3A33;
  --hcm-stone-800:    #1F1D19;

  /* Accent — warm, editorial, used SPARINGLY for emphasis only.
     Legacy --hcm-yellow / --hcm-blue tokens kept as aliases for back-compat. */
  --hcm-coral:        #F26B2C;   /* true orange — the signature pop, used on small accents */
  --hcm-coral-dim:    #D45615;   /* pressed state */
  --hcm-coral-soft:   #F6F45F;   /* yellow wash — for large surfaces */
  --hcm-sky:          var(--hcm-coral);   /* aliased to orange */
  --hcm-sky-deep:     var(--hcm-coral-dim);
  --hcm-sky-bright:   var(--hcm-coral-soft);

  /* Aliases (existing components reference these names) */
  --hcm-yellow:       var(--hcm-coral);
  --hcm-yellow-dim:   var(--hcm-coral-dim);
  --hcm-blue:         var(--hcm-coral);
  --hcm-blue-deep:    var(--hcm-coral-dim);

  /* Semantic — kept neutral; HCM rarely uses traffic-light colors */
  --hcm-success:      var(--hcm-yellow);
  --hcm-warning:      #E8A500;
  --hcm-error:        #D63A1F;

  /* ============================================================
     SEMANTIC — Foreground / Background roles
     Use these in components, not raw palette values.
     ============================================================ */

  /* Foreground (text / icons) */
  --fg-1:  var(--hcm-ink);         /* primary type */
  --fg-2:  var(--hcm-stone-600);   /* secondary / body meta */
  --fg-3:  var(--hcm-stone-400);   /* tertiary / captions */
  --fg-inverse: var(--hcm-off-white);
  --fg-accent:  var(--hcm-coral);

  /* Background / Surfaces */
  --bg-1:  var(--hcm-off-white);   /* primary surface */
  --bg-2:  var(--hcm-paper);       /* raised surface */
  --bg-3:  var(--hcm-stone-100);   /* sunken / divider-adjacent */
  --bg-inverse: var(--hcm-black);  /* dark sections */
  --bg-accent:  var(--hcm-yellow); /* emphasis blocks */
  --bg-accent-blue: var(--hcm-coral);

  /* Lines — hairline, always sharp */
  --line-1: var(--hcm-ink);        /* primary rule, 1px */
  --line-2: var(--hcm-stone-200);  /* quiet divider */

  /* ============================================================
     TYPOGRAPHY — Font stacks
     ============================================================ */

  /* Display — Anton-style condensed grotesk, tall + narrow + heavy */
  --font-display: 'Anton', 'Oswald', 'Bebas Neue', 'Impact', sans-serif;

  /* Body / UI — ABC Monument Grotesk, the brand neo-grotesk */
  --font-body: 'ABC Monument Grotesk', 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Mono — technical labels, date stamps, "01 / 02 / 03" section indexes */
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  /* ============================================================
     TYPE SCALE
     Display uses TIGHT leading (0.88–0.95), wide set, heavy crop.
     Body uses generous leading, never italic, never all-caps.
     ============================================================ */

  --fs-display-xl: clamp(4.5rem, 9vw, 9rem);    /* hero headlines */
  --fs-display-l:  clamp(3rem, 6vw, 6rem);      /* section headlines */
  --fs-display-m:  clamp(2.25rem, 4vw, 4rem);   /* card headlines */
  --fs-display-s:  clamp(1.75rem, 2.5vw, 2.5rem);

  --fs-body-l:   1.125rem;    /* lead paragraph */
  --fs-body-m:   1rem;        /* default body */
  --fs-body-s:   0.875rem;    /* meta / caption */
  --fs-body-xs:  0.75rem;     /* fine print, eyebrow */

  --fs-mono-m:   0.8125rem;
  --fs-mono-s:   0.6875rem;

  /* Leading */
  --lh-display: 0.9;
  --lh-tight:   1.1;
  --lh-body:    1.5;
  --lh-loose:   1.65;

  /* Tracking */
  --tr-display:   -0.02em;   /* slight negative for large display */
  --tr-body:      0;
  --tr-eyebrow:   0.12em;    /* wide for uppercase labels */
  --tr-mono:      0.04em;

  /* ============================================================
     SPACING — 8pt base, generous whitespace
     ============================================================ */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  24px;
  --sp-6:  32px;
  --sp-7:  48px;
  --sp-8:  64px;
  --sp-9:  96px;
  --sp-10: 128px;
  --sp-11: 160px;

  /* ============================================================
     RADIUS — Minimal. HCM is sharp.
     Radii only on: form controls (2px), pill CTAs (999px).
     Cards and sections are ALWAYS square.
     ============================================================ */
  --r-none:  0;
  --r-xs:    2px;
  --r-pill:  999px;

  /* ============================================================
     BORDER + HAIRLINE
     Always 1px, always ink. No soft borders.
     ============================================================ */
  --bd-hair:  1px solid var(--line-1);
  --bd-quiet: 1px solid var(--line-2);
  --bd-heavy: 2px solid var(--line-1);

  /* ============================================================
     SHADOW — Used almost never.
     HCM relies on contrast, not elevation.
     ============================================================ */
  --shadow-none: none;
  --shadow-press: 0 1px 0 0 var(--hcm-ink);
  --shadow-lift:  0 12px 32px -12px rgba(10, 10, 10, 0.25);

  /* ============================================================
     MOTION — Sharp, decisive. No bounce.
     ============================================================ */
  --ease-out-sharp: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-sharp:  cubic-bezier(0.8, 0, 0.9, 0.2);
  --ease-standard:  cubic-bezier(0.4, 0, 0.2, 1);

  --dur-fast:   120ms;
  --dur-base:   200ms;
  --dur-slow:   400ms;
  --dur-reveal: 700ms;

  /* Layout */
  --max-w:  1440px;
  --gutter: clamp(16px, 3vw, 40px);
}

/* ============================================================
   BASE ELEMENTS — semantic defaults
   ============================================================ */

html {
  font-family: var(--font-body);
  color: var(--fg-1);
  background: var(--bg-1);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  line-height: var(--lh-body);
  font-weight: 400;
}

/* ---------- Display headings ---------- */
h1, .h1 {
  font-family: var(--font-display);
  font-size: var(--fs-display-xl);
  line-height: var(--lh-display);
  letter-spacing: var(--tr-display);
  font-weight: 400;             /* Anton is a single weight */
  text-transform: uppercase;
  margin: 0;
  color: var(--fg-1);
  text-wrap: balance;
}

h2, .h2 {
  font-family: var(--font-display);
  font-size: var(--fs-display-l);
  line-height: var(--lh-display);
  letter-spacing: var(--tr-display);
  font-weight: 400;
  text-transform: uppercase;
  margin: 0;
  color: var(--fg-1);
  text-wrap: balance;
}

h3, .h3 {
  font-family: var(--font-display);
  font-size: var(--fs-display-m);
  line-height: 0.95;
  letter-spacing: var(--tr-display);
  font-weight: 400;
  text-transform: uppercase;
  margin: 0;
  color: var(--fg-1);
}

h4, .h4 {
  font-family: var(--font-display);
  font-size: var(--fs-display-s);
  line-height: 1;
  letter-spacing: var(--tr-display);
  font-weight: 400;
  text-transform: uppercase;
  margin: 0;
  color: var(--fg-1);
}

/* ---------- Body ---------- */
p, .body {
  font-family: var(--font-body);
  font-size: var(--fs-body-m);
  line-height: var(--lh-body);
  font-weight: 400;
  color: var(--fg-1);
  margin: 0 0 1em 0;
  text-wrap: pretty;
}

.lead {
  font-size: var(--fs-body-l);
  line-height: var(--lh-body);
  color: var(--fg-1);
  max-width: 52ch;
}

.meta, small {
  font-size: var(--fs-body-s);
  color: var(--fg-2);
  line-height: var(--lh-body);
}

/* ---------- Eyebrow — uppercase label, tracked wide ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-body-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tr-eyebrow);
  color: var(--fg-1);
  line-height: 1;
}

/* ---------- Mono — section indexes, timestamps ---------- */
code, pre, .mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-m);
  letter-spacing: var(--tr-mono);
  color: var(--fg-accent);
}

.index-num {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-m);
  color: var(--fg-accent);
  letter-spacing: var(--tr-mono);
}

/* ---------- Link ---------- */
a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color var(--dur-fast) var(--ease-standard);
}
a:hover { color: var(--fg-accent); }

/* ---------- The "." — HCM's signature period-accent ---------- */
.dot {
  color: var(--hcm-yellow);
  display: inline-block;
}

/* ---------- Selection ---------- */
::selection {
  background: var(--hcm-yellow);
  color: var(--hcm-ink);
}

/* ---------- Dark inversion ---------- */
.inverse {
  background: var(--bg-inverse);
  color: var(--fg-inverse);
}
.inverse h1, .inverse h2, .inverse h3, .inverse h4 { color: var(--fg-inverse); }
.inverse .meta { color: var(--hcm-stone-200); }

/* ============================================================
   PRINT / PRESENT MODE
   When the page is printed (Cmd+P or host's "Present"), the
   browser strips backgrounds by default and treats the doc as
   a continuous flow. Two specific fixes:
     1. Force colors via print-color-adjust on every surface.
     2. Collapse the IndustryScroller's 5×100vh scroll-driven
        section into a static stacked layout — sticky behavior
        breaks in static contexts.
   ============================================================ */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  /* Collapse industry scroller: fix container to a single screen,
     un-stick the inner panel so print produces one industry frame
     rather than 5 viewports of empty space. */
  section#industries {
    height: auto !important;
    min-height: 720px !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  section#industries > div {
    position: relative !important;
    height: auto !important;
    min-height: 720px !important;
  }
  /* Avoid awkward page breaks mid-section */
  header, footer, section { page-break-inside: avoid; break-inside: avoid; }
}
