/* Tokens mirror sexter.io (src/app/globals.css, dark theme) so both sites read as one family. */
:root {
  --bg-primary: #0e0e16;
  --bg-secondary: #15151f;
  --bg-tertiary: #1e1e2c;
  --bg-card: #1a1a28;
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124, 58, 237, 0.35);
  --text-primary: #f5f5fa;
  --text-secondary: #b4b4cc;
  --text-muted: #7878a0;
  --border: rgba(255, 255, 255, 0.1);
  --bubble-npc: #202c33;
  --bubble-user: #005c4b;
  --bubble-text: #e9edef;
  --bubble-time: #8696a0;
  --btn-hover-bg: rgba(255, 255, 255, 0.08);
  --btn-hover-border: rgba(255, 255, 255, 0.2);
  --smgf: #f58a3c;
  --smgf-deep: #5a0e32;
  --discord: #5865f2;
  --patreon: #f96854;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

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

:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; border-radius: 4px; }

/* ── Spine ─────────────────────────────────────────────────────────────── */
.shell {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 768px) { .shell { padding-inline: 40px; } }
@media (min-width: 1200px) { .shell { padding-inline: 64px; } }

.section { padding-top: clamp(64px, 8vw, 116px); }
.section--roomy { padding-top: clamp(104px, 13vw, 180px); }

/* ── Type ──────────────────────────────────────────────────────────────── */
.mono {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0;
}
.display {
  font-size: clamp(2.4rem, 6.6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
  margin: 22px 0 0;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(1.5rem, 3.3vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 650;
  margin: 0;
}
.lede { font-size: clamp(1rem, 1.25vw, 1.1875rem); line-height: 1.55; margin: 0; }
.body { font-size: 0.9375rem; line-height: 1.62; margin: 0; }

.secondary { color: var(--text-secondary); }
.muted { color: var(--text-muted); }
.accent { color: var(--accent-light); }
.smgf { color: var(--smgf); }

/* ── Buttons / links ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  padding: 15px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: color-mix(in srgb, var(--accent) 84%, #fff); }
.btn--smgf { background: var(--smgf); color: #2a0716; }
.btn--smgf:hover { background: color-mix(in srgb, var(--smgf) 84%, #fff); }
.btn--ghost { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn--ghost:hover { background: var(--btn-hover-bg); border-color: var(--btn-hover-border); color: var(--text-primary); }
.btn--sm { font-size: 13px; padding: 9px 15px; border-radius: 8px; }

.link { color: var(--text-muted); text-decoration: none; transition: color 0.15s ease; }
.link:hover, .link:focus-visible { color: var(--text-primary); }
.link--strong { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border); }
.link--strong:hover { color: var(--text-primary); text-decoration-color: currentColor; }

/* ── Top bar ───────────────────────────────────────────────────────────── */
.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-primary) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text-primary); font-weight: 700; font-size: 15px; letter-spacing: -0.02em; white-space: nowrap; }
.brand img { width: 30px; height: 30px; }
.bar-nav { display: flex; align-items: center; gap: 22px; }
.bar-nav .link { padding: 6px 0; }
@media (max-width: 640px) { .hide-sm { display: none; } }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { padding-top: clamp(52px, 8vw, 104px); padding-bottom: clamp(24px, 4vw, 48px); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 48px; }
.hero-aside { display: flex; justify-content: flex-start; }
.hero .display { margin-top: 0; }
.hero .lede { margin-top: 26px; max-width: 46ch; }
.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
  .hero-aside { justify-content: flex-end; }
}

/* ── Chat (same bubble geometry as the in-game thread on sexter.io) ──── */
.chat {
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--text-primary) 4%, transparent);
  padding: 16px 18px 18px;
}
.chat-head { display: flex; align-items: center; gap: 11px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.chat-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-name { margin: 0; font-weight: 650; font-size: 15px; }
.chat-status { margin: 2px 0 0; font-size: 12px; color: #22c55e; }

.thread { display: flex; flex-direction: column; gap: 5px; min-height: 120px; }
.bub {
  position: relative;
  max-width: min(88%, 320px);
  padding: 8px 12px 9px;
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.42;
  color: var(--bubble-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
  overflow-wrap: anywhere;
}
.bub--in { background: var(--bubble-npc); border-bottom-left-radius: 0; align-self: flex-start; margin-left: 7px; }
.bub--out { background: var(--bubble-user); border-bottom-right-radius: 0; align-self: flex-end; margin-right: 7px; }
.bub--in::before, .bub--out::before { content: ""; position: absolute; bottom: 0; width: 7px; height: 7px; }
.bub--in::before { left: -7px; border-bottom-right-radius: 6px; box-shadow: 3px 3px 0 0 var(--bubble-npc); }
.bub--out::before { right: -7px; border-bottom-left-radius: 6px; box-shadow: -3px 3px 0 0 var(--bubble-user); }
.bub-meta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  float: right;
  margin: 5px 0 0 9px;
  position: relative;
  top: 2px;
  font-size: 10.5px;
  line-height: 1;
  color: var(--bubble-time);
  user-select: none;
}
.bub--typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.bub--typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--bubble-time); animation: typing 1.1s infinite ease-in-out; }
.bub--typing span:nth-child(2) { animation-delay: 0.15s; }
.bub--typing span:nth-child(3) { animation-delay: 0.3s; }

.choices { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.choices .mono { margin-bottom: 2px; }
.choice {
  font: inherit;
  font-size: 14px;
  text-align: left;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.choice:hover { background: color-mix(in srgb, var(--accent) 18%, var(--bg-tertiary)); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.choice:active { transform: translateY(1px); }
.choices-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

/* ── Games ─────────────────────────────────────────────────────────────── */
.games { margin-top: 28px; display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 960px) { .games { grid-template-columns: 1fr 1fr; gap: 24px; } }

.game {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-secondary);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.game:hover { border-color: var(--btn-hover-border); }

.game-art { position: relative; aspect-ratio: 16 / 8; overflow: hidden; border-bottom: 1px solid var(--border); }
.game-art--sexter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(20px, 4vw, 40px);
  background:
    radial-gradient(120% 90% at 85% 50%, rgba(124, 58, 237, 0.32), transparent 60%),
    linear-gradient(180deg, #17122a, #0e0e16);
}
.sexter-lockup { display: flex; align-items: center; gap: 12px; font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; letter-spacing: -0.04em; }
.sexter-lockup img { width: clamp(44px, 6vw, 60px); height: auto; }
.mini-thread { display: flex; flex-direction: column; gap: 6px; width: min(52%, 230px); }
.mini-thread .bub { font-size: 13px; max-width: 100%; }
.mini-thread .bub--out { background: var(--accent); }
.mini-thread .bub--out::before { box-shadow: -3px 3px 0 0 var(--accent); }
@media (max-width: 460px) { .mini-thread { display: none; } .game-art--sexter { justify-content: center; } }

.game-art--smgf { background: #0b1022; }
.game-art-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.game-art--smgf::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 16, 34, 0.75), rgba(11, 16, 34, 0) 60%); }
.game-art-logo { position: absolute; left: clamp(16px, 4vw, 32px); top: 50%; transform: translateY(-50%); width: clamp(120px, 34%, 210px); z-index: 1; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45)); }
.game:hover .game-art-bg { transform: scale(1.03); }

.game-body { display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 3vw, 32px); flex: 1; }
.game-body .h2 { margin-top: -2px; }
.note { padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--smgf) 8%, transparent); border: 1px solid color-mix(in srgb, var(--smgf) 22%, transparent); }
.note strong { color: var(--text-secondary); }
.game-actions { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 10px; }

.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ticks li { position: relative; padding-left: 24px; font-size: 0.9375rem; line-height: 1.5; color: var(--text-secondary); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--accent-light);
  border-bottom: 2px solid var(--accent-light);
  transform: rotate(-45deg);
}

/* ── Features ──────────────────────────────────────────────────────────── */
.features { margin-top: clamp(32px, 4vw, 48px); display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.feature { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px; background: var(--bg-primary); }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .features { grid-template-columns: repeat(4, 1fr); } }

/* ── Split + phones ───────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr; gap: 26px; padding-top: 30px; border-top: 1px solid var(--border); }
.stack { display: flex; flex-direction: column; gap: 16px; max-width: 56ch; align-self: end; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; } }

.phones {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
  gap: clamp(14px, 2vw, 24px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: #32324a transparent;
}
.phone {
  margin: 0;
  scroll-snap-align: start;
  padding: 7px;
  border-radius: 30px;
  background: #050508;
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.phone img { border-radius: 23px; width: 100%; }
.phone:hover { transform: translateY(-4px); }

/* ── Note from Zip ─────────────────────────────────────────────────────── */
.note-zip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  max-width: 760px;
}
.note-zip img { width: 72px; height: 72px; transform: rotate(-6deg); }
.note-zip-body { display: flex; flex-direction: column; gap: 14px; }
.note-zip-body .body { max-width: 62ch; }
.signoff { color: var(--text-primary); font-weight: 600; }
@media (min-width: 720px) {
  .note-zip { grid-template-columns: 96px minmax(0, 1fr); gap: 32px; }
  .note-zip img { width: 96px; height: 96px; }
}

/* ── Community tiles ───────────────────────────────────────────────────── */
.community { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) { .community { grid-template-columns: 1fr 1fr; gap: 24px; } }
.tile {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.tile > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.tile svg { flex-shrink: 0; }
.tile-arrow { color: var(--text-muted); font-size: 20px; transition: transform 0.18s ease, color 0.18s ease; }
.tile:hover .tile-arrow { transform: translateX(4px); color: var(--text-primary); }
.tile:active { transform: translateY(1px); }
.tile--discord svg { color: var(--discord); }
.tile--discord:hover { border-color: color-mix(in srgb, var(--discord) 55%, transparent); background: color-mix(in srgb, var(--discord) 10%, var(--bg-secondary)); }
.tile--patreon svg { color: var(--patreon); }
.tile--patreon:hover { border-color: color-mix(in srgb, var(--patreon) 55%, transparent); background: color-mix(in srgb, var(--patreon) 10%, var(--bg-secondary)); }

/* ── Closer + footer ───────────────────────────────────────────────────── */
.closer { padding-top: clamp(72px, 9vw, 128px); padding-bottom: clamp(56px, 7vw, 96px); }
.closer-title { font-size: clamp(1.85rem, 4.6vw, 3.1rem); max-width: 24ch; }

.footer-wrap { border-top: 1px solid var(--border); }
.footer { display: flex; flex-direction: column; gap: 18px; padding-top: 26px; padding-bottom: 36px; }
.footer .mono .link { text-transform: none; letter-spacing: 0.04em; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; }
@media (min-width: 900px) { .footer { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; } }

/* ── Age gate ──────────────────────────────────────────────────────────── */
.age-gate { display: none; }
.age-pending body { overflow: hidden; }
.age-pending .age-gate {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: color-mix(in srgb, var(--bg-primary) 82%, transparent);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.age-card {
  width: 100%;
  max-width: 392px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 32px 28px 28px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.age-card img { margin-bottom: 6px; }
.age-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 14px; }
.age-actions .btn { width: 100%; }

/* ── Motion ────────────────────────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes typing { 0%, 60%, 100% { opacity: 0.35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.rise { animation: rise 0.62s cubic-bezier(0.22, 1, 0.36, 1) both; }
.pop { animation: pop 0.34s cubic-bezier(0.22, 1, 0.36, 1) both; }
.age-pending .rise, .age-pending .pop { animation-play-state: paused; }

.in { opacity: 1; }
@supports (animation-timeline: view()) {
  .in { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 18%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .pop, .in { animation: none !important; opacity: 1 !important; transform: none !important; }
  .bub--typing span { animation: none; }
}
