/* ==========================================================================
   Citadel Fitness: landing page
   Brand tokens mirrored from the app's own theme (src/theme/tokens.ts)
   ========================================================================== */

:root {
  --ink900: #0B0E14;
  --ink800: #10141d;
  --ink700: #1C2230;
  --ink500: #4A5468;
  --ink300: #8A93A6;
  --ink100: #D8DCE4;
  --white: #FFFFFF;
  --border: #2A3140;
  --primary: #FF5A36;
  --primary-2: #FF3D81;
  --calendar-2: #8B5CF6;
  --pulse-2: #22D3EE;

  --font-display: 'Sora', system-ui, -apple-system, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink900);
  color: var(--white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* ---------- reveal-on-scroll: fly-in variants ---------- */
:root {
  --fly-ease: cubic-bezier(0.16, 1.36, 0.34, 1);
}
.reveal-up, .reveal-left, .reveal-right {
  opacity: 0;
  transition: opacity 0.85s var(--fly-ease), transform 0.85s var(--fly-ease);
  transition-delay: calc(var(--delay, 0) * 110ms);
  will-change: transform, opacity;
}
.reveal-up { transform: translateY(64px) scale(0.96); }
.reveal-left { transform: translateX(-90px) rotate(-3deg) scale(0.94); }
.reveal-right { transform: translateX(90px) rotate(3deg) scale(0.94); }

.reveal-up.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: translate(0, 0) rotate(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-up, .reveal-left, .reveal-right { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* ---------- noise overlay: keeps flat dark sections from reading cheap ---------- */
.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- scroll progress bar: the "journey" motif, always in motion ---------- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  z-index: 60;
  background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--calendar-2));
  box-shadow: 0 0 12px rgba(255,90,54,0.6);
  transition: width 0.1s linear;
}

/* ---------- ambient per-section glows: continuous, never stop ----------
   Deliberately no `filter: blur()` here — on some browser/GPU combinations
   a large blurred+animated element renders as its raw hard-edged box
   instead of softening, which showed up as a visible rectangle behind the
   Features/Premium sections. A wide multi-stop radial-gradient looks just
   as soft on its own and has no such failure mode. */
.section-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  animation: drift 15s ease-in-out infinite;
}
.section-glow--pulse {
  background: radial-gradient(ellipse 620px 480px at 88% 0%, rgba(34,211,238,0.16), rgba(34,211,238,0.06) 35%, transparent 65%);
}
.section-glow--identity {
  background: radial-gradient(ellipse 680px 520px at 4% 100%, rgba(139,92,246,0.16), rgba(139,92,246,0.06) 35%, transparent 65%);
  animation-delay: -4s;
}
.section-glow--flame {
  background: radial-gradient(ellipse 600px 460px at 50% 0%, rgba(255,90,54,0.16), rgba(255,90,54,0.06) 35%, transparent 65%);
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(16px, -12px) scale(1.05); }
}

/* ---------- icon idle pulse: small continuous life, everywhere ---------- */
.feature-icon, .chip-icon {
  animation: icon-glow 4.5s ease-in-out infinite;
}
.feature-card:nth-child(2) .feature-icon { animation-delay: 0.6s; }
.feature-card:nth-child(3) .feature-icon { animation-delay: 1.2s; }
.chip:nth-child(2) .chip-icon { animation-delay: 0.5s; }
.chip:nth-child(3) .chip-icon { animation-delay: 1s; }
.chip:nth-child(4) .chip-icon { animation-delay: 1.5s; }
.chip:nth-child(5) .chip-icon { animation-delay: 2s; }
@keyframes icon-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255,90,54,0)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 8px rgba(255,90,54,0.55)); transform: scale(1.08); }
}

/* ============================== NAV ============================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 18px 20px;
  background: linear-gradient(to bottom, rgba(11,14,20,0.7), transparent);
  transition: background 0.4s var(--ease);
}
.nav-inner {
  width: 100%;
  max-width: 640px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(28,34,48,0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}
.nav.is-scrolled .nav-inner {
  background: rgba(28,34,48,0.72);
  border-color: rgba(255,255,255,0.12);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--white);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  background: var(--primary);
  padding: 9px 16px;
  border-radius: 999px;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.nav-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.arrow { display: inline-block; transition: transform 0.25s var(--ease); }
a:hover .arrow, .nav-cta:hover .arrow { transform: translateX(3px); }

/* ============================== HERO ============================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 24px 80px;
  overflow: hidden;
}

.hero-glow {
  /* No `filter: blur()` — see the note above .section-glow. The gradient's
     own gradual stops do the softening instead. */
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1100px;
  height: 1100px;
  transform: translate(-50%, -55%);
  background: radial-gradient(circle at 40% 35%, rgba(255,90,54,0.22), rgba(255,90,54,0.09) 30%, rgba(139,92,246,0.08) 45%, transparent 68%);
  pointer-events: none;
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: translate(-50%, -55%) scale(1); opacity: 0.85; }
  50% { transform: translate(-50%, -55%) scale(1.12); opacity: 1; }
}

.hero-inner {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink100);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(255,90,54,0.6);
  animation: dot-pulse 2.2s ease-out infinite;
}
@keyframes dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,90,54,0.55); }
  70% { box-shadow: 0 0 0 6px rgba(255,90,54,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,90,54,0); }
}

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  background: linear-gradient(100deg, var(--white) 40%, var(--ink100) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
  color: var(--ink300);
  max-width: 480px;
  margin: 0 0 34px;
}

.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  padding: 15px 26px;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), filter 0.25s ease;
}
.btn-primary {
  color: var(--white);
  background: linear-gradient(100deg, var(--primary), var(--primary-2));
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn-ghost {
  color: var(--ink100);
  font-weight: 600;
  padding: 15px 6px;
}
.btn-ghost:hover { color: var(--white); }

.btn-pulse { position: relative; }
.btn-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(255,90,54,0.45);
  animation: ring-pulse 2.6s ease-out infinite;
  pointer-events: none;
}
@keyframes ring-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,90,54,0.4); }
  70% { box-shadow: 0 0 0 14px rgba(255,90,54,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,90,54,0); }
}

/* ---- hero mock card ---- */
.hero-visual { display: flex; justify-content: center; }
.mock-card {
  width: 100%;
  max-width: 300px;
  background: linear-gradient(160deg, var(--ink700), var(--ink800));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.02);
}
.mock-float { animation: float 7s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50% { transform: translateY(-14px) rotate(0.6deg); }
}
.mock-header { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.mock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.mock-line { display: block; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.14); }
.mock-line-title { width: 96px; }
.mock-line-sm { width: 54px; height: 6px; margin-top: 8px; }
.mock-cta {
  height: 44px;
  border-radius: 14px;
  margin-bottom: 16px;
  background: linear-gradient(100deg, var(--primary), var(--primary-2));
  opacity: 0.92;
}
.mock-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mock-chip { width: 30px; height: 30px; border-radius: 10px; background: rgba(255,255,255,0.08); flex-shrink: 0; }
.mock-stat { flex: 1; }
.mock-stat-badge {
  display: block;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--calendar-2));
  margin-bottom: 6px;
}
.mock-stat-badge--alt { background: linear-gradient(135deg, var(--primary), var(--pulse-2)); }

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 36px;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 12px;
}
.scroll-cue span {
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--ink100);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue {
  0% { top: 6px; opacity: 1; }
  70% { opacity: 0; }
  100% { top: 20px; opacity: 0; }
}

/* ============================== SECTIONS (shared) ============================== */
.features, .premium, .final-cta {
  position: relative;
  overflow: hidden;
}
section:not(.hero) {
  max-width: 1080px;
  margin: 0 auto;
  padding: 100px 24px;
}
.section-head, .feature-grid, .chip-grid, .premium-note, .final-cta h2, .final-cta p, .final-cta .btn {
  position: relative;
  z-index: 1;
}
.section-head { text-align: center; max-width: 560px; margin: 0 auto 56px; }
.kicker {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.section-sub { color: var(--ink300); font-size: 16px; margin: 0; }

/* ============================== FEATURES ============================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--ink700);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 30px 26px;
  transition: transform 0.35s var(--ease), border-color 0.35s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,90,54,0.35);
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: rgba(255,90,54,0.12);
  color: var(--primary);
  margin-bottom: 20px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
}
.feature-card p {
  color: var(--ink300);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
}

/* ============================== PREMIUM ============================== */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 780px;
  margin: 0 auto;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink100);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 12px 18px;
  border-radius: 999px;
  transition: box-shadow 0.35s ease, border-color 0.35s ease, transform 0.25s ease;
}
.chip:hover {
  border-color: rgba(255,90,54,0.4);
  box-shadow: 0 0 24px -4px rgba(255,90,54,0.35);
  transform: translateY(-2px);
}
.chip-icon {
  display: inline-flex;
  color: var(--primary);
}
.chip-icon svg { width: 16px; height: 16px; }
.premium-note {
  text-align: center;
  color: var(--ink500);
  font-size: 13px;
  margin-top: 30px;
  letter-spacing: 0.02em;
}

/* ============================== FINAL CTA ============================== */
.final-cta {
  text-align: center;
  padding-bottom: 140px !important;
}
.final-cta h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.final-cta p {
  color: var(--ink300);
  font-size: 16px;
  margin: 0 0 34px;
}

/* ============================== FOOTER ============================== */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  border-top: 1px solid var(--border);
}
.wordmark-sm { font-size: 13px; letter-spacing: 0.12em; color: var(--ink300); }
.footer-copy { font-size: 13px; color: var(--ink500); }
.footer-link { font-size: 13px; color: var(--ink300); font-weight: 600; }
.footer-link:hover { color: var(--primary); }

/* ============================== RESPONSIVE ============================== */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .lede { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; max-width: 260px; margin: 0 auto; }
  .feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero { padding-top: 120px; }
  .nav-inner { padding: 8px 8px 8px 16px; }
  section:not(.hero) { padding: 72px 20px; }
}
