/* ============================================================
   TwiChat — product page (Glass direction only)
   ============================================================ */

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-snap-type: y mandatory;
  scroll-padding-top: var(--nav-h, 66px);
  overflow-y: auto;
  scrollbar-width: none;
}

html::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  font-family: "Sora", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--magenta); color: #fff; }

/* ---------- Design tokens (shared) ---------- */
:root {
  --purple: #9146ff;
  --purple-bright: #a970ff;
  --cyan: #21e6ff;
  --magenta: #ff37d4;

  --maxw: 1200px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Sora", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
}

/* ============================================================
   DIRECTION: GLASS
   ============================================================ */
[data-dir="glass"] {
  --bg: #0a0a1f;
  --bg-elev: #12122e;
  --surface: rgba(255, 255, 255, .07);
  --surface-2: rgba(255, 255, 255, .11);
  --border: rgba(255, 255, 255, .16);
  --border-bright: rgba(255, 255, 255, .3);
  --text: #f4f5ff;
  --muted: #c3c6e8;
  --faint: #8e92c0;
  --accent: var(--cyan);
  --accent-grad: linear-gradient(110deg, #5ff0ff, #b58bff 55%, #ff8fe6);
  --glow-1: rgba(95, 240, 255, .45);
  --glow-2: rgba(160, 120, 255, .5);
  --glow-3: rgba(255, 143, 230, .4);
  --card-glow: inset 0 1px 0 rgba(255,255,255,.18), 0 30px 70px -35px rgba(0,0,0,.7);
  --ring: rgba(180, 200, 255, .7);
}

/* ============================================================
   Animated backdrop (glass)
   ============================================================ */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.bg::before,
.bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  transition: opacity .6s var(--ease);
}

[data-dir="glass"] .bg::before {
  width: 65vw; height: 65vw;
  top: -22vw; left: -8vw;
  background: radial-gradient(circle, var(--glow-2), transparent 60%);
  animation: drift1 20s ease-in-out infinite alternate;
}
[data-dir="glass"] .bg::after {
  width: 60vw; height: 60vw;
  top: 20vh; right: -18vw;
  background: radial-gradient(circle, var(--glow-3), transparent 60%);
  animation: drift2 24s ease-in-out infinite alternate;
}
[data-dir="glass"] .bg-grid {
  position: absolute; inset: 0;
  background:
    radial-gradient(40vw 40vw at 80% 80%, var(--glow-1), transparent 60%);
  opacity: .5;
}

@keyframes drift1 { to { transform: translate(8vw, 6vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-7vw, -5vh) scale(1.1); } }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: currentColor;
  opacity: .7;
}

.section {
  padding: clamp(72px, 11vw, 150px) 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  scroll-margin-top: calc(var(--nav-h, 66px) * -1);
  scroll-snap-align: start;
}
.section::before,
.section::after { content: ""; flex: 1; }

.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; margin: 0; }
.h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); letter-spacing: -.02em; margin: 18px 0 16px; }
.lede { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.2rem); }

.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 12px;
  font-weight: 600; font-size: .98rem;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  color: #08040f;
  background: var(--accent-grad);
  box-shadow: 0 10px 40px -12px var(--glow-1), 0 0 0 1px rgba(255,255,255,.08) inset;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 50px -12px var(--glow-2); }
.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.btn-lg { padding: 17px 32px; font-size: 1.05rem; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  background: rgba(10, 10, 31, 0.75);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, padding .3s;
}
.nav.scrolled { border-color: var(--border); padding: 11px 24px; }
.nav-inner { width: 100%; max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; }

.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -.01em; }
.brand .logo {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  flex: none;
}
.brand .logo svg { width: 34px; height: 34px; }
.brand b { font-weight: 700; }
.brand span { color: var(--accent); }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--muted); font-size: .92rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 10px; }

.btn-cog {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: .5rem;
  color: var(--muted);
  transition: color .2s, background .2s;
  flex: none;
}
.btn-cog svg { width: 18px; height: 18px; }
.btn-cog:hover { color: var(--text); background: rgba(255,255,255,.07); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 88px;
  padding-bottom: 56px;
  display: flex;
  align-items: center;
  scroll-snap-align: start;
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 100px; align-items: center;
}
.hero h1 { font-size: clamp(2.7rem, 6vw, 4.7rem); letter-spacing: -.03em; margin: 22px 0 22px; }
.hero .lede { max-width: 480px; font-size: clamp(1.05rem, 1.5vw, 1.3rem); }
.hero-cta { display: flex; gap: 14px; margin: 34px 0 26px; flex-wrap: wrap; }
.trust { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--faint); font-size: .82rem; }
.trust .tlabel { font-family: var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.trust .pills { display: flex; gap: 8px; }
.trust .pill {
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-weight: 600; font-size: .8rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ---------- Screenshot stage (replaces chat mock) ---------- */
.screenshot-stage { position: relative; display: grid; place-items: center; }
.screenshot-stage .halo {
  position: absolute; inset: -8% -4%;
  background: var(--accent-grad);
  filter: blur(70px); opacity: .35; z-index: 0;
  border-radius: 40px;
}

/* floating emotes */
.float-emote {
  position: absolute; z-index: 2;
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; padding: 6px;
  background: var(--surface-2); border: 1px solid var(--border-bright);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 34px -14px var(--glow-2);
  animation: bob 5s ease-in-out infinite;
}
.float-emote img { width: 100%; height: 100%; object-fit: contain; }
.float-emote.e1 { top: 4%;  right: -6%; animation-delay: 0s;    animation-duration: 5.2s; }
.float-emote.e2 { bottom: 12%; left: -8%;  animation-delay: -1.6s; animation-duration: 4.8s; }
.float-emote.e3 { top: 36%; left: -9%;  animation-delay: -0.8s; animation-duration: 5.6s; }
.float-emote.e4 { top: 26%;    right: -7%; animation-delay: -2.4s; animation-duration: 4.6s; }
.float-emote.e5 { bottom: 20%; right: -5%; animation-delay: -3.2s; animation-duration: 5.0s; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }

/* Screenshot frame — wraps real images */
.screenshot-frame {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border-bright);
  box-shadow: var(--card-glow), 0 40px 90px -40px rgba(0,0,0,.8);
  background: var(--bg-elev);
}
.screenshot-frame img {
  width: 100%; height: auto; display: block;
}

/* Placeholder shown when image is missing */
.screenshot-frame.empty img { display: none; }
.screenshot-frame .img-placeholder {
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  min-height: 340px; padding: 32px;
  color: var(--faint); font-family: var(--font-mono); font-size: .78rem;
  text-align: center; gap: 14px;
  border: 2px dashed var(--border);
  border-radius: 14px; margin: 12px;
}
.screenshot-frame.empty .img-placeholder { display: flex; }
.screenshot-frame .img-placeholder code {
  color: var(--accent); font-family: var(--font-mono);
  background: var(--surface-2); padding: 3px 8px; border-radius: 5px;
}

/* Feature card screenshot (moderation card) */
.feature-screenshot-frame {
  margin: 18px 0 0;
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  width: 100%;
}
.feature-screenshot-frame img {
  width: 100%; height: auto; display: block;
}
.card [data-label="images/mod.png"] {
  width: 60%;
  margin-left: auto;
  margin-right: auto;
}
[data-label="images/showcase.png"] {
  width: 80%;
  max-width: 336px;
  margin-left: auto;
  margin-right: auto;
}
.feature-screenshot-frame.empty img { display: none; }
.feature-screenshot-frame .img-placeholder {
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  min-height: 120px; padding: 20px;
  color: var(--faint); font-family: var(--font-mono); font-size: .72rem;
  text-align: center; gap: 10px;
  border: 2px dashed var(--border); border-radius: 8px; margin: 6px;
}
.feature-screenshot-frame.empty .img-placeholder { display: flex; }
.feature-screenshot-frame .img-placeholder code {
  color: var(--accent); background: var(--surface-2); padding: 2px 7px; border-radius: 4px;
}

/* ---------- Bento features ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 22px;
}
.card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px; padding: 24px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  display: grid;
  grid-template-columns: 54px 1fr;
  column-gap: 20px;
  align-content: start;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-bright); box-shadow: var(--card-glow); }
.card .ic {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--accent); margin-bottom: 0; align-self: center;
}
.card .ic svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.6rem; letter-spacing: -.02em; margin-bottom: 0; }
.card > h3 { align-self: center; }
.card p { color: var(--muted); font-size: 1.08rem; line-height: 1.65; margin: 0; }
.card > p { grid-column: 1 / -1; margin-top: 18px; }
.card > .eq,
.card > .perf,
.card > .feature-screenshot-frame,
.card > .emote-wall { grid-column: 1 / -1; }
.card.span2 { grid-column: span 2; }
.card.span3 { grid-column: span 3; }
.card.full  { grid-column: 1 / -1; }
.card.tall { grid-row: span 2; }

/* emote chips inside feature card */
.emote-wall { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.emote-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 11px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: .8rem; color: var(--muted); font-weight: 600;
}
.emote-chip .g { height: 20px; width: auto; display: block; flex-shrink: 0; }
.emote-chip .src { font-family: var(--font-mono); font-size: .62rem; color: var(--accent); letter-spacing: .05em; }

/* audio viz */
.eq { display: flex; align-items: flex-end; gap: 4px; height: 60px; margin-top: 22px; }
.eq span {
  flex: 1; border-radius: 3px 3px 0 0;
  background: var(--accent-grad);
  animation: eq 1.1s ease-in-out infinite;
  min-height: 6px;
}
@keyframes eq { 0%,100% { height: 18%; } 50% { height: 100%; } }

/* perf meter */
.perf { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.perf-row { display: flex; align-items: center; gap: 12px; font-size: .82rem; }
.perf-row .lab { width: 92px; color: var(--muted); }
.perf-row .bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.perf-row .bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent-grad); }
.perf-row .val { font-family: var(--font-mono); font-size: .76rem; color: var(--accent); width: 58px; text-align: right; }

/* link preview mock */
.link-mock {
  margin-top: 18px; display: flex; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  overflow: hidden;
}
.lm-thumb {
  flex-shrink: 0; width: 72px; height: 52px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(95,240,255,.12) 0%, rgba(160,120,255,.22) 100%);
  border: 1px solid var(--border); display: grid; place-items: center;
}
.lm-play {
  width: 0; height: 0; margin-left: 3px;
  border: solid transparent; border-width: 6px 0 6px 12px;
  border-left-color: var(--accent);
}
.lm-info { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; }
.lm-host { font-family: var(--font-mono); font-size: .58rem; color: var(--accent); letter-spacing: .05em; }
.lm-title { font-size: .78rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-meta { font-size: .7rem; color: var(--faint); }

/* ---------- Showcase split ---------- */
.showcase-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: center; }
.feature-list { display: flex; flex-direction: column; gap: 26px; margin-top: 30px; }
.feature-list li { list-style: none; display: flex; gap: 16px; }
.feature-list .num {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--accent);
}
.feature-list h4 { font-family: var(--font-display); font-size: 1.12rem; margin: 4px 0 5px; font-weight: 600; }
.feature-list p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 54px; }
.stat {
  text-align: center; padding: 34px 18px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.stat .n { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 700; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: .85rem; margin-top: 6px; }

/* ---------- FAQ ---------- */
.faq { width: 100%; max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.qa {
  width: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: border-color .25s;
}
.qa.is-open { border-color: var(--border-bright); }
.qa summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; font-family: var(--font-display); font-weight: 600; font-size: 1.06rem;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary .pm { flex: none; width: 22px; height: 22px; position: relative; transition: transform .3s var(--ease); }
.qa summary .pm::before, .qa summary .pm::after { content: ""; position: absolute; background: var(--accent); border-radius: 2px; }
.qa summary .pm::before { top: 50%; left: 0; right: 0; height: 2px; transform: translateY(-50%); }
.qa summary .pm::after { left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); transition: opacity .3s; }
.qa.is-open summary .pm::after { opacity: 0; }
.qa .ans-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.32s cubic-bezier(0.4,0,0.2,1), opacity 0.28s ease; opacity: 0; }
.qa.is-open .ans-wrap { grid-template-rows: 1fr; opacity: 1; }
.qa .ans { padding: 0 24px 20px; overflow: hidden; color: var(--muted); font-size: .96rem; min-height: 0; }
.qa .ans ol, .qa .ans ul { margin: 0; }

/* ---------- Final CTA ---------- */
.cta-band { position: relative; text-align: center; padding: clamp(60px, 9vw, 110px) 0; }
.cta-card {
  position: relative; overflow: hidden;
  max-width: 920px; margin: 0 auto; padding: clamp(44px, 7vw, 80px) 32px;
  border-radius: 28px; border: 1px solid var(--border-bright);
  background: var(--surface);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--card-glow);
}
.cta-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent-grad); opacity: .12;
}
.cta-card h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -.02em; }
.cta-card p { color: var(--muted); max-width: 520px; margin: 16px auto 30px; font-size: 1.08rem; }

/* ---------- Footer ---------- */
.faq-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#faq {
  min-height: unset;
  flex: 1;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.footer { border-top: 1px solid var(--border); padding: 32px 0 20px; scroll-snap-align: start; scroll-snap-stop: always; }
.footer-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer .brand { margin-bottom: 8px; }
.footer .fdesc { color: var(--faint); font-size: .88rem; max-width: 300px; }
.footer-cols { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col h5 { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; }
.footer-col a { display: block; color: var(--muted); font-size: .9rem; margin-bottom: 7px; transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--faint); font-size: .82rem; }

/* ---------- Hero entrance (page load) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes hero-in {
    from { opacity: 0; transform: translateY(36px); }
    to   { opacity: 1; transform: none; }
  }
  .hero .hero-copy      { animation: hero-in 0.9s var(--ease) 0.05s both; }
  .hero .screenshot-stage { animation: hero-in 0.9s var(--ease) 0.3s  both; }
}


/* ---------- Scroll hint ---------- */
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  color: var(--faint);
  animation: hint-bob 2.4s ease-in-out infinite;
  pointer-events: none;
}
.scroll-hint svg { width: 20px; height: 20px; }
@keyframes hint-bob {
  0%, 100% { opacity: .35; transform: translateX(-50%) translateY(0); }
  55% { opacity: .85; transform: translateX(-50%) translateY(8px); }
}
@media (prefers-reduced-motion: reduce) { .scroll-hint { display: none; } }

/* ---------- Section dots ---------- */
.section-dots {
  position: fixed; right: 22px; top: 50%; z-index: 40;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 12px;
  pointer-events: none;
}
.section-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border-bright);
  cursor: pointer; pointer-events: auto;
  transition: background .3s var(--ease), transform .3s var(--ease), box-shadow .3s;
  position: relative;
}
.section-dot.active {
  background: var(--accent);
  transform: scale(1.5);
  box-shadow: 0 0 10px var(--glow-1);
}
.section-dot::before {
  content: attr(data-label);
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  white-space: nowrap;
  font-family: var(--font-mono); font-size: .65rem; letter-spacing: .08em;
  color: var(--muted);
  background: var(--bg-elev); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 6px;
  opacity: 0; transition: opacity .2s;
  pointer-events: none;
}
.section-dot:hover::before { opacity: 1; }
@media (max-width: 560px) { .section-dots { display: none; } }

/* ---------- Reveal ----------
   Visible by default; slide-up plays only if animations are supported. */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .reveal.armed { opacity: 0; transform: translateY(52px); filter: blur(4px); }
  .reveal.armed.in {
    opacity: 1; transform: none; filter: blur(0);
    transition: opacity .75s var(--ease), transform .75s var(--ease), filter .75s var(--ease);
  }
  /* Stagger bento cards */
  .bento .card.reveal.armed.in:nth-child(2) { transition-delay: .08s; }
  .bento .card.reveal.armed.in:nth-child(3) { transition-delay: .16s; }
  .bento .card.reveal.armed.in:nth-child(4) { transition-delay: .24s; }
  .bento .card.reveal.armed.in:nth-child(5) { transition-delay: .32s; }
  /* Stagger stats */
  .stat.reveal.armed.in:nth-child(2) { transition-delay: .08s; }
  .stat.reveal.armed.in:nth-child(3) { transition-delay: .16s; }
  .stat.reveal.armed.in:nth-child(4) { transition-delay: .24s; }
  /* Stagger FAQ */
  .faq .qa.reveal.armed.in:nth-child(2) { transition-delay: .1s; }
  .faq .qa.reveal.armed.in:nth-child(3) { transition-delay: .2s; }
  .faq .qa.reveal.armed.in:nth-child(4) { transition-delay: .3s; }
  .faq .qa.reveal.armed.in:nth-child(5) { transition-delay: .4s; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .screenshot-stage { order: -1; }
  .showcase-grid { grid-template-columns: 1fr; gap: 40px; }
  .card.span3 { grid-column: 1 / -1; }
  .card.full  { grid-column: 1 / -1; }
  .card.tall  { grid-row: auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .card.span2, .card.span3, .card.full { grid-column: auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 120px; }
  .screenshot-frame { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 1080p density ---------- */
@media (max-height: 1080px) {
  html { font-size: 13px; }
  .section { padding: clamp(24px, 4vw, 56px) 0; }
  .section-head { margin-bottom: 16px; }
  .bento { gap: 12px; }
  .card { padding: 16px; }
  .hero { padding-top: 64px; padding-bottom: 32px; }
  .hero-grid { gap: 56px; }
}

/* ============================================================
   Bug Report Modal
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 1rem;
}

.modal-overlay[hidden] { display: none; }

.modal-box {
  background: rgba(14, 12, 24, .97);
  border: 1px solid rgba(139, 92, 246, .3);
  border-radius: 1.125rem;
  padding: 2rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(139,92,246,.08);
  animation: modal-in .18s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-hd h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.modal-x {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.4);
  font-size: 1.5rem;
  line-height: 1;
  padding: .2rem .5rem;
  border-radius: .375rem;
  transition: color .15s, background .15s;
}

.modal-x:hover { color: #fff; background: rgba(255,255,255,.08); }

.modal-field { margin-bottom: 1.125rem; }

.modal-field label {
  display: block;
  margin-bottom: .4rem;
  font-size: .8125rem;
  font-weight: 500;
  color: rgba(255,255,255,.6);
}

.modal-field input,
.modal-field textarea {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .5rem;
  padding: .7rem .9rem;
  color: #fff;
  font-family: inherit;
  font-size: .9375rem;
  outline: none;
  transition: border-color .15s, background .15s;
  box-sizing: border-box;
  resize: vertical;
}

.modal-field input:focus,
.modal-field textarea:focus {
  border-color: rgba(139, 92, 246, .55);
  background: rgba(139, 92, 246, .07);
}

.modal-field input::placeholder,
.modal-field textarea::placeholder { color: rgba(255,255,255,.22); }

.modal-actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.btn-sm { padding: .55rem 1.1rem !important; font-size: .875rem !important; }

.modal-success {
  text-align: center;
  padding: 1.25rem 0 .5rem;
}

.modal-success svg {
  color: #34d399;
  display: block;
  margin: 0 auto 1rem;
}

.modal-success p {
  margin: 0;
  font-size: 1rem;
  color: rgba(255,255,255,.8);
}

/* ============================================================
   Changelog Modal
   ============================================================ */
.modal-box--wide {
  max-width: 600px;
}

.cl-entries {
  max-height: 70vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
  padding-right: 4px;
}

.cl-entries::-webkit-scrollbar { width: 5px; }
.cl-entries::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }

.cl-loading {
  text-align: center;
  color: rgba(255,255,255,.4);
  padding: 2rem 0;
  font-size: .9375rem;
}

.cl-empty {
  text-align: center;
  color: rgba(255,255,255,.35);
  padding: 2rem 0;
  font-size: .9375rem;
}

.cl-entry {
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding: 1.25rem 0;
}

.cl-entry:last-child { border-bottom: none; }

.cl-entry-hd {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}

.cl-ver {
  font-size: .8125rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: .02em;
  background: linear-gradient(110deg, #5ff0ff, #b58bff 55%, #ff8fe6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cl-date {
  font-size: .8rem;
  color: rgba(255,255,255,.35);
  font-family: var(--font-mono);
}

.cl-body {
  font-size: .9rem;
  color: rgba(255,255,255,.75);
  line-height: 1.7;
  margin: 0;
  font-family: var(--font-body);
}

.cl-body p { margin: 0 0 .5em; }
.cl-body p:last-child { margin-bottom: 0; }
.cl-body ul { margin: .25em 0 .5em; padding-left: 1.4em; }
.cl-body li { margin: .15em 0; }
.cl-body h1, .cl-body h2, .cl-body h3 {
  font-size: .875rem; font-weight: 700;
  color: rgba(255,255,255,.95);
  margin: .75em 0 .3em; font-family: var(--font-display);
}
.cl-body h1:first-child, .cl-body h2:first-child, .cl-body h3:first-child { margin-top: 0; }
.cl-body code {
  font-family: var(--font-mono); font-size: .8em;
  background: rgba(255,255,255,.1); padding: 1px 5px; border-radius: 4px;
}
.cl-body pre {
  background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px; padding: .6em .9em; overflow-x: auto; margin: .5em 0;
}
.cl-body pre code { background: none; padding: 0; font-size: .85em; }
.cl-body strong { font-weight: 700; color: rgba(255,255,255,.95); }
.cl-body em { font-style: italic; }
.cl-body del { text-decoration: line-through; opacity: .6; }
.cl-body a { color: var(--cyan); }
.cl-body a:hover { text-decoration: underline; }
