/* ============================================================
   Tamarack Design System — Colors + Type
   Dark-mode first. Orange punctuates. Everything else recedes.
   ============================================================ */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "MADE Soulmaze";
  src: url("fonts/MADE Soulmaze Italic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* Non-italic usage: the font ships italic-only, so we map roman to the same file.
   Glyphs retain their natural slant, but `font-style: normal` prevents the browser
   synthesizing additional obliquing. */
@font-face {
  font-family: "MADE Soulmaze";
  src: url("fonts/MADE Soulmaze Italic.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MADE Soulmaze Outline";
  src: url("fonts/MADE Soulmaze Outline Italic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

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

@font-face {
  font-family: "Work Sans";
  src: url("fonts/WorkSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ================================
     COLOR — Brand
     ================================ */

  /* Primary — Sunburst / Tamarack Orange */
  --sunburst: #E0551F;           /* Pantone 7579 C */
  --sunburst-hover: #F06A35;     /* 8% lighter for hover */
  --sunburst-press: #C4441A;     /* 8% darker for press */
  --sunburst-tint-10: rgba(224, 85, 31, 0.10);
  --sunburst-tint-20: rgba(224, 85, 31, 0.20);

  /* Neutrals — dark-mode first */
  --black: #0D0D0D;              /* dominant background */
  --surface-1: #141414;          /* card, elevated panel */
  --surface-2: #1C1C1C;          /* hover / secondary surface */
  --surface-3: #242424;          /* tertiary / inset */
  --hairline: #2A2A2A;           /* subtle border */
  --hairline-strong: #3A3A3A;    /* stronger divider */

  --white: #FFFFFF;
  --ink-1: #F5F5F5;              /* primary text on black */
  --ink-2: #B8B8B8;              /* secondary text / eyebrow */
  --ink-3: #7A7A7A;              /* tertiary / meta */
  --ink-4: #4A4A4A;              /* disabled / placeholder */

  /* Light-mode inverse (rarely used; inverted cards, print) */
  --paper: #F5F2ED;              /* warm off-white */
  --paper-surface: #FFFFFF;
  --ink-on-paper-1: #0D0D0D;
  --ink-on-paper-2: #4A4A4A;

  /* Semantic (kept muted — orange still leads) */
  --success: #5FA86A;
  --warning: #E0A51F;
  --error:   #D94A3D;
  --info:    #7AA9C9;

  /* ================================
     COLOR — Semantic aliases
     (reference these in components)
     ================================ */
  --bg:            var(--black);
  --bg-elevated:   var(--surface-1);
  --bg-hover:      var(--surface-2);
  --bg-inset:      var(--surface-3);

  --fg-1:          var(--ink-1);
  --fg-2:          var(--ink-2);
  --fg-3:          var(--ink-3);
  --fg-disabled:   var(--ink-4);
  --fg-accent:     var(--sunburst);
  --fg-on-accent:  var(--black);

  --border:        var(--hairline);
  --border-strong: var(--hairline-strong);
  --border-accent: var(--sunburst);

  /* ================================
     TYPE — Families
     ================================ */
  --font-display: "MADE Soulmaze", "Work Sans", system-ui, sans-serif;
  --font-display-outline: "MADE Soulmaze Outline", "MADE Soulmaze", sans-serif;
  --font-body: "Work Sans", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  /* ================================
     TYPE — Scale
     Display (Soulmaze) is for oversized wordmark moments only.
     Headlines use Work Sans Bold, tight tracking, large.
     ================================ */

  /* Display / Wordmark */
  --text-display-xl: clamp(96px, 18vw, 280px);
  --text-display-lg: clamp(72px, 12vw, 180px);

  /* Headlines (Work Sans Bold) */
  --text-h1: clamp(48px, 6vw, 88px);
  --text-h2: clamp(36px, 4.5vw, 64px);
  --text-h3: clamp(28px, 3vw, 44px);
  --text-h4: 22px;
  --text-h5: 18px;

  /* Body */
  --text-lg: 20px;    /* lede / intro */
  --text-md: 16px;    /* default body */
  --text-sm: 14px;    /* secondary */
  --text-xs: 12px;    /* eyebrow, meta, nav */

  /* Line heights */
  --lh-display: 0.92;
  --lh-tight: 1.05;
  --lh-snug: 1.2;
  --lh-normal: 1.5;
  --lh-loose: 1.7;

  /* Tracking */
  --track-display: -0.02em;    /* negative for huge wordmarks */
  --track-tight: -0.01em;
  --track-normal: 0;
  --track-wide: 0.08em;         /* eyebrows, nav, caps */
  --track-wider: 0.14em;

  /* Weights */
  --weight-regular: 400;
  --weight-bold: 700;

  /* ================================
     SPACING
     4px base, compressed at small end, generous at large end.
     Tamarack likes negative space.
     ================================ */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --space-11: 192px;

  /* ================================
     RADII
     Only 1px and 2px. Never more, never pill, never circular.
     Tamarack's edges are crisp — softened by a hair, nothing more.
     ================================ */
  --radius-1: 1px;    /* hairline soften */
  --radius-2: 2px;    /* default — buttons, cards, inputs, media */

  /* ================================
     BORDERS
     ================================ */
  --border-width: 1px;
  --border-width-strong: 2px;

  /* ================================
     MOTION
     Restrained. No bounce. Short durations.
     ================================ */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 400ms;

  /* ================================
     LAYOUT
     ================================ */
  --container-max: 1440px;
  --gutter: clamp(24px, 5vw, 80px);
}

/* ============================================================
   BASE ELEMENTS
   ============================================================ */

html, body {
  background: var(--bg);
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Display wordmark utility — giant italic Soulmaze */
.t-display-xl,
.t-display-lg {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  line-height: var(--lh-display);
  letter-spacing: var(--track-display);
  color: var(--fg-1);
  text-transform: uppercase;
}
.t-display-xl { font-size: var(--text-display-xl); }
.t-display-lg { font-size: var(--text-display-lg); }

/* Headlines — Work Sans Bold, tight */
h1, .t-h1,
h2, .t-h2,
h3, .t-h3 {
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  color: var(--fg-1);
  letter-spacing: var(--track-tight);
  line-height: var(--lh-tight);
  margin: 0;
}
h1, .t-h1 { font-size: var(--text-h1); }
h2, .t-h2 { font-size: var(--text-h2); }
h3, .t-h3 { font-size: var(--text-h3); line-height: var(--lh-snug); }

h4, .t-h4 {
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  font-size: var(--text-h4);
  line-height: var(--lh-snug);
  letter-spacing: var(--track-normal);
  margin: 0;
}
h5, .t-h5 {
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  font-size: var(--text-h5);
  line-height: var(--lh-snug);
  margin: 0;
}

/* Body */
p, .t-body {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-md);
  line-height: var(--lh-normal);
  color: var(--fg-2);
  margin: 0;
}
.t-lede {
  font-size: var(--text-lg);
  line-height: var(--lh-normal);
  color: var(--fg-1);
}
.t-small {
  font-size: var(--text-sm);
  color: var(--fg-2);
}
.t-meta {
  font-size: var(--text-xs);
  color: var(--fg-3);
}

/* Eyebrow — all-caps, wide tracking */
.t-eyebrow {
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--fg-accent);
}

/* Code */
code, .t-code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-inset);
  padding: 2px 6px;
  border-radius: var(--radius-2);
  color: var(--fg-1);
}

/* Links */
a {
  color: var(--fg-accent);
  text-decoration: none;
  transition: opacity var(--dur-fast) var(--ease-out);
}
a:hover { opacity: 0.8; }

/* Focus ring */
*:focus-visible {
  outline: 2px solid var(--sunburst);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: var(--sunburst);
  color: var(--black);
}
