/* The Flight Tech Labs — site styles */

:root {
  --bg: #070a12;
  --bg-soft: #0a0f1b;
  --surface: #0f1522;
  --surface-2: #151e2f;
  --line: #1f2b40;
  --line-soft: #172237;
  --text: #eef2f8;
  --text-2: #cfd8e8;
  --muted: #93a0b8;
  --accent: #5ee1ff;
  --accent-2: #8b6cff;
  --ok: #3ddc97;
  --warn: #ffc857;
  --accent-3: #ff7ad9;
  --radius: 24px;
  --radius-sm: 14px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow: 0 20px 60px -30px rgba(0, 0, 0, .7);
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4, h5 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 1em; }
ul { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: pan 7s linear infinite;
}
.eyebrow {
  display: inline-block;
  color: var(--accent); font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px;
}
.h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.section { padding: clamp(56px, 9vw, 96px) 0; }
.section.tight { padding: 48px 0; }
.section-head { margin-bottom: 40px; max-width: 720px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 1.05rem; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); border: 0; margin: 0; }

/* ---------- Navigation ---------- */
.site-nav { position: sticky; top: 12px; z-index: 50; margin-top: 12px; padding: 0 16px; view-transition-name: site-nav; }
.nav-inner {
  position: relative; display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px;
  padding: 0 10px 0 18px; border-radius: 999px;
  background: rgba(10, 15, 27, .6); border: 1px solid var(--line-soft);
  backdrop-filter: saturate(170%) blur(18px);
  -webkit-backdrop-filter: saturate(170%) blur(18px);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-nav.scrolled .nav-inner { background: rgba(10, 15, 27, .86); border-color: var(--line); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .9); }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 800; font-size: 1.02rem; letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.logo {
  width: 32px; height: 32px; border-radius: 10px; flex: 0 0 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; color: #05080f; font-weight: 800; font-size: .78rem;
  box-shadow: 0 6px 18px -6px rgba(94, 225, 255, .6);
  transition: transform .4s var(--ease);
}
.brand:hover .logo { transform: rotate(-8deg) scale(1.08); }
.nav-links { display: flex; list-style: none; gap: 26px; margin: 0; padding: 0; }
.nav-links a { position: relative; color: var(--muted); font-size: .92rem; font-weight: 500; transition: color .2s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); text-decoration: none; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
  display: none; background: var(--surface); border: 1px solid var(--line);
  color: var(--text); border-radius: 10px; padding: 8px 12px; cursor: pointer; font: inherit;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  position: relative; overflow: hidden;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font: 700 .96rem/1 "Inter", system-ui, sans-serif; color: var(--text); text-decoration: none;
  transition: transform .3s var(--ease), filter .2s ease, background-color .2s ease, background-position .6s var(--ease), border-color .2s ease, box-shadow .3s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
  background-size: 200% 100%;
  color: #05080f;
  box-shadow: 0 12px 30px -12px rgba(94, 225, 255, .6);
}
.btn-primary:hover { background-position: 100% 0; color: #05080f; box-shadow: 0 16px 36px -12px rgba(139, 108, 255, .7); }
/* light sweep across the button on hover */
.btn-primary::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn-primary:hover::before { transform: translateX(120%); transition: transform .8s var(--ease); }
.btn.is-disabled {
  background: var(--surface-2); border-color: var(--line); color: var(--muted);
  box-shadow: none; cursor: not-allowed; pointer-events: none;
}
.btn.is-disabled::before { display: none; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 9px 16px; font-size: .88rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 110px 0 90px; text-align: center; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -220px; transform: translateX(-50%);
  width: min(1100px, 150vw); height: 760px;
  background:
    radial-gradient(closest-side, rgba(94, 225, 255, .20), transparent 70%),
    radial-gradient(closest-side at 72% 40%, rgba(139, 108, 255, .22), transparent 70%);
  pointer-events: none;
  animation: breathe 9s ease-in-out infinite alternate;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .35;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(15, 21, 34, .8); color: var(--muted); font-size: .86rem;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 2.2s ease-out infinite; }
.hero h1 { margin: 26px 0 18px; font-size: clamp(2.5rem, 6.2vw, 4.4rem); font-weight: 800; letter-spacing: -0.04em; }
.lead { color: var(--muted); font-size: clamp(1.02rem, 1.6vw, 1.22rem); max-width: 660px; margin: 0 auto; }
.cta-row { margin-top: 36px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-meta { margin-top: 28px; color: var(--muted); font-size: .9rem; display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
.hero-meta span::before { content: "\2713"; color: var(--ok); margin-right: 8px; font-weight: 700; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat {
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; text-align: left;
}
.stat strong { display: block; font-size: 2rem; letter-spacing: -0.03em; }
.stat span { color: var(--muted); font-size: .92rem; }

/* ---------- App cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 22px; }
.app {
  position: relative;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
  transition: border-color .3s ease, transform .45s var(--ease), box-shadow .45s var(--ease);
}
.app:hover { border-color: #33466a; transform: translateY(-6px); box-shadow: var(--shadow); }
.app-top { display: flex; align-items: center; gap: 16px; }
.icon {
  width: 62px; height: 62px; flex: 0 0 62px; border-radius: 17px;
  background: linear-gradient(135deg, #1d3a57, #2a2058); border: 1px solid #2f4466;
  display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; color: var(--accent); letter-spacing: -0.02em;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.app:hover .icon { transform: translateY(-3px) rotate(-6deg) scale(1.05); box-shadow: 0 14px 30px -14px rgba(94, 225, 255, .7); }
.app h3 { font-size: 1.42rem; }
.tagline { color: var(--accent); font-weight: 600; font-size: .95rem; margin-top: 4px; }
.desc { color: var(--muted); font-size: .97rem; margin: 0; }
.features { list-style: none; padding: 0; display: grid; gap: 9px; }
.features li { display: flex; gap: 11px; color: var(--text-2); font-size: .94rem; }
.features li::before {
  content: ""; flex: 0 0 8px; height: 8px; margin-top: 9px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 8px var(--ok);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: .8rem; color: var(--muted); border: 1px solid var(--line);
  background: #0b1020; padding: 4px 11px; border-radius: 999px;
}
.chip-ok { color: var(--ok); border-color: rgba(61, 220, 151, .35); background: rgba(61, 220, 151, .08); }
.chip-pre { color: var(--accent-2); border-color: rgba(139, 108, 255, .45); background: rgba(139, 108, 255, .1); }
.chip-soon { color: var(--warn); border-color: rgba(255, 200, 87, .35); background: rgba(255, 200, 87, .08); }
.app-foot { margin-top: auto; display: grid; gap: 12px; }
.app-note { font-size: .86rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 14px; margin: 0; }
.app-note strong { color: var(--text); font-weight: 600; }
.badge {
  position: absolute; top: 22px; right: 22px; font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ok);
  border: 1px solid rgba(61, 220, 151, .35); background: rgba(61, 220, 151, .08);
  padding: 4px 10px; border-radius: 999px;
}

/* ---------- Feature / info cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .94rem; margin: 0; }
.ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: rgba(94, 225, 255, .10); color: var(--accent); border: 1px solid rgba(94, 225, 255, .22);
}
.ico svg { width: 20px; height: 20px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; counter-reset: step; }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; position: relative;
}
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
  background: rgba(94, 225, 255, .12); color: var(--accent); font-weight: 800; margin-bottom: 16px;
}
.step h4 { font-size: 1.04rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .94rem; margin: 0; }

/* ---------- Callouts ---------- */
.callout {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 22px 24px; color: var(--muted); font-size: .95rem; display: flex; gap: 16px; align-items: flex-start;
}
.callout strong { color: var(--text); }
.callout .ico { margin: 0; flex: 0 0 42px; }
.callout.warn { border-color: rgba(255, 200, 87, .28); background: linear-gradient(180deg, rgba(255, 200, 87, .06), var(--surface)); }
.callout.warn .ico { background: rgba(255, 200, 87, .1); color: var(--warn); border-color: rgba(255, 200, 87, .3); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: 24px; padding: 56px 32px; text-align: center;
  background:
    radial-gradient(closest-side at 15% 0%, rgba(94, 225, 255, .18), transparent 70%),
    radial-gradient(closest-side at 90% 100%, rgba(139, 108, 255, .2), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
}
.cta-band p { color: var(--muted); max-width: 560px; margin: 14px auto 0; }
.cta-band .cta-row { margin-top: 28px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: 84px 0 40px; position: relative; isolation: isolate; }
.page-hero::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -160px; transform: translateX(-50%);
  width: min(900px, 140vw); height: 440px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(94, 225, 255, .14), transparent 70%);
}
.page-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); font-weight: 800; letter-spacing: -0.035em; margin-bottom: 14px; }
.page-hero p { color: var(--muted); font-size: 1.1rem; max-width: 700px; }
.crumbs { font-size: .86rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }

/* ---------- App detail ---------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.detail-head { display: flex; gap: 22px; align-items: center; margin-bottom: 26px; }
.detail-head .icon { width: 88px; height: 88px; flex-basis: 88px; border-radius: 22px; font-size: 1.8rem; }
.detail-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; letter-spacing: -0.035em; }
.panel {
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.panel h2 { font-size: 1.2rem; margin-bottom: 14px; }
.panel + .panel { margin-top: 20px; }
.dl-panel { position: sticky; top: 92px; }
.dl-panel .btn { width: 100%; padding: 16px 22px; font-size: 1.02rem; }
.dl-panel .hint { font-size: .85rem; color: var(--muted); margin: 14px 0 0; text-align: center; }
.spec { display: grid; grid-template-columns: auto 1fr; gap: 12px 18px; margin: 0; font-size: .94rem; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; color: var(--text); font-weight: 500; }
.prose h2 { font-size: 1.4rem; margin: 40px 0 12px; }
.panel.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.12rem; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--text-2); }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; background: #0b1020; border: 1px solid var(--line); padding: 2px 7px; border-radius: 7px; color: var(--text); }
.screens { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.screen {
  aspect-ratio: 16 / 10; border-radius: var(--radius-sm); border: 1px dashed #2d3c5a;
  background: repeating-linear-gradient(45deg, var(--bg-soft) 0 12px, #0c1322 12px 24px);
  display: grid; place-items: center; color: var(--muted); font-size: .85rem;
}
.screen img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
/* real screenshots keep their own shape (wide strips, phone shots) */
.screen:has(img) { aspect-ratio: auto; border-style: solid; background: var(--bg-soft); grid-column: 1 / -1; }
.screen:has(img) img { height: auto; object-fit: contain; }

.related { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.related li { display: grid; gap: 2px; }
.related span { color: var(--muted); font-size: .92rem; }
.inline-links a + a::before { content: " · "; color: var(--muted); }
.release-app a { color: inherit; }

/* ---------- Changelog ---------- */
.timeline { position: relative; display: grid; gap: 22px; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.release { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.release::before {
  content: ""; position: absolute; left: -28px; top: 30px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--bg), 0 0 12px var(--accent);
}
.release-head { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: baseline; margin-bottom: 10px; }
.release-head h3 { font-size: 1.2rem; }
.release ul { padding-left: 20px; color: var(--text-2); }
.release li { margin-bottom: 6px; }
.release-app { font-size: .82rem; color: var(--accent); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0; transition: border-color .2s ease;
}
.faq details[open] { border-color: #33466a; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 600; color: var(--text);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.4rem; line-height: 1; color: var(--accent); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 22px 20px; color: var(--muted); font-size: .96rem; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .88rem; color: var(--text-2); font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text); background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 14px; width: 100%;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(94, 225, 255, .15); }
.hp { position: absolute; left: -9999px; }

/* ---------- Legal prose ---------- */
.legal { max-width: 800px; }
.legal h2 { font-size: 1.3rem; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--text-2); }
.legal ul { padding-left: 22px; margin-bottom: 1em; }
.legal li { margin-bottom: 6px; }
.updated { color: var(--muted); font-size: .9rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--bg-soft); margin-top: 40px; padding: 64px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 36px; }
.foot-grid p { color: var(--muted); font-size: .92rem; margin-top: 14px; max-width: 320px; }
.foot-grid h5 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-2); margin-bottom: 14px; }
.foot-grid a { display: block; color: var(--muted); font-size: .93rem; padding: 4px 0; }
.foot-grid a:hover { color: var(--text); text-decoration: none; }
.copy { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .88rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

.state { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 56px 0; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 99;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); font-size: .92rem;
}

/* ---------- Fluid background ---------- */
/* Two blurred colour fields drift slowly behind every page. Only transform is animated. */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%;
  filter: blur(90px); opacity: .42; will-change: transform;
}
body::before {
  width: 52vmax; height: 52vmax; left: -16vmax; top: -18vmax;
  background: radial-gradient(circle at 35% 35%, rgba(94, 225, 255, .55), transparent 62%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
body::after {
  width: 58vmax; height: 58vmax; right: -20vmax; top: 24vh;
  background:
    radial-gradient(circle at 60% 40%, rgba(139, 108, 255, .5), transparent 62%),
    radial-gradient(circle at 30% 75%, rgba(255, 122, 217, .26), transparent 55%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
/* surfaces let a little of the background through */
.app, .panel, .stat { background: linear-gradient(180deg, rgba(21, 30, 47, .8), rgba(15, 21, 34, .68)); }
.card, .step, .release, .callout, .faq details { background: rgba(15, 21, 34, .68); }

/* ---------- Motion ---------- */
@keyframes drift-a { to { transform: translate3d(22vw, 16vh, 0) scale(1.18) rotate(24deg); } }
@keyframes drift-b { to { transform: translate3d(-24vw, -14vh, 0) scale(.86) rotate(-30deg); } }
@keyframes breathe { to { transform: translateX(-50%) scale(1.12); opacity: .75; } }
@keyframes pan { to { background-position: 200% 0; } }
@keyframes pulse { from { box-shadow: 0 0 0 0 rgba(61, 220, 151, .6); } to { box-shadow: 0 0 0 10px rgba(61, 220, 151, 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(6px); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px); } }
@keyframes progress { to { transform: scaleX(1); } }

/* page headers rise in, one element after another */
.hero .wrap > *, .page-hero .wrap > * { animation: rise .9s var(--ease) both; }
.hero .wrap > :nth-child(2), .page-hero .wrap > :nth-child(2) { animation-delay: .08s; }
.hero .wrap > :nth-child(3), .page-hero .wrap > :nth-child(3) { animation-delay: .16s; }
.hero .wrap > :nth-child(4) { animation-delay: .24s; }
.hero .wrap > :nth-child(5) { animation-delay: .32s; }

/* scroll reveal: main.js adds .reveal, then .in when the element enters the viewport */
.reveal { opacity: 0; transform: translateY(26px) scale(.985); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* spotlight: a soft light follows the pointer across a card (--mx / --my set in main.js) */
.card, .stat, .panel { position: relative; }
.card, .step, .stat { transition: border-color .3s ease, transform .45s var(--ease), box-shadow .45s var(--ease); }
.card:hover, .step:hover, .stat:hover { border-color: #33466a; transform: translateY(-4px); box-shadow: var(--shadow); }
.app::after, .card::after, .step::after, .stat::after, .panel::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(94, 225, 255, .13), rgba(139, 108, 255, .06) 40%, transparent 65%);
  transition: opacity .4s ease;
}
.app:hover::after, .card:hover::after, .step:hover::after, .stat:hover::after, .panel:hover::after { opacity: 1; }

.faq details[open] .answer { animation: rise .45s var(--ease) both; }
.toast { animation: toast-in .45s var(--ease) both; }

/* marquee of project names (home page) */
.marquee {
  overflow: hidden; margin-bottom: 32px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; gap: 12px; padding-right: 12px; }
.marquee .chip { font-size: .9rem; padding: 8px 16px; color: var(--text-2); white-space: nowrap; transition: color .2s ease, border-color .2s ease; }
.marquee .chip:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }

/* reading progress bar, in browsers with scroll-driven animations */
@supports (animation-timeline: scroll()) {
  html::before {
    content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
    transform: scaleX(0); transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
    animation: progress linear both; animation-timeline: scroll(root);
  }
}

/* cross-fade between pages; the nav bar stays in place */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .22s ease both; }
::view-transition-new(root) { animation: vt-in .45s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .detail-grid { grid-template-columns: 1fr; }
  .dl-panel { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links {
    display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(10, 15, 27, .97); border: 1px solid var(--line); border-radius: 22px; padding: 8px 22px 14px;
  }
  .nav-links.open { display: flex; animation: rise .4s var(--ease) both; }
  .nav-links a::after { display: none; }
  .nav-links a { display: block; padding: 12px 0; font-size: 1rem; }
  .menu-toggle { display: inline-block; }
  .nav-cta .btn { display: none; }
  .hero { padding: 76px 0 64px; }
  .section { padding: 60px 0; }
  .page-hero { padding: 60px 0 24px; }
  .grid { grid-template-columns: 1fr; }
  .app { padding: 22px; }
  .form .row { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 22px; }
  .foot-grid { grid-template-columns: 1fr; }
  .detail-head { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @view-transition { navigation: none; }
  .marquee { overflow-x: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
