:root {
  --ink: #070d12;
  --ink-2: #0c151c;
  --fog: #9bb0bc;
  --paper: #e8f2ef;
  --mint: #1ec8b0;
  --mint-2: #7dffd4;
  --steel: #3d7ea6;
  --danger: #ff7b72;
  --ok: #5ee4a8;
  --line: rgba(126, 168, 180, .22);
  --font: "Manrope", system-ui, sans-serif;
  --display: "Syne", "Manrope", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--paper);
  background:
    radial-gradient(1000px 700px at 70% -10%, rgba(30, 200, 176, .16), transparent 55%),
    radial-gradient(800px 500px at -10% 40%, rgba(61, 126, 166, .18), transparent 50%),
    linear-gradient(180deg, #081018 0%, var(--ink) 40%, #061015 100%);
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 50;
}

a { color: var(--mint-2); text-decoration: none; }
a:hover { color: #fff; }

.nav, .pub-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem);
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(7,13,18,.85), rgba(7,13,18,.2));
}
.nav-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  color: var(--paper);
}
.nav-links { display: flex; gap: 1.25rem; align-items: center; font-size: .92rem; }
.nav-links a { color: var(--fog); }
.nav-links a:hover { color: var(--paper); }
.nav-cta {
  padding: .45rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper) !important;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding: clamp(5.5rem, 12vh, 8rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 8vh, 5rem);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.mesh {
  width: 100%;
  height: 100%;
  opacity: .95;
  animation: meshFloat 10s ease-in-out infinite alternate;
}
.mesh-lines { animation: pulseLine 3.5s ease-in-out infinite; }
.scan {
  animation: scanY 4.5s linear infinite;
}
@keyframes meshFloat {
  from { transform: translateY(0) scale(1.02); }
  to { transform: translateY(-18px) scale(1.05); }
}
@keyframes pulseLine {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}
@keyframes scanY {
  0% { transform: translateY(180px); opacity: 0; }
  10% { opacity: .7; }
  90% { opacity: .7; }
  100% { transform: translateY(720px); opacity: 0; }
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 38rem;
  animation: rise .9s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.brand-mark {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  letter-spacing: -.04em;
  margin: 0 0 .6rem;
  line-height: .95;
  background: linear-gradient(120deg, #fff 10%, var(--mint-2) 55%, var(--steel) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  line-height: 1.25;
  letter-spacing: -.02em;
  margin: 0 0 .85rem;
  max-width: 18ch;
}
.lede {
  margin: 0 0 1.5rem;
  color: var(--fog);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 36ch;
}
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--paper);
  font: 600 .95rem var(--font);
  padding: .8rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(126,255,212,.45); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(135deg, #19b89f, #2a8fb5);
  border-color: transparent;
  color: #041018;
}
.btn.ghost { background: transparent; }
a.btn { display: inline-flex; align-items: center; }

.studio, .how, .close {
  padding: clamp(3rem, 8vh, 5rem) clamp(1rem, 4vw, 2.5rem);
  max-width: 1120px;
  margin: 0 auto;
}
.studio-head h2, .how h2, .close h2 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -.03em;
  margin: 0 0 .5rem;
}
.studio-head p, .section-lede, .close p {
  color: var(--fog);
  margin: 0 0 1.75rem;
  max-width: 42ch;
  line-height: 1.55;
}

.studio-stage {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 1.5rem;
  align-items: stretch;
}
@media (max-width: 900px) {
  .studio-stage { grid-template-columns: 1fr; }
  .nav-links a:not(.nav-cta) { display: none; }
}

.viewport {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(30,200,176,.08), transparent 40%),
    #0a141b;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.viewport video, .viewport canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.viewport canvas { pointer-events: none; }
.ring {
  position: absolute;
  inset: 12% 18%;
  border: 1.5px solid rgba(125,255,212,.35);
  border-radius: 50% / 58%;
  box-shadow: inset 0 0 40px rgba(30,200,176,.08);
  animation: ringPulse 2.8s ease-in-out infinite;
  pointer-events: none;
}
.ring.ok { border-color: rgba(94,228,168,.7); }
.ring.bad { border-color: rgba(255,123,114,.7); }
@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: .7; }
  50% { transform: scale(1.02); opacity: 1; }
}
.viewport-status {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: .4rem .7rem;
  border-radius: 999px;
  background: rgba(7,13,18,.72);
  border: 1px solid var(--line);
  font-size: .78rem;
  color: var(--fog);
  backdrop-filter: blur(6px);
}

.studio-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.steps li {
  display: flex;
  gap: .75rem;
  align-items: center;
  color: var(--fog);
  font-size: .95rem;
  opacity: .55;
  transition: opacity .25s ease, color .25s ease;
}
.steps li span {
  font-family: var(--display);
  font-weight: 700;
  color: var(--mint);
  min-width: 1.6rem;
}
.steps li.active, .steps li.done {
  opacity: 1;
  color: var(--paper);
}
.steps li.done span { color: var(--ok); }

.challenge-panel {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(30,200,176,.35);
  border-radius: 18px;
  background: rgba(30,200,176,.08);
  animation: rise .4s ease both;
}
.challenge-label {
  margin: 0;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mint-2);
}
.challenge-text {
  margin: .35rem 0 .75rem;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
}
.progress {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--mint), var(--mint-2));
  transition: width .1s linear;
}

.result {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  animation: rise .45s ease both;
}
.result.pass { border-color: rgba(94,228,168,.45); }
.result.fail { border-color: rgba(255,123,114,.45); }
.result-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: .75rem;
}
.meter-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.meter-track i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--steel), var(--mint-2));
  transition: width .8s cubic-bezier(.2,.8,.2,1);
}
.meter-meta {
  display: flex;
  justify-content: space-between;
  margin-top: .45rem;
  font-size: .82rem;
  color: var(--fog);
}
.meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .25rem .75rem;
  margin: .85rem 0 0;
  font-size: .82rem;
  color: var(--fog);
}
.meta dt { opacity: .7; }
.meta dd { margin: 0; color: var(--paper); font-variant-numeric: tabular-nums; }

.actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.hint { margin: 0; color: var(--fog); font-size: .82rem; line-height: 1.45; }
.session-line {
  margin: 0;
  font-size: .75rem;
  color: rgba(155,176,188,.7);
}
.session-line code {
  font-family: ui-monospace, monospace;
  color: var(--mint-2);
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 800px) {
  .how-grid { grid-template-columns: 1fr; }
}
.how-grid strong {
  display: block;
  font-family: var(--display);
  font-size: 1.15rem;
  margin-bottom: .4rem;
}
.how-grid p {
  margin: 0;
  color: var(--fog);
  line-height: 1.5;
  font-size: .95rem;
}

.close {
  text-align: left;
  border-top: 1px solid var(--line);
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem) 2.5rem;
  color: rgba(155,176,188,.65);
  font-size: .78rem;
  border-top: 1px solid var(--line);
}
