/* =====================================================================
   ReFrame — Design System
   One source of truth for tokens, base styles, and shared components.
   Mobile-first: base rules target small screens; min-width queries scale up.
   ===================================================================== */

/* ---- Reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- Tokens --------------------------------------------------------- */
:root {
  /* Brand palette */
  --bg: #0a0118;
  --bg-soft: #140a23;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --cyan: #06b6d4;
  --cyan-light: #22d3ee;
  --orange: #f97316;
  --amber: #f59e0b;
  --violet: #a855f7;
  --green: #22c55e;
  --red: #f87171;

  --text: #f5f3ff;
  --text-soft: #d1d5db;
  --text-muted: #9ca3af;
  --text-faint: #6b7280;

  /* Fluid type scale (mobile -> desktop via clamp), ~1.25 ratio.
     Hierarchy target on desktop: H1 ~49 (hero, set in home.css) > H2 40 > H3 27 > lead 22 > body 19 > label 16 */
  --step--1: clamp(0.9rem, 0.86rem + 0.16vw, 1rem);      /* 14.4 -> 16   small labels */
  --step-0:  clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);  /* 17   -> 19   body */
  --step-1:  clamp(1.15rem, 1.05rem + 0.45vw, 1.375rem); /* 18.4 -> 22   lead */
  --step-2:  clamp(1.35rem, 1.22rem + 0.6vw, 1.7rem);    /* 21.6 -> 27.2 h3 */
  --step-3:  clamp(1.55rem, 1.35rem + 1vw, 2.1rem);      /* 24.8 -> 33.6 */
  --step-4:  clamp(2rem, 1.45rem + 2.5vw, 3rem);         /* 32   -> 48   h2 (near original 52) */
  --step-5:  clamp(2.4rem, 1.8rem + 3vw, 3.25rem);       /* 38.4 -> 52   h1 */

  /* Spacing & layout */
  --wrap: 1440px;
  --gutter: clamp(1.25rem, 0.8rem + 2.2vw, 3.5rem);
  --section-y: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  --grad: linear-gradient(135deg, #06b6d4 0%, #22d3ee 25%, #f59e0b 75%, #f97316 100%);
  --grad-warm: linear-gradient(135deg, #f97316, #f59e0b);
}

/* ---- Base ----------------------------------------------------------- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 { line-height: 1.1; letter-spacing: -0.02em; }
h1 { font-size: var(--step-5); font-weight: 800; }
h2 { font-size: var(--step-4); font-weight: 700; }
h3, h4 { font-weight: 700; }
h3 { font-size: var(--step-2); }

p { text-wrap: pretty; }
a { color: inherit; }

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Layout helpers ------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: var(--section-y); }
.section--hairline { border-top: 1px solid var(--line); }
.section--glow {
  background:
    radial-gradient(ellipse at 15% 0%, rgba(139, 92, 246, 0.10), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(234, 88, 12, 0.08), transparent 55%);
}

.eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--orange);
  margin-bottom: 0.5rem; /* kicker hugs the headline it labels */
}

.lead {
  font-size: var(--step-1);
  color: var(--text-soft);
  font-weight: 500;
  line-height: 1.4;
  max-width: 42ch;
}
/* Emphasis within a lead: bold + brighten so it reads against the muted body */
.lead strong { font-weight: 700; color: var(--text); }

/* Wide enough for large headings to breathe; the .lead keeps its own narrow measure */
.section-head { max-width: 56rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .lead { margin-top: clamp(0.9rem, 0.7rem + 0.5vw, 1.25rem); } /* breathing room under the headline */
.section-head.center .lead { margin-inline: auto; max-width: 46ch; }
/* Optional headline break: hidden on mobile (let it wrap naturally), forced on wider screens */
.br-wide { display: none; }
@media (min-width: 700px) { .br-wide { display: inline; } }

/* ---- Buttons -------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 9999px;
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  min-height: 44px; /* thumb-friendly tap target */
}
.btn-primary { background: var(--grad-warm); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); background: linear-gradient(135deg, #fb923c, #fbbf24); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid var(--line-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); }
.btn-block { width: 100%; }

@media (min-width: 600px) {
  .btn-block { width: auto; }
}

/* ---- Media frames (placeholders until real assets land) ------------- */
.frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.4), rgba(154, 52, 18, 0.3));
  border: 1px dashed var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.35);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
  padding: 1rem;
}
.frame > svg { width: 34px; height: 34px; opacity: 0.5; }
.frame--16-9 { aspect-ratio: 16 / 9; }
.frame--9-16 { aspect-ratio: 9 / 16; }
.frame--1-1  { aspect-ratio: 1 / 1; }
/* Real video frame: solid white border, no placeholder chrome, iframe fills the box */
.frame--video {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-style: solid;
  background: #000;
  padding: 0;
}
.frame--video > iframe,
.frame--video > stream {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}


/* ---- Cards ---------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.card--interactive:hover {
  border-color: rgba(249, 115, 22, 0.35);
  background: var(--surface-2);
  transform: translateY(-3px);
}

.gradient-border { position: relative; background: linear-gradient(135deg, rgba(10,1,24,0.95), rgba(20,5,40,0.95)); }
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: linear-gradient(135deg, #c2410c, #f97316, #fbbf24, #f97316, #c2410c);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---- Navigation ----------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(10, 1, 24, 0.8);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; color: #fff; }
.brand-logo { height: 60px; width: auto; }
@media (min-width: 880px) { .brand-logo { height: 66px; } }

.nav-links { display: none; }
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-cta { display: none; }

/* Mobile slide-down menu */
.nav-menu {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem var(--gutter) 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 1, 24, 0.97);
}
.nav-menu.open { display: flex; }
.nav-menu a {
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 500;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--line);
}
.nav-menu a:last-child { border-bottom: none; }
.nav-menu .btn { margin-top: 0.75rem; }

@media (min-width: 880px) {
  .nav-toggle { display: none; }
  .nav-menu { display: none !important; }
  .nav-links {
    display: flex;
    gap: 2rem;
    font-size: var(--step-0);
    font-weight: 500;
    color: var(--text-muted);
  }
  .nav-links a { text-decoration: none; transition: color 0.2s; }
  .nav-links a:hover { color: #fff; }
  .nav-cta { display: inline-flex; }
}

/* ---- Footer --------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding-block: 3rem; }
.footer-grid { display: grid; gap: 2rem; }
.footer-tag { color: var(--text-faint); font-size: var(--step--1); margin-top: 0.6rem; }
.footer-col h4 {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col a { color: var(--text-faint); text-decoration: none; font-size: var(--step--1); transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  color: var(--text-faint); font-size: var(--step--1);
}

@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 2fr 1fr; }
}

/* ---- Accessibility -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
