/* ============================================================
   NORFORGE GREEN — Design Tokens
   Colors, type, spacing, radii, shadows, motion.
   ============================================================ */

/* ---------- Fonts ---------- */
/* The Google Fonts stylesheet is loaded via <link> in the document head
   (site.fontsHref, with preconnects in HeadBase), not @import here — so the
   browser discovers it up front instead of after this file downloads and
   parses. Fonts stay Google-hosted. */

:root {
  /* ============================================================
     COLORS — Brand anchors
     ============================================================ */
  --iron:          #353A47;  /* primary brand — forged steel */
  --verdigris:     #47A08C;  /* accent — the "green" */
  --fog:           #D2D4D5;  /* light neutral — primary text on iron */

  /* Verdigris scale — the single accent. DESIGN.md defines only 200–500;
     no other shades exist in the system. */
  --verdigris-200: #9ECDC1;  /* reserved — hover / subtle states */
  --verdigris-300: #71B6A4;  /* closing gradient start */
  --verdigris-400: #47A08C;  /* == --verdigris, PRIMARY ACCENT */
  --verdigris-500: #3E8F7D;  /* reserved — hover / subtle states */

  /* Iron / neutral scale — cold, blue-gray */
  --iron-900:      #14171D;
  --iron-800:      #1B1F27;  /* app background */
  --iron-700:      #242933;  /* raised surface */
  --iron-600:      #2E343F;  /* raised-2 / hover */
  --iron-500:      #353A47;  /* == --iron, brand anchor */
  --iron-400:      #4A5160;
  --iron-300:      #6B7280;
  --iron-250:      #808793;  /* faintest AA-safe muted text on dark (DESIGN.md §6) */
  --iron-200:      #9AA0AB;
  --iron-100:      #B8BDC5;
  --paper:         #F7F7F8;
  --paper-pure:    #FFFFFF;

  /* Error state — the one intentional extension beyond DESIGN.md (a slide
     system has no form states). Used only by invalid form fields. */
  --ember:         #E85D5D;

  /* ============================================================
     SEMANTIC TOKENS — dark mode (default)
     ============================================================ */
  --bg:            var(--iron-800);
  --bg-subtle:     var(--iron-900);
  --surface:       var(--iron-700);
  --surface-raised:var(--iron-600);
  --overlay-scrim: rgba(20, 23, 29, 0.72);  /* iron-900 @ 72% */

  --fg-1:          var(--fog);          /* primary text */
  --fg-2:          var(--iron-100);     /* secondary text */
  --fg-3:          var(--iron-200);     /* tertiary / labels */
  --fg-4:          var(--iron-300);     /* disabled / faint */

  --border-subtle: rgba(210, 212, 213, 0.08);
  --border-strong: rgba(210, 212, 213, 0.16);
  --border-focus:  var(--verdigris);

  --accent:        var(--verdigris);
  --accent-hover:  var(--verdigris-500);
  --on-accent:     var(--iron-900);

  --danger:        var(--ember);

  /* ============================================================
     TYPOGRAPHY
     ============================================================ */
  --font-display:  'Space Grotesk', 'Inter Tight', system-ui, -apple-system, sans-serif;
  --font-ui:       'Inter Tight', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono:     'JetBrains Mono', 'SF Mono', 'Menlo', 'Consolas', monospace;

  /* Modular scale, 1.2 ratio */
  --text-2xs:  12px;
  --text-xs:   13px;
  --text-sm:   14px;
  --text-base: 16px;
  --text-md:   18px;
  --text-lg:   21px;
  --text-xl:   25px;
  --text-2xl:  30px;
  --text-3xl:  36px;
  --text-4xl:  44px;
  --text-5xl:  54px;
  --text-6xl:  64px;

  /* Weights */
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  /* Line heights */
  --lh-tight:    1.05;
  --lh-display:  1.15;
  --lh-snug:     1.3;
  --lh-body:     1.55;
  --lh-loose:    1.7;

  /* Tracking */
  --tracking-tightest: -0.03em;
  --tracking-tight:    -0.015em;
  --tracking-normal:   0;
  --tracking-wide:     0.02em;
  --tracking-wider:    0.06em;

  /* ============================================================
     SPACING — 4px base
     ============================================================ */
  --space-0:   0;
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-8:   32px;
  --space-10:  40px;
  --space-12:  48px;
  --space-16:  64px;
  --space-20:  80px;
  --space-24:  96px;
  --space-32:  128px;

  /* ============================================================
     RADII — restrained
     ============================================================ */
  --radius-xs: 2px;   /* inputs, chips */
  --radius-sm: 4px;   /* buttons, cards */
  --radius-md: 8px;   /* modals, large surfaces */
  --radius-full: 999px; /* avatars only */

  /* ============================================================
     ELEVATION — 3 levels, sharp & short
     ============================================================ */
  --elev-0: none;
  --elev-1: 0 1px 0 rgba(0, 0, 0, 0.2);
  --elev-2: 0 2px 0 rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.3);
  --elev-overlay: 0 4px 0 rgba(0, 0, 0, 0.3), 0 12px 24px rgba(0, 0, 0, 0.4);

  /* ============================================================
     MOTION
     ============================================================ */
  --ease-out:    cubic-bezier(0.2, 0, 0, 1);
  --ease-in-out: cubic-bezier(0.5, 0, 0.2, 1);
  --dur-fast:    100ms;
  --dur-default: 150ms;
  --dur-slow:    200ms;

  /* ============================================================
     LAYOUT
     ============================================================ */
  --container-max: 1280px;
  --content-max:   720px;
  --gutter:        24px;
}

/* ============================================================
   LIGHT MODE (marketing use)
   ============================================================ */
[data-theme='light'] {
  --bg:            var(--paper);
  --bg-subtle:     var(--paper-pure);
  --surface:       var(--paper-pure);
  --surface-raised:var(--paper-pure);
  --overlay-scrim: rgba(53, 58, 71, 0.4);

  --fg-1:          var(--iron-900);
  --fg-2:          var(--iron-700);
  --fg-3:          var(--iron-400);
  --fg-4:          var(--iron-300);

  --border-subtle: rgba(53, 58, 71, 0.10);
  --border-strong: rgba(53, 58, 71, 0.20);

  --on-accent:     var(--paper-pure);
}

/* ============================================================
   BASE ELEMENT STYLES
   ============================================================ */
html, body {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: var(--lh-body);
  color: var(--fg-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-1);
  margin: 0;
}

h1 { font-size: var(--text-5xl); letter-spacing: var(--tracking-tightest); line-height: var(--lh-tight); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-md); font-weight: var(--fw-semibold); }

p { margin: 0; color: var(--fg-2); }

small, .text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }

code, pre, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  font-feature-settings: 'zero', 'ss02';
}

/* Tabular numerals for data */
.tabular, [data-numeric] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* Eyebrow / label */
.label, .eyebrow {
  font-family: var(--font-ui);
  font-size: var(--text-2xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--fg-3);
}

/* Selection */
::selection { background: var(--verdigris); color: var(--iron-900); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--verdigris);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
