:root {
  --bg: #F2F4F9;
  --surface: #FFFFFF;
  --ink: #061536;
  --ink-soft: #4A5078;
  --accent: #4917FA;
  --accent-deep: #3A0FD0;
  --wash: #E3DDFF;
  --ok: #1A8A5B;
  --warn: #B3261E;
  --radius: 22px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* Barra superior */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }

.brand-logo { display: block; height: 32px; width: auto; }

.menu { display: flex; gap: 6px; }

.menu a {
  white-space: nowrap;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 999px;
  transition: background .15s, color .15s;
}

.menu a:hover, .menu a:focus-visible { background: var(--wash); color: var(--accent-deep); }

.menu .lang-switch {
  margin-left: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--accent-deep);
  border: 2px solid var(--wash);
}

.menu .lang-switch:hover, .menu .lang-switch:focus-visible { border-color: var(--accent); }

/* Contenido */
main {
  width: min(720px, 100% - 32px);
  margin: 0 auto;
  padding: 56px 0 80px;
}

.hero { text-align: center; }

h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 8vw, 68px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.lede {
  max-width: 52ch;
  margin: 0 auto 36px;
  font-size: 19px;
  color: var(--ink-soft);
}

/* Caja de subida: el único elemento protagonista */
.drop {
  position: relative;
  min-height: 300px;
  display: grid;
  place-items: center;
  padding: 40px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--wash), 0 24px 60px -30px rgba(16, 20, 51, .35);
  cursor: pointer;
  outline: none;
  transition: box-shadow .2s, transform .2s;
}

.drop:hover, .drop:focus-visible {
  box-shadow: 0 0 0 3px var(--accent), 0 24px 60px -30px rgba(44, 43, 214, .5);
}

.drop.over {
  transform: scale(1.015);
  box-shadow: 0 0 0 3px var(--accent), 0 30px 70px -30px rgba(44, 43, 214, .6);
  background: #F8F6FF;
}

.drop.busy, .drop.done, .drop.error { cursor: default; }

.drop-state { width: 100%; max-width: 440px; }

.drop-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  display: block;
  color: var(--accent);
}

.drop-icon.ok { color: var(--ok); }

.drop-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.drop-hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

/* Texto distinto según haya ratón o solo pantalla táctil */
.if-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .if-pointer { display: none; }
  .if-touch { display: inline; }
}

/* Barra de progreso */
.bar {
  height: 10px;
  margin: 22px 0 14px;
  border-radius: 999px;
  background: var(--wash);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  transition: width .25s ease-out;
}

/* Informe */
.report {
  list-style: none;
  margin: 14px 0 22px;
  padding: 0;
  text-align: left;
  display: grid;
  gap: 8px;
}

.report li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bg);
  font-size: 15px;
}

.report li.muted { color: var(--ink-soft); }

.report li span:last-child { font-weight: 700; white-space: nowrap; }

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  transition: background .15s, transform .1s;
}

.btn:hover { background: var(--accent-deep); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.btn.ghost {
  color: var(--accent-deep);
  background: var(--wash);
}

.btn.ghost:hover { background: #D3CBFF; }

.fine {
  scroll-margin-bottom: 24px;
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.fine a { font-weight: 600; color: var(--accent-deep); text-decoration: underline; }

/* Pasos */
.steps, .faq { margin-top: 96px; }

h2 {
  margin: 0 0 24px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.steps ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: paso;
  display: grid;
  gap: 18px;
}

.steps li {
  counter-increment: paso;
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 16px;
  row-gap: 2px;
  align-items: start;
}

.steps li::before {
  content: counter(paso);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--wash);
  color: var(--accent-deep);
  font-weight: 800;
  font-size: 18px;
}

.steps li::before { grid-row: 1 / span 2; }
.steps strong { grid-column: 2; font-weight: 700; }
.steps span { grid-column: 2; color: var(--ink-soft); }

/* Preguntas */
.faq details {
  border-top: 1px solid #D7DBE8;
  padding: 6px 0;
}

.faq details:last-child { border-bottom: 1px solid #D7DBE8; }

.faq summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 700;
  font-size: 18px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wash);
  color: var(--accent-deep);
  font-weight: 700;
  transition: transform .2s;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq p { margin: 0 0 14px; color: var(--ink-soft); max-width: 66ch; }

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .9em;
  background: var(--wash);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--accent-deep);
}

/* Pie */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  width: min(720px, 100% - 32px);
  margin: 0 auto;
  padding: 24px 0 40px;
  border-top: 1px solid #D7DBE8;
  font-size: 14px;
  color: var(--ink-soft);
}

.foot span:first-child { font-weight: 800; color: var(--ink); }
.foot a { font-weight: 600; color: var(--accent-deep); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .topbar { padding: 10px 12px; gap: 12px; }
  .brand-logo { height: 24px; }
  .menu { gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .menu::-webkit-scrollbar { display: none; }
  .menu a { padding: 8px 6px; font-size: 13px; }
  .menu .lang-switch { margin-left: 2px; padding: 5px 8px; font-size: 12px; }
  .lede { font-size: 17px; }
  .drop { min-height: 240px; padding: 32px 18px; }
  .steps li { grid-template-columns: 36px 1fr; }
  .steps li::before { width: 36px; height: 36px; font-size: 16px; }
}

@media (max-width: 400px) {
  .topbar { padding: 10px 10px; gap: 8px; }
  .brand-logo { height: 22px; }
  .menu a { padding: 8px 5px; font-size: 12.5px; }
  .menu .lang-switch { padding: 5px 7px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .drop, .bar-fill, .menu a, .btn, .faq summary::after { transition: none; }
}
