/* La página de Surte (fase 10, paso 10.3). Colores de la app (generador/ui/theme/tokens.py), en claro y oscuro. */

:root {
  --bg: #f6f6f3;
  --surface: #ffffff;
  --border: #e4e4df;
  --text: #1c1c1a;
  --muted: #6b6b66;
  --accent: #0e6e5c;
  --accent-hover: #0a5547;
  --accent-text: #0b5e4e;
  --accent-soft: #e3f1ec;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --shadow: 0 1px 2px rgba(20, 20, 19, 0.06), 0 8px 24px rgba(20, 20, 19, 0.06);
  --radius: 12px;
  --radius-control: 8px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --surface: #1c1c1a;
    --border: #2e2e2a;
    --text: #ecece7;
    --muted: #a3a39b;
    --accent: #17806a;
    --accent-hover: #126b59;
    --accent-text: #7fd8c1;
    --accent-soft: #15332c;
    --danger: #f19a91;
    --danger-soft: #3a1d1a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-text); }
a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* --- Cabecera ------------------------------------------------------------------------------ */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700;
  font-size: 19px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.top nav { display: flex; align-items: center; gap: 20px; }
.top nav a.link { color: var(--muted); text-decoration: none; font-size: 15px; }
.top nav a.link:hover { color: var(--text); }

/* --- Botones ------------------------------------------------------------------------------- */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border-radius: var(--radius-control); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
}
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-hover); color: #fff; }
.button.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.button.secondary:hover { border-color: var(--muted); color: var(--text); }
.button.small { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.button[disabled] { opacity: 0.6; cursor: progress; }

/* --- Portada ------------------------------------------------------------------------------- */

.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; gap: 40px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 18px;
  max-width: 17ch; }
.hero .lead { font-size: clamp(17px, 2vw, 19px); color: var(--muted); margin: 0 0 28px; max-width: 58ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.facts { color: var(--muted); font-size: 14px; margin: 0; }
.shot {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow); background: #1c1c1a;
}
.shot figcaption { padding: 10px 14px; font-size: 13px; color: var(--muted); background: var(--surface);
  border-top: 1px solid var(--border); }

/* --- Secciones ----------------------------------------------------------------------------- */

section { padding: 56px 0; scroll-margin-top: 60px; }
section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
h2 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 12px; }
.section-lead { color: var(--muted); margin: 0 0 36px; max-width: 62ch; font-size: 17px; }
h3 { font-size: 19px; line-height: 1.3; margin: 0 0 8px; }

.steps { display: grid; gap: 48px; }
.step { display: grid; gap: 24px; align-items: center; }
.step .number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 999px; margin-bottom: 12px;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 15px;
}
.step p { color: var(--muted); margin: 0; }

.cards { display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
section.alt .card { background: var(--bg); }
.card p { color: var(--muted); margin: 0; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 32px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 999px;
  background: var(--accent-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317806a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}
.checks strong { font-weight: 600; }

/* --- Formulario de la prueba --------------------------------------------------------------- */

.trial { display: grid; gap: 32px; align-items: start; }
.trial-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 14px; }
.field .optional { color: var(--muted); font-weight: 400; }
.field input {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-control);
  min-height: 44px; padding: 8px 12px; width: 100%;
}
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 4px 0 20px; }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.trial-box .button { width: 100%; }
.status { margin: 16px 0 0; padding: 12px 14px; border-radius: var(--radius-control); font-size: 15px; }
.status:empty { display: none; }
.status.ok { background: var(--accent-soft); color: var(--accent-text); }
.status.error { background: var(--danger-soft); color: var(--danger); }
.note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

/* --- Preguntas ----------------------------------------------------------------------------- */

.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 20px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style-position: outside; }
.faq details p { color: var(--muted); margin: 0 0 16px; }

/* --- Pie y páginas legales ----------------------------------------------------------------- */

footer { padding: 32px 0 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--border); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--muted); }

.legal { padding: 48px 0 64px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.2; margin: 0 0 8px; }
.legal h2 { font-size: 21px; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--text); }
.legal .updated { color: var(--muted); margin: 0 0 24px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 15px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.legal th { width: 32%; color: var(--muted); font-weight: 600; }

/* --- Pantallas anchas ---------------------------------------------------------------------- */

@media (min-width: 900px) {
  .hero { padding: 88px 0 56px; }
  .hero .wrap { grid-template-columns: 5fr 6fr; align-items: center; }
  .step { grid-template-columns: 2fr 3fr; gap: 48px; }
  .step:nth-child(even) .text { order: 2; }
  .cards.two { grid-template-columns: 1fr 1fr; }
  .trial { grid-template-columns: 1fr 1fr; gap: 56px; }
}

@media (max-width: 560px) {
  .top nav a.link { display: none; }
  .actions .button { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
