/* Adaptive Subs Website — unified deep-sea glass + amber gloss aesthetic (matches app/web/app.html) */
:root {
  --base: #070d24;
  --base-2: #0c1535;
  --ink: #ecf1ff;
  --ink-2: #a8b5d4;
  --ink-3: #6e7ea6;
  --glass: rgba(18, 28, 62, 0.56);
  --glass-strong: rgba(17, 26, 58, 0.86);
  --edge: rgba(155, 188, 255, 0.16);
  --edge-hover: rgba(255, 198, 92, 0.42);
  --rule: rgba(155, 188, 255, 0.11);
  --sea: #3558d6;
  --sky: #7db8ff;
  --ember: #ff9a4a;
  --gloss: #ffc65c;
  --gloss-deep: #e89b24;
  --gloss-ink: #231502;
  --ok: #50d897;
  --warn: #ff9d62;
  --shadow: 0 18px 56px rgba(0, 0, 0, 0.42);
  --display: "Segoe UI Variable Display", "Segoe UI", "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif;
  --text: "Segoe UI Variable Text", "Segoe UI", "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; background: var(--base); color: var(--ink); }
body { font: 15px/1.68 var(--text); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: var(--gloss); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(125, 184, 255, 0.12);
  border: 1px solid rgba(125, 184, 255, 0.16);
  color: #dce7ff;
  padding: 2px 6px;
  border-radius: 6px;
  word-break: break-all;
}
:focus-visible { outline: 2px solid var(--gloss); outline-offset: 2px; border-radius: 6px; }

/* Living deep-sea ambient background */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.34; will-change: transform; }
.b1 { width: 580px; height: 580px; left: -160px; top: -180px; background: var(--sky); animation: drift1 24s ease-in-out infinite alternate; }
.b2 { width: 500px; height: 500px; right: -150px; top: 140px; background: var(--ember); opacity: 0.22; animation: drift2 28s ease-in-out infinite alternate; }
.b3 { width: 640px; height: 640px; left: 28%; bottom: -300px; background: var(--sea); opacity: 0.36; animation: drift3 32s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(120px, 80px) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-110px, 120px) scale(0.94); } }
@keyframes drift3 { to { transform: translate(-130px, -70px) scale(1.06); } }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.055; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { position: relative; z-index: 2; max-width: 1100px; margin: 0 auto; padding: 0 22px; }

/* Glass card */
.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--edge);
  border-radius: 18px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(1.45);
  backdrop-filter: blur(22px) saturate(1.45);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-strong); }
}

/* Sticky nav */
header.nav-wrap {
  position: sticky; top: 14px; z-index: 20;
  padding: 14px 22px 0;
}
nav.nav {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px; border-radius: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none !important; margin-right: auto; }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 4px 16px rgba(53, 88, 214, 0.4); }
.brand b { display: block; font: 700 15.5px/1.15 var(--display); letter-spacing: 0.01em; }
.brand span { display: block; font-size: 11.5px; color: var(--ink-2); }
.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-links a {
  color: var(--ink-2); font-size: 13.5px; padding: 6px 11px; border-radius: 9px;
  transition: color 0.15s, background 0.15s; text-decoration: none;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: rgba(125, 184, 255, 0.11); }

/* Buttons */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.06);
  color: var(--ink); font: 600 14px/1.2 var(--text);
  padding: 11px 18px; border-radius: 12px; cursor: pointer; text-decoration: none !important;
  transition: transform 0.15s var(--ease), border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.btn:hover { border-color: rgba(125, 184, 255, 0.55); background: rgba(255, 255, 255, 0.1); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: linear-gradient(180deg, #ffd47e, var(--gloss));
  border-color: transparent; color: var(--gloss-ink); font-weight: 700;
  box-shadow: 0 6px 26px rgba(255, 198, 92, 0.34);
}
.btn.primary:hover { box-shadow: 0 10px 32px rgba(255, 198, 92, 0.48); }
.btn.sm { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.btn.lg { padding: 13px 22px; font-size: 15px; border-radius: 13px; }
.btn.full { width: 100%; }

/* Ruby gloss word (signature visual motif) */
.g { position: relative; display: inline-block; margin: 0 1px; }
.g .w {
  background: rgba(255, 198, 92, 0.18);
  border-radius: 6px; padding: 0 4px;
  box-shadow: inset 0 -2px 0 rgba(255, 198, 92, 0.65);
  transition: background 0.25s, box-shadow 0.25s;
}
.g .z {
  position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%);
  margin-bottom: 4px; font: 600 0.54em/1.1 var(--text); color: var(--gloss);
  white-space: nowrap; text-shadow: 0 0 14px rgba(255, 198, 92, 0.55);
  transition: opacity 0.25s, transform 0.25s;
}
.g.known .w { background: transparent; box-shadow: none; padding: 0; }
.g.known .z { opacity: 0; transform: translateX(-50%) translateY(4px); pointer-events: none; }

/* Sections */
main { padding: 36px 0 72px; }
section.block { margin-top: 56px; }
.sec-head { margin-bottom: 22px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--gloss); letter-spacing: 0.04em;
  padding: 4px 11px; border-radius: 999px;
  background: rgba(255, 198, 92, 0.12); border: 1px solid rgba(255, 198, 92, 0.26);
  margin-bottom: 12px;
}
.eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--gloss); box-shadow: 0 0 8px var(--gloss); }
h1 { margin: 0; font: 750 clamp(30px, 4.4vw, 46px)/1.2 var(--display); letter-spacing: -0.015em; }
h2 { margin: 0 0 6px; font: 700 clamp(22px, 3vw, 28px)/1.25 var(--display); letter-spacing: -0.01em; }
h3 { margin: 0 0 6px; font: 650 17px/1.35 var(--display); }
.lead { margin: 14px 0 0; font-size: 16.5px; color: var(--ink-2); max-width: 660px; }
.muted { color: var(--ink-2); }
.tiny { font-size: 12.5px; color: var(--ink-3); }

/* Hero */
.hero { display: grid; gap: 28px; padding-top: 10px; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 26px; align-items: center; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; align-items: center; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 13px; color: var(--ink-3); }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }

/* Interactive subtitle preview stage */
.stage-card { overflow: hidden; padding: 0; }
.stage-bg {
  position: relative; min-height: 245px; padding: 26px 24px 22px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: #050814; isolation: isolate;
}
.stage-bg img.still {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%; opacity: 0.42; z-index: -2;
}
.stage-bg::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(5, 8, 20, 0.35) 0%, rgba(5, 8, 20, 0.86) 72%, #070d24 100%);
}
.stage-pill {
  align-self: flex-start; margin-bottom: auto;
  font-size: 11.5px; color: #c7d4f2; background: rgba(7, 13, 36, 0.72);
  border: 1px solid rgba(155, 188, 255, 0.22); border-radius: 999px; padding: 4px 10px;
}
.sub-box {
  background: rgba(4, 7, 18, 0.78); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px; padding: 26px 18px 14px; text-align: center;
  font: 600 clamp(17px, 2.2vw, 22px)/1.9 var(--display); color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.stage-ctrl {
  padding: 14px 20px 16px; display: grid; gap: 8px;
  border-top: 1px solid var(--rule); background: rgba(8, 14, 36, 0.65);
}
.stage-ctrl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.stage-ctrl-row b { color: var(--gloss); font-variant-numeric: tabular-nums; }
.stage-ctrl input[type=range] { width: 100%; accent-color: var(--gloss); cursor: pointer; }
.stage-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); }

/* Feature cards */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { padding: 20px 22px; }
.card p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
.badge-chip {
  display: inline-block; font-size: 11.5px; font-weight: 650; padding: 2px 9px; border-radius: 999px;
  background: rgba(125, 184, 255, 0.14); color: #b7d3ff; margin-bottom: 10px;
}
.badge-chip.gold { background: rgba(255, 198, 92, 0.16); color: var(--gloss); }
.badge-chip.green { background: rgba(80, 216, 151, 0.15); color: var(--ok); }

/* Screenshot showcase */
.shot { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: 1px solid var(--rule); background: #050814; }
.shot .cap { padding: 14px 16px 16px; }
.shot .cap b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.shot .cap span { font-size: 13px; color: var(--ink-2); }

/* Download hub */
.dl-card { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.dl-card.featured { border-color: rgba(255, 198, 92, 0.35); }
.dl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dl-sub { margin: 0; font-size: 14px; color: var(--ink-2); }
.dl-stack { display: grid; gap: 10px; margin-top: 4px; }
.dl-note {
  padding: 12px 14px; border-radius: 12px;
  background: rgba(255, 157, 98, 0.1); border: 1px solid rgba(255, 157, 98, 0.25);
  font-size: 13px; color: #ffd9c2; line-height: 1.55;
}
.dl-note strong { color: #ffb98a; }
.dl-note.info {
  background: rgba(125, 184, 255, 0.09); border-color: rgba(125, 184, 255, 0.22); color: #cfe0ff;
}

/* Steps */
.step-num {
  width: 28px; height: 28px; border-radius: 9px;
  display: inline-grid; place-items: center; font: 700 14px/1 var(--display);
  background: rgba(255, 198, 92, 0.16); color: var(--gloss); margin-bottom: 10px;
}

/* FAQ & Docs Prose */
.faq { display: grid; gap: 10px; }
.faq details { padding: 15px 18px; }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gloss); font-size: 18px; font-weight: 400; flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); font-size: 14px; }

.prose { padding: 28px 30px; max-width: 840px; }
.prose h1 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 10px; }
.prose h2 { font-size: 19px; margin: 28px 0 10px; padding-top: 18px; border-top: 1px solid var(--rule); }
.prose h2:first-of-type { border-top: 0; padding-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 20px; display: grid; gap: 6px; }
.kbd-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.kbd-table th, .kbd-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.kbd-table th { color: var(--ink); font-weight: 650; }
.kbd-table td { color: var(--ink-2); }

/* Footer */
footer.foot {
  border-top: 1px solid var(--rule); margin-top: 64px; padding: 26px 0 42px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  font-size: 13px; color: var(--ink-3);
}
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; }
.foot-links a { color: var(--ink-2); }

@media (max-width: 860px) {
  .hero-top, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  header.nav-wrap { padding: 10px 12px 0; }
  .wrap { padding: 0 14px; }
  .prose { padding: 20px 18px; }
}
