/* TrackFrame website — same palette and type as the app's studio. */
:root {
  --canvas: #0B0C0E;
  --surface: #16181B;
  --raised: #22252A;
  --stroke: #2E3136;
  --text: #F2F3F5;
  --text-2: #A3A9B1;
  --accent: #5AA9FF;
  --accent-fill: #1A6FDB;
  --lime: #C8FF2E;
  --orange: #FF7A1A;
  --radius: 22px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, system-ui, sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --condensed: "SF Pro Display", "Arial Narrow", -apple-system, system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }

/* ---------- Header gradient (as in the editor) ---------- */
.top {
  position: relative;
  background: linear-gradient(180deg, #2A64B8 0%, #16345F 46%, var(--canvas) 100%);
  padding-bottom: 40px;
}
.top::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 50% at 85% 0%, rgba(200, 255, 46, 0.12), transparent 70%);
  pointer-events: none;
}

/* ---------- Floating glass navigation ---------- */
.nav {
  position: sticky; top: 14px; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  width: min(1160px, 100% - 28px); margin: 14px auto 0;
  padding: 8px 8px 8px 14px;
  border-radius: 999px;
  background: rgba(22, 24, 27, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a {
  color: var(--text); opacity: 0.85; padding: 8px 14px; border-radius: 999px; font-size: 15px;
}
.nav-links a:hover { background: rgba(255, 255, 255, 0.08); text-decoration: none; opacity: 1; }
.lang {
  display: flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); margin-left: 6px;
}
.lang a { color: var(--text-2); font: 600 13px var(--sans); padding: 6px 10px; border-radius: 999px; }
.lang a[aria-current="true"] { background: var(--text); color: var(--canvas); }
.lang a:hover { text-decoration: none; color: var(--text); }
.lang a[aria-current="true"]:hover { color: var(--canvas); }
@media (max-width: 760px) { .nav-links { display: none; } .lang { margin-left: auto; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 54px; padding: 0 26px; border-radius: 999px;
  font: 600 17px var(--sans); color: #fff; background: var(--accent-fill);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 28px rgba(26, 111, 219, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.ghost {
  background: rgba(255, 255, 255, 0.08); box-shadow: none; color: var(--text);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.btn svg { width: 20px; height: 20px; }
.badge-soon {
  font: 600 12px var(--sans); letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.2);
}

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 1; padding-top: 72px; text-align: center; }
.hero h1 { font-size: clamp(42px, 7vw, 84px); font-weight: 750; max-width: 15ch; margin: 0 auto; }
.hero h1 em { font-style: normal; color: var(--lime); white-space: nowrap; }
.hero .lede { color: rgba(242, 243, 245, 0.82); font-size: clamp(18px, 2.2vw, 22px); max-width: 640px; margin: 22px auto 0; }
.hero .ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

.stage { position: relative; margin: 64px auto 0; width: min(1080px, 100%); }
.frame {
  border-radius: 26px; overflow: hidden; background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.6);
  aspect-ratio: 16 / 9;
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.stage .phone { position: absolute; right: -5%; bottom: -20%; width: 21%; }
@media (max-width: 760px) { .stage .phone { display: none; } }

/* ---------- Phone mockup ---------- */
.phone {
  aspect-ratio: 1206 / 2622;
  border-radius: 13% / 6%;
  padding: 2.4%;
  background: linear-gradient(145deg, #3a3d43, #1b1d21 40%, #2c2f35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.10);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 11% / 5.1%; }

/* ---------- Sections ---------- */
section { padding: 110px 0; }
.kicker { color: var(--accent); font: 600 14px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }
.title { font-size: clamp(32px, 4.6vw, 54px); font-weight: 720; margin-top: 12px; max-width: 18ch; }
.sub { color: var(--text-2); font-size: 19px; max-width: 620px; margin-top: 16px; }
.center { text-align: center; }
.center .title, .center .sub { margin-inline: auto; }

.works { padding-top: 40px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.chip {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--stroke); color: var(--text-2);
  font-size: 15px; background: rgba(255, 255, 255, 0.02);
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 54px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 28px; position: relative; overflow: hidden;
}
.step .num {
  font: 700 13px var(--mono); color: var(--accent);
  border: 1px solid rgba(90, 169, 255, 0.35); border-radius: 999px; padding: 4px 10px; display: inline-block;
}
.step h3 { font-size: 23px; margin-top: 18px; }
.step p { color: var(--text-2); margin-top: 10px; }
.step .icon {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  background: var(--raised); margin-top: 22px; color: var(--accent);
}
.step .icon svg { width: 26px; height: 26px; }

/* Overlay styles */
.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 54px; }
@media (max-width: 960px) { .styles { grid-template-columns: 1fr; } }
.style-card { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius); overflow: hidden; }
.style-card .scene {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.15)),
    url("/img/scene.jpg") center / cover;
}
.style-card .scene.clean { background: linear-gradient(180deg, #4C8FD6 0%, #8EC1E6 46%, #C9D6E3 47%, #F5F8FB 62%, #E8EEF4 100%); }
.style-card .meta { padding: 22px 24px 26px; }
.style-card h3 { font-size: 22px; }
.style-card p { color: var(--text-2); margin-top: 6px; font-size: 16px; }

/* Widget replicas (same proportions as the app's overlays) */
.w { position: absolute; color: #fff; }
.hud {
  left: 6%; bottom: 8%; width: 46%; padding: 4% 5%;
  background: rgba(10, 12, 10, 0.74); border-radius: 14px;
}
.hud .row { display: flex; justify-content: space-between; font: 600 11px var(--condensed); letter-spacing: 0.04em; color: #C2C9D0; }
.hud .val { font: 800 clamp(38px, 5vw, 52px)/1 var(--condensed); letter-spacing: -0.03em; margin-top: 6px; font-stretch: condensed; }
.hud .val small { font-size: 0.32em; color: var(--lime); margin-left: 6px; letter-spacing: 0; }
.hud .bar { height: 5px; border-radius: 3px; background: #2A323B; margin-top: 10px; overflow: hidden; }
.hud .bar i { display: block; height: 100%; width: 78%; background: var(--lime); border-radius: 3px; }
.hud-side { right: 6%; top: 8%; width: 30%; padding: 3% 4%; background: rgba(10, 12, 10, 0.74); border-radius: 12px; }
.hud-side .row { font: 600 10px var(--condensed); color: #C2C9D0; letter-spacing: 0.04em; }
.hud-side .val { font: 800 26px/1.1 var(--condensed); color: var(--lime); }

.min { left: 7%; bottom: 10%; text-shadow: 1.5px 1.5px 0 rgba(0, 0, 0, 0.55), 0 0 10px rgba(0, 0, 0, 0.55); }
.min .val { font: 300 clamp(54px, 7vw, 72px)/1 var(--sans); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.min .val small { font-size: 0.26em; font-weight: 400; margin-left: 6px; letter-spacing: 0; }
.min-side { right: 7%; top: 10%; display: grid; gap: 10px; text-shadow: 0 0 8px rgba(0, 0, 0, 0.6); }
.min-side div { border-left: 2px solid #fff; padding-left: 10px; font: 400 22px/1.1 var(--sans); }
.min-side span { display: block; font-size: 12px; opacity: 0.9; }
.min-line { left: 7%; right: 7%; bottom: 5%; height: 2px; background: linear-gradient(90deg, #fff 40%, rgba(255, 255, 255, 0.45) 40%); box-shadow: 0 0 6px rgba(0, 0, 0, 0.6); }

.gauge { left: 6%; bottom: 8%; width: 34%; aspect-ratio: 1; }
.ana-card {
  right: 6%; top: 8%; width: 26%; padding: 3% 4%; border-radius: 14px;
  background: rgba(27, 31, 36, 0.82); font-family: var(--rounded);
}
.ana-card .row { font: 600 10px var(--rounded); color: #C9B8A6; letter-spacing: 0.04em; }
.ana-card .val { font: 700 24px var(--rounded); }
.ana-card .tri { height: 26px; margin-top: 6px; background: var(--orange); clip-path: polygon(0 0, 100% 100%, 0 100%); }

/* Feature splits */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 70px; align-items: center; }
.split.flip { grid-template-columns: 0.95fr 1.05fr; }
.split.flip .copy { order: 2; }
.split .media { display: flex; justify-content: center; position: relative; }
.split .media .phone { width: min(330px, 78%); }
.split .media::before {
  content: ""; position: absolute; inset: 10% 5%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(26, 111, 219, 0.35), transparent);
  filter: blur(30px); z-index: 0;
}
.split .media .phone { position: relative; z-index: 1; }
.points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.points li { display: flex; gap: 14px; color: var(--text-2); }
.points li b { color: var(--text); font-weight: 600; }
.points svg { flex: none; width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
@media (max-width: 860px) {
  .split, .split.flip { grid-template-columns: 1fr; gap: 44px; }
  .split.flip .copy { order: 0; }
}

/* Feature grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 54px; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 24px; }
.card .icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--raised); color: var(--accent); }
.card .icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 18px; margin-top: 16px; letter-spacing: -0.01em; }
.card p { color: var(--text-2); font-size: 15px; margin-top: 6px; }

/* Gallery */
.gallery { display: flex; gap: 22px; overflow-x: auto; padding: 50px 20px 30px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { flex: none; width: 250px; margin: 0; scroll-snap-align: center; }
.gallery figcaption { color: var(--text-2); font-size: 14px; text-align: center; margin-top: 14px; }
@media (min-width: 1200px) { .gallery { justify-content: center; } }

/* FAQ */
.faq { max-width: 820px; margin: 46px auto 0; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--stroke); border-radius: 18px; padding: 0 22px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 0; font-weight: 600; font-size: 17px;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font: 400 26px/1 var(--sans); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); padding: 0 0 20px; }

/* Final CTA */
.cta-band {
  margin: 0 auto; border-radius: 32px; padding: 72px 30px; text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #2A64B8, #16345F 70%, #10223F);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.cta-band img.appicon { width: 92px; height: 92px; border-radius: 22px; margin: 0 auto 22px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); }
.cta-band .title { margin-inline: auto; }
.cta-band .sub { color: rgba(242, 243, 245, 0.8); margin-inline: auto; }
.cta-band .ctas { margin-top: 30px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* Footer */
footer { border-top: 1px solid var(--stroke); padding: 34px 0 46px; color: var(--text-2); font-size: 15px; margin-top: 110px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { color: var(--text-2); }
footer a:hover { color: var(--text); }

/* ---------- Document pages (privacy, support) ---------- */
.doc-hero { position: relative; z-index: 1; padding: 70px 0 10px; }
.doc-hero h1 { font-size: clamp(38px, 5.5vw, 60px); font-weight: 740; }
.doc-hero p { color: rgba(242, 243, 245, 0.8); margin-top: 14px; font-size: 19px; max-width: 640px; }
.doc { max-width: 780px; margin: 0 auto; padding: 40px 0 0; }
.doc h2 { font-size: 26px; margin: 46px 0 12px; }
.doc h3 { font-size: 19px; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--text-2); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; margin: 10px 0 0; display: grid; gap: 8px; }
.doc strong { color: var(--text); font-weight: 600; }
.summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 10px;
}
@media (max-width: 700px) { .summary { grid-template-columns: 1fr; } }
.summary div { background: var(--surface); border: 1px solid var(--stroke); border-radius: 18px; padding: 18px; }
.summary b { display: block; color: var(--text); font-size: 16px; }
.summary span { color: var(--text-2); font-size: 14px; }
.contact {
  margin-top: 26px; background: var(--surface); border: 1px solid var(--stroke); border-radius: 22px;
  padding: 26px; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.contact b { display: block; font-size: 19px; }
.contact span { color: var(--text-2); }
.updated { color: var(--text-2); font-size: 14px; margin-top: 40px; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
