/* styles.css · Editor de Vídeo Online (DaVinci Resolve en navegador) · 1000HW
 * Cache-bust: ?v=5
 * Vanilla CSS · mobile-first · paleta 1000HW (void/acid/concrete/softgray/text-light)
 * WCAG 2.1 AA compliant · prefers-reduced-motion respetado
 *
 * Diseño: foco en video preview + timeline interactivo + controles de editor.
 */

/* ============================================================
 * 0. CUSTOM PROPERTIES (design tokens)
 * ============================================================ */
:root {
  /* Paleta canónica 1000HW */
  --void:        #050505;
  --concrete:    #1A1A1E;
  --structure:   #2A2A30;
  --acid:        #CCFF00;
  --acid-dim:    #A8CC00;
  --softgray:    #9CA3AF;
  --text-light:  #E5E7EB;
  --text-mid:    #B5B7C0;
  --text-dim:    #6B6E78;
  --danger:      #FF6B6B;
  --warn:        #FFB74D;
  --success:     #4ADE80;
  --info:        #60A5FA;

  /* Timeline */
  --timeline-bg:        #0F0F11;
  --timeline-track:     #1F1F23;
  --timeline-buffer:    #3A3A42;
  --timeline-trim:      rgba(204, 255, 0, 0.18);
  --timeline-handle:    var(--acid);

  /* Tipografía */
  --font-display: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', Monaco, Consolas, monospace;
  --font-body:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Espaciado */
  --space-1:  4px;
  --space-2:  8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Otros */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 14px;
  --shadow-md: 0 6px 22px rgba(0,0,0,0.45);
  --shadow-lg: 0 14px 50px rgba(0,0,0,0.55);

  /* Transiciones */
  --t-fast: 150ms cubic-bezier(.4,0,.2,1);
  --t-mid:  300ms cubic-bezier(.4,0,.2,1);
  --t-slow: 600ms cubic-bezier(.4,0,.2,1);
}

/* ============================================================
 * 1. RESET + BASE
 * ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background-color: var(--void);
  color: var(--text-light);
  line-height: 1.55;
  font-size: 16px;
  background-image: radial-gradient(circle at 20% 0%, rgba(204, 255, 0, 0.05) 0%, transparent 40%),
                    radial-gradient(circle at 100% 100%, rgba(204, 255, 0, 0.03) 0%, transparent 40%);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
  line-height: 1.2;
}

p { margin: 0 0 var(--space-4); }

a {
  color: var(--acid);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--t-fast);
}
a:hover { color: var(--text-light); }
a:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
  border-radius: 2px;
}

code {
  font-family: var(--font-mono);
  background: rgba(255,255,255,0.04);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* ============================================================
 * 2. UTILIDADES + ACCESIBILIDAD
 * ============================================================ */
.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--acid);
  color: var(--void);
  padding: var(--space-3) var(--space-4);
  z-index: 100;
}
.skip-link:focus {
  left: var(--space-3);
  top: var(--space-3);
}

::selection { background: var(--acid); color: var(--void); }

/* ============================================================
 * 3. LAYOUT (container)
 * ============================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}
@media (min-width: 768px) {
  .container { padding: 0 var(--space-5); }
}

/* ============================================================
 * 4. NAV (sticky top)
 * ============================================================ */
.nav {
  border-bottom: 1px solid var(--structure);
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: var(--space-3) var(--space-4);
  position: sticky;
  top: 0;
  z-index: 40;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.nav-back {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.nav-back:hover { color: var(--acid); }
.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.04em;
  color: var(--text-light);
}
.nav-brand .brand-acid { color: var(--acid); }

/* ============================================================
 * 5. HERO
 * ============================================================ */
.hero {
  padding: var(--space-7) 0 var(--space-5);
  border-bottom: 1px solid var(--structure);
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  border: 1px solid var(--structure);
  color: var(--text-mid);
  background: var(--concrete);
  border-radius: var(--radius-sm);
}
.tag-acid {
  border-color: var(--acid);
  color: var(--acid);
  background: rgba(204, 255, 0, 0.08);
}
.tag-priv {
  border-color: var(--success);
  color: var(--success);
  background: rgba(74, 222, 128, 0.08);
}

.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: var(--space-4);
}
.hero .accent { color: var(--acid); }
.hero-lede {
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--text-mid);
  max-width: 65ch;
  margin-bottom: var(--space-5);
}

.hero-disclaimer {
  background: rgba(204, 255, 0, 0.06);
  border-left: 3px solid var(--acid);
  padding: var(--space-4);
  border-radius: var(--radius);
  color: var(--text-light);
  max-width: 70ch;
  margin: 0;
  font-size: 14px;
}
.hero-disclaimer strong { color: var(--acid); }

/* ============================================================
 * 6. TOOL
 * ============================================================ */
.tool-section {
  padding: var(--space-6) 0;
}
.tool-card {
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
}
.tool-card-inner > * + * {
  margin-top: var(--space-5);
}

.tool-intro {
  color: var(--text-mid);
  font-size: 15px;
  margin-bottom: var(--space-5);
}

/* Fieldset por paso */
.step-fieldset {
  border: none;
  border-top: 1px solid var(--structure);
  padding: var(--space-5) 0 var(--space-4);
  margin: 0;
  position: relative;
}
.step-fieldset:first-of-type {
  border-top: none;
  padding-top: 0;
}
.step-fieldset legend {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 0 var(--space-4);
  margin: 0;
  color: var(--text-light);
  font-weight: 600;
  font-size: 18px;
  width: 100%;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--acid);
  color: var(--void);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}
.fieldset-hint {
  color: var(--text-mid);
  font-size: 14px;
  margin: 0 0 var(--space-4);
}

/* ============================================================
 * 6.1 DROPZONE
 * ============================================================ */
.dropzone {
  border: 2px dashed var(--structure);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-5);
  text-align: center;
  background: var(--void);
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
}
.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.04);
  outline: none;
}
.dropzone.is-drag-over {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.08);
  transform: scale(1.01);
}
.dropzone-icon {
  font-size: 48px;
  margin-bottom: var(--space-3);
  opacity: 0.8;
}
.dropzone-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: var(--space-2);
}
.dropzone-sub {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: var(--space-3);
}
.dropzone-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* File meta block after load */
.file-meta {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}
@media (min-width: 600px) {
  .file-meta {
    grid-template-columns: 1fr 1fr 1fr auto;
    align-items: center;
  }
}
.file-meta-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.file-meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.file-meta-value {
  font-size: 14px;
  color: var(--text-light);
  word-break: break-all;
}
@media (min-width: 600px) {
  .file-meta-row {
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-2);
  }
}

/* ============================================================
 * 6.2 PREVIEW STAGE (video + text overlay)
 * ============================================================ */
.preview-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.preview-stage {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--structure);
}
@media (max-width: 600px) {
  .preview-stage {
    aspect-ratio: 4 / 3;
  }
}
.preview-stage video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.text-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 5%;
  text-align: center;
}
.text-overlay .text-content {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(16px, 3.6vw, 36px);
  line-height: 1.25;
  word-wrap: break-word;
  max-width: 90%;
  text-shadow:
    0 0 8px rgba(0,0,0,0.7),
    0 2px 4px rgba(0,0,0,0.8);
}
.text-overlay.bg-shadow .text-content {
  text-shadow:
    0 0 12px rgba(0,0,0,0.9),
    0 2px 6px rgba(0,0,0,0.95);
}
.text-overlay.bg-box .text-content {
  background: rgba(0, 0, 0, 0.55);
  color: var(--text-light);
  padding: 12px 24px;
  border-radius: var(--radius);
  text-shadow: none;
}
.text-overlay.bg-none .text-content {
  text-shadow: 0 0 8px rgba(0,0,0,0.7),
               0 2px 4px rgba(0,0,0,0.8);
}

.preview-empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-align: center;
  padding: var(--space-5);
}

/* Player controls */
.player-controls {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.time-display {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.time-sep { color: var(--text-dim); }

.volume-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
  color: var(--text-mid);
}
.volume-control input[type="range"] {
  width: 100px;
}

/* Generic ctrl-btn */
.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--concrete);
  color: var(--text-light);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  min-height: 44px;
}
.ctrl-btn:hover {
  border-color: var(--acid);
  color: var(--acid);
}
.ctrl-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}
.ctrl-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ctrl-btn:disabled:hover {
  border-color: var(--structure);
  color: var(--text-light);
}
#btn-play {
  min-width: 56px;
  font-size: 18px;
}
.ctrl-btn-small {
  min-height: 36px;
  padding: var(--space-2) var(--space-3);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* ============================================================
 * 6.3 TIMELINE
 * ============================================================ */
.timeline-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.timeline-track {
  position: relative;
  width: 100%;
  height: 48px;
  background: var(--timeline-track);
  border-radius: var(--radius);
  border: 1px solid var(--structure);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}

.timeline-buffer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--timeline-buffer);
  pointer-events: none;
}

.timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: rgba(204, 255, 0, 0.18);
  pointer-events: none;
}

.timeline-trim {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  background: transparent;
  pointer-events: none;
}

.trim-handle {
  position: absolute;
  top: 0;
  width: 18px;
  height: 100%;
  background: var(--timeline-handle);
  border-radius: 3px;
  cursor: ew-resize;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: auto;
  transition: background var(--t-fast), transform var(--t-fast);
}
.trim-handle:hover {
  background: var(--acid);
  transform: scale(1.08);
}
.trim-handle:focus-visible {
  outline: 2px solid var(--text-light);
  outline-offset: 2px;
  z-index: 4;
}
.trim-handle-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--void);
  letter-spacing: 0.05em;
}
.trim-handle-bar {
  width: 3px;
  height: 22px;
  background: var(--void);
  border-radius: 2px;
  margin-bottom: 2px;
}

/* Trim region overlay (between IN and OUT) */
.trim-region {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(204, 255, 0, 0.10);
  border-left: 2px solid var(--acid);
  border-right: 2px solid var(--acid);
  pointer-events: none;
  z-index: 1;
}

.trim-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.trim-readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
}
.trim-readout-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}
.trim-readout-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.trim-readout-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-light);
}
.trim-readout-input {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-light);
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: 6px 8px;
  text-align: center;
  width: 100%;
  max-width: 140px;
  margin: 0 auto;
  font-feature-settings: "tnum" 1;
}
.trim-readout-input:focus {
  outline: 2px solid var(--acid);
  outline-offset: 1px;
  border-color: var(--acid);
}
.trim-readout-input:invalid {
  border-color: var(--warn);
  color: var(--warn);
}
.trim-readout-final { color: var(--acid); }

.trim-warning {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 183, 77, 0.1);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius);
  color: var(--warn);
  font-size: 13px;
}

/* ============================================================
 * 6.4 FORM (texto overlay + export options)
 * ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.form-row.full {
  grid-column: 1 / -1;
}
.form-row label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
}
.form-row input,
.form-row select,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 14px;
  padding: var(--space-3);
  background: var(--void);
  color: var(--text-light);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  transition: border-color var(--t-fast);
  min-height: 44px;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--acid);
  outline: 2px solid var(--acid);
  outline-offset: 0;
}
.form-row textarea { min-height: 96px; resize: vertical; }
.hint {
  font-size: 12px;
  color: var(--text-dim);
}

/* color picker + hex readout */
.color-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.color-control input[type="color"] {
  width: 44px;
  height: 44px;
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  background: var(--void);
  padding: 4px;
  cursor: pointer;
}
.color-hex {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-mid);
}

/* ============================================================
 * 6.5 BOTONES PRIMARIOS
 * ============================================================ */
.btn {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--t-fast);
  border: 1px solid transparent;
  min-height: 44px;
  min-width: 44px;
}
.btn-primary {
  background: var(--acid);
  color: var(--void);
  border-color: var(--acid);
}
.btn-primary:hover:not(:disabled) {
  background: var(--acid-dim);
  border-color: var(--acid-dim);
}
.btn-primary:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-ghost {
  background: transparent;
  color: var(--text-mid);
  border-color: var(--structure);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--text-mid);
  color: var(--text-light);
}
.btn-small {
  font-size: 13px;
  padding: var(--space-2) var(--space-3);
  min-height: 36px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--structure);
}

.form-message {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-mono);
  margin-top: var(--space-3);
}
.form-message.success { background: rgba(74, 222, 128, 0.1); border-left: 3px solid var(--success); color: var(--success); }
.form-message.warn    { background: rgba(255, 183, 77, 0.1); border-left: 3px solid var(--warn);    color: var(--warn); }
.form-message.error   { background: rgba(255, 107, 107, 0.1); border-left: 3px solid var(--danger); color: var(--danger); }
.form-message.info    { background: rgba(96, 165, 250, 0.1); border-left: 3px solid var(--info);    color: var(--info); }

/* ============================================================
 * 7. CALLOUT (compatibilidad navegadores)
 * ============================================================ */
.callout-pro {
  background: rgba(255, 183, 77, 0.06);
  border: 1px solid rgba(255, 183, 77, 0.25);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-6) 0;
}
.callout-pro h3 {
  margin: 0 0 var(--space-2);
  color: var(--warn);
  font-size: 17px;
}
.callout-pro p {
  color: var(--text-mid);
  font-size: 14px;
  margin: 0;
}

/* ============================================================
 * 8. SECCIONES DE CONTENIDO
 * ============================================================ */
.content-section {
  margin: var(--space-7) 0;
}
.content-section h2 {
  font-size: clamp(20px, 2.5vw, 28px);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  color: var(--text-light);
}
.content-section h2:first-child { margin-top: 0; }
.content-section h3 {
  font-size: clamp(17px, 2vw, 22px);
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  color: var(--text-light);
}
.content-section p {
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.6;
}
.content-section ul,
.content-section ol {
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.65;
  padding-left: var(--space-5);
  margin-bottom: var(--space-4);
}
.content-section li { margin-bottom: var(--space-2); }
.content-section strong { color: var(--text-light); }
.content-section a { color: var(--acid); }

.nota {
  border-left: 3px solid var(--acid);
  padding: var(--space-3) var(--space-4);
  background: rgba(204, 255, 0, 0.05);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-light);
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--structure);
  padding: var(--space-3) 0;
}
.faq details:first-of-type {
  border-top: 1px solid var(--structure);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-light);
  font-size: 15px;
  list-style: none;
  padding: var(--space-3) var(--space-5) var(--space-3) 0;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--acid);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  transition: transform var(--t-fast);
}
.faq details[open] summary::after {
  content: "−";
}
.faq details p {
  margin: var(--space-3) 0 0 0;
  font-size: 14px;
  color: var(--text-mid);
}
.faq summary:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Glosario */
.glossary {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
@media (min-width: 600px) {
  .glossary { grid-template-columns: 1fr 1fr; }
}
.glossary div {
  padding: var(--space-3) var(--space-4);
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
}
.glossary dt {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--acid);
  margin-bottom: var(--space-1);
}
.glossary dd {
  margin: 0;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.5;
}

/* ============================================================
 * 9. FOOTER
 * ============================================================ */
footer {
  border-top: 1px solid var(--structure);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================================
 * 10. OFFLINE-READY BANNER (top, NO modal)
 * ============================================================ */
.offline-banner {
  position: fixed;
  top: var(--space-3);
  left: 50%;
  transform: translateX(-50%) translateY(-200%);
  background: var(--success);
  color: var(--void);
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-5);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  z-index: 50;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: transform var(--t-mid);
  max-width: calc(100% - 32px);
}
.offline-banner.visible {
  transform: translateX(-50%) translateY(0);
}
.offline-banner-icon {
  font-size: 18px;
  font-weight: 700;
}
.offline-banner-text { white-space: nowrap; }
.offline-banner-close {
  background: transparent;
  border: 1px solid var(--void);
  color: var(--void);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  margin-left: var(--space-2);
  transition: background var(--t-fast);
}
.offline-banner-close:hover {
  background: var(--void);
  color: var(--success);
}
.offline-banner-close:focus-visible {
  outline: 2px solid var(--text-light);
  outline-offset: 2px;
}

/* ============================================================
 * 11. DONATION TOAST (bottom-right)
 * ============================================================ */
.donation-toast {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-lg);
  z-index: 45;
  max-width: calc(100% - 32px);
  transform: translateY(200%);
  opacity: 0;
  transition: transform var(--t-mid), opacity var(--t-mid);
}
.donation-toast.visible {
  transform: translateY(0);
  opacity: 1;
}
.donation-toast-icon {
  font-size: 28px;
  line-height: 1;
}
.donation-toast-body { flex: 1; }
.donation-toast-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light);
}
.donation-toast-subtitle {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.4;
  max-width: 320px;
}
.donation-toast-btn {
  display: inline-block;
  background: var(--acid);
  color: var(--void);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: background var(--t-fast);
}
.donation-toast-btn:hover { background: var(--acid-dim); }
.donation-toast-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}
.donation-toast-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-left: var(--space-1);
}
.donation-toast-close:hover { color: var(--text-light); }
.donation-toast-close:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .donation-toast {
    bottom: var(--space-3);
    right: var(--space-3);
    left: var(--space-3);
    max-width: none;
  }
  .donation-toast-icon { font-size: 22px; }
  .donation-toast-subtitle { max-width: none; }
}

/* ============================================================
 * 12. A11Y — FOCUS VISIBLE GLOBAL
 * ============================================================ */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

/* ============================================================
 * 13. PREFERS-REDUCED-MOTION
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .offline-banner,
  .donation-toast {
    transition: none !important;
  }
  .dropzone.is-drag-over {
    transform: none;
  }
}

/* ============================================================
 * 13.5 LANG SWITCH (ES/EN)
 * ============================================================ */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: 2px;
}
.lang-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  min-height: 28px;
  min-width: 36px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--t-fast);
}
.lang-btn:hover { color: var(--text-light); }
.lang-btn[aria-pressed="true"] {
  background: var(--acid);
  color: var(--void);
}
.lang-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

/* ============================================================
 * 14. MOBILE TWEAKS
 * ============================================================ */
@media (max-width: 600px) {
  .trim-readout {
    grid-template-columns: 1fr;
  }
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn { width: 100%; }
  .player-controls {
    gap: var(--space-3);
  }
  .volume-control {
    margin-left: 0;
    width: 100%;
  }
}

/* Impresión (cuando el usuario quiera imprimir la página, no el vídeo) */
@media print {
  body { background: white; color: black; }
  .nav, .hero-disclaimer, .tool-section, .callout-pro, .offline-banner, .donation-toast, footer { display: none; }
}
