/* =========================================================================
   RIO HARPER — DESIGN SYSTEM
   Foundations: color + typography
   "ARRI product page meets A24 title card"
   ========================================================================= */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk-VariableFont.ttf") format("truetype-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-VariableFont.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-VariableFont.ttf") format("truetype-variations");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* =====================================================================
     COLOR — dark cinema theatre + tungsten accent
     ===================================================================== */

  /* Foundation — charcoal, never pure black */
  --bg-0:        #0C0C0E;   /* page background, hero plates */
  --bg-1:        #111114;   /* cards, raised surfaces */
  --bg-2:        #16161A;   /* inset wells, code blocks */
  --bg-3:        #1D1D22;   /* hover on raised surfaces */

  /* Hairlines */
  --line-1:      rgba(232, 230, 225, 0.08);  /* default divider */
  --line-2:      rgba(232, 230, 225, 0.14);  /* prominent divider, focus ring base */
  --line-3:      rgba(232, 230, 225, 0.22);  /* hover border */

  /* Foreground — warm off-white */
  --fg-0:        #E8E6E1;   /* primary text, headlines */
  --fg-1:        #B8B5AE;   /* secondary text, captions */
  --fg-2:        #7A7872;   /* tertiary, metadata, labels */
  --fg-3:        #4A4944;   /* disabled, scaffolding */

  /* Accent — tungsten / lens-coating amber */
  --accent:        #D4A04A;   /* brand accent — name, key dividers, hover */
  --accent-hi:     #E5B868;   /* hover / focus glow */
  --accent-lo:     #A07A35;   /* pressed */
  --accent-tint:   rgba(212, 160, 74, 0.12);  /* wash for chips, hover surfaces */
  --accent-edge:   rgba(212, 160, 74, 0.32);  /* hairline at accent edges */

  /* Secondary — muted steel blue, technical */
  --steel:         #6B7D8D;
  --steel-hi:      #8A9CAC;
  --steel-tint:    rgba(107, 125, 141, 0.14);

  /* Semantic */
  --success:       #6E8F6A;
  --warning:       #D4A04A;   /* same as accent on purpose */
  --danger:        #B66756;

  /* =====================================================================
     TYPOGRAPHY
     ===================================================================== */

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Type scale — tight, editorial, with one big display step */
  --t-display:    clamp(56px, 8vw, 112px);   /* hero name, A24 title-card */
  --t-h1:         48px;
  --t-h2:         32px;
  --t-h3:         22px;
  --t-h4:         18px;
  --t-body:       16px;
  --t-small:      14px;
  --t-caption:    12px;
  --t-micro:      11px;       /* spec strip, labels, all-caps tags */

  --lh-tight:     1.02;       /* display */
  --lh-snug:      1.18;       /* headings */
  --lh-normal:    1.5;        /* body */
  --lh-loose:     1.7;        /* long-form prose */

  /* Letter-spacing — a film tech-credit strip lives in negative space */
  --tr-display:   -0.03em;    /* tight, confident */
  --tr-heading:   -0.015em;
  --tr-body:      0;
  --tr-mono:      0;
  --tr-micro:     0.16em;     /* SPECIMEN · SPEC STRIP · CREDITS */

  /* =====================================================================
     SPACING + RADII + ELEVATION
     ===================================================================== */
  --s-1:  4px;   --s-2:  8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 24px;   --s-6: 32px;   --s-7: 48px;  --s-8: 64px;
  --s-9: 96px;   --s-10: 128px;

  --r-0: 0;
  --r-1: 2px;     /* default — sharp, tool-like */
  --r-2: 4px;
  --r-3: 8px;     /* cards */
  --r-4: 12px;
  --r-pill: 999px;

  --shadow-1: 0 1px 0 rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.35);
  --shadow-2: 0 1px 0 rgba(0,0,0,0.5), 0 24px 64px rgba(0,0,0,0.55);
  --inner-1:  inset 0 1px 0 rgba(232, 230, 225, 0.04);

  /* Transitions — restrained, like a focus pull */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0.05, 0.36, 1);
  --t-fast:   120ms;
  --t-base:   220ms;
  --t-slow:   480ms;
}

/* =========================================================================
   SEMANTIC ELEMENTS — opt-in via .rh class on root or via direct tags
   ========================================================================= */

html, body {
  background: var(--bg-0);
  color: var(--fg-0);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.rh-display {
  font-family: var(--font-display);
  font-size: var(--t-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-display);
  color: var(--fg-0);
}

h1, .rh-h1 {
  font-family: var(--font-display);
  font-size: var(--t-h1);
  font-weight: 500;
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-heading);
  color: var(--fg-0);
}
h2, .rh-h2 {
  font-family: var(--font-display);
  font-size: var(--t-h2);
  font-weight: 500;
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-heading);
  color: var(--fg-0);
}
h3, .rh-h3 {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  font-weight: 500;
  line-height: var(--lh-snug);
  color: var(--fg-0);
}
h4, .rh-h4 {
  font-family: var(--font-body);
  font-size: var(--t-h4);
  font-weight: 600;
  line-height: var(--lh-snug);
  color: var(--fg-0);
}

p, .rh-body {
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-loose);
  color: var(--fg-1);
  max-width: 64ch;
}

small, .rh-small { font-size: var(--t-small); color: var(--fg-1); }

code, kbd, pre, .rh-mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: var(--tr-mono);
  color: var(--fg-0);
}

.rh-eyebrow,
.rh-label {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: var(--tr-micro);
  text-transform: uppercase;
  color: var(--fg-2);
}

.rh-accent { color: var(--accent); }
.rh-steel  { color: var(--steel-hi); }
.rh-muted  { color: var(--fg-1); }
.rh-dim    { color: var(--fg-2); }

/* Spec strip — film technical credits, mono, generous tracking */
.rh-spec-strip {
  display: flex;
  gap: var(--s-7);
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: var(--tr-micro);
  text-transform: uppercase;
  color: var(--fg-2);
  border-top: 1px solid var(--line-1);
  border-bottom: 1px solid var(--line-1);
  padding: var(--s-4) 0;
}
.rh-spec-strip > * > strong {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--t-small);
  color: var(--fg-0);
  letter-spacing: 0;
  text-transform: none;
  margin-top: 4px;
}

/* Selection */
::selection { background: var(--accent); color: var(--bg-0); }
