/* VroomVideo — one sheet for every page. Sand ground, white cards, ink type, one electric accent. Tokens live in tokens.css, linked before this sheet. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { margin: 0; overflow-x: hidden; background: var(--sand); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; min-height: 100vh; }
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--electric); outline-offset: 3px; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 6rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .wrap { padding-inline: 1.5rem; } }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.h-hero { font-size: clamp(2.75rem, 7.5vw, 4.5rem); line-height: 0.95; }
.h-section { font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.05; }
.lede { font-size: 1.125rem; color: var(--ink-65); margin: 0; }
@media (min-width: 768px) { .lede { font-size: 1.25rem; } }
.muted { color: var(--ink-50); }
.small { font-size: 0.875rem; }
.highlight { background: linear-gradient(transparent 68%, var(--peach) 68%, var(--peach) 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding-inline: 0.04em; }
@media (min-width: 480px) { .highlight { white-space: nowrap; } }
.brand { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.02em; }
.brand b { color: var(--electric); font-weight: 700; }

/* ---------- nav ---------- */
.nav-wrap { position: sticky; top: 1rem; z-index: 30; padding-inline: 1rem; }
.nav { max-width: 64rem; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1.25rem; border-radius: 999px; border: 1px solid var(--ink-8); background: oklch(1 0 0 / 85%); box-shadow: var(--shadow-nav); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav-links { display: none; align-items: center; gap: 1.75rem; font-size: 0.875rem; font-weight: 500; color: var(--ink-65); }
.nav-links a:hover { color: var(--ink); }
@media (min-width: 640px) { .nav-links { display: flex; } }
.steps { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; font-weight: 600; color: var(--ink-50); }
.steps span { display: inline-flex; align-items: center; gap: 0.4rem; }
.steps i { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 999px; background: var(--ink-10); font-style: normal; font-size: 0.7rem; }
.steps .on { color: var(--ink); }
.steps .on i { background: var(--ink); color: var(--dark-fg); }
.steps .done i { background: var(--electric); color: #fff; }
.steps .sep { width: 1.25rem; height: 1px; background: var(--ink-10); }
@media (max-width: 639px) { .steps { display: none; } }

/* ---------- buttons & fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border-radius: 999px; min-height: 2.75rem; padding: 0.625rem 1.25rem; font-size: 0.875rem; font-weight: 600; background: var(--ink); color: var(--dark-fg); transition: transform 0.2s var(--ease), opacity 0.2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: 0.55; transform: none; cursor: default; }
.btn.big { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink-10); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.accent { background: var(--electric); color: #fff; }
.btn.wide { width: 100%; }
.btn .arr { transition: transform 0.2s var(--ease); }
.btn:hover .arr { transform: translateX(2px); }
.field { width: 100%; border-radius: 999px; border: 1px solid var(--ink-10); background: var(--sand); padding: 0.875rem 1.25rem; font-size: 1rem; color: var(--ink); outline: none; transition: border-color 0.2s; }
.field::placeholder { color: var(--ink-35); }
.field:focus { border-color: var(--electric); }
.field.area { border-radius: 1.25rem; min-height: 6rem; resize: vertical; line-height: 1.45; }
select.field { appearance: none; -webkit-appearance: none; padding-right: 2.5rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23333' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
.label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--ink-65); margin: 0 0 0.375rem 0.75rem; }
.label em { font-style: normal; font-weight: 500; color: var(--ink-35); }
.msg { margin: 0.75rem 0 0 0.25rem; font-size: 0.875rem; color: var(--ink-50); min-height: 1.3em; }
.msg[data-tone="error"] { color: var(--error); }
.msg[data-tone="ok"] { color: var(--electric); }

/* ---------- surfaces ---------- */
.card { background: var(--card); border-radius: 2rem; }
.card.pad { padding: 1.75rem; }
@media (min-width: 768px) { .card.pad { padding: 2.25rem; } }
.dot { width: 0.375rem; height: 0.375rem; border-radius: 999px; background: var(--electric); flex: none; }

/* ---------- start widget (landing) ---------- */
.start { width: 100%; max-width: 42rem; border-radius: 1.75rem; border: 1px solid var(--ink-8); background: var(--card); padding: 0.625rem; box-shadow: var(--shadow-card); text-align: left; }
.tabs { display: flex; gap: 0.25rem; border-radius: 999px; background: var(--sand); padding: 0.25rem; }
.tabs button { flex: 1; border-radius: 999px; padding: 0.625rem 0.5rem; font-size: 0.875rem; line-height: 1.2; font-weight: 500; color: var(--ink-50); transition: color 0.2s, background 0.2s, box-shadow 0.2s; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px oklch(0.145 0 0 / 8%); }
.start form { padding: 0.75rem; }
.row { display: flex; flex-direction: column; gap: 0.5rem; }
@media (min-width: 640px) { .row { flex-direction: row; } .row .field { flex: 1; } }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; border-radius: 1.5rem; border: 1px dashed oklch(0.145 0 0 / 18%); background: var(--sand); padding: 2rem 1rem; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.drop:hover, .drop.over { border-color: var(--electric); background: oklch(0.55 0.229 262 / 4%); }
.drop strong { font-size: 0.875rem; font-weight: 500; }
.drop .small { color: var(--ink-50); font-size: 0.75rem; }
.drop svg { color: var(--electric); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(4rem, 1fr)); gap: 0.375rem; margin-top: 0.625rem; }
.thumbs img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: 0.5rem; }

/* ---------- start page ---------- */
.hero { position: relative; overflow: hidden; padding: 4rem 1rem 3rem; text-align: center; }
@media (min-width: 768px) { .hero { padding-top: 6rem; } }
.hero-glow { pointer-events: none; position: absolute; top: -10rem; left: 50%; width: 56rem; height: 32rem; transform: translateX(-50%); border-radius: 999px; background: oklch(0.915 0.048 300 / 60%); filter: blur(64px); }
.hero-body { position: relative; max-width: 48rem; margin-inline: auto; display: flex; flex-direction: column; align-items: center; }
.hero .lede { max-width: 36rem; margin-top: 1.5rem; }
.hero .start { margin-top: 2.25rem; }
.bullets { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem 1.75rem; margin: 1.75rem 0 0; padding: 0; list-style: none; font-size: 0.875rem; font-weight: 500; color: var(--ink-65); }
.bullets li { display: flex; align-items: center; gap: 0.5rem; }

footer { padding-bottom: 2.5rem; }
footer .wrap { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.875rem; color: var(--ink-50); }
@media (min-width: 640px) { footer .wrap { flex-direction: row; justify-content: space-between; } }

/* ---------- create page ---------- */
.create { padding-block: 2.5rem 5rem; }
.create-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; margin-top: 2rem; align-items: start; }
@media (min-width: 1024px) { .create-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.sticky { position: sticky; top: 5.5rem; }
.block + .block { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--ink-8); }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.block-head h3 { font-size: 1.125rem; }
.block-head .small { color: var(--ink-50); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.5rem; }
.photos > *, .fields > * { min-width: 0; }
.photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 0.75rem; background: var(--sand); cursor: pointer; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.2s, filter 0.2s; }
.photo.off img { opacity: 0.3; filter: grayscale(1); }
.photo.fixed { cursor: default; }
.photo.fixed i { display: none; }
.photo i { position: absolute; top: 0.375rem; right: 0.375rem; display: grid; place-items: center; width: 1.375rem; height: 1.375rem; border-radius: 999px; background: oklch(1 0 0 / 90%); color: var(--ink); font-style: normal; font-size: 0.75rem; font-weight: 700; opacity: 0; transition: opacity 0.2s; }
.photo:hover i, .photo.off i { opacity: 1; }
.photo.off i { background: var(--ink); color: var(--dark-fg); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.875rem 0.75rem; }
@media (min-width: 640px) { .fields { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fields .span-2 { grid-column: span 2; }
.fields .span-4 { grid-column: 1 / -1; }
.fields .field { padding: 0.75rem 1rem; font-size: 1rem; }
.join { display: flex; gap: 0.375rem; }
.join .field:first-child { flex: 1; min-width: 0; }
.join select.field { width: auto; flex: none; min-width: 5.75rem; }
.locked { border-radius: 1rem; background: var(--peach); padding: 0.875rem 1.125rem; font-size: 0.875rem; }
.cuts { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.cut { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-radius: 1rem; background: var(--sand); padding: 0.75rem 1rem; font-size: 0.875rem; }
.cut .status { font-weight: 600; color: var(--ink-50); }
.cut .status.done { color: var(--electric); }
.cut .status.failed { color: var(--error); }

.swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.swatch { width: 2.75rem; height: 2.75rem; border-radius: 999px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px oklch(0.145 0 0 / 10%); transition: transform 0.15s var(--ease); }
.swatch:hover { transform: scale(1.08); }
.swatch[aria-checked="true"] { border-color: var(--ink); }
.swatch.custom { position: relative; overflow: hidden; background: conic-gradient(#f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.swatch.custom input { position: absolute; inset: -50%; width: 200%; height: 200%; opacity: 0; cursor: pointer; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
@media (min-width: 480px) { .choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.choice { position: relative; display: block; border-radius: 1rem; border: 2px solid transparent; background: var(--sand); padding: 0.75rem; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.choice:hover { background: var(--bone); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--ink); background: var(--card); }
.choice .name { display: block; font-size: 0.875rem; font-weight: 600; }
.choice .desc { display: block; margin-top: 0.125rem; font-size: 0.75rem; color: var(--ink-50); line-height: 1.35; }
.choice.font .sample { display: block; font-size: 1.5rem; line-height: 1; margin-bottom: 0.375rem; text-transform: uppercase; letter-spacing: -0.02em; }
.choice.style img { aspect-ratio: 9 / 16; width: 100%; object-fit: cover; border-radius: 0.625rem; margin-bottom: 0.625rem; background: var(--night); }
.choice.style.wide { grid-column: 1 / -1; }
.pills { display: flex; gap: 0.375rem; border-radius: 999px; background: var(--sand); padding: 0.25rem; }
.pills label { position: relative; flex: 1; text-align: center; border-radius: 999px; padding: 0.5rem 0.5rem; font-size: 0.8125rem; font-weight: 500; color: var(--ink-50); cursor: pointer; transition: background 0.2s, color 0.2s; }
.pills label:has(input:checked) { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px oklch(0.145 0 0 / 8%); }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; }
.switch .desc { display: block; font-size: 0.8125rem; color: var(--ink-50); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { flex: none; width: 2.75rem; height: 1.625rem; border-radius: 999px; background: var(--ink-10); position: relative; transition: background 0.2s; }
.switch .track::after { content: ""; position: absolute; top: 0.1875rem; left: 0.1875rem; width: 1.25rem; height: 1.25rem; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px oklch(0 0 0 / 20%); transition: transform 0.2s var(--ease); }
.switch:has(input:checked) .track { background: var(--electric); }
.switch:has(input:checked) .track::after { transform: translateX(1.125rem); }
.logo-row { display: flex; align-items: center; gap: 0.75rem; }
.logo-box { display: grid; place-items: center; width: 5rem; height: 3.5rem; border-radius: 0.75rem; border: 1px dashed oklch(0.145 0 0 / 18%); background: var(--sand); overflow: hidden; }
.logo-box img { max-width: 90%; max-height: 80%; object-fit: contain; }
.logo-row .actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn.sm { padding: 0.625rem 1rem; font-size: 0.8125rem; }
.cost { margin: 0.75rem 0 0; font-size: 0.8125rem; color: var(--ink-50); text-align: center; }

/* ---------- video page ---------- */
.result { padding-block: 2.5rem 5rem; }
.result-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; margin-top: 2rem; align-items: start; }
@media (min-width: 900px) { .result-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.stage { position: relative; width: 100%; max-width: 24rem; margin-inline: auto; aspect-ratio: 9 / 16; border-radius: 1.75rem; overflow: hidden; background: var(--night); box-shadow: 0 30px 60px -30px oklch(0.145 0 0 / 50%); }
.stage.landscape { max-width: none; aspect-ratio: 16 / 9; }
.stage.portrait { aspect-ratio: 4 / 5; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--night); }
.stage .tag { position: absolute; top: 0.875rem; left: 0.875rem; border-radius: 999px; background: oklch(1 0 0 / 90%); color: var(--ink); padding: 0.3rem 0.75rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; }
.stage .waiting { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; color: var(--dark-fg); text-align: center; padding: 2rem; }
.stage .waiting p { margin: 0; font-size: 0.875rem; opacity: 0.7; }
.spinner { width: 2.5rem; height: 2.5rem; border-radius: 999px; border: 3px solid oklch(1 0 0 / 15%); border-top-color: var(--electric); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.progress li { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.875rem; border-radius: 0.875rem; font-size: 0.9375rem; color: var(--ink-50); }
.progress li i { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 999px; background: var(--ink-10); font-style: normal; font-size: 0.75rem; flex: none; }
.progress li.on { background: var(--card); color: var(--ink); font-weight: 600; }
.progress li.on i { background: var(--electric); color: #fff; animation: pulse 1.2s ease-in-out infinite; }
.progress li.done { color: var(--ink); }
.progress li.done i { background: var(--ink); color: var(--dark-fg); }
@keyframes pulse { 50% { transform: scale(0.85); } }
.actions-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.meta { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.meta span { border-radius: 999px; background: var(--card); padding: 0.375rem 0.875rem; font-size: 0.8125rem; font-weight: 500; color: var(--ink-65); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }

