/* ============================================================
   Trailair landing — single stylesheet, no framework.
   Dark cinematic theme, mobile-first, premium iOS-app feel.
   ============================================================ */

/* --- Tokens ------------------------------------------------- */
:root {
  /* Surfaces */
  --bg:           #0A0A0A;
  --bg-soft:      #111114;
  --surface:      #1C1C1E;
  --surface-hi:  #2C2C2E;
  --border:       #2A2A2E;

  /* Text */
  --fg:           #F2F2F7;
  --fg-muted:     #A1A1AA;
  --fg-dim:       #71717A;

  /* Brand */
  --gold:         #FF9F0A;
  --gold-soft:    #FFC163;
  --red:          #E11D48;
  --red-soft:     #FB7185;

  /* Type scale (mobile baseline) */
  --fs-xs:        13px;
  --fs-sm:        15px;
  --fs-base:      16px;
  --fs-lg:        18px;
  --fs-xl:        22px;
  --fs-2xl:       28px;
  --fs-3xl:       40px;
  --fs-4xl:       clamp(44px, 9vw, 88px);

  /* Spacing scale (8pt rhythm) */
  --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;

  /* Radii */
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-pill: 999px;

  /* Motion */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 180ms;
  --t-base: 260ms;
  --t-slow: 420ms;

  /* Shadows */
  --shadow-glow-gold: 0 30px 80px -20px rgba(255, 159, 10, 0.42);
  --shadow-card:      0 12px 40px rgba(0,0,0,0.45);
  color-scheme: dark;
}

/* --- Reset / base ------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

/* Accessibility: visible focus ring */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Container ---------------------------------------------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: var(--s-5);
  padding-right: var(--s-5);
}

/* --- Nav ---------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: var(--s-4) 0;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(10, 10, 10, 0.7);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base) var(--ease-out),
              background var(--t-base) var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(10, 10, 10, 0.85);
  border-bottom-color: var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-weight: 700;
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
}
.brand img {
  width: 32px; height: 32px; border-radius: 8px;
  box-shadow: 0 4px 16px rgba(255, 159, 10, 0.25);
}
.nav__links {
  display: none;
  gap: var(--s-6);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
}
.nav__links a { transition: color var(--t-fast); }
.nav__links a:hover { color: var(--fg); }

@media (min-width: 720px) {
  .nav__links { display: inline-flex; }
}

/* --- Buttons ------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform var(--t-fast) var(--ease-out),
    background var(--t-fast),
    border-color var(--t-fast),
    box-shadow var(--t-base) var(--ease-out);
  min-height: 44px; /* touch */
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--fg);
  color: var(--bg);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.12);
}
.btn--primary:hover {
  background: #fff;
  box-shadow: 0 16px 44px rgba(255, 255, 255, 0.18);
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold) 0%, #FFB94A 100%);
  color: #1A0E00;
  box-shadow: var(--shadow-glow-gold);
}
.btn--gold:hover { filter: brightness(1.05); }

.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn--ghost:hover {
  background: var(--surface);
  border-color: var(--surface-hi);
}

.btn svg { width: 18px; height: 18px; }

/* --- Hero --------------------------------------------------- */
.hero {
  position: relative;
  padding: calc(96px + var(--s-7)) 0 var(--s-9);
  overflow: hidden;
  text-align: center;
}
.hero__aura {
  position: absolute;
  inset: -40% 50% auto 50%;
  transform: translate(-50%, 0);
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(255, 159, 10, 0.28),
    rgba(255, 159, 10, 0.06) 45%,
    transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  animation: aura-pulse 9s ease-in-out infinite;
}
@keyframes aura-pulse {
  0%, 100% { opacity: 0.75; transform: translate(-50%, 0) scale(1); }
  50%      { opacity: 1;    transform: translate(-50%, -10px) scale(1.05); }
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-5);
}
.hero__logo {
  width: 124px; height: 124px;
  border-radius: 28px;
  box-shadow: 0 30px 80px -10px rgba(255, 159, 10, 0.45),
              0 10px 30px rgba(0, 0, 0, 0.7);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: rgba(28, 28, 30, 0.6);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}
h1 {
  margin: 0;
  font-size: var(--fs-4xl);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 14ch;
  background: linear-gradient(180deg, #FFFFFF 0%, #B8B8C0 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  margin: 0;
  max-width: 56ch;
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--fg-muted);
  line-height: 1.55;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  justify-content: center;
  margin-top: var(--s-3);
}
.hero__meta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-3);
  color: var(--fg-dim);
  font-size: var(--fs-xs);
}
.hero__meta .sep { opacity: 0.4; }

/* --- Section header ----------------------------------------- */
section { padding: var(--s-9) 0; position: relative; }
.section-head {
  text-align: center;
  margin-bottom: var(--s-7);
}
.section-head .kicker {
  display: inline-block;
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s-3);
}
.section-head h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.section-head p {
  margin: var(--s-3) auto 0;
  max-width: 56ch;
  color: var(--fg-muted);
  font-size: var(--fs-lg);
}

/* --- Feature grid ------------------------------------------- */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 720px) {
  .features { grid-template-columns: repeat(2, 1fr); gap: var(--s-5); }
}
@media (min-width: 1024px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}
.feature {
  position: relative;
  padding: var(--s-6);
  background: linear-gradient(180deg, var(--surface) 0%, #161618 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition:
    border-color var(--t-base) var(--ease-out),
    transform var(--t-base) var(--ease-out);
}
.feature::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 159, 10, 0.4) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--t-base);
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
}
.feature:hover { transform: translateY(-2px); border-color: transparent; }
.feature:hover::before { opacity: 1; }
.feature__icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(255, 159, 10, 0.18), rgba(255, 159, 10, 0.04));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-4);
  color: var(--gold);
}
.feature__icon svg { width: 24px; height: 24px; }
.feature h3 {
  margin: 0 0 var(--s-2);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.feature p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  line-height: 1.6;
}

/* --- Showcase strip ----------------------------------------- */
.showcase {
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(255, 159, 10, 0.10), transparent 70%),
    var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.showcase__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
  align-items: center;
}
@media (min-width: 880px) {
  .showcase__grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--s-8); }
}
.showcase h2 {
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 var(--s-4);
}
.showcase ul {
  list-style: none; padding: 0; margin: var(--s-5) 0 0;
  display: grid;
  gap: var(--s-3);
}
.showcase li {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  color: var(--fg-muted);
  font-size: var(--fs-base);
}
.showcase li::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 18px; height: 18px;
  margin-top: 3px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--gold) 0%, var(--gold) 28%, transparent 30%),
    rgba(255, 159, 10, 0.16);
  border: 1px solid rgba(255, 159, 10, 0.35);
}
.phone {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9 / 19.5;
  margin: 0 auto;
  border-radius: 44px;
  background: linear-gradient(135deg, #1c1c1e 0%, #0b0b0d 100%);
  padding: 14px;
  box-shadow:
    0 60px 120px -20px rgba(0,0,0,0.7),
    inset 0 0 0 1.5px rgba(255,255,255,0.05);
}
.phone::before {
  content: "";
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 28px;
  background: #000;
  border-radius: 14px;
  z-index: 2;
}
.phone__screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background:
    radial-gradient(70% 50% at 50% 30%, rgba(255, 159, 10, 0.22), transparent 70%),
    linear-gradient(180deg, #0A0A0A 0%, #050505 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone__screen img {
  width: 50%;
  filter: drop-shadow(0 20px 40px rgba(255, 159, 10, 0.35));
}

/* --- Screenshots gallery ----------------------------------- */
.screens-section {
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(255, 159, 10, 0.10), transparent 60%),
    var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.screens-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
  justify-items: center;
}
@media (min-width: 640px) {
  .screens-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-6) var(--s-5); }
}
@media (min-width: 1024px) {
  .screens-grid { grid-template-columns: repeat(4, 1fr); gap: var(--s-6) var(--s-4); }
}

.screen {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--s-4);
  width: 100%;
  max-width: 280px;
  /* Staggered entrance via custom property — works alongside .reveal */
  transition-delay: calc(var(--i, 0) * 80ms);
}
.screen__frame {
  position: relative;
  width: 100%;
  border-radius: 36px;
  padding: 10px;
  background: linear-gradient(160deg, #1c1c1e 0%, #0a0a0d 100%);
  box-shadow:
    0 30px 70px -20px rgba(0, 0, 0, 0.7),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.04);
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out);
}
.screen__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 25%);
  pointer-events: none;
}
.screen__frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
  background: #0A0A0A;
}
.screen:hover .screen__frame {
  transform: translateY(-4px);
  box-shadow:
    0 40px 90px -20px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 159, 10, 0.18),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.06);
}
.screen figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.screen__kicker {
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.screen__title {
  font-size: var(--fs-base);
  color: var(--fg);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* --- Final CTA --------------------------------------------- */
.cta {
  text-align: center;
  padding: var(--s-10) 0;
  background:
    radial-gradient(60% 60% at 50% 100%, rgba(225, 29, 72, 0.20), transparent 70%),
    radial-gradient(60% 60% at 50% 0%, rgba(255, 159, 10, 0.18), transparent 70%);
}
.cta h2 {
  margin: 0 auto var(--s-4);
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 16ch;
}
.cta p {
  margin: 0 auto var(--s-5);
  max-width: 52ch;
  color: var(--fg-muted);
  font-size: var(--fs-lg);
}

/* --- Footer ------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--s-7) 0 var(--s-6);
  color: var(--fg-dim);
  font-size: var(--fs-sm);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  align-items: center;
  text-align: center;
}
@media (min-width: 720px) {
  .footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
}
.footer__links {
  display: flex;
  gap: var(--s-5);
  flex-wrap: wrap;
  justify-content: center;
}
.footer__links a { color: var(--fg-muted); transition: color var(--t-fast); }
.footer__links a:hover { color: var(--fg); }
.footer .legal { font-size: var(--fs-xs); color: var(--fg-dim); }

/* --- Reveal-on-scroll (vanilla JS hooks) -------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-slow) var(--ease-out),
              transform var(--t-slow) var(--ease-out);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* --- Long-form pages (privacy / terms) ---------------------- */
.doc {
  padding: calc(96px + var(--s-7)) 0 var(--s-9);
}
.doc .container { max-width: 720px; }
.doc h1 {
  font-size: clamp(36px, 6vw, 56px);
  letter-spacing: -0.03em;
  margin: 0 0 var(--s-2);
  background: linear-gradient(180deg, #fff 0%, #B8B8C0 110%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.doc .meta {
  color: var(--fg-dim);
  font-size: var(--fs-sm);
  margin-bottom: var(--s-7);
}
.doc h2 {
  margin: var(--s-7) 0 var(--s-3);
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--fg);
}
.doc h3 {
  margin: var(--s-5) 0 var(--s-2);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--fg);
}
.doc p, .doc li {
  font-size: var(--fs-base);
  color: var(--fg-muted);
  line-height: 1.7;
}
.doc strong { color: var(--fg); }
.doc a { color: var(--gold); transition: color var(--t-fast); }
.doc a:hover { color: var(--gold-soft); text-decoration: underline; }
.doc ul { padding-left: var(--s-5); margin: var(--s-3) 0; }
.doc li { margin-bottom: 6px; }
.doc .callout {
  background: var(--surface);
  border-left: 3px solid var(--gold);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-sm);
  margin: var(--s-5) 0;
}
.doc hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--s-7) 0 var(--s-4);
}
.doc .back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--fg-muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--s-6);
  transition: color var(--t-fast);
}
.doc .back:hover { color: var(--fg); }

/* --- Reduced motion ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
