:root {
  --gold: #f0cd41;
  --gold-soft: #f7e08a;
  --ink: #0e0e0e;
  --ink-2: #161616;
  --ink-3: #1f1f1f;
  --line: #2a2a2a;
  --txt: #f5f5f3;
  --txt-dim: #a8a8a3;
  --txt-faint: #6f6f6a;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 24px 60px rgba(0,0,0,.45);
  --maxw: 760px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #1c1a12 0%, var(--ink) 55%);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  line-height: 1.5;
}

/* ---------- Header ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(16px, 5vw, 48px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  background: rgba(14,14,14,.78); backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-mark { font-weight: 900; letter-spacing: .06em; font-size: 20px; color: var(--txt); }
.brand-accent { color: var(--gold); }
.brand-studio { font-weight: 600; font-size: 11px; letter-spacing: .32em; color: var(--gold); border: 1px solid var(--gold); padding: 2px 7px; border-radius: 6px; }
.brand-tagline { font-size: 12px; color: var(--txt-faint); font-style: italic; letter-spacing: .02em; }
@media (max-width: 520px){ .brand-tagline { display: none; } }

/* ---------- Views ---------- */
#app { max-width: var(--maxw); margin: 0 auto; padding: clamp(28px, 6vw, 64px) clamp(16px, 5vw, 24px) 80px; }
.view { display: none; animation: fade .4s ease; }
.view.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Home ---------- */
.hero { text-align: center; margin-bottom: 40px; }
.eyebrow { color: var(--gold); font-weight: 600; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 16px; }
.hero h1 { font-size: clamp(30px, 6.5vw, 50px); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
.hero .hl, .hl { color: var(--gold); }
.subtitle { color: var(--txt-dim); margin-top: 18px; font-size: 17px; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px){ .cards { grid-template-columns: 1fr; } }
.card {
  text-align: left; cursor: pointer; font-family: inherit; color: var(--txt);
  background: linear-gradient(180deg, var(--ink-2), var(--ink-3));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 26px; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: var(--shadow); }
.card-icon { font-size: 34px; margin-bottom: 14px; }
.card h2 { font-size: 21px; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--txt-dim); font-size: 14.5px; }
.card-cta { display: inline-block; margin-top: 18px; color: var(--gold); font-weight: 600; font-size: 14px; }
.home-foot { margin-top: 44px; text-align: center; color: var(--txt-faint); font-size: 13px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.home-foot i { color: var(--line); font-style: normal; }

/* ---------- Forms ---------- */
.back { background: none; border: none; color: var(--txt-dim); font-family: inherit; font-size: 14px; cursor: pointer; padding: 6px 0; margin-bottom: 18px; transition: color .2s; }
.back:hover { color: var(--gold); }
.form-head { margin-bottom: 28px; }
.step-icon { font-size: 30px; display: block; margin-bottom: 10px; }
.form-head h1 { font-size: clamp(26px, 5vw, 34px); font-weight: 800; letter-spacing: -.02em; }
.form-head p { color: var(--txt-dim); margin-top: 8px; max-width: 52ch; }

.panel { background: linear-gradient(180deg, var(--ink-2), #131313); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 4vw, 32px); display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 520px){ .field-row { grid-template-columns: 1fr; } }
.field-label { font-weight: 600; font-size: 14px; }
.field-label em { color: var(--txt-faint); font-style: normal; font-weight: 400; font-size: 12.5px; }
.field-hint { color: var(--txt-faint); font-size: 12.5px; }
input, select { font-family: inherit; font-size: 15px; color: var(--txt); background: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; transition: border-color .2s, box-shadow .2s; width: 100%; }
input::placeholder { color: var(--txt-faint); }
input:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240,205,65,.14); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a8a8a3' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 38px; }

.or-sep { text-align: center; position: relative; }
.or-sep::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--line); }
.or-sep span { position: relative; background: #141414; padding: 0 14px; color: var(--txt-faint); font-size: 12px; letter-spacing: .1em; }

/* dropzone */
.dropzone { display: block; border: 1.5px dashed var(--line); border-radius: 14px; padding: 30px 20px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--gold); background: rgba(240,205,65,.05); }
.dz-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.dropzone strong { display: block; font-size: 15px; }
.dropzone small { color: var(--txt-faint); font-size: 12.5px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs:empty { display: none; }
.thumb { width: 64px; height: 64px; border-radius: 9px; overflow: hidden; position: relative; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: none; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; font-size: 11px; line-height: 1; padding: 0; }

/* toggles */
.toggles { display: flex; flex-wrap: wrap; gap: 10px; }
.toggle { position: relative; }
.toggle input { position: absolute; opacity: 0; }
.toggle span { display: inline-block; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 14px; transition: all .2s; user-select: none; }
.toggle input:checked + span { border-color: var(--gold); background: rgba(240,205,65,.12); color: var(--gold-soft); }

/* buttons */
.btn-primary, .btn-secondary, .btn-ghost { font-family: inherit; font-weight: 700; font-size: 16px; border-radius: 13px; padding: 15px 22px; cursor: pointer; border: none; text-align: center; text-decoration: none; display: inline-block; transition: transform .15s, filter .2s, background .2s; }
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-2px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-secondary { background: transparent; color: var(--gold); border: 1.5px solid var(--gold); }
.btn-secondary:hover { background: rgba(240,205,65,.1); }
.btn-ghost { background: var(--ink-3); color: var(--txt-dim); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--txt); }
.engine-note { font-size: 12.5px; color: var(--txt-faint); text-align: center; }

/* ---------- Waiting ---------- */
.waiting-stage { text-align: center; padding: clamp(40px, 12vh, 110px) 10px; }
.spinner { display: inline-flex; gap: 8px; margin-bottom: 30px; }
.spinner div { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); animation: bounce 1.2s infinite ease-in-out; }
.spinner div:nth-child(2){ animation-delay: .15s; } .spinner div:nth-child(3){ animation-delay: .3s; }
@keyframes bounce { 0%,80%,100%{ transform: scale(.5); opacity:.4; } 40%{ transform: scale(1); opacity:1; } }
.waiting-stage h2 { font-size: 26px; font-weight: 800; }
.wait-msg { color: var(--gold-soft); margin-top: 14px; font-size: 17px; min-height: 26px; transition: opacity .3s; }
.progress { height: 6px; background: var(--ink-3); border-radius: 999px; margin: 30px auto 0; max-width: 360px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 999px; transition: width .6s ease; }
.wait-eta { color: var(--txt-faint); font-size: 13px; margin-top: 16px; }

/* ---------- Results ---------- */
.result-head { text-align: center; margin-bottom: 26px; }
.result-badge { display: inline-block; background: rgba(240,205,65,.14); color: var(--gold); border: 1px solid rgba(240,205,65,.3); padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.result-head h1 { font-size: clamp(26px, 5vw, 36px); font-weight: 800; }
.video-wrap { display: flex; justify-content: center; }
.video-wrap video { max-width: 100%; max-height: 70vh; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: #000; }
.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

.upsell { margin-top: 34px; text-align: center; background: linear-gradient(180deg, rgba(240,205,65,.07), transparent); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.upsell p { color: var(--txt-dim); margin-bottom: 16px; }

/* study output */
.study-output { display: grid; gap: 18px; }
.st-card { background: linear-gradient(180deg, var(--ink-2), #131313); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.st-card h3 { color: var(--gold); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 14px; }
.st-hero-num { font-size: clamp(34px, 8vw, 52px); font-weight: 900; color: var(--gold); letter-spacing: -.02em; line-height: 1; }
.st-hero-sub { color: var(--txt-dim); margin-top: 8px; }
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px){ .st-grid { grid-template-columns: 1fr; } }
.st-stat { background: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.st-stat .lbl { color: var(--txt-faint); font-size: 12.5px; }
.st-stat .val { font-size: 22px; font-weight: 800; margin-top: 4px; }
.st-card ul { list-style: none; display: grid; gap: 10px; }
.st-card li { padding-left: 26px; position: relative; color: var(--txt-dim); font-size: 14.5px; }
.st-card li::before { content: '✓'; position: absolute; left: 0; color: var(--gold); font-weight: 800; }
.st-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.st-compare .col { border-radius: 12px; padding: 18px; border: 1px solid var(--line); }
.st-compare .solo { background: var(--ink); }
.st-compare .hostlux { background: rgba(240,205,65,.08); border-color: rgba(240,205,65,.35); }
.st-compare .col .tag { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.st-compare .solo .tag { color: var(--txt-faint); }
.st-compare .hostlux .tag { color: var(--gold); }
.st-compare .big { font-size: 26px; font-weight: 900; margin-top: 8px; }
.st-disclaimer { color: var(--txt-faint); font-size: 12px; font-style: italic; }

/* error */
.error-stage { text-align: center; padding: 80px 10px; }
.err-icon { font-size: 40px; display: block; margin-bottom: 16px; }
.error-stage h2 { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.error-stage p { color: var(--txt-dim); margin-bottom: 24px; }

/* print */
@media print {
  .topbar, .result-head .result-badge, .result-actions, .upsell, .back { display: none !important; }
  body { background: #fff; color: #000; }
  .st-card { border-color: #ddd; background: #fff; break-inside: avoid; }
}
