:root {
  --bg: #09080f;
  --surface: #14121f;
  --surface-2: #1f1c30;
  --border: #2e2a45;
  --text: #f6f4ff;
  --muted: #aca7c6;
  --accent: #e879f9;
  --accent-text: #1d0524;
  --accent-2: #22d3ee;
  --danger: #fb7185;
  --ok: #34d399;
  --gradient: linear-gradient(100deg, #7c3aed 0%, #c026d3 52%, #e11d48 100%);
  --glow: 0 10px 34px rgba(192, 38, 211, .38);
  --radius: 14px;
  --display: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.2; margin: 0 0 .4rem; }
h2 { font-size: 1.3rem; margin: 0 0 .4rem; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
img, video { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }

.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.1rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 16px; height: 16px; border-radius: 4px; background: var(--accent); }
.icon { width: 20px; height: 20px; flex: none; }

.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1.1rem; padding: 1.25rem 1rem;
  background: var(--surface); border-right: 1px solid var(--border);
}
.sidebar-brand { padding: 0 .6rem; }
.btn.side-create { display: flex; align-items: center; justify-content: center; gap: .4rem; }
.side-nav { display: flex; flex-direction: column; gap: .15rem; }
.side-heading { margin: 0 0 .25rem; padding: 0 .75rem; color: var(--muted); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.side-link {
  display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 44px; padding: .5rem .75rem;
  border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: .95rem; text-align: left; cursor: pointer;
}
.side-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side-link.is-active { background: var(--surface-2); color: var(--accent); font-weight: 600; }
.side-footer { margin-top: auto; display: flex; flex-direction: column; gap: .6rem; }
.side-footer form { margin: 0; }
.side-footer > .btn { width: 100%; }
.credit-box { padding: .8rem; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.credit-box p { margin: 0 0 .55rem; }
.credit-box p:last-child { margin-bottom: 0; }
.credit-box .btn { display: block; }
.credit-count { display: block; color: var(--text); font-size: 1.15rem; font-weight: 700; }

.mobile-bar, .menu-backdrop { display: none; }
.menu-button {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 1px solid var(--border); border-radius: 8px; background: none; color: var(--text); cursor: pointer;
}

.main-column { display: flex; flex-direction: column; min-width: 0; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: clamp(20px, 3vw, 40px) clamp(16px, 3vw, 40px); flex: 1; }
.footer { padding: 1.5rem; text-align: center; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--border); }

.btn {
  display: inline-block; padding: .65rem 1.2rem; border: 1px solid var(--accent); border-radius: 8px;
  background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; text-align: center;
}
.btn:hover { text-decoration: none; filter: brightness(1.07); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-small { padding: .35rem .8rem; font-size: .875rem; }
.btn-large { padding: .85rem 1.6rem; font-size: 1.05rem; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-disabled { cursor: default; color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(16px, 3vw, 24px); }
.narrow { max-width: 440px; margin: 0 auto; }
.flash { padding: .7rem 1rem; border-radius: 8px; margin: 0 0 1.2rem; border: 1px solid var(--border); background: var(--surface-2); }
.flash-error { border-color: var(--danger); }
.flash-success { border-color: var(--ok); }

.form { display: flex; flex-direction: column; gap: 1rem; }
.form label { display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; font-weight: 600; }
input, select, textarea {
  width: 100%; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font: inherit; font-weight: 400;
}
input:disabled { color: var(--muted); }
textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.form p { margin: 0; }

.hero { text-align: center; padding: clamp(24px, 7vw, 72px) 0; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); max-width: 16em; margin: 0 auto .8rem; }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 36em; margin: 0 auto 1.6rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-bottom: 1rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.features p { margin: 0; }

.page-head { margin-bottom: 1.5rem; }
.page-head p { margin: 0; }
.page-head-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1240px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan { display: flex; flex-direction: column; gap: .5rem; }
.plan ul { list-style: none; margin: .4rem 0 1rem; padding: 0; color: var(--muted); flex: 1; }
.plan li { padding: .2rem 0; }
.plan .btn, .plan form { width: 100%; }
.plan-featured { border-color: var(--accent); }
.price { font-size: 2rem; font-weight: 700; margin: 0; }
.price span { font-size: .95rem; font-weight: 400; color: var(--muted); }

.create-form { max-width: 720px; }
.segmented { display: flex; gap: .4rem; border: 0; padding: .3rem; margin: 0; background: var(--bg); border-radius: 10px; }
.segmented label { flex: 1; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; width: 1px; }
.segmented span { display: block; padding: .55rem; border-radius: 7px; text-align: center; color: var(--muted); }
.segmented input:checked + span { background: var(--surface-2); color: var(--text); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }
.dropzone {
  display: flex !important; align-items: center; justify-content: center; min-height: 190px; padding: 1rem;
  border: 1.5px dashed var(--border); border-radius: var(--radius); cursor: pointer; text-align: center; font-weight: 500 !important;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); }
.dropzone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dropzone img { max-height: 320px; border-radius: 8px; }
.dropzone small { display: block; color: var(--muted); font-weight: 400; margin-top: .25rem; }

.model-picker { border: 0; padding: 0; margin: 0; }
.model-picker legend { padding: 0; margin-bottom: .35rem; font-size: .9rem; font-weight: 600; }
.model-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.form .model-option { display: block; cursor: pointer; font-weight: 400; }
.model-option input { position: absolute; opacity: 0; width: 1px; }
.model-option > span { display: block; height: 100%; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: 10px; }
.model-option strong { display: block; }
.model-option small { color: var(--muted); }
.model-option:hover > span { border-color: var(--muted); }
.model-option input:checked + span { border-color: var(--accent); background: var(--surface-2); }
.model-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form .model-option.is-locked { cursor: not-allowed; opacity: .6; }
input[type="range"] { padding: 0; border: 0; background: none; accent-color: var(--accent); min-height: 28px; }
.cost-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1rem; padding: .7rem .8rem; border-radius: 8px; background: var(--bg); }
.form .cost-text { font-weight: 600; }
.cost-text.is-short { color: var(--danger); }
.verify-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.verify-banner form { margin: 0; }
.plan-note { margin-top: 1rem; }
.rate-card { margin-top: 1.5rem; }

.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; }
.tabs a { padding: .3rem .85rem; border-radius: 999px; color: var(--muted); border: 1px solid var(--border); font-size: .9rem; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.active { background: var(--surface-2); color: var(--text); }
.empty { text-align: center; padding: 3rem 1rem; }
.empty p { margin-top: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; }
.job-card { color: var(--text); display: block; }
.job-card:hover { text-decoration: none; }
.job-card:hover .job-thumb { border-color: var(--accent); }
.job-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.job-thumb video, .job-thumb img { width: 100%; height: 100%; object-fit: cover; }
.job-prompt { margin: .6rem 0 .1rem; font-size: .95rem; overflow-wrap: anywhere; }
.job-card .small { margin: 0; }
.status { position: absolute; top: .55rem; left: .55rem; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface-2); color: var(--text); }
.status-inline { position: static; display: inline-block; margin-bottom: .9rem; }
.status-completed { background: var(--ok); color: #07210f; }
.status-failed { background: var(--danger); color: #2a0806; }
.status-processing, .status-queued, .status-downloading { background: var(--accent); color: var(--accent-text); }
.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1.5rem; }

.job-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 1.2rem; align-items: start; }
.job-stage { background: #000; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; min-height: 320px; display: flex; align-items: center; justify-content: center; }
.job-stage video { width: 100%; max-height: 75vh; }
.progress-state { text-align: center; padding: 2rem; max-width: 26em; }
.spinner { width: 38px; height: 38px; margin: 0 auto 1rem; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 4s; } }
.job-info p { overflow-wrap: anywhere; margin-top: 0; }
.source-image { border-radius: 8px; margin-bottom: 1rem; max-height: 180px; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; margin: 0 0 1.1rem; font-size: .9rem; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.stack { display: flex; flex-direction: column; gap: .5rem; margin-top: .8rem; }
.stack .btn, .stack form { width: 100%; }
.stack form { margin: 0; }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.1rem; align-items: start; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; color: var(--muted); font-weight: 600; white-space: nowrap; }
th, td { padding: .55rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.positive { color: var(--ok); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .8rem; margin-bottom: 1.1rem; }
.stat strong { display: block; font-size: 1.6rem; }
.search { display: flex; gap: .5rem; margin-bottom: 1rem; max-width: 420px; }
.inline-form { display: flex; gap: .4rem; margin: 0; }
.inline-form input { width: 80px; padding: .3rem .5rem; }

@media (max-width: 1040px) {
  .job-layout { grid-template-columns: minmax(0, 1fr); }
}

/* Phones and small tablets: the sidebar becomes a slide-out menu. */
@media (max-width: 860px) {
  .shell { display: block; }
  .mobile-bar {
    display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 20;
    padding: .5rem 16px; background: var(--surface); border-bottom: 1px solid var(--border);
  }
  .sidebar {
    position: fixed; z-index: 40; left: 0; top: 0; width: min(280px, 85vw); height: 100%;
    transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s;
  }
  .nav-open .sidebar { transform: none; visibility: visible; }
  .nav-open .menu-backdrop { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .55); }
  .nav-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }


/* ── Brand ─────────────────────────────────────────────────────────────── */
body {
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(124, 58, 237, .24), transparent 62%),
    radial-gradient(760px 480px at 18% 108%, rgba(225, 29, 72, .13), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}
h1, h2, h3, .brand, .price, .credit-count, .stat strong { font-family: var(--display); letter-spacing: -.015em; }
h1 { font-weight: 800; }
a { color: var(--accent-2); }
.gradient-text {
  background: linear-gradient(95deg, #a78bfa 0%, #e879f9 45%, #fb7185 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.brand-mark { position: relative; width: 26px; height: 26px; border-radius: 8px; background: var(--gradient); box-shadow: 0 4px 14px rgba(192, 38, 211, .55); flex: none; }
.brand-mark::after {
  content: ""; position: absolute; left: 9.5px; top: 7px; width: 0; height: 0;
  border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}

.btn {
  background: var(--gradient); border-color: transparent; color: #fff; border-radius: 10px;
  box-shadow: var(--glow); transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.1); box-shadow: 0 14px 40px rgba(192, 38, 211, .5); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--border); color: var(--text); box-shadow: none; }
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); box-shadow: none; }
.btn-danger:hover { box-shadow: none; }
.btn-disabled, .btn-disabled:hover { transform: none; filter: none; color: var(--muted); }
.btn-white, .btn-white:hover { background: #fff; color: #5b0f7a; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.btn:disabled { transform: none; filter: grayscale(.5); box-shadow: none; cursor: not-allowed; }

.card { border-radius: var(--radius); background: linear-gradient(180deg, rgba(31, 28, 48, .85), rgba(20, 18, 31, .85)); }
input, select, textarea { background: #0d0b16; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 121, 249, .18); }

.sidebar { background: rgba(16, 14, 26, .92); }
.side-link:hover { color: var(--text); }
.side-link.is-active {
  background: linear-gradient(90deg, rgba(192, 38, 211, .28), rgba(124, 58, 237, .06));
  color: #fff; box-shadow: inset 3px 0 0 var(--accent);
}
.credit-box { background: linear-gradient(135deg, rgba(124, 58, 237, .2), rgba(34, 211, 238, .08)); }
.credit-count { color: var(--accent-2); }
.mobile-bar { background: rgba(16, 14, 26, .96); }

.segmented input:checked + span { background: var(--gradient); color: #fff; font-weight: 600; }
.model-option input:checked + span { border-color: var(--accent); background: linear-gradient(135deg, rgba(124, 58, 237, .24), rgba(192, 38, 211, .12)); box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(192, 38, 211, .22); }
.dropzone { border-color: #4a4370; background: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, .14), transparent 70%); }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: radial-gradient(circle at 50% 0%, rgba(192, 38, 211, .22), transparent 70%); }
input[type="range"] { accent-color: #d946ef; }
.form .cost-text { color: var(--accent-2); }
.form .cost-text.is-short { color: var(--danger); }
.cost-row { border: 1px solid var(--border); background: rgba(34, 211, 238, .05); }
.status-processing, .status-queued, .status-downloading { background: var(--accent-2); color: #042a33; }
.job-thumb { border-radius: var(--radius); }
.job-card:hover .job-thumb { box-shadow: var(--glow); }
.tabs a.active { background: var(--gradient); border-color: transparent; color: #fff; }
.spinner { border-top-color: var(--accent); border-right-color: var(--accent-2); }
.flash-info { border-color: #4a4370; background: rgba(124, 58, 237, .14); }

.plan-featured { position: relative; border-color: transparent; background: linear-gradient(180deg, #1f1b33, #15122a) padding-box, var(--gradient) border-box; box-shadow: var(--glow); }
.plan-badge { position: absolute; top: -11px; right: 16px; padding: .1rem .65rem; border-radius: 999px; background: var(--gradient); color: #fff; font-size: .75rem; font-weight: 700; }

/* ── Home ──────────────────────────────────────────────────────────────── */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(8px, 3vw, 32px) 0 clamp(32px, 5vw, 56px); }
.hero-copy h1 { font-size: clamp(2.1rem, 4.2vw, 3.5rem); line-height: 1.08; margin: 0 0 1rem; }
.hero-copy .lead { margin: 0 0 1.5rem; }
.hero-copy .actions { justify-content: flex-start; }
.eyebrow { margin: 0 0 .7rem; color: var(--accent-2); font-family: var(--display); font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

.showcase { position: relative; padding-right: 13%; }
.stage { margin: 0; padding: 10px; border-radius: 18px; background: linear-gradient(180deg, #221e36, #14121f); border: 1px solid var(--border); box-shadow: 0 24px 70px rgba(124, 58, 237, .38); }
.stage figcaption { margin-top: .45rem; padding: 0 22% .15rem .3rem; }
.stage-screen { position: relative; overflow: hidden; border-radius: 10px; background: #000; aspect-ratio: 832 / 480; }
.stage-screen video { width: 100%; height: 100%; object-fit: cover; }
.stage-tag { position: absolute; top: 10px; left: 10px; display: flex; align-items: center; gap: .4rem; padding: .2rem .6rem; border-radius: 999px; background: rgba(9, 8, 15, .72); font-size: .75rem; font-weight: 600; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: #fb7185; animation: rec-pulse 1.4s ease-in-out infinite; }
.stage-timeline { display: flex; align-items: center; gap: .6rem; padding: .6rem 22% .1rem .3rem; color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.stage-play { width: 0; height: 0; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.stage-track { position: relative; flex: 1; height: 6px; overflow: hidden; border-radius: 999px; background: #332e4d; }
.stage-progress { position: absolute; inset: 0; background: var(--gradient); transform-origin: left; animation: stage-progress 5s linear infinite; }
.stage-tile { position: absolute; right: 0; bottom: 34px; width: 25%; margin: 0; overflow: hidden; border: 3px solid #fff; border-radius: 14px; background: #000; aspect-ratio: 9 / 16; box-shadow: 0 18px 50px rgba(0, 0, 0, .6); transform: rotate(3deg); }
.stage-tile video { width: 100%; height: 100%; object-fit: cover; }
@keyframes stage-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rec-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .stage-progress, .rec-dot { animation: none; }
  .btn, .btn:hover { transition: none; transform: none; }
}

.section { margin-top: clamp(24px, 4vw, 44px); }
.section-title { margin: 0 0 1rem; font-size: clamp(1.3rem, 2.4vw, 1.75rem); }
.model-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.model-card { transition: transform .15s ease, border-color .15s ease; }
.model-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.model-card p { margin: 0; }
.model-meta { margin-top: .6rem !important; color: var(--accent-2); font-size: .85rem; font-weight: 600; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.step p { margin: 0; }
.step-number { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-bottom: .7rem; border-radius: 10px; background: var(--gradient); color: #fff; font-family: var(--display); font-weight: 700; }
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: clamp(28px, 4vw, 48px); padding: clamp(20px, 3.5vw, 36px); border-radius: 18px; background: var(--gradient); box-shadow: var(--glow); }
.cta-band h2 { margin: 0 0 .25rem; font-size: clamp(1.4rem, 3vw, 2rem); color: #fff; }
.cta-band p { margin: 0; color: #fff; }

@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
}


/* ── Admin ─────────────────────────────────────────────────────────────── */
.alert-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.2rem; }
.alert { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .6rem .9rem; border: 1px solid var(--border); border-left-width: 4px; border-radius: 8px; background: var(--surface); font-size: .92rem; }
.alert-danger { border-left-color: var(--danger); }
.alert-warning { border-left-color: #fbbf24; }
.stats-money .stat strong { font-size: 1.5rem; }
.stat strong { margin: .1rem 0; }
.stat span { display: block; }
strong.positive, strong.negative { display: block; }
.negative { color: var(--danger); }
.tag { display: inline-block; padding: .05rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.tag-ok { background: rgba(52, 211, 153, .15); color: var(--ok); }
.tag-danger { background: rgba(251, 113, 133, .15); color: var(--danger); }
.tag-accent { background: rgba(232, 121, 249, .16); color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.filters input { flex: 1 1 220px; width: auto; }
.filters select { flex: 0 1 180px; width: auto; }
.row-actions { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; }
.row-actions form { margin: 0; }
.action-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.action-row form { margin: 0; }
.narrow-form { max-width: 720px; }
.section-tight { margin-top: 1rem; }
.form label.check, label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
label.check input { width: auto; flex: none; }
.check-group { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; border: 0; padding: 0; margin: 0; }
.check-group legend { padding: 0; margin-bottom: .35rem; font-size: .9rem; font-weight: 600; }
.quality-row { padding: .8rem; border: 1px solid var(--border); border-radius: 10px; margin: 0; }
.quality-row legend { padding: 0 .3rem; }
.form-row-tight { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); margin-top: .6rem; }
.settings-form { max-width: 820px; }
.danger-zone { margin-top: .6rem; }
.danger-zone summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.danger-zone form { margin-top: .8rem; }
.error-detail { overflow-wrap: anywhere; color: var(--danger); }
.inline-form input { width: auto; min-width: 0; }
.inline-form input[name="label"] { width: 160px; }
.inline-form input[type="number"] { width: 64px; }
code { font-size: .85em; color: var(--accent-2); overflow-wrap: anywhere; }
.flash-announcement { border-color: var(--accent-2); background: rgba(34, 211, 238, .08); }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }
.legal-page { max-width: 780px; margin: 0 auto; }
.legal-text { overflow-wrap: anywhere; color: var(--muted); }
.page-head .small { margin-bottom: .5rem; }
td a { color: var(--accent-2); }

td code { white-space: nowrap; overflow-wrap: normal; }
.row-actions { flex-wrap: nowrap; }
td:first-child { min-width: 130px; }
@media (max-width: 860px) { .sidebar { background: #100e1a; } }


/* ── Polish layer: app screens ─────────────────────────────────────────── */
::selection { background: rgba(232, 121, 249, .35); }
html { scroll-behavior: smooth; }
* { scrollbar-width: thin; scrollbar-color: #3a3556 transparent; }
@keyframes rise { from { transform: translateY(8px); } to { transform: none; } }
.container > *:not([data-reveal]) { animation: rise .3s ease-out both; }
@media (prefers-reduced-motion: reduce) { .container > * { animation: none; } html { scroll-behavior: auto; } }

.card { backdrop-filter: blur(6px); box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 40px rgba(0, 0, 0, .28); }
.page-head h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.page-head > p, .page-head > div > p { margin-top: .25rem; }
.btn:active { transform: translateY(0) scale(.99); }
.side-link { transition: background .15s ease, color .15s ease; }
.sidebar { box-shadow: 8px 0 40px rgba(0, 0, 0, .25); }
.side-create { margin-top: .2rem; }
.footer { border-top-color: rgba(255, 255, 255, .06); }

/* Auth */
.auth-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 0; max-width: 980px; margin: clamp(0px, 3vw, 28px) auto 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 30px 90px rgba(124, 58, 237, .28); }
.auth-visual { position: relative; min-height: 520px; background: #000; }
.auth-visual video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.auth-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9, 8, 15, .1) 30%, rgba(9, 8, 15, .92)); }
.auth-visual-text { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: clamp(20px, 3vw, 34px); }
.auth-visual-text h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin: 0 0 .3rem; font-family: var(--display); }
.auth-visual-text p:last-child { margin: 0; color: var(--muted); }
.auth-panel { display: flex; flex-direction: column; justify-content: center; gap: .6rem; border: 0; border-radius: 0; padding: clamp(24px, 4vw, 44px); background: rgba(16, 14, 26, .96); box-shadow: none; }
.auth-panel h1 { margin: 0; }
.auth-panel .form { margin: .8rem 0 .4rem; }
.auth-panel p { margin: 0; }
.narrow.card { box-shadow: 0 30px 80px rgba(124, 58, 237, .22); }
@media (max-width: 760px) { .auth-split { grid-template-columns: minmax(0, 1fr); } .auth-visual { min-height: 190px; } }

/* Create */
.balance-pill { display: inline-flex; gap: .35rem; align-items: baseline; padding: .45rem .95rem; border: 1px solid var(--border); border-radius: 999px; background: rgba(34, 211, 238, .07); color: var(--muted); font-size: .9rem; }
.balance-pill strong { color: var(--accent-2); font-family: var(--display); }
.balance-pill:hover { text-decoration: none; border-color: var(--accent-2); }
.create-layout { display: grid !important; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.2rem; align-items: start; }
.create-main { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.create-step { gap: 1rem; }
.step-title { display: flex; align-items: center; gap: .65rem; margin: 0; font-size: 1.05rem; }
.step-dot { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9px; background: var(--gradient); color: #fff; font-size: .85rem; box-shadow: 0 4px 14px rgba(192, 38, 211, .45); }
.create-side { position: sticky; top: 24px; }
.summary { display: flex; flex-direction: column; gap: .9rem; border-color: rgba(34, 211, 238, .28); background: linear-gradient(180deg, rgba(34, 211, 238, .08), rgba(124, 58, 237, .1)); }
.summary .eyebrow { margin: 0; }
.summary .cost-text { margin: 0; font-size: 1.1rem; line-height: 1.4; }
.summary p { margin: 0; }
.summary .btn { width: 100%; }
@media (max-width: 1040px) { .create-layout { grid-template-columns: minmax(0, 1fr) !important; } .create-side { position: static; } }
.model-options { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.model-option > span { display: flex; flex-direction: column; gap: .15rem; padding: .85rem .95rem; transition: border-color .15s ease, transform .15s ease; }
.model-option:hover > span { transform: translateY(-1px); }
.chips { display: flex; gap: .35rem; margin-top: .45rem; font-style: normal; }
.chips i { padding: .05rem .5rem; border-radius: 999px; background: rgba(255, 255, 255, .07); color: var(--muted); font-style: normal; font-size: .72rem; font-weight: 600; }
.dropzone { min-height: 170px; transition: border-color .15s ease, background .15s ease; }
.drop-icon { width: 30px; height: 30px; margin: 0 auto .5rem; color: var(--accent); }
textarea { min-height: 110px; }

/* History */
.grid { gap: 1.3rem; }
.job-card { transition: transform .18s ease; }
.job-card:hover { transform: translateY(-3px); }
.job-thumb { background: linear-gradient(135deg, #1b1830, #120f20); }
.job-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .5)); pointer-events: none; }
.status { z-index: 1; backdrop-filter: blur(6px); }
.job-prompt { font-weight: 500; }
.empty { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 3.5rem 1rem; }
.empty h3, .empty p { margin: 0; }
.empty .btn { margin-top: .8rem; }
.empty-icon { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 18px; background: rgba(124, 58, 237, .18); color: var(--accent); }
.empty-icon .icon { width: 28px; height: 28px; }
.tabs a { transition: border-color .15s ease, color .15s ease; }
.tabs a:hover { border-color: var(--accent); }

/* Job */
.job-stage { background: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, .25), #000 70%); box-shadow: 0 24px 70px rgba(124, 58, 237, .3); }
.progress-state h2 { font-family: var(--display); }
.spinner { width: 54px; height: 54px; border-width: 4px; box-shadow: 0 0 40px rgba(192, 38, 211, .4); }
.job-info { position: sticky; top: 24px; }
.job-info h3 { color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.meta { padding: .8rem; border-radius: 10px; background: rgba(0, 0, 0, .25); }

/* Pricing & billing */
.plan { transition: transform .18s ease, border-color .18s ease; }
.plan:hover { transform: translateY(-4px); border-color: var(--accent); }
.plan-featured:hover { border-color: transparent; }
.price { font-size: 2.3rem; }
.plan ul { padding-top: .4rem; border-top: 1px solid var(--border); }
.plan li { position: relative; padding-left: 1.5rem; }
.plan li::before { content: ""; position: absolute; left: 0; top: .62rem; width: 10px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.balance-card { background: linear-gradient(135deg, rgba(124, 58, 237, .35), rgba(192, 38, 211, .18) 60%, rgba(34, 211, 238, .12)); border-color: rgba(232, 121, 249, .4); box-shadow: var(--glow); }
.row-actions { flex-wrap: wrap !important; min-width: 120px; }
td code { white-space: normal; overflow-wrap: anywhere; }
.balance-card .eyebrow { margin: 0 0 .2rem; }
.balance-card .price { font-size: 2.8rem; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: rgba(255, 255, 255, .03); }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }

/* Account */
.form h3 { margin: 0; font-size: 1.1rem; }

/* Admin */
.stat { position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: var(--gradient); opacity: .8; }
.stat strong { font-size: 1.9rem; }
.stats-money .stat strong { font-size: 1.7rem; }
.alert { background: rgba(20, 18, 31, .9); }


/* ══ Light theme ═══════════════════════════════════════════════════════════
   Loaded last on purpose: it re-points the palette variables and replaces the
   few hard-coded dark colours above. Video screens stay dark so footage pops. */
:root {
  --bg: #f5f4fb;
  --surface: #ffffff;
  --surface-2: #f0edfa;
  --border: #e3e0f0;
  --text: #17132b;
  --muted: #655f82;
  --accent: #7c3aed;
  --accent-text: #ffffff;
  --accent-2: #0e7490;
  --danger: #dc2644;
  --ok: #0f9d6b;
  --glow: 0 10px 28px rgba(124, 58, 237, .28);
  --soft-shadow: 0 1px 2px rgba(23, 19, 43, .05), 0 10px 30px rgba(60, 40, 120, .08);
}
body {
  background:
    radial-gradient(900px 520px at 92% -10%, rgba(167, 139, 250, .32), transparent 62%),
    radial-gradient(760px 480px at 6% 105%, rgba(251, 113, 133, .16), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
}
a { color: #6d28d9; }
.gradient-text { background: linear-gradient(95deg, #6d28d9 0%, #c026d3 50%, #e11d48 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { color: #7c3aed; }
code { color: #6d28d9; }
td a { color: #6d28d9; }

/* Sidebar: light and calm, with the brand colour reserved for the active item. */
.sidebar { background: #fbfaff; border-right: 1px solid var(--border); box-shadow: none; }
.side-link { color: #4f4a6b; }
.side-link:hover { background: #f0edfa; color: var(--text); }
.side-link.is-active { background: linear-gradient(90deg, rgba(124, 58, 237, .14), rgba(124, 58, 237, .03)); color: #5b21b6; box-shadow: inset 3px 0 0 #7c3aed; }
.side-heading { color: #8a85a6; }
.credit-box { background: linear-gradient(135deg, #f1ebff, #ffeef3); border-color: #e6dcfb; }
.credit-count { color: #5b21b6; }
.mobile-bar { background: rgba(255, 255, 255, .96); }
.menu-button { color: var(--text); background: #fff; }
.nav-open .menu-backdrop { background: rgba(23, 19, 43, .4); }
@media (max-width: 860px) { .sidebar { background: #fbfaff; } }
.brand-mark { box-shadow: 0 4px 12px rgba(124, 58, 237, .35); }
.footer { border-top-color: var(--border); }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--border); backdrop-filter: none; box-shadow: var(--soft-shadow); }
.narrow.card { box-shadow: 0 24px 70px rgba(124, 58, 237, .16); }
input, select, textarea { background: #fff; color: var(--text); border-color: #d9d5ec; }
input::placeholder, textarea::placeholder { color: #a39fbd; }
input:focus, select:focus, textarea:focus { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, .16); }
input:disabled { background: #f5f4fb; }
.flash { background: #fff; box-shadow: var(--soft-shadow); }
.flash-info { background: #f3eefe; border-color: #d9c9fb; }
.flash-success { background: #eafaf3; }
.flash-error { background: #fff0f2; }
.flash-announcement { background: #e9f8fc; border-color: #9bd6e6; }

/* Buttons */
.btn { color: #fff; }
.btn-ghost { background: #fff; color: var(--text); border-color: #d9d5ec; }
.btn-ghost:hover { border-color: #7c3aed; color: #5b21b6; }
.btn-danger { background: #fff; color: var(--danger); border-color: #f1a3b0; }
.btn-danger:hover { background: #fff0f2; color: #b4162f; border-color: var(--danger); }
.btn-disabled, .btn-disabled:hover { color: var(--muted); background: #f0edfa; }
.btn-white, .btn-white:hover { color: #6d28d9; }

/* Create */
.segmented { background: #ece8f8; }
.segmented span { color: #5f5a7d; }
.model-option > span { background: #fff; }
.model-option:hover > span { border-color: #b8a6ef; box-shadow: 0 6px 18px rgba(124, 58, 237, .1); }
.model-option input:checked + span { background: linear-gradient(135deg, #f3ecff, #fdeefb); box-shadow: 0 0 0 1px #7c3aed, 0 8px 22px rgba(124, 58, 237, .16); }
.chips i { background: #efebfa; color: #5f5a7d; }
.dropzone { background: #faf8ff; border-color: #cfc6ee; }
.dropzone:hover, .dropzone.is-over { background: #f3ecff; border-color: #7c3aed; }
.drop-icon { color: #7c3aed; }
.summary { background: linear-gradient(180deg, #f6f1ff, #ffffff); border-color: #ddd0fb; }
.form .cost-text { color: #5b21b6; }
.form .cost-text.is-short, .cost-text.is-short { color: var(--danger); }
.cost-row { background: #f6f1ff; border-color: #ddd0fb; }
.balance-pill { background: #fff; color: var(--muted); border-color: var(--border); box-shadow: var(--soft-shadow); }
.balance-pill strong { color: #5b21b6; }
.balance-pill:hover { border-color: #7c3aed; }
.step-dot { box-shadow: 0 4px 12px rgba(124, 58, 237, .3); }

/* History & job */
.tabs a { background: #fff; color: var(--muted); }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: #fff; }
.job-thumb { background: linear-gradient(135deg, #ece8f8, #f8f4ff); border-color: var(--border); }
.job-card:hover .job-thumb { box-shadow: 0 14px 36px rgba(124, 58, 237, .22); }
.job-thumb::after { background: linear-gradient(180deg, transparent 60%, rgba(23, 19, 43, .35)); }
.status { background: #fff; color: var(--text); }
.status-completed { background: #d6f5e7; color: #0a6b49; }
.status-failed { background: #ffe0e5; color: #b4162f; }
.status-processing, .status-queued, .status-downloading { background: #d9f1f7; color: #0b5a70; }
.job-stage { background: radial-gradient(circle at 50% 0%, #3b2a78, #0d0b16 72%); border-color: #2a2447; box-shadow: 0 24px 60px rgba(60, 40, 120, .3); }
.job-stage .progress-state { color: #fff; }
.job-stage .progress-state .muted { color: #bdb6dd; }
.job-stage .spinner { border-color: rgba(255, 255, 255, .15); border-top-color: #e879f9; border-right-color: #22d3ee; }
.job-info h3 { color: #8a85a6; }
.meta { background: #f6f3fd; }
.empty-icon { background: #f0e9ff; color: #7c3aed; }

/* Pricing & billing */
.plan:hover { border-color: #b8a6ef; box-shadow: 0 16px 40px rgba(124, 58, 237, .14); }
.plan-featured { background: linear-gradient(180deg, #ffffff, #fbf7ff) padding-box, var(--gradient) border-box; box-shadow: 0 16px 44px rgba(124, 58, 237, .22); }
.plan-featured:hover { border-color: transparent; }
.balance-card { background: linear-gradient(135deg, #efe6ff, #ffe9f2 70%, #e5f6fb); border-color: #dccbfb; box-shadow: var(--soft-shadow); }
.balance-card .eyebrow { color: #6d28d9; }
tbody tr:hover { background: rgba(124, 58, 237, .04); }
th, td { border-bottom-color: var(--border); }
.positive { color: var(--ok); }

/* Admin */
.alert { background: #fff; box-shadow: var(--soft-shadow); }
.alert-warning { border-left-color: #f59e0b; }
.alert-info { border-left-color: var(--accent); }
.tag { background: #efebfa; color: #5f5a7d; }
.tag-ok { background: #d6f5e7; color: #0a6b49; }
.tag-danger { background: #ffe0e5; color: #b4162f; }
.tag-accent { background: #f1e5ff; color: #6d28d9; }
.stat::before { opacity: 1; }
.quality-row { background: #faf8ff; }

/* Landing page */
.stage { background: #fff; border-color: var(--border); box-shadow: 0 28px 70px rgba(124, 58, 237, .22); }
.stage-tag { background: rgba(23, 19, 43, .72); color: #fff; }
.stage-play { border-left-color: #5b21b6; }
.stage-track { background: #e6e1f5; }
.stage-time { color: var(--muted); }
.stage-tile { border-color: #fff; box-shadow: 0 18px 44px rgba(23, 19, 43, .35); }
.model-card:hover { border-color: #b8a6ef; box-shadow: 0 14px 34px rgba(124, 58, 237, .14); }
.model-meta { color: #6d28d9; }
.cta-band p, .cta-band h2 { color: #fff; }

/* ── Landing page sections ─────────────────────────────────────────────── */
/* Reveal on scroll. Only hidden when JavaScript is running, so nothing is lost without it. */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
[data-delay="1"] { transition-delay: .08s !important; }
[data-delay="2"] { transition-delay: .16s !important; }
[data-delay="3"] { transition-delay: .24s !important; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1; transform: none; transition: none; } }

.section-head { max-width: 640px; margin: 0 auto 1.8rem; text-align: center; }
.section-head .section-title { margin-bottom: .5rem; font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.15; }
.section-head p { margin: 0; }
.section { margin-top: clamp(48px, 7vw, 96px); }
.section-link { margin: 1.4rem 0 0; font-weight: 600; }

/* Floating colour orbs behind the hero video */
.orb { position: absolute; z-index: 0; border-radius: 50%; filter: blur(46px); opacity: .55; pointer-events: none; animation: float 9s ease-in-out infinite; }
.orb-a { width: 220px; height: 220px; left: -40px; top: -30px; background: #a78bfa; }
.orb-b { width: 200px; height: 200px; right: 4%; bottom: -30px; background: #fb7185; animation-delay: -4s; }
.stage, .stage-tile { z-index: 1; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(18px, -22px); } }
.stage-tile { animation: bob 7s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: rotate(3deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .orb, .stage-tile { animation: none; } .ticker-track { animation: none !important; } }

/* Scrolling ticker of use cases */
.ticker { overflow: hidden; margin-top: clamp(8px, 2vw, 24px); padding: .9rem 0; border-block: 1px solid var(--border); background: rgba(255, 255, 255, .6); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; gap: .8rem; width: max-content; animation: scroll-x 34s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-chip { display: inline-flex; align-items: center; gap: .55rem; padding: .45rem 1rem; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--text); font-weight: 600; font-size: .92rem; white-space: nowrap; box-shadow: var(--soft-shadow); }
.ticker-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--gradient); }
@keyframes scroll-x { to { transform: translateX(calc(-50% - .4rem)); } }

/* Stats strip */
.stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: 20px; background: var(--border); box-shadow: var(--soft-shadow); }
.strip-item { display: flex; flex-direction: column; gap: .2rem; padding: 1.5rem 1.4rem; background: #fff; }
.strip-item strong { font-family: var(--display); font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.1; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.strip-item > span { color: var(--muted); font-size: .92rem; }
.strip-item strong span { font: inherit; color: inherit; }

/* Bento feature grid */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(190px, auto); gap: 1rem; }
.bento-card { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: .35rem; padding: 1.4rem; border: 1px solid var(--border); border-radius: 22px; background: #fff; box-shadow: var(--soft-shadow); transform-style: preserve-3d; }
.js .bento-card[data-reveal].is-in { transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform .25s ease, box-shadow .25s ease, opacity .7s ease; }
.bento-card:hover { box-shadow: 0 22px 54px rgba(124, 58, 237, .2); }
.bento-card h3 { margin: 0; font-size: 1.15rem; }
.bento-card p { margin: 0; color: var(--muted); font-size: .94rem; }
.bento-wide { grid-column: span 2; grid-row: span 2; color: #fff; border-color: transparent; }
.bento-tall { grid-row: span 2; color: #fff; border-color: transparent; }
.bento-wide video, .bento-tall video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.bento-wide:hover video, .bento-tall:hover video { transform: scale(1.05); }
.bento-wide::after, .bento-tall::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 11, 22, 0) 35%, rgba(13, 11, 22, .85)); }
.bento-copy { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .35rem; }
.bento-wide .bento-copy h3 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
.bento-wide p, .bento-tall p { color: #e3def7; }
.bento-tag { align-self: flex-start; padding: .15rem .65rem; border-radius: 999px; background: rgba(255, 255, 255, .2); backdrop-filter: blur(8px); font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.bento-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: auto; border-radius: 14px; background: linear-gradient(135deg, #f1e8ff, #ffe6ef); color: #7c3aed; }
.bento-card:not(.bento-wide):not(.bento-tall):hover .bento-icon { background: var(--gradient); color: #fff; }
.bento-banner { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; gap: 1.1rem; background: linear-gradient(110deg, #f3ecff, #fff0f5 55%, #e9f8fc); }
.bento-banner .bento-icon { margin: 0; flex: none; }
.bento-banner h3 { margin-bottom: .15rem; }
@media (max-width: 1000px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bento-wide { grid-column: span 2; } }
@media (max-width: 560px) { .bento { grid-template-columns: minmax(0, 1fr); } .bento-wide, .bento-tall { grid-column: auto; grid-row: span 1; min-height: 280px; } }

/* Models */
.model-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .4rem; }
.model-top h3 { margin: 0; }
.chip-sound { padding: .05rem .55rem; border-radius: 999px; background: #efebfa; color: #5f5a7d; font-size: .7rem; font-weight: 700; }
.model-card { position: relative; overflow: hidden; }
.model-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--gradient); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.model-card:hover::before { transform: scaleX(1); }

/* Steps with a connecting line */
.steps-line { position: relative; }
.steps-line .step { position: relative; z-index: 1; }
@media (min-width: 760px) { .steps-line::before { content: ""; position: absolute; left: 12%; right: 12%; top: 40px; height: 2px; background: repeating-linear-gradient(90deg, #cdbff5 0 8px, transparent 8px 16px); } }

/* Pricing preview */
.mini-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.mini-plan { position: relative; text-align: center; transition: transform .2s ease, box-shadow .2s ease; }
.mini-plan:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(124, 58, 237, .16); }
.mini-plan h3 { margin: 0 0 .2rem; }
.mini-plan p { margin: 0; }
.mini-plan.is-featured { background: linear-gradient(180deg, #fff, #fbf7ff) padding-box, var(--gradient) border-box; border-color: transparent; box-shadow: 0 16px 44px rgba(124, 58, 237, .2); }

/* FAQ accordion */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: .7rem; }
.faq-item { border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--soft-shadow); transition: border-color .2s ease; }
.faq-item[open] { border-color: #c9b6f6; }
.faq-item summary { position: relative; padding: 1.05rem 3rem 1.05rem 1.3rem; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; position: absolute; right: 1.3rem; top: 50%; width: 9px; height: 9px; border-right: 2px solid #7c3aed; border-bottom: 2px solid #7c3aed; transform: translateY(-70%) rotate(45deg); transition: transform .25s ease; }
.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-item p { margin: 0; padding: 0 1.3rem 1.2rem; }

/* Call-to-action band: slow moving gradient */
.cta-band { background: linear-gradient(110deg, #6d28d9, #c026d3, #e11d48, #c026d3, #6d28d9); background-size: 250% 100%; animation: cta-shift 12s linear infinite; }
@keyframes cta-shift { to { background-position: -250% 0; } }
@media (prefers-reduced-motion: reduce) { .cta-band { animation: none; } }

/* Auth: dark video panel with light copy, light form panel */
.auth-split { border-color: var(--border); box-shadow: 0 30px 80px rgba(124, 58, 237, .2); }
.auth-panel { background: #fff; }
.auth-visual-text, .auth-visual-text h2 { color: #fff; }
.auth-visual-text p:last-child { color: #d6d0ee; }
.auth-visual-text .eyebrow { color: #67e8f9; }
.auth-visual::after { background: linear-gradient(180deg, rgba(13, 11, 22, .05) 25%, rgba(13, 11, 22, .88)); }
