:root {
  color-scheme: dark;
  --ink: #f8f3ed;
  --muted: #b9afa5;
  --canvas: #171311;
  --panel: #211b18;
  --panel-2: #2a221e;
  --line: rgba(255, 240, 224, .12);
  --red: #ef314e;
  --red-2: #ff5c72;
  --cream: #ffe8cc;
  --green: #86d7aa;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 12%, rgba(239, 49, 78, .15), transparent 28rem),
    radial-gradient(circle at 12% 42%, rgba(255, 203, 143, .07), transparent 24rem),
    var(--canvas);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a { color: inherit; }
button, textarea { font: inherit; }
button { color: inherit; }

.topbar {
  width: min(1180px, calc(100% - 40px));
  min-height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.identity {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.identity-mark {
  width: 42px;
  height: 42px;
  display: block;
  flex: 0 0 42px;
  border-radius: 13px;
  object-fit: cover;
  transform: rotate(-3deg);
  box-shadow: 0 8px 24px rgba(239, 49, 78, .18);
}

.identity strong, .identity small { display: block; }
.identity strong { font-size: 14px; letter-spacing: .01em; }
.identity small { margin-top: 1px; color: var(--muted); font-size: 12px; }

.quiet-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.quiet-link:hover { color: var(--ink); }

main, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(390px, .97fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
  padding: 78px 0 88px;
}

.eyebrow, .section-heading > span, .handoff-kicker {
  color: var(--cream);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow span { width: 24px; height: 2px; background: var(--red); }

h1 {
  max-width: 760px;
  margin: 20px 0 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 6vw, 76px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.045em;
}

h1 em { color: var(--red-2); font-style: italic; }

.lead {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
}

.hero-actions { display: flex; align-items: stretch; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.primary-action, .secondary-action {
  min-height: 58px;
  border-radius: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s ease, background .2s ease, border-color .2s ease;
}
.primary-action:active, .secondary-action:active { transform: scale(.98); }

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 12px;
  border: 0;
  color: white;
  background: var(--red);
  box-shadow: 0 16px 40px rgba(239, 49, 78, .2);
}
.primary-action:hover { background: #ff3b59; }
.primary-action strong, .primary-action small { display: block; text-align: left; }
.primary-action strong { font-size: 15px; }
.primary-action small { margin-top: 1px; opacity: .72; font-size: 11px; }
.action-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, .14);
  font-size: 17px;
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, .025);
  font-size: 14px;
  font-weight: 650;
}
.secondary-action:hover { border-color: rgba(255, 240, 224, .28); background: var(--panel); }

.copy-state { min-height: 24px; margin: 12px 0 0; color: var(--green); font-size: 13px; }
.copy-state.error { color: #ff98a6; }

.preview-card {
  position: relative;
  min-height: 480px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(155deg, #2a221e, #171311 70%);
  box-shadow: 0 36px 90px rgba(0, 0, 0, .34);
  overflow: hidden;
  transform: rotate(1deg);
}

.preview-card::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  top: 80px;
  border: 54px solid rgba(239, 49, 78, .12);
  border-radius: 50%;
}

.preview-browser {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.preview-browser > span { width: 8px; height: 8px; border-radius: 50%; background: #5a4c45; }
.preview-browser > span:first-child { background: var(--red); }
.preview-browser div {
  margin-left: 7px;
  padding: 5px 12px;
  border-radius: 8px;
  color: #8f8379;
  background: rgba(0, 0, 0, .22);
  font: 10px ui-monospace, monospace;
}

.preview-video {
  position: absolute;
  inset: 82px 24px auto;
  height: 250px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    linear-gradient(120deg, transparent 44%, rgba(255,255,255,.035) 45% 55%, transparent 56%),
    linear-gradient(145deg, #3a172e, #461471 48%, #15102b);
  overflow: hidden;
}
.preview-video::before, .preview-video::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 36px solid rgba(255, 255, 255, .055);
}
.preview-video::before { left: -80px; top: -60px; }
.preview-video::after { right: -80px; bottom: -90px; }
.play {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  padding-left: 3px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
}
.timeline { position: absolute; left: 16px; right: 16px; bottom: 14px; height: 3px; background: #ffffff38; }
.timeline i { display: block; width: 42%; height: 100%; background: var(--red); }

.preview-helper {
  position: absolute;
  width: min(350px, calc(100% - 42px));
  right: 18px;
  bottom: 20px;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 17px;
  background: rgba(25, 22, 22, .94);
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 50px rgba(0,0,0,.4);
}
.helper-top { display: flex; justify-content: space-between; align-items: center; }
.helper-top b { font-size: 14px; }
.helper-top span { color: var(--green); font-size: 10px; }
.preview-helper p { margin: 7px 0 13px; color: var(--muted); font-size: 11px; }
.fake-button { padding: 10px; border-radius: 10px; background: var(--red); text-align: center; font-size: 12px; font-weight: 700; }

.steps { padding: 78px 0 92px; border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 28px; }
.section-heading h2, .handoff h2 {
  margin: 8px 0 0;
  font-family: Georgia, serif;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.025em;
}

.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step-card {
  position: relative;
  min-height: 300px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.018);
}
.step-card.featured { background: var(--panel-2); border-color: rgba(255, 92, 114, .3); }
.step-number {
  display: inline-block;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--red);
  color: var(--muted);
  font: 12px ui-monospace, monospace;
}
.step-card h3 { margin: 60px 0 10px; font-size: 20px; }
.step-card p { margin: 0; color: var(--muted); font-size: 14px; }
.step-card a, .text-button {
  position: absolute;
  left: 24px;
  bottom: 23px;
  padding: 0;
  border: 0;
  color: var(--cream);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
kbd, code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--cream);
  background: rgba(0,0,0,.2);
  font: .88em ui-monospace, SFMono-Regular, Consolas, monospace;
}
.micro-note { position: absolute; left: 24px; right: 24px; bottom: 22px; color: var(--red-2); font-size: 12px; }

.console-note {
  max-width: 820px;
  margin: -58px 0 86px;
  padding-left: 16px;
  border-left: 2px solid var(--red);
  color: var(--muted);
  font-size: 12px;
}

.handoff {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  padding: clamp(30px, 5vw, 54px);
  border-radius: 28px;
  color: #2a1719;
  background: linear-gradient(115deg, #ffd9cd, #ffb2be);
}
.handoff-kicker { color: #852333; }
.handoff h2 { max-width: 700px; }
.handoff p { max-width: 720px; margin: 16px 0 0; color: #693d40; }
.handoff code { color: #641e2a; background: #ffffff4d; border-color: #7f263633; }
.handoff-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 15px;
  border-radius: 999px;
  background: #351c20;
  color: #ffe4e8;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.handoff-status:hover { background: #4a272d; }
.handoff-status span { width: 8px; height: 8px; border-radius: 50%; background: #ffb33b; box-shadow: 0 0 0 5px #ffb33b25; }

.fallback {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.018);
}
.fallback summary { padding: 20px 22px; cursor: pointer; font-weight: 700; }
.fallback-body { padding: 0 22px 22px; color: var(--muted); }
.fallback-body li + li { margin-top: 8px; }

.safety {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  max-width: 760px;
  margin: 68px auto;
}
.safety-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: #86d7aa1c;
  font-weight: 900;
}
.safety strong { display: block; margin: 1px 0 3px; }
.safety p { margin: 0; color: var(--muted); font-size: 13px; }

footer {
  min-height: 88px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
footer a { color: var(--cream); text-decoration: none; }

dialog {
  width: min(720px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 30px 100px #000b;
}
dialog::backdrop { background: rgba(10, 7, 6, .8); backdrop-filter: blur(5px); }
dialog form { padding: 22px; }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.dialog-head span { color: var(--red-2); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; }
.dialog-head h2 { margin: 4px 0 0; font: 500 26px Georgia, serif; }
.dialog-head button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--panel-2); cursor: pointer; font-size: 22px; }
#script-source {
  width: 100%;
  height: 260px;
  resize: vertical;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #e8ded4;
  background: #110e0d;
  font: 12px/1.5 ui-monospace, Consolas, monospace;
}
.primary-action.compact { min-height: 46px; margin-top: 12px; padding: 0 18px; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; }
  .preview-card { min-height: 430px; transform: none; }
  .step-grid { grid-template-columns: 1fr; }
  .step-card { min-height: 235px; }
  .step-card h3 { margin-top: 38px; }
  .handoff { grid-template-columns: 1fr; }
  .handoff-status { justify-self: start; }
}

@media (max-width: 560px) {
  .topbar, main, footer { width: min(100% - 28px, 1180px); }
  .topbar { min-height: 70px; }
  .quiet-link { display: none; }
  .hero { min-height: auto; padding: 48px 0 70px; gap: 46px; }
  h1 { font-size: 43px; }
  .hero-actions { display: grid; }
  .primary-action, .secondary-action { width: 100%; justify-content: center; }
  .preview-card { min-height: 370px; }
  .preview-video { height: 200px; }
  .preview-helper { bottom: 14px; }
  .steps { padding: 60px 0 70px; }
  .console-note { margin: -38px 0 66px; }
  .handoff { padding: 28px 22px; }
  .handoff-status { white-space: normal; }
  .safety { margin: 48px 0; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 24px 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy { animation: rise .5s ease both; }
  .preview-card { animation: rise .6s .08s ease both; }
  .step-card { animation: rise .45s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
}
