/* ============================================================================
   ReelGrab — Beautiful Media Converter
   Design language: linear.app. A flat near-black canvas, a single restrained
   indigo accent, Inter for type + JetBrains Mono for technical labels, hairline
   borders, and figure-style cards. Minimal, engineered, calm.
   ========================================================================== */

/* ---- Tokens ------------------------------------------------------------- */
:root {
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --radius-lg: 16px;
  --radius-md: 11px;
  --radius-sm: 8px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.14s;
  --t: 0.2s;

  --maxw: 540px;
  --maxw-wide: 960px;
  --nav-h: 56px;
}

/* Dark (default) — Linear's signature near-black */
:root,
[data-theme='dark'] {
  color-scheme: dark;
  --bg: #08090a;
  --bg-2: #0d0e10;

  --text: #f7f8f8;
  --text-dim: #8a8f98;
  --text-faint: #585c64;

  --accent: #5e6ad2;
  --accent-bright: #828fff;
  --accent-border: #4b54b0;
  --accent-tint: rgba(94, 106, 210, 0.16);

  --green: #4cb782;
  --green-border: #3a8f66;
  --red: #eb5757;

  --surface: rgba(255, 255, 255, 0.026);
  --surface-2: rgba(255, 255, 255, 0.05);
  --surface-3: rgba(255, 255, 255, 0.08);
  --field-bg: rgba(255, 255, 255, 0.02);

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --hairline: rgba(255, 255, 255, 0.06);

  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 20px 50px -30px rgba(0, 0, 0, 0.9);
  --shadow-btn: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(0, 0, 0, 0.5);

  --glow: rgba(94, 106, 210, 0.12);
  --grain-opacity: 0.02;
}

/* Light — clean near-white */
[data-theme='light'] {
  color-scheme: light;
  --bg: #fbfbfc;
  --bg-2: #f3f3f5;

  --text: #16171a;
  --text-dim: #696d76;
  --text-faint: #a0a3aa;

  --accent: #5e6ad2;
  --accent-bright: #6b78e6;
  --accent-border: #5460c4;
  --accent-tint: rgba(94, 106, 210, 0.1);

  --green: #3d9970;
  --green-border: #318060;
  --red: #d64545;

  --surface: rgba(9, 9, 11, 0.016);
  --surface-2: rgba(9, 9, 11, 0.04);
  --surface-3: rgba(9, 9, 11, 0.06);
  --field-bg: #ffffff;

  --border: rgba(9, 9, 11, 0.1);
  --border-strong: rgba(9, 9, 11, 0.16);
  --hairline: rgba(9, 9, 11, 0.06);

  --shadow-card: 0 0 0 1px rgba(9, 9, 11, 0.02), 0 20px 44px -32px rgba(20, 18, 60, 0.28);
  --shadow-btn: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(20, 18, 60, 0.16);

  --glow: rgba(94, 106, 210, 0.1);
  --grain-opacity: 0.018;
}

/* ---- Reset -------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  min-height: 100svh;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
img {
  display: block;
  max-width: 100%;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
  letter-spacing: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  padding: 0.1em 0.4em;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---- Canvas (flat black + one faint glow) ------------------------------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}
.glow {
  position: absolute;
  top: -32vmax;
  left: 50%;
  transform: translateX(-50%);
  width: 90vmax;
  height: 52vmax;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--glow), transparent 62%);
  filter: blur(30px);
}
.grain {
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--grain-opacity);
  pointer-events: none;
}

/* ---- Top navigation ----------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.nav-inner {
  max-width: var(--maxw-wide);
  height: var(--nav-h);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  border: 1px solid var(--accent-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
}
.nav-link {
  font-size: 0.87rem;
  font-weight: 450;
  color: var(--text-dim);
  transition: color var(--t-fast) var(--ease);
}
.nav-link:hover {
  color: var(--text);
}
.theme-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease);
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.theme-toggle .icon-moon {
  display: none;
}
[data-theme='light'] .theme-toggle .icon-sun {
  display: none;
}
[data-theme='light'] .theme-toggle .icon-moon {
  display: block;
}

/* ---- Layout containers -------------------------------------------------- */
main {
  padding-bottom: 90px;
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
  max-width: 600px;
  margin: clamp(48px, 9vh, 100px) auto 0;
  padding: 0 22px;
  text-align: center;
  animation: rise 0.6s var(--ease-out) both;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 24px;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 8px 1px var(--accent);
}
.title {
  font-weight: 600;
  font-size: clamp(2.4rem, 6.2vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  background: linear-gradient(180deg, var(--text) 36%, color-mix(in srgb, var(--text) 64%, transparent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 1.04rem;
  letter-spacing: -0.012em;
}

/* ---- Converter card ----------------------------------------------------- */
.card {
  position: relative;
  max-width: var(--maxw);
  margin: 36px auto 0;
  padding: clamp(18px, 4vw, 24px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: rise 0.65s var(--ease-out) 0.05s both;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

/* ---- URL field ---------------------------------------------------------- */
.field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px 6px 14px;
  border-radius: var(--radius-md);
  background: var(--field-bg);
  border: 1px solid var(--border);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.field:focus-within {
  border-color: color-mix(in srgb, var(--accent) 75%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field.shake {
  animation: shake 0.38s var(--ease);
  border-color: var(--red);
}
.field-icon {
  display: grid;
  place-items: center;
  color: var(--text-faint);
  flex: none;
  transition: color var(--t) var(--ease);
}
.field:focus-within .field-icon {
  color: var(--accent-bright);
}
.url-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  color: var(--text);
  font-size: 0.97rem;
  letter-spacing: -0.011em;
  padding: 10px 2px;
}
.url-input::placeholder {
  color: var(--text-faint);
}
.url-input:focus {
  outline: none;
}
.ghost-btn {
  flex: none;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 8px 13px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: all var(--t-fast) var(--ease);
}
.ghost-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-3);
}
.icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text-dim);
  transition: all var(--t-fast) var(--ease);
}
.icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}
.hint {
  min-height: 17px;
  margin: 10px 3px 0;
  font-size: 0.82rem;
  color: var(--text-faint);
  transition: color var(--t-fast);
}
.hint.is-error {
  color: var(--red);
}
.hint.is-ok {
  color: var(--green);
}

/* ---- Preview ------------------------------------------------------------ */
.preview {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-top: 16px;
  padding: 11px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  animation: rise 0.4s var(--ease-out) both;
}
.preview-thumb {
  position: relative;
  flex: none;
  width: 116px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--hairline);
}
.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}
.preview-thumb img.loaded {
  opacity: 1;
}
.preview-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, var(--surface-3) 50%, transparent 80%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
.preview-thumb img.loaded ~ .preview-shimmer {
  display: none;
}
.duration {
  position: absolute;
  right: 5px;
  bottom: 5px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: #fff;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  z-index: 2;
}
.preview-meta {
  min-width: 0;
  flex: 1;
}
.preview-title {
  font-weight: 510;
  font-size: 0.93rem;
  line-height: 1.35;
  letter-spacing: -0.013em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.preview-channel {
  margin-top: 3px;
  font-size: 0.83rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.source-badge {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-dim);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

/* ---- Controls ----------------------------------------------------------- */
.controls {
  margin-top: 20px;
  display: grid;
  gap: 16px;
}
.control-row {
  display: grid;
  gap: 9px;
}
.control-label {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Segmented control with sliding pill */
.segmented {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--field-bg);
  border: 1px solid var(--border);
}
.seg-pill {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 5px);
  height: calc(100% - 8px);
  border-radius: 8px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform var(--t) var(--ease-out);
  z-index: 0;
}
.segmented[data-active='mp3'] .seg-pill {
  transform: translateX(calc(100% + 3px));
}
.seg-opt {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 9px;
  border-radius: 8px;
  color: var(--text-dim);
  transition: color var(--t) var(--ease);
}
.seg-opt strong {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.seg-opt small {
  font-size: 0.69rem;
  opacity: 0.7;
}
.seg-opt.is-active {
  color: var(--text);
}

/* Quality chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.chip {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  border: 1px solid var(--border);
  transition: all var(--t-fast) var(--ease);
}
.chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.chip.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 32%, transparent);
}

/* ---- CTA (Linear-style button) ------------------------------------------ */
.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin-top: 20px;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 510;
  letter-spacing: -0.01em;
  color: #fff;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  border: 1px solid var(--accent-border);
  box-shadow: var(--shadow-btn);
  transition: filter var(--t-fast) var(--ease), transform var(--t-fast) var(--ease),
    opacity var(--t-fast) var(--ease);
}
.cta:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.cta:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(0.97);
}
.cta:disabled {
  filter: saturate(0.35) brightness(0.68);
  opacity: 0.55;
  cursor: not-allowed;
}
.cta-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.cta.is-loading .cta-spinner {
  display: block;
}
.cta-success {
  margin-top: 4px;
  text-decoration: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--green) 86%, #fff), var(--green));
  border-color: var(--green-border);
}

/* ---- Progress ----------------------------------------------------------- */
.progress {
  margin-top: 20px;
  animation: rise 0.35s var(--ease-out) both;
}
.progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 11px;
}
.progress-phase {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}
.progress-percent {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}
.progress-track {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  transition: width 0.4s var(--ease);
}
.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
.progress.indeterminate .progress-bar {
  width: 34% !important;
  animation: indeterminate 1.3s var(--ease) infinite;
}
.progress-sub {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
  min-height: 16px;
}

/* ---- Result ------------------------------------------------------------- */
.result {
  text-align: center;
  margin-top: 20px;
  animation: rise 0.4s var(--ease-out) both;
}
.check {
  display: inline-grid;
  place-items: center;
  margin-bottom: 4px;
}
.check-ring {
  stroke: color-mix(in srgb, var(--green) 55%, transparent);
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: draw 0.55s var(--ease-out) forwards;
}
.check-mark {
  stroke: var(--green);
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.35s var(--ease-out) 0.4s forwards;
}
.result-title {
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 6px;
}
.result-name {
  margin: 5px auto 16px;
  max-width: 92%;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Error -------------------------------------------------------------- */
.error {
  text-align: center;
  margin-top: 20px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--red) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--red) 26%, transparent);
  animation: rise 0.35s var(--ease-out) both;
}
.error-icon {
  color: var(--red);
  margin-bottom: 6px;
}
.error-msg {
  color: var(--text);
  font-weight: 460;
  font-size: 0.92rem;
}
.text-btn {
  margin-top: 13px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 8px 15px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all var(--t-fast) var(--ease);
}
.text-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

/* ---- Figure section (how it works) -------------------------------------- */
.steps {
  max-width: var(--maxw-wide);
  margin: clamp(70px, 12vh, 130px) auto 0;
  padding: 0 clamp(18px, 4vw, 28px);
  animation: rise 0.6s var(--ease-out) both;
}
.steps-head {
  margin-bottom: 26px;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.steps-title {
  margin-top: 11px;
  font-size: clamp(1.5rem, 3.2vw, 2.05rem);
  font-weight: 600;
  letter-spacing: -0.028em;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 24px 22px 26px;
  background: var(--bg);
  transition: background var(--t) var(--ease);
}
.step:hover {
  background: var(--surface);
}
.step-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.step-art {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), transparent);
  color: var(--text-dim);
  margin-bottom: 2px;
}
.step-art svg {
  width: 54px;
  height: 54px;
}
.step-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.step-desc {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-dim);
}

/* ---- Footer ------------------------------------------------------------- */
.foot {
  max-width: 600px;
  margin: clamp(54px, 9vh, 90px) auto 0;
  padding: 0 22px;
  text-align: center;
  font-size: 0.83rem;
  color: var(--text-faint);
  line-height: 1.7;
}
.grad-text {
  color: var(--text-dim);
  font-weight: 500;
}
.disclaimer {
  margin-top: 7px;
  font-size: 0.76rem;
  opacity: 0.85;
  max-width: 430px;
  margin-inline: auto;
}

/* ---- Utilities ---------------------------------------------------------- */
[hidden] {
  display: none !important;
}
.is-collapsed {
  display: none !important;
}

/* ---- Keyframes ---------------------------------------------------------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
@keyframes indeterminate {
  0% {
    left: -34%;
  }
  100% {
    left: 100%;
  }
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 720px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .step-art {
    aspect-ratio: 21 / 9;
  }
}
@media (max-width: 460px) {
  .nav-link[href='#converter'] {
    display: none;
  }
  .preview {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }
  .preview-thumb {
    width: 100%;
  }
  .seg-opt small {
    display: none;
  }
}

/* ---- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
