/* ═══════════════════════════════════════════════════════════════════════════
   Wingbro — wingbro.app landing
   Design tokens mirrored from the app's src/theme/tokens.ts (dark theme).
   Static, dependency-free. Reveal animations via IntersectionObserver (js/main.js)
   and degrade gracefully without JS.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Palette (app tokens) */
  --night-900: #0b0b12;
  --night-800: #15151f;
  --night-700: #1e1e2a;
  --violet-600: #5b3fe0;
  --violet-500: #7c5cff;
  --violet-400: #9c84ff;
  --violet-300: #b9a8ff;
  --magenta: #b14dff;
  --rose-500: #ff4d8d;
  --rose-400: #ff6fa3;
  --gold-500: #ffb020;
  --gold-400: #ffc24d;

  /* Semantic */
  --bg: var(--night-900);
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f2f2f7;
  --text-2: rgba(242, 242, 247, 0.72);
  --text-3: rgba(242, 242, 247, 0.45);
  --brand: var(--violet-500);
  --accent: var(--rose-500);
  --spark: var(--gold-400);
  --grad: linear-gradient(100deg, var(--violet-500), var(--magenta) 50%, var(--rose-500));

  /* Shape & motion */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;
  --container: 1140px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --shadow-1: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-brand: 0 10px 40px rgba(124, 92, 255, 0.35);

  --font: 'Inter var', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@font-face {
  font-family: 'Inter var';
  src: url('../assets/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--violet-300);
  text-decoration: none;
}

a:hover {
  color: #fff;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 22px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--r-sm) 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* ── Reveal animation (JS adds .in) ───────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* No-JS fallback: html gets .no-js removed by main.js; keep visible without it */
html.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 11, 18, 0.72);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: #fff;
}

.nav__logo img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}

.nav__links a {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
}

.nav__links a:hover {
  color: #fff;
}

.nav__cta {
  background: var(--grad);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  font-weight: 700;
  box-shadow: var(--shadow-brand);
  transition: transform 0.25s var(--ease);
}

.nav__cta:hover {
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .nav__links li:not(.nav__cta-li) {
    display: none;
  }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 84px 0 72px;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url('../assets/hero-bg.webp');
  background-size: cover;
  background-position: center right;
}

@media (max-width: 720px) {
  .hero__bg {
    background-image: url('../assets/hero-bg-mobile.webp');
  }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 11, 18, 0.96) 0%, rgba(11, 11, 18, 0.82) 45%, rgba(11, 11, 18, 0.35) 100%),
    linear-gradient(0deg, var(--night-900) 0%, transparent 30%);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet-300);
}

.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 12px var(--violet-500);
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 6vw, 62px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero h1 em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  font-size: 19px;
  color: var(--text-2);
  max-width: 540px;
  margin-bottom: 30px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: #000;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 9px 18px 9px 14px;
  color: #fff;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

.store-badge:hover {
  transform: translateY(-2px);
  border-color: var(--violet-400);
  color: #fff;
}

.store-badge svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.store-badge__txt {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.store-badge__txt small {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.store-badge__txt strong {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero__note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-3);
}

/* Phone mockup */
.phone-wrap {
  display: flex;
  justify-content: center;
  perspective: 1400px;
}

.phone {
  width: 300px;
  border-radius: 44px;
  background: #17171f;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-2), 0 0 80px rgba(124, 92, 255, 0.22);
  padding: 12px;
  transform: rotateY(-8deg) rotateX(2deg);
}

@media (prefers-reduced-motion: no-preference) {
  .phone {
    animation: float 7s ease-in-out infinite;
  }
  @keyframes float {
    0%, 100% { transform: rotateY(-8deg) rotateX(2deg) translateY(0); }
    50% { transform: rotateY(-8deg) rotateX(2deg) translateY(-12px); }
  }
}

.phone__screen {
  border-radius: 34px;
  background: linear-gradient(180deg, #101018, var(--night-900));
  border: 1px solid var(--border);
  overflow: hidden;
  padding: 18px 14px;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.phone__notch {
  width: 84px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0 auto 4px;
}

.p-greet {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.p-name {
  font-size: 19px;
  font-weight: 800;
}

.p-hero {
  border-radius: 18px;
  background: var(--grad);
  padding: 14px;
  color: #fff;
}

.p-hero__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.p-hero__sigil {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  flex: none;
  object-fit: cover;
}

.p-hero__label {
  font-size: 9px;
  letter-spacing: 0.12em;
  opacity: 0.85;
}

.p-hero__rank {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
}

.p-hero__streak {
  margin-left: auto;
  text-align: right;
  font-size: 15px;
  font-weight: 800;
}

.p-hero__streak small {
  display: block;
  font-size: 9px;
  font-weight: 500;
  opacity: 0.8;
}

.p-hero__bar {
  margin-top: 12px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}

.p-hero__bar i {
  display: block;
  height: 100%;
  width: 62%;
  background: #fff;
  border-radius: 3px;
}

.p-card {
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 13px;
}

.p-card--dare {
  border: 1.5px solid var(--gold-400);
}

.p-card__tag {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-400);
  margin-bottom: 7px;
}

.p-card__tag span:last-child {
  color: var(--text-3);
}

.p-card__title {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.p-card__body {
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.45;
}

.p-stats {
  display: flex;
  gap: 12px;
}

.p-stat {
  flex: 1;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 12px 13px;
}

.p-stat__label {
  font-size: 9.5px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.p-stat__val {
  font-size: 21px;
  font-weight: 800;
}

.p-stat__val em {
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  color: var(--rose-400);
  margin-left: 4px;
}

.p-stat--courage .p-stat__val em {
  color: var(--gold-400);
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
section {
  padding: 84px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: clamp(30px, 4.4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 14px 0 12px;
}

.section-head h2 em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head p {
  color: var(--text-2);
  font-size: 18px;
}

/* Anti-rizz strip */
.strip {
  padding: 40px 0;
  border-block: 1px solid var(--border);
  background: var(--night-800);
}

.strip__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 42px;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.strip__item {
  font-size: 16.5px;
  font-weight: 650;
  color: var(--text-2);
}

.strip__item strong {
  color: #fff;
}

.strip__item em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

/* Feature grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 940px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 92, 255, 0.45);
  background: var(--surface-2);
}

.card__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(124, 92, 255, 0.14);
  border: 1px solid rgba(124, 92, 255, 0.3);
  margin-bottom: 16px;
  font-size: 22px;
}

.card h3 {
  font-size: 19px;
  font-weight: 750;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 15px;
  color: var(--text-2);
}

.card .soon {
  display: inline-block;
  margin-left: 8px;
  vertical-align: 2px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-400);
  border: 1px solid rgba(255, 194, 77, 0.45);
  border-radius: var(--r-pill);
  padding: 2px 8px;
}

/* Ladder (ranks) */
.ladder {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  counter-reset: rung;
}

.rung {
  flex: 1 1 130px;
  min-width: 128px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 14px;
  counter-increment: rung;
  position: relative;
  overflow: hidden;
}

.rung::before {
  content: counter(rung, decimal-leading-zero);
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-3);
}

.rung strong {
  display: block;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}

.rung span {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.4;
  display: block;
  margin-top: 4px;
}

.rung--last {
  border-color: rgba(255, 194, 77, 0.5);
  background: rgba(255, 176, 32, 0.07);
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 800px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 30px 26px 26px;
}

.step__n {
  font-size: 40px;
  font-weight: 850;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 14px;
}

.step h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.step p {
  font-size: 15px;
  color: var(--text-2);
}

/* FAQ */
.faq {
  max-width: 760px;
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px 4px;
  font-size: 17.5px;
  font-weight: 650;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  font-size: 24px;
  font-weight: 400;
  color: var(--violet-300);
  transition: transform 0.3s var(--ease);
  flex: none;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq .faq__a {
  padding: 0 4px 22px;
  color: var(--text-2);
  font-size: 15.5px;
  max-width: 640px;
}

/* Download band */
.dl-band {
  background:
    radial-gradient(120% 160% at 50% 0%, rgba(124, 92, 255, 0.22), transparent 55%),
    var(--night-800);
  border-block: 1px solid var(--border);
  text-align: center;
}

.dl-band .container {
  max-width: 720px;
}

.dl-band h2 {
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.dl-band p {
  color: var(--text-2);
  font-size: 18px;
  margin-bottom: 30px;
}

.dl-band .cta-row {
  justify-content: center;
}

.dl-band .app-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 22px;
  filter: drop-shadow(0 12px 30px rgba(124, 92, 255, 0.45));
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  padding: 44px 0 36px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-3);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 42px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text-2);
}

.footer-brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  list-style: none;
}

.footer-links a {
  color: var(--text-3);
}

.footer-links a:hover {
  color: #fff;
}

.footer-meta {
  width: 100%;
  margin-top: 10px;
}

@media (max-width: 980px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .phone-wrap {
    order: -1;
  }
  .phone {
    width: 270px;
    transform: none;
  }
  section {
    padding: 64px 0;
  }
}
