/* Fonts: Geist and Geist Mono (SIL OFL), self-hosted. */
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin-wght-v5.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-latin-wght-v5.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

/*
  Tokens. One accent (filament orange), cool zinc neutrals, light + dark via prefers-color-scheme.
  Radius rule: containers 14px, controls 8px, switches and progress bars fully round. Nothing else.
  Z-index scale: nav 20, skip link 30. Dialogs use the top layer.
*/
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --muted: #52525b;
  --accent: #c2410c;
  --accent-hover: #a8380a;
  --on-accent: #ffffff;
  --accent-soft: #fff4ec;
  --accent-soft-border: #fcd9c2;
  --band: #9a3412;
  --on-band: #fff7f2;
  --inverse: #fafafa;
  --on-inverse: #18181b;
  --danger: #b91c1c;
  --success: #15803d;
  --shadow: 0 1px 2px rgb(24 24 27 / .04), 0 24px 48px -24px rgb(124 45 18 / .18);

  --r-container: 14px;
  --r-control: 8px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --nav-h: 64px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0e;
    --surface: #141417;
    --surface-2: #1b1b1f;
    --border: #26262a;
    --border-strong: #3f3f46;
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --accent: #fb923c;
    --accent-hover: #fdba74;
    --on-accent: #18181b;
    --accent-soft: #1d140e;
    --accent-soft-border: #43281a;
    --band: #fb923c;
    --on-band: #18181b;
    --inverse: #18181b;
    --on-inverse: #f4f4f5;
    --danger: #f87171;
    --success: #4ade80;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 24px 48px -24px rgb(0 0 0 / .6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 30;
  background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: var(--r-control);
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Nav: sticky, translucent over the page */
.nav {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}
@media (prefers-reduced-transparency: reduce) { .nav { background: var(--bg); backdrop-filter: none; } }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; }
.wordmark .icon { color: var(--accent); width: 22px; height: 22px; }
.nav nav { display: flex; gap: 4px; }
.nav nav a {
  color: var(--muted); text-decoration: none; font-size: 15px; padding: 6px 12px; border-radius: var(--r-control);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav nav a:hover { color: var(--text); background: var(--surface-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--r-control);
  border: 1px solid transparent; font-weight: 500; font-size: 15px; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease), opacity .2s;
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 rgb(255 255 255 / .16); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-inverse { background: var(--inverse); color: var(--on-inverse); }
.btn-inverse:hover { background: color-mix(in srgb, var(--inverse) 88%, var(--band)); }
.btn-sm { height: 36px; padding: 0 12px; font-size: 14px; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 16px; }
.btn .icon { width: 18px; height: 18px; transition: transform .25s var(--ease); }
a.btn:hover .icon { transform: translate(2px, -2px); }

.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: var(--r-control); border: 1px solid transparent; background: transparent;
  color: var(--muted); cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), transform .12s var(--ease);
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.icon-btn:active:not(:disabled) { transform: scale(.94); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn .icon { width: 18px; height: 18px; }

/* Hero: copy left, the converter itself is the visual on the right */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: start;
  padding-top: 72px;
  padding-bottom: 96px;
}
.hero-copy { padding-top: 40px; position: sticky; top: calc(var(--nav-h) + 32px); }
.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: .12em; color: var(--accent); margin-bottom: 20px;
}
h1 {
  font-size: clamp(2.75rem, 5.2vw, 4.25rem);
  line-height: 1;
  letter-spacing: -.045em;
  font-weight: 650;
  text-wrap: balance;
}
.lede { margin-top: 24px; font-size: 18px; color: var(--muted); max-width: 40ch; line-height: 1.55; text-wrap: pretty; }

/* Converter */
.converter {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-container);
  box-shadow: var(--shadow);
  padding: 8px 20px 20px;
  display: grid;
  gap: 16px;
}
.converter-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-inline: -20px; padding: 6px 20px 14px; border-bottom: 1px solid var(--border);
}
.io { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; }
.io span {
  padding: 3px 7px; border-radius: 6px; border: 1px solid var(--border); color: var(--muted);
}
.io .io-to { border: 0; padding-inline: 2px; }
.io .io-out { color: var(--accent); border-color: var(--accent-soft-border); background: var(--accent-soft); }
.local { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.local .icon { width: 15px; height: 15px; color: var(--success); }

.dropzone {
  display: grid; justify-items: center; text-align: center; gap: 6px;
  padding: 56px 24px; border: 1.5px dashed var(--border-strong); border-radius: var(--r-control);
  background: var(--surface-2); cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), padding .3s var(--ease);
}
.dropzone:hover, .dropzone.is-dragging { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dz-icon {
  width: 52px; height: 52px; padding: 12px; margin-bottom: 10px; color: var(--accent);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-control);
  transition: transform .3s var(--ease);
}
.dropzone:hover .dz-icon, .dropzone.is-dragging .dz-icon { transform: translateY(-4px); }
.dz-title { font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.dz-help { color: var(--muted); font-size: 14px; }
.dz-button { margin-top: 16px; pointer-events: none; }
.converter[data-has-items="true"] .dropzone { padding: 16px 20px; grid-template-columns: auto 1fr auto; text-align: left; justify-items: start; align-items: center; column-gap: 14px; row-gap: 0; }
.converter[data-has-items="true"] .dz-icon { grid-row: span 2; margin: 0; width: 40px; height: 40px; padding: 9px; transform: none; }
.converter[data-has-items="true"] .dz-title { font-size: 15px; }
.converter[data-has-items="true"] .dz-help { grid-column: 2; font-size: 13px; }
.converter[data-has-items="true"] .dz-button { grid-column: 3; grid-row: 1 / span 2; margin: 0; height: 36px; font-size: 14px; }

.notice { font-size: 14px; color: var(--danger); }

.settings { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start; }
.segmented { border: 0; margin: 0; padding: 0; min-width: 0; }
.segmented legend { font-size: 14px; font-weight: 500; padding: 0; margin-bottom: 8px; }
.segmented-options {
  display: inline-grid; grid-template-columns: repeat(3, auto); gap: 2px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-control);
}
.segmented-options label { position: relative; }
.segmented-options input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented-options span {
  display: block; padding: 6px 14px; border-radius: 6px; font-size: 14px; color: var(--muted);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.segmented-options input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(24 24 27 / .1); font-weight: 500; }
.segmented-options input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint { margin-top: 8px; font-size: 13px; color: var(--muted); }

.switch { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; cursor: pointer; padding-top: 28px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  width: 40px; height: 24px; border-radius: 999px; background: var(--border-strong); position: relative;
  transition: background-color .2s var(--ease); margin-top: 1px;
}
.switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgb(24 24 27 / .2); transition: transform .25s var(--ease);
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-text { font-size: 14px; font-weight: 500; display: grid; }
.switch-text small { font-weight: 400; color: var(--muted); font-size: 13px; }

.reapply {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 14px; padding: 10px 12px; border-radius: var(--r-control); background: var(--surface-2);
}

.engine { display: grid; gap: 8px; font-size: 13px; color: var(--muted); }

/* Indeterminate progress: a light sweep, no spinner */
.shimmer {
  display: block; height: 4px; border-radius: 999px; overflow: hidden; position: relative;
  background: var(--surface-2);
}
.shimmer::after {
  content: ""; position: absolute; inset: 0; width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: sweep 1.2s var(--ease) infinite;
}
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* Queue */
.queue { list-style: none; margin: 0; padding: 0; display: grid; }
.queue:empty { display: none; }
.row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 4px; border-top: 1px solid var(--border);
  animation: row-in .35s var(--ease) both;
}
.row:first-child { border-top: 0; }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.row-icon { width: 22px; height: 22px; color: var(--muted); }
.row[data-status="done"] .row-icon { color: var(--success); }
.row[data-status="error"] .row-icon { color: var(--danger); }
.row-main { min-width: 0; display: grid; gap: 2px; }
.row-name { font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.row[data-status="error"] .row-meta { font-family: var(--font); font-size: 13.5px; color: var(--danger); }
.row-progress { margin-top: 6px; display: none; }
.row[data-status="converting"] .row-progress { display: block; }
.row-actions { display: flex; gap: 2px; }

.queue-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 14px; border-top: 1px solid var(--border);
}
.queue-summary { font-size: 14px; color: var(--muted); }
.queue-summary strong { color: var(--text); font-weight: 600; }
.queue-actions { display: flex; gap: 8px; }

/* Shown once something has converted: print offer on the left, GitHub star on the right */
.after-convert { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
.after-convert:not(:has(> :not([hidden]))) { display: none; }
.ready-to-print, .star-cta { font-size: 14px; color: var(--muted); animation: row-in .35s var(--ease) both; }
.ready-to-print a, .star-cta a { color: var(--accent); font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.ready-to-print a:hover, .star-cta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ready-to-print .icon, .star-cta .icon { width: 15px; height: 15px; }

/* Section headings share one scale */
.features h2, .howto h2, .faq h2 {
  font-size: clamp(2rem, 3.4vw, 2.75rem); letter-spacing: -.035em; font-weight: 650; line-height: 1.05; text-wrap: balance;
}

/* Features bento: 4 cells on a 12-col grid, 7+5 over 5+7 */
.features { padding-top: 32px; }
.bento { margin-top: 40px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.cell {
  border: 1px solid var(--border); border-radius: var(--r-container); background: var(--surface);
  padding: 32px; display: grid; align-content: start; gap: 10px; min-height: 280px; overflow: hidden;
}
.cell h3 { font-size: 20px; letter-spacing: -.02em; font-weight: 600; line-height: 1.2; }
.cell p { color: var(--muted); max-width: 48ch; }
.cell-icon { width: 28px; height: 28px; color: var(--accent); margin-bottom: 16px; }

.cell-private {
  grid-column: span 7; align-content: end;
  background: var(--accent-soft); border-color: var(--accent-soft-border);
}
.cell-private .cell-icon { width: 44px; height: 44px; margin-bottom: auto; padding-bottom: 32px; box-sizing: content-box; }
.cell-private h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); letter-spacing: -.035em; line-height: 1.08; max-width: 16ch; }

.cell-quality { grid-column: span 5; }
.tolerances {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: auto; padding-top: 20px;
}
.tolerances div { padding-top: 12px; border-top: 2px solid var(--border); }
.tolerances div:nth-child(2) { border-top-color: var(--accent); }
.tolerances dt { font-size: 13px; color: var(--muted); }
.tolerances dd { font-family: var(--mono); font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -.04em; font-weight: 500; }
.tolerances small { font-size: 12px; color: var(--muted); margin-left: 3px; letter-spacing: 0; }

.cell-folder { grid-column: span 5; }
.exts { list-style: none; margin: auto 0 0; padding: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.exts li {
  font-family: var(--mono); font-size: 13px; padding: 5px 10px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
}

.cell-preview {
  grid-column: span 7; background: var(--surface-2); padding: 0;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: stretch; gap: 0;
}
.cell-preview-copy { padding: 32px 0 32px 32px; display: grid; align-content: start; gap: 10px; }
.cell-render { display: block; min-height: 0; }
.cell-render img {
  width: 100%; height: 100%; object-fit: cover; object-position: 40% 60%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%);
  mask-image: linear-gradient(90deg, transparent, #000 14%);
}

/* Top bar: the print-service offer, above the nav */
.topbar { background: var(--band); color: var(--on-band); }
.topbar-inner { display: flex; align-items: center; gap: 12px; min-height: 48px; padding-block: 6px; font-size: 14px; }
.topbar-icon { width: 20px; height: 20px; opacity: .9; }
.topbar h2 { font-size: 14px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap; }
.topbar p { opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.topbar .btn { margin-left: auto; height: 32px; padding: 0 12px; font-size: 13px; }
.topbar .btn .icon { width: 16px; height: 16px; }

/* How-to: a flow of three steps joined by a connector, no cards */
.howto { padding-top: 128px; }
.howto-head { max-width: 65ch; }
.howto-intro { margin-top: 16px; color: var(--muted); font-size: 17px; text-wrap: pretty; }
.howto-list {
  list-style: none; margin: 48px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px;
}
.howto-list li { position: relative; }
.howto-list li:not(:last-child)::after {
  content: ""; position: absolute; top: 24px; left: 64px; right: -36px;
  border-top: 1.5px dashed var(--border-strong);
}
.step-icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 20px;
  border-radius: var(--r-control); background: var(--surface); border: 1px solid var(--border); color: var(--accent);
}
.step-icon .icon { width: 22px; height: 22px; }
.howto-list li:first-child .step-icon { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.howto-list h3 { font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.howto-list p { color: var(--muted); margin-top: 6px; }

/* FAQ */
.faq { padding-top: 112px; padding-bottom: 112px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start; }
.faq h2 { position: sticky; top: calc(var(--nav-h) + 32px); }
.faq-list { display: grid; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-child { border-top: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; font-weight: 500; font-size: 17px; transition: color .2s var(--ease);
}
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--muted); transition: transform .25s var(--ease); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 65ch; }
.faq details[open] p { animation: rise .35s var(--ease) both; }
.faq details p a { color: var(--accent); text-underline-offset: 3px; }

/* Footer */
.footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { display: grid; gap: 28px; padding-block: 40px; font-size: 14px; }
.footer-top, .footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-bottom { padding-top: 24px; border-top: 1px solid var(--border); }
.made-with { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.made-with a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.made-with a:hover { color: var(--accent); }
.heart { width: 16px; height: 16px; color: var(--accent); }
.credits { color: var(--muted); font-size: 13px; }
.credits a { text-underline-offset: 2px; }

/* Links between the converter pages */
.related { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.related-label { color: var(--muted); margin-right: 8px; }
.related a {
  color: var(--text); text-decoration: none; padding: 5px 10px; border-radius: var(--r-control); border: 1px solid var(--border);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.related a:hover { border-color: var(--accent); color: var(--accent); }
.related a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-soft-border); }

/* Preview dialog */
.preview {
  width: min(920px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border);
  border-radius: var(--r-container); background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.preview::backdrop { background: rgb(12 12 14 / .6); backdrop-filter: blur(4px); }
.preview[open] { animation: pop .3s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.preview-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--border); }
.preview-head h2 { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-stage { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); }
.preview-stage canvas { display: block; width: 100%; height: 100%; }
.preview-loading { position: absolute; left: 30%; right: 30%; top: 50%; }
.preview-stage.is-ready .preview-loading { display: none; }
.preview-help { padding: 10px 20px 14px; font-size: 13px; color: var(--muted); }

/* 404 */
.notfound { padding-block: 96px 128px; display: grid; gap: 20px; justify-items: start; }
.notfound .code { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.notfound .lede { margin-top: 0; }
.notfound .related { margin-top: 20px; }

/* Motion. Hero enters on load; sections rise into place as they scroll in. */
.hero-copy > * { animation: rise .7s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .06s; }
.hero-copy > :nth-child(3) { animation-delay: .12s; }
.converter { animation: rise .8s var(--ease) .15s both; }
.notfound > * { animation: rise .7s var(--ease) both; }
.notfound > :nth-child(2) { animation-delay: .06s; }
.notfound > :nth-child(n+3) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}
@keyframes reveal { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* Tablet: hero and FAQ stack */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; padding-bottom: 72px; }
  .hero-copy { position: static; padding-top: 0; }
  .faq { grid-template-columns: 1fr; gap: 20px; }
  .faq h2 { position: static; }
  .cell-private, .cell-quality, .cell-folder, .cell-preview { grid-column: span 12; }
}

/* Mobile: everything collapses to one column */
@media (max-width: 767px) {
  .wrap { padding-inline: 16px; }
  .nav nav a { padding: 6px 8px; font-size: 14px; }
  .wordmark span { font-size: 15px; }
  .converter { padding: 6px 14px 14px; }
  .converter-head { margin-inline: -14px; padding-inline: 14px; }
  .dropzone { padding: 40px 16px; }
  .settings { grid-template-columns: 1fr; gap: 16px; }
  .switch { padding-top: 0; }
  .bento { margin-top: 28px; gap: 12px; }
  .cell { padding: 24px; min-height: 0; }
  .cell-private .cell-icon { padding-bottom: 20px; }
  .cell-preview { grid-template-columns: 1fr; padding: 0; }
  .cell-preview-copy { padding: 24px 24px 0; }
  .cell-render img { aspect-ratio: 4 / 3; height: auto; -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%); mask-image: linear-gradient(180deg, transparent, #000 18%); }
  .topbar p, .topbar-icon { display: none; }
  .howto, .faq { padding-top: 80px; }
  .faq { padding-bottom: 80px; }
  .howto-list { grid-template-columns: 1fr; gap: 32px; margin-top: 32px; }
  .howto-list li { padding-left: 68px; }
  .howto-list .step-icon { position: absolute; left: 0; top: 0; margin: 0; }
  .howto-list li:not(:last-child)::after { top: 56px; bottom: -24px; left: 24px; right: auto; border-top: 0; border-left: 1.5px dashed var(--border-strong); }
  .converter[data-has-items="true"] .dropzone { grid-template-columns: auto 1fr; }
  .converter[data-has-items="true"] .dz-button { grid-column: 1 / -1; grid-row: auto; justify-self: stretch; margin-top: 10px; }
  .footer-top, .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .local { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .shimmer::after { animation: none; width: 100%; opacity: .5; }
}
