/* ═══════════════════════════════════════════════════════════════════════
   Remedyate — cinematic landing page
   Styling & layout ONLY. All motion is driven by js/cinematic.js —
   this file intentionally contains no @keyframes and no transitions.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Fonts ─────────────────────────────────────────────────────────────── */
@font-face { font-family: 'Archivo'; src: url('../assets/fonts/Archivo-Regular.ttf') format('truetype');  font-weight: 400; }
@font-face { font-family: 'Archivo'; src: url('../assets/fonts/Archivo-Medium.ttf') format('truetype');   font-weight: 500; }
@font-face { font-family: 'Archivo'; src: url('../assets/fonts/Archivo-SemiBold.ttf') format('truetype'); font-weight: 600; }
@font-face { font-family: 'Archivo'; src: url('../assets/fonts/Archivo-Bold.ttf') format('truetype');     font-weight: 700; }
@font-face { font-family: 'Archivo'; src: url('../assets/fonts/Archivo-ExtraBold.ttf') format('truetype');font-weight: 800; }
@font-face { font-family: 'Archivo'; src: url('../assets/fonts/Archivo-Black.ttf') format('truetype');    font-weight: 900; }
@font-face { font-family: 'ArchivoExpanded'; src: url('../assets/fonts/Archivo_Expanded-Bold.ttf') format('truetype');  font-weight: 700; }
@font-face { font-family: 'ArchivoExpanded'; src: url('../assets/fonts/Archivo_Expanded-Black.ttf') format('truetype'); font-weight: 900; }
@font-face { font-family: 'ArchivoCondensed'; src: url('../assets/fonts/Archivo_Condensed-SemiBold.ttf') format('truetype'); font-weight: 600; }

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

:root {
  --bg:        #050b18;
  --bg-deep:   #04081c;
  --ink:       #ffffff;
  --ink-70:    rgba(255,255,255,0.72);
  --ink-45:    rgba(255,255,255,0.45);
  --blue:      #0057ff;
  --blue-soft: #3b9eff;
  --cyan:      #00c8ff;
  --violet:    #7c3aed;
  --glass:     rgba(255,255,255,0.05);
  --glass-brd: rgba(255,255,255,0.10);
}

html { scroll-behavior: auto; }  /* JS owns smooth scrolling */
body {
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.6;
}

img { max-width: 100%; }
a { color: inherit; }

/* ── Preloader ─────────────────────────────────────────────────────────── */
#preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg-deep);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
}
.preloader-logo { height: 34px; opacity: 0; }
.preloader-track {
  width: 180px; height: 2px; border-radius: 2px;
  background: rgba(255,255,255,0.10); overflow: hidden;
}
.preloader-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

/* ── Scroll progress ───────────────────────────────────────────────────── */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 900;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

/* ── Top nav ───────────────────────────────────────────────────────────── */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  background: rgba(5, 11, 24, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  opacity: 0; transform: translateY(-100%);  /* JS animates in */
  pointer-events: none;
}
.topnav.is-live { pointer-events: all; }
.topnav-logo { height: 20px; }
.topnav-links { display: flex; gap: 26px; }
.topnav-links a {
  font-size: 12.5px; font-weight: 600; text-decoration: none;
  color: var(--ink-70); text-transform: uppercase; letter-spacing: 0.08em;
  font-family: 'ArchivoCondensed', 'Archivo', sans-serif;
}
.topnav-links a:hover { color: var(--ink); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 30px; border-radius: 10px;
  font-family: 'Archivo', sans-serif; font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer; border: none;
  will-change: transform;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), #00a3ff);
  color: #fff;
  box-shadow: 0 8px 30px rgba(0, 87, 255, 0.35);
}
.btn-ghost {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  color: var(--ink);
  backdrop-filter: blur(8px);
}
.btn-sm { padding: 8px 18px; font-size: 12.5px; }
.btn-lg { padding: 17px 44px; font-size: 17px; }

/* ── Typography helpers ────────────────────────────────────────────────── */
.eyebrow {
  font-family: 'ArchivoCondensed', 'Archivo', sans-serif;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--blue-soft);
  margin-bottom: 18px;
}
.accent { color: var(--blue-soft); }

/* ── HERO ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 48%, rgba(4,8,28,0.55) 0%, rgba(4,8,28,0) 100%),
    linear-gradient(to bottom, rgba(4,8,28,0.35) 0%, rgba(4,8,28,0) 30%, rgba(4,8,28,0) 70%, var(--bg) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  max-width: 960px;
  padding: 80px 28px 90px;
}
.hero-logo { height: 34px; margin-bottom: 30px; }
.hero-headline {
  font-family: 'ArchivoExpanded', 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(32px, 5vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}
.hero-headline .line { display: block; }
/* word spans injected by JS */
.hero-headline .w { display: inline-block; will-change: transform, opacity; }
.hero-sub {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--ink-70);
  max-width: 600px;
  margin: 0 auto 32px;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--ink-45);
  font-family: 'ArchivoCondensed', 'Archivo', sans-serif;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.25em;
}
.scroll-cue-line {
  width: 1px; height: 44px; position: relative;
  background: rgba(255,255,255,0.15); overflow: hidden;
}
.scroll-cue-dot {
  position: absolute; left: -1.5px; top: 0;
  width: 4px; height: 10px; border-radius: 3px;
  background: var(--cyan);
}

/* ── Acts (shared) ─────────────────────────────────────────────────────── */
.act {
  position: relative;
  padding: 140px 28px;
  overflow: hidden;
}
.act-dark { background: var(--bg); }
.act-deep {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 50%, var(--bg) 100%);
}
.act-inner {
  position: relative; z-index: 2;
  max-width: 1080px; margin: 0 auto;
}
.act-number {
  position: absolute; top: 60px; right: 4vw; z-index: 1;
  font-family: 'ArchivoExpanded', sans-serif; font-weight: 900;
  font-size: clamp(120px, 22vw, 300px); line-height: 1;
  color: rgba(59, 158, 255, 0.05);
  pointer-events: none; user-select: none;
  will-change: transform;
}
.act-title {
  font-family: 'ArchivoExpanded', 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 1.12; letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.act-lede {
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--ink-70);
  max-width: 640px;
  margin-bottom: 56px;
}
.act-kicker {
  margin-top: 64px;
  max-width: 640px;
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--ink-70);
  border-left: 3px solid var(--blue);
  padding-left: 22px;
}
.act-kicker strong { color: var(--ink); }

/* ── Stat grid (Act I) ─────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.stat-card {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 16px;
  padding: 30px 26px;
  backdrop-filter: blur(8px);
  will-change: transform, opacity;
}
.stat-wide { grid-column: span 2; }
.stat-value {
  display: block;
  font-family: 'ArchivoExpanded', 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(38px, 4.4vw, 56px);
  letter-spacing: -0.02em;
  color: var(--blue-soft);
  line-height: 1.1;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.stat-value em {
  font-style: normal;
  font-size: 0.5em;
  color: var(--ink-70);
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
}
.stat-label {
  display: block;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-70);
}

/* ── Repurposing comparison (Act II) ───────────────────────────────────── */
#network-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.55; }

.repurpose-compare {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 18px;
  padding: 32px 34px;
  margin-bottom: 56px;
  backdrop-filter: blur(8px);
}
.rc-row {
  display: grid;
  grid-template-columns: 190px 1fr 230px;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
}
.rc-label {
  font-family: 'ArchivoCondensed', 'Archivo', sans-serif;
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-70);
}
.rc-track {
  height: 14px; border-radius: 7px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.rc-bar { height: 100%; width: 0%; border-radius: 7px; }
.rc-bar-new { background: linear-gradient(90deg, #38445e, #57648a); }
.rc-bar-re  { background: linear-gradient(90deg, var(--blue), var(--cyan)); box-shadow: 0 0 18px rgba(0, 200, 255, 0.45); }
.rc-value { font-size: 13.5px; font-weight: 600; color: var(--ink-70); text-align: right; }
.rc-note {
  margin-top: 18px; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 14px; color: var(--ink-70);
}
.rc-note strong { color: var(--cyan); }

/* ── Case cards (Act II) ───────────────────────────────────────────────── */
.case-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.case-card {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 16px;
  padding: 26px 24px;
  backdrop-filter: blur(8px);
  will-change: transform, opacity;
}
.case-tag {
  display: inline-block;
  font-family: 'ArchivoCondensed', 'Archivo', sans-serif;
  font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(59, 158, 255, 0.12);
  border: 1px solid rgba(59, 158, 255, 0.3);
  color: #7dc8ff;
  margin-bottom: 16px;
}
.case-card h3 {
  font-family: 'ArchivoExpanded', 'Archivo', sans-serif;
  font-weight: 700; font-size: 19px;
  margin-bottom: 10px;
}
.case-card p { font-size: 13.5px; line-height: 1.65; color: var(--ink-70); }
.case-card strong { color: var(--ink); }

/* ── Principles (Act III) ──────────────────────────────────────────────── */
.principle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}
.principle-card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 18px;
  padding: 36px 32px 32px;
  backdrop-filter: blur(8px);
  overflow: hidden;
  will-change: transform, opacity;
}
.principle-index {
  position: absolute; top: 14px; right: 22px;
  font-family: 'ArchivoExpanded', sans-serif; font-weight: 900;
  font-size: 54px; line-height: 1;
  color: rgba(59, 158, 255, 0.12);
  user-select: none;
}
.principle-card h3 {
  font-family: 'ArchivoExpanded', 'Archivo', sans-serif;
  font-weight: 700; font-size: 21px;
  margin-bottom: 12px;
}
.principle-card p { font-size: 14.5px; color: var(--ink-70); max-width: 92%; }

/* ── Clara (Act IV) ────────────────────────────────────────────────────── */
.act-inner-split {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 72px;
  align-items: center;
}
.clara-visual {
  position: relative;
  width: 340px; height: 340px;
  margin: 0 auto;
  will-change: transform, opacity;
}
#clara-ring {
  position: absolute; inset: -60px;
  width: calc(100% + 120px); height: calc(100% + 120px);
  pointer-events: none;
}
.clara-avatar-xl {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 3px solid rgba(59, 158, 255, 0.35);
  box-shadow: 0 0 80px rgba(0, 87, 255, 0.35);
  will-change: transform;
}
.clara-chat { display: flex; flex-direction: column; gap: 12px; min-height: 210px; }
.chat-msg {
  align-self: flex-start;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 4px 16px 16px 16px;
  padding: 13px 18px;
  font-size: 14.5px;
  color: rgba(255,255,255,0.88);
  max-width: 520px;
  backdrop-filter: blur(8px);
  visibility: hidden;  /* JS reveals & types */
}
.chat-msg .caret {
  display: inline-block; width: 2px; height: 1em;
  background: var(--cyan); vertical-align: text-bottom; margin-left: 2px;
}

/* ── Finale (Act V) ────────────────────────────────────────────────────── */
.finale {
  min-height: 92vh;
  display: flex; align-items: center;
  text-align: center;
}
#finale-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.finale-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 65% 55% at 50% 50%, rgba(4,8,28,0.5) 0%, rgba(4,8,28,0) 100%),
    linear-gradient(to bottom, var(--bg) 0%, rgba(4,8,28,0) 25%, rgba(4,8,28,0) 75%, var(--bg-deep) 100%);
}
.finale-inner { width: 100%; }
.finale-title {
  font-family: 'ArchivoExpanded', 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(32px, 5.4vw, 66px);
  line-height: 1.08; letter-spacing: -0.02em;
  margin-bottom: 26px;
}
.finale-lede { margin-left: auto; margin-right: auto; margin-bottom: 44px; }
.finale-foot {
  margin-top: 34px;
  font-family: 'ArchivoCondensed', 'Archivo', sans-serif;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--ink-45);
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
  background: var(--bg-deep);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 44px 28px 52px;
  text-align: center;
}
.footer-logo { height: 20px; opacity: 0.7; margin-bottom: 16px; }
.footer p {
  font-size: 12px; color: var(--ink-45);
  max-width: 620px; margin: 0 auto; line-height: 1.7;
}

/* ── Launch modal (Clara's coming-soon announcement) ───────────────────── */
.launch-modal {
  position: fixed; inset: 0; z-index: 950;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
/* the hidden attribute must beat the display:flex above */
.launch-modal[hidden] { display: none; }
.launch-backdrop {
  position: absolute; inset: 0;
  background: rgba(2, 5, 14, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;                /* JS fades in */
}
.launch-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  background: rgba(14, 20, 38, 0.92);
  border: 1px solid rgba(59, 158, 255, 0.28);
  border-radius: 22px;
  padding: 44px 38px 36px;
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 60px rgba(0, 87, 255, 0.18);
  will-change: transform, opacity;
}
.launch-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; cursor: pointer;
  font-size: 26px; line-height: 1;
  color: var(--ink-45);
  font-family: 'Archivo', sans-serif;
}
.launch-close:hover { color: var(--ink); }
.launch-avatar {
  width: 84px; height: 84px; border-radius: 50%;
  border: 2px solid rgba(59, 158, 255, 0.5);
  box-shadow: 0 0 34px rgba(0, 87, 255, 0.45);
  margin-bottom: 18px;
}
.launch-title {
  font-family: 'ArchivoExpanded', 'Archivo', sans-serif;
  font-weight: 900; font-size: 26px;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.launch-msg {
  font-size: 14.5px; line-height: 1.7;
  color: var(--ink-70);
  min-height: 120px;
  margin-bottom: 22px;
  text-align: left;
}
.launch-msg .caret {
  display: inline-block; width: 2px; height: 1em;
  background: var(--cyan); vertical-align: text-bottom; margin-left: 2px;
}
.launch-mail { width: 100%; }
.launch-foot {
  margin-top: 18px;
  font-family: 'ArchivoCondensed', 'Archivo', sans-serif;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--ink-45);
}

/* ── Clara dock (fixed companion) ──────────────────────────────────────── */
.clara-dock {
  position: fixed; right: 26px; bottom: 26px; z-index: 850;
  display: flex; align-items: flex-end; gap: 12px;
  opacity: 0;                 /* JS animates in after preloader */
  pointer-events: none;
  will-change: transform;
}
.clara-dock-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  border: 2px solid rgba(59, 158, 255, 0.5);
  box-shadow: 0 4px 24px rgba(0, 87, 255, 0.45);
  flex-shrink: 0;
}
.clara-dock-bubble {
  background: rgba(14, 20, 38, 0.92);
  border: 1px solid rgba(59, 158, 255, 0.3);
  backdrop-filter: blur(12px);
  border-radius: 14px 14px 4px 14px;
  padding: 10px 15px;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.9);
  max-width: 250px;
  opacity: 0;                 /* JS fades per act */
  will-change: transform, opacity;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-wide { grid-column: span 2; }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .act-inner-split { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .clara-chat { text-align: left; }
  .chat-msg { align-self: center; }
  .topnav-links { display: none; }
}
@media (max-width: 640px) {
  .act { padding: 96px 20px; }
  .stat-grid, .case-grid, .principle-grid { grid-template-columns: 1fr; }
  .stat-wide { grid-column: span 1; }
  .rc-row { grid-template-columns: 1fr; gap: 8px; }
  .rc-value { text-align: left; }
  .clara-visual { width: 240px; height: 240px; }
  .clara-dock-bubble { max-width: 180px; font-size: 12px; }
  .hero-logo { height: 30px; }
}
