/* UltraCodey landing — single page, no dependencies.
   Design language mirrors the app: near-black surfaces, one solid violet
   accent, sentence-case type, restrained motion. */

:root {
  --bg: #0b0c10;
  --bg-raised: #11131a;
  --bg-card: #141722;
  --line: #232735;
  --text: #e8eaf2;
  --text-dim: #9aa1b5;
  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, 0.16);
  --good: #34d399;
  --radius: 14px;
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Inter", "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.04; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.06rem; }
p  { margin: 0 0 1em; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px;
  font-weight: 600; font-size: .95rem; line-height: 1;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #8d71ff; }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 28px;
  padding: 0 clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--text-dim); font-size: .92rem; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { padding: 9px 16px; }
@media (max-width: 720px) { .nav-links { display: none; } }

/* ── Hero ── */
.hero {
  display: grid; grid-template-columns: minmax(320px, 5fr) 6fr;
  gap: clamp(24px, 4vw, 64px); align-items: center;
  padding: clamp(48px, 9vh, 110px) clamp(16px, 4vw, 48px) 40px;
  max-width: 1380px; margin: 0 auto;
}
.hero-kicker {
  color: var(--accent); font-weight: 600; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .12em; margin-bottom: 18px;
}
.hero-sub { color: var(--text-dim); font-size: 1.08rem; max-width: 34rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 34px; }
.hero-stats { list-style: none; display: flex; gap: 28px; padding: 0; margin: 0; flex-wrap: wrap; }
.hero-stats li { display: flex; flex-direction: column; min-width: 96px; }
.hero-stats b { font-size: 1.45rem; font-weight: 700; }
.hero-stats span { color: var(--text-dim); font-size: .82rem; line-height: 1.35; }

.hero-stage { position: relative; perspective: 1400px; min-width: 0; }
.hero-frame {
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-raised);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8);
  transform: rotateY(-9deg) rotateX(4deg);
  transition: transform .2s ease-out;
  will-change: transform;
}
.hero-glow {
  position: absolute; inset: -8% -4%; z-index: -1;
  background: radial-gradient(45% 45% at 60% 40%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-frame { transform: none; }
}

/* ── Section scaffolding ── */
section { padding: clamp(48px, 9vh, 110px) clamp(16px, 4vw, 48px); }
.sec-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.sec-head p { color: var(--text-dim); font-size: 1.04rem; }

/* ── Slideshow ── */
.surfaces { background: var(--bg-raised); border-block: 1px solid var(--line); }
.show { max-width: 1180px; margin: 0 auto; perspective: 1600px; }
.show-stage {
  position: relative; aspect-ratio: 1936 / 1048;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--bg); box-shadow: 0 30px 80px -28px rgba(0, 0, 0, .75);
  will-change: transform;
}
.show-img {
  position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease;
}
.show-img.active { opacity: 1; }
.show-caption {
  text-align: center; color: var(--text-dim); font-size: .95rem;
  max-width: 56rem; margin: 18px auto 14px; min-height: 3em;
}
.show-dots { display: flex; gap: 10px; justify-content: center; }
.show-dots button {
  width: 9px; height: 9px; border-radius: 50%;
  border: none; padding: 0; cursor: pointer;
  background: var(--line); transition: background .2s, transform .2s;
}
.show-dots button.active { background: var(--accent); transform: scale(1.25); }

/* ── The firm ── */
.firm { background: var(--bg-raised); border-block: 1px solid var(--line); }
.firm-roles {
  display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-width: 1180px; margin: 0 auto;
}
.firm-role {
  position: relative; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 26px 24px;
}
.firm-role i {
  display: block; font-style: normal; font-weight: 700; font-size: .85rem;
  color: var(--accent); letter-spacing: .14em; margin-bottom: 14px;
}
.firm-role h3 { margin-bottom: .4em; }
.firm-role p { color: var(--text-dim); font-size: .94rem; margin: 0; }
.firm-role::after {
  /* hand-off arrow between roles on wide layouts */
  content: "→"; position: absolute; right: -19px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-size: 1.2rem; z-index: 1;
}
.firm-role:last-child::after { content: none; }
@media (max-width: 920px) { .firm-role::after { content: none; } }
.firm-note {
  max-width: 760px; margin: 36px auto 0; text-align: center;
  color: var(--text-dim); font-size: .95rem;
  border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px;
  background: var(--bg-card);
}

/* ── Security ── */
.security { background: var(--bg-raised); border-block: 1px solid var(--line); }
.sec-grid {
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  max-width: 1180px; margin: 0 auto;
}
.sec-grid > div {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 18px 20px; background: var(--bg-card);
  display: flex; flex-direction: column; gap: 6px;
}
.sec-grid b { font-size: .98rem; }
.sec-grid span { color: var(--text-dim); font-size: .88rem; line-height: 1.55; }

/* ── Surface spotlights ── */
.spots { display: flex; flex-direction: column; gap: clamp(56px, 9vh, 110px); max-width: 1280px; margin: 0 auto; }
.spot {
  display: grid; grid-template-columns: 7fr 5fr;
  gap: clamp(24px, 4vw, 56px); align-items: center;
}
.spot:nth-child(even) { grid-template-columns: 5fr 7fr; }
.spot:nth-child(even) .spot-media { order: 2; }
.spot:nth-child(even) .spot-copy { order: 1; }
.spot-media {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-raised); box-shadow: 0 26px 70px -26px rgba(0, 0, 0, .7);
  transition: transform .18s ease-out; will-change: transform;
}
.spot-tag {
  color: var(--accent); font-weight: 600; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .12em; margin-bottom: 10px;
}
.spot-copy h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.spot-copy > p { color: var(--text-dim); }
.spot-copy ul { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 9px; }
.spot-copy li {
  position: relative; padding-left: 22px; color: var(--text-dim); font-size: .93rem;
}
.spot-copy li::before {
  content: ""; position: absolute; left: 0; top: .52em;
  width: 10px; height: 10px; border-radius: 3px;
  background: var(--accent-soft); border: 1px solid var(--accent);
}
.spot-copy code {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 6px; font-size: .86em;
}
/* theming/levels reuse .spot inside their own bands */
.theming, .levels { background: var(--bg-raised); border-block: 1px solid var(--line); }
.theming .spot, .levels .spot { max-width: 1280px; margin: 0 auto; }
.levels { background: var(--bg); border: 0; }
@media (max-width: 920px) {
  .spot, .spot:nth-child(even) { grid-template-columns: 1fr; }
  .spot:nth-child(even) .spot-media { order: 0; }
  .spot:nth-child(even) .spot-copy { order: 1; }
}

/* ── Power tools duo ── */
.duo {
  display: grid; gap: 22px; grid-template-columns: 1fr 1fr;
  max-width: 1280px; margin: 0 auto;
}
.duo-card {
  margin: 0; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-card);
  transition: transform .18s ease-out, border-color .18s; will-change: transform;
}
.duo-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.duo-card figcaption { padding: 16px 20px; color: var(--text-dim); font-size: .92rem; }
.duo-card figcaption b { color: var(--text); }
@media (max-width: 920px) { .duo { grid-template-columns: 1fr; } }

/* ── Meet Codey ── */
.codey { background: var(--bg-raised); border-block: 1px solid var(--line); }
.codey-grid {
  display: grid; grid-template-columns: 7fr 5fr; gap: clamp(24px, 4vw, 56px);
  align-items: center; max-width: 1180px; margin: 0 auto 48px;
}
.codey-copy h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.codey-copy > p { color: var(--text-dim); }
.codey-copy ul { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 9px; }
.codey-copy li { position: relative; padding-left: 22px; color: var(--text-dim); font-size: .94rem; }
.codey-copy li::before {
  content: ""; position: absolute; left: 0; top: .52em;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent-soft); border: 1px solid var(--accent);
}
.codey-copy b { color: var(--text); }
.codey-stage { display: flex; justify-content: center; }
.codey-pet {
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: var(--bg); box-shadow: 0 26px 70px -24px rgba(0, 0, 0, .8);
  transition: transform .18s ease-out; will-change: transform;
}
.codey-studio {
  margin: 0 auto; max-width: 1180px;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-card); box-shadow: 0 26px 70px -26px rgba(0, 0, 0, .7);
  transition: transform .18s ease-out; will-change: transform;
}
.codey-studio figcaption { padding: 16px 20px; color: var(--text-dim); font-size: .92rem; }
.codey-studio figcaption b { color: var(--text); }
@media (max-width: 920px) { .codey-grid { grid-template-columns: 1fr; } }

/* ── Features ── */
.feat-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  max-width: 1280px; margin: 0 auto;
}
.feat {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px;
  transition: transform .18s ease-out, border-color .18s;
  will-change: transform;
}
.feat:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.feat h3 { color: var(--text); }
.feat p { color: var(--text-dim); font-size: .94rem; margin: 0; }

/* ── Brain band ── */
.brain { background: var(--bg-raised); border-block: 1px solid var(--line); }
.brain-inner { max-width: 980px; margin: 0 auto; text-align: center; }
.brain-inner > p { color: var(--text-dim); font-size: 1.05rem; max-width: 46rem; margin: 0 auto 40px; }
.brain-points {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  text-align: left;
}
.brain-points > div {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 16px 18px; background: var(--bg-card);
  display: flex; flex-direction: column; gap: 4px;
}
.brain-points b { font-size: .98rem; }
.brain-points span { color: var(--text-dim); font-size: .86rem; }

/* ── Compare ── */
.table-wrap { max-width: 1080px; margin: 0 auto; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 720px; }
th, td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); }
thead th { background: var(--bg-card); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
thead th.uc { color: var(--accent); }
tbody th { font-weight: 500; color: var(--text); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: none; }
td { color: var(--text-dim); }
td.uc { color: var(--good); font-weight: 600; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.compare-note { max-width: 760px; margin: 26px auto 0; text-align: center; color: var(--text-dim); font-size: .92rem; }

/* ── Download ── */
.dl-card {
  max-width: 680px; margin: 0 auto; text-align: center;
  border: 1px solid var(--line); border-radius: 18px;
  padding: clamp(32px, 6vw, 64px);
  background:
    radial-gradient(80% 90% at 50% -10%, var(--accent-soft), transparent 60%),
    var(--bg-card);
}
.dl-card img { margin: 0 auto 18px; }
.dl-card p { color: var(--text-dim); max-width: 30rem; margin-inline: auto; }
.dl-card .hero-actions { justify-content: center; }
.dl-fine { font-size: .82rem; margin-top: 18px; }

/* ── Footer ── */
.foot {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 28px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line); color: var(--text-dim); font-size: .88rem;
}
.foot > div { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.foot p { margin: 0; }
.foot nav { margin-left: auto; display: flex; gap: 18px; }
.foot nav a:hover { color: var(--text); }

/* ── Scroll reveal + motion ── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-frame { transform: none !important; }
  .tilt3d { transform: none !important; }
  .show-img { transition: none; }
}
