:root {
  --bg: #080808;
  --ink: #ece8e1;
  --muted: #8b8680;
  --dim: #3a3733;
  --line: rgba(255,255,255,.1);
  --red: #e5391c;
  --display: "Anton", Impact, sans-serif;
  --serif: "Cormorant Garamond", serif;
  --sans: "Inter", system-ui, sans-serif;
  --gutter: clamp(16px, 3.6vw, 56px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background-image: radial-gradient(ellipse 80% 60% at 70% 0%, rgba(229,57,28,.08), transparent 60%); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

/* arriving out of the cave: bright sea light fades away */
.arrive { position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background: radial-gradient(circle at 55% 45%, #ffffff 0%, #eef3f6 40%, #b9c6cc 100%); }

/* ---------- header ---------- */
.top { display: flex; align-items: center; gap: 24px; padding: 22px var(--gutter); border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: 12px; color: #f5f1e8; }
.logo-mark { width: 30px; height: 28px; }
.logo-door { fill: var(--red); }
.logo-word { font-family: "Orbitron", var(--sans); font-weight: 800; font-size: 13px; letter-spacing: .26em; }
.top-tag { display: flex; align-items: center; gap: 10px; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); flex: 1; }
.red-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px var(--red); }
.back { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); transition: color .3s; }
.back:hover { color: var(--ink); }

/* ---------- account ---------- */
.me[hidden], .me-in[hidden] { display: none; }
.me { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); }
.me-hi { color: var(--ink); }
.me-left { border: 1px solid rgba(229,57,28,.5); color: #ffb8a8; border-radius: 30px; padding: 4px 10px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.me-out, .me-in { background: none; border: 0; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.me-out:hover, .me-in:hover { color: var(--ink); }
.auth { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(229,57,28,.22), rgba(0,0,0,.92) 70%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.auth[hidden] { display: none; }
.auth-card { position: relative; width: min(560px, 100%); background: linear-gradient(#121110, #0b0b0b); border: 1px solid rgba(229,57,28,.35); border-radius: 20px;
  padding: clamp(24px, 4vw, 40px); box-shadow: 0 40px 120px rgba(0,0,0,.8), 0 0 80px rgba(229,57,28,.18); }
.auth-card .kicker { display: flex; gap: 10px; align-items: center; }
.auth-x { position: absolute; top: 14px; right: 16px; background: none; border: 0; color: var(--muted); font-size: 16px; padding: 6px; }
.auth-x:hover { color: var(--ink); }
.auth-title { font: 400 clamp(38px, 5vw, 56px)/.95 var(--display); text-transform: uppercase; }
.auth-title em { font-style: normal; color: var(--red); text-shadow: 0 0 30px rgba(229,57,28,.5); }
.auth-sub { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 14px 0 22px; }
.auth-sub b { color: var(--ink); font-weight: 500; }
.auth-form { display: grid; gap: 14px; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-form .field > span i { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--dim); margin-left: 4px; }
.auth-form input[type=email], .auth-form input[type=password], .auth-form select { width: 100%; background: #0f0f0f; border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); padding: 12px 14px; font: 15px/1.5 var(--sans); transition: border-color .3s, box-shadow .3s; }
.auth-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.auth-form input:focus, .auth-form select:focus { outline: none; border-color: rgba(229,57,28,.6); box-shadow: 0 0 0 3px rgba(229,57,28,.15); }
.auth-form .bad { border-color: var(--red) !important; }
.auth-err { color: #ff8a73; font-size: 13px; min-height: 1em; }
.auth-err:empty { display: none; }
.auth-switch, .auth-fine { text-align: center; font-size: 13px; color: var(--muted); }
.auth-switch button { background: none; border: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.auth-fine { font-size: 11px; color: var(--dim); margin-top: -4px; }
.auth.login .for-signup, .auth:not(.login) .for-login { display: none; }
.auth.login .auth-title { margin-bottom: 24px; }
.me-left { white-space: nowrap; }
.out-note a { color: var(--red); text-decoration: underline; }

/* ---------- intro ---------- */
.intro { padding: 56px var(--gutter) 36px; max-width: 1100px; }
.kicker { font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--red); margin-bottom: 16px; }
.title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(48px, 7vw, 116px); line-height: .92; }
.title span { display: block; }
.title span:last-child { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.sub { color: var(--muted); max-width: 560px; margin-top: 20px; line-height: 1.6; font-size: 15px; }

/* ---------- workspace ---------- */
.workspace { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 28px; padding: 0 var(--gutter) 64px; align-items: start; }
.panel { background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; gap: 22px; position: sticky; top: 20px; }
.field { display: grid; gap: 10px; border: 0; }
.field > span, .field legend { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
input[type=text], textarea { width: 100%; background: #0f0f0f; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); padding: 12px 14px; font: 15px/1.5 var(--sans); resize: vertical; transition: border-color .3s, box-shadow .3s; }
input[type=text]:focus, textarea:focus { outline: none; border-color: rgba(229,57,28,.6); box-shadow: 0 0 0 3px rgba(229,57,28,.15); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { background: none; border: 1px solid var(--line); border-radius: 30px; padding: 8px 14px; font-size: 12.5px; color: #c9c4bd; transition: all .25s; }
.chips button:hover { border-color: rgba(255,255,255,.3); }
.chips button.on { background: var(--ink); color: #111; border-color: var(--ink); }
.swatches { display: flex; gap: 10px; align-items: center; }
.swatches button, .swatches .custom { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--c); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px transparent; transition: box-shadow .25s, transform .25s; }
.swatches button.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); transform: scale(1.08); }
.swatches .custom { position: relative; overflow: hidden; background: conic-gradient(#e5391c, #f59e0b, #10b981, #0ea5e9, #8b5cf6, #ec4899, #e5391c); cursor: pointer; }
.swatches .custom.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.swatches .custom input { position: absolute; inset: -10px; opacity: 0; cursor: pointer; }
.generate, .auth-go { margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--red); border: 0; border-radius: 60px; padding: 16px 22px;
  font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: #fff; box-shadow: 0 10px 40px rgba(229,57,28,.35); transition: transform .25s, box-shadow .25s; }
.generate:hover, .auth-go:hover { transform: translateY(-2px); box-shadow: 0 16px 50px rgba(229,57,28,.5); }
.generate svg, .auth-go svg { width: 18px; fill: none; stroke: #fff; stroke-width: 1.8; }
.generate:disabled, .auth-go:disabled { opacity: .6; transform: none; cursor: progress; }

/* ---------- stage ---------- */
.stage { position: relative; min-height: 640px; border: 1px solid var(--line); border-radius: 18px; padding: 28px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 120%, rgba(229,57,28,.12), transparent 60%), #0b0b0b; }
.devices { position: relative; padding-right: 9%; opacity: 0; transition: opacity .6s; }
.stage.ready .devices { opacity: 1; }
.browser { border-radius: 12px; overflow: hidden; background: #151413; box-shadow: 0 40px 100px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.08); }
.chrome { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: #151413; border-bottom: 1px solid rgba(255,255,255,.06); }
.chrome i { width: 9px; height: 9px; border-radius: 50%; background: #3d3a36; }
.chrome i:first-child { background: var(--red); }
.chrome .url { margin: 0 auto; font-size: 11px; color: #8d877f; background: rgba(255,255,255,.05); padding: 4px 18px; border-radius: 20px; letter-spacing: .04em; }
.viewport { position: relative; overflow: hidden; background: #fff; }
.browser .viewport { aspect-ratio: 16 / 10; }
.viewport iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #fff; }
.phone { position: absolute; right: 0; bottom: -40px; width: 21%; min-width: 150px; aspect-ratio: 390 / 844; border-radius: 34px; padding: 9px; background: #0a0a0a;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.2), 0 40px 90px rgba(0,0,0,.85); transform: rotate(4deg); }
.phone .viewport { height: 100%; border-radius: 26px; }
.build-log { position: absolute; left: 28px; top: 28px; z-index: 3; width: min(360px, 80%); padding: 18px 20px; border-radius: 14px; background: rgba(8,8,8,.88); border: 1px solid var(--line);
  backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .4s, transform .4s; }
.stage.building .build-log { opacity: 1; transform: none; }
.build-log .bar { height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; margin-bottom: 14px; }
.build-log .bar i { display: block; height: 100%; width: 0; background: var(--red); box-shadow: 0 0 12px var(--red); }
.build-log ol { list-style: none; display: grid; gap: 8px; font-size: 12.5px; color: #c9c4bd; }
.build-log li::before { content: "◌"; color: var(--muted); margin-right: 10px; }
.build-log li.done::before { content: "✓"; color: #6ee7a8; }
.empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--muted); font-size: 13px; letter-spacing: .1em; transition: opacity .5s; }
.empty-mark { width: 90px; color: #2a2826; }
.empty .logo-door { animation: doorGlow 2.6s ease-in-out infinite; }
@keyframes doorGlow { 50% { filter: drop-shadow(0 0 14px var(--red)); } }
.stage.ready .empty, .stage.building .empty { opacity: 0; pointer-events: none; }
.actions { display: flex; gap: 14px; justify-content: flex-end; margin-top: 64px; opacity: 0; transition: opacity .5s .3s; }
.stage.ready .actions { opacity: 1; }
.ghost { background: none; border: 1px solid var(--line); border-radius: 40px; padding: 12px 18px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.ghost:hover { border-color: rgba(255,255,255,.3); }
.send { background: var(--ink); color: #111; border-radius: 40px; padding: 12px 20px; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.send:hover { background: #fff; }

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .panel { position: static; }
  .top-tag { display: none; }
  .me-hi, .back { display: none; }
  .me { margin-left: auto; }
  .auth { place-items: start center; }
  .auth-grid { grid-template-columns: 1fr; }
  .stage { min-height: 460px; padding: 16px; }
  .phone { width: 30%; bottom: -20px; }
  .build-log { left: 16px; top: 16px; }
}

.logo-mark { overflow: visible; }
.neon-pulse { fill: none; stroke: var(--neon, #ff5a2a); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 7 93; animation: neonRun 3.2s linear infinite;
  filter: drop-shadow(0 0 6px var(--neon, #ff5a2a)) drop-shadow(0 0 14px #e5391c); }
@keyframes neonRun { to { stroke-dashoffset: -100; } }

/* ---------- AI mockups ---------- */
.mockups { display: none; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stage.ai .mockups { display: grid; }
.stage.ai .devices, .stage.ai .empty { display: none; }
.mock { position: relative; border-radius: 12px; overflow: hidden; background: #111; border: 1px solid var(--line); aspect-ratio: 3 / 4.4; cursor: zoom-in; }
.mock header { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; justify-content: space-between; padding: 12px 14px;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase; background: linear-gradient(rgba(0,0,0,.75), transparent); }
.mock header b { color: var(--red); font-weight: 600; }
.mock img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; opacity: 0; transition: opacity .8s, object-position 7s ease-in-out; }
.mock.done img { opacity: 1; }
.mock.done:hover img { object-position: bottom; }
.mock .wait { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.mock .wait::before { content: ""; position: absolute; left: 0; right: 0; height: 30%; top: -30%; background: linear-gradient(transparent, rgba(229,57,28,.18), transparent); animation: scan 2.2s linear infinite; }
@keyframes scan { to { top: 100%; } }
.mock .wait .t { font: 600 26px "Orbitron", var(--sans); color: var(--ink); letter-spacing: .1em; }
.mock.done .wait { display: none; }
.mock.err { cursor: default; }
.mock.err .wait { color: #f3a08f; padding: 20px; }
.mock .retry { margin-top: 6px; }
.ai-note { color: var(--muted); font-size: 12px; margin-top: 16px; min-height: 1em; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(5,5,5,.94); display: grid; grid-template-rows: 1fr auto; }
.lightbox[hidden] { display: none; }
.lb-scroll { overflow-y: auto; display: flex; justify-content: center; padding: 30px 16px; }
.lb-scroll img { width: min(900px, 100%); height: auto; border-radius: 10px; box-shadow: 0 30px 90px rgba(0,0,0,.8); align-self: flex-start; }
.lb-bar { display: flex; align-items: center; gap: 14px; padding: 16px var(--gutter); border-top: 1px solid var(--line); background: #0b0b0b; }
.lb-title { flex: 1; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
@media (max-width: 900px) { .mockups { grid-template-columns: 1fr; } .mock { aspect-ratio: 3 / 4; } }

/* ---------- multi-step brief ---------- */
.steps-head { display: grid; gap: 12px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.steps li button { width: 100%; background: none; border: 0; border-top: 2px solid var(--dim); padding: 8px 0 0; text-align: left;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); transition: color .3s, border-color .3s; }
.steps li.done button { border-color: rgba(229,57,28,.5); color: #c9c4bd; }
.steps li.on button { border-color: var(--red); color: var(--ink); }
.strength { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); }
.strength-bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.07); overflow: hidden; }
.strength-bar i { display: block; height: 100%; width: 5%; background: linear-gradient(90deg, #7a2a1c, var(--red), #ff9a6a); transition: width .5s; }
.step { display: none; gap: 20px; }
.step.on { display: grid; animation: stepIn .45s ease-out; }
@keyframes stepIn { from { opacity: 0; transform: translateX(14px); } }
.step h3 { font: 400 26px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.step-nav { display: flex; justify-content: space-between; }
.step-nav .ghost[disabled] { opacity: .3; cursor: default; }
.chips.tiny button { padding: 5px 10px; font-size: 11px; }
.field.two { grid-template-columns: 1fr 1fr; align-items: end; gap: 14px; }
.field.two > label, .field.two > fieldset { display: grid; gap: 10px; border: 0; }
.field.two span, .field.two legend, .lbl { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.color-in { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #0f0f0f; padding: 4px; cursor: pointer; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: #0f0f0f; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.tags:focus-within { border-color: rgba(229,57,28,.6); }
.tag-list { display: contents; }
.tag { display: inline-flex; align-items: center; gap: 6px; background: rgba(229,57,28,.15); color: #ffc9b8; border: 1px solid rgba(229,57,28,.4); border-radius: 20px; padding: 3px 10px; font-size: 12px; }
.tag button { background: none; border: 0; color: inherit; font-size: 12px; }
.tag-input { flex: 1; min-width: 120px; background: none; border: 0; color: var(--ink); font: 14px var(--sans); outline: none; }
.range { width: 100%; accent-color: var(--red); }
.density-out { color: var(--ink); font-weight: 500; letter-spacing: .1em; }
.drop { display: grid; place-items: center; min-height: 74px; border: 1.5px dashed rgba(255,255,255,.18); border-radius: 12px; color: var(--muted); font-size: 13px; cursor: pointer;
  transition: border-color .3s, background .3s; text-align: center; padding: 10px; background-size: contain; background-repeat: no-repeat; background-position: center; }
.drop:hover, .drop.over { border-color: var(--red); background-color: rgba(229,57,28,.06); }
.drop.has span { background: rgba(0,0,0,.7); padding: 4px 10px; border-radius: 12px; font-size: 11px; }
.thumbs { display: flex; gap: 8px; }
.thumbs figure { position: relative; width: 84px; height: 60px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.thumbs button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.75); font-size: 11px; }
.hear summary { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.hear-text { white-space: pre-wrap; font: 12px/1.6 ui-monospace, Consolas, monospace; color: #c9c4bd; background: #0f0f0f; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 10px; max-height: 260px; overflow: auto; }

.prefill-note { font-size: 13px; line-height: 1.5; color: #ffd2c4; background: rgba(229,57,28,.1); border: 1px solid rgba(229,57,28,.35); border-radius: 10px; padding: 10px 14px; }
.prefill-note b { color: #fff; font-weight: 600; }
