/* Trenalia · web de presentación (/web). Claro por defecto; oscuro con el mismo botón que la aplicación. */
:root {
  --paper: #f5f7fa; --paper-2: #eaeef4; --card: #ffffff; --ink: #142033; --ink-2: #48566b; --rule: #d5dce6;
  --blue: #1f6fd1; --blue-ink: #ffffff; --green: #12935c; --amber: #b57600; --red: #d93a32;
  --board: #0d1626; --board-2: #15233a; --led: #ffb21a; --led-dim: #9c7a3a; --led-red: #ff6a5f; --led-green: #4fd99a;
  --shadow: 0 1px 2px rgba(20,32,51,.06), 0 12px 32px -12px rgba(20,32,51,.22);
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #0b111c; --paper-2: #111a29; --card: #131d2e; --ink: #e6ecf5; --ink-2: #a3b0c4; --rule: #24324b;
  --blue: #5aa9ff; --blue-ink: #06101f; --green: #3ecf8e; --amber: #f2b33d; --red: #ff5a52;
  --board: #060b14; --board-2: #0f1828; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(36px, 5.4vw, 64px); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(26px, 3.3vw, 40px); font-weight: 780; }
h3 { font-size: 21px; font-weight: 720; letter-spacing: -0.01em; }
p { margin: 0 0 14px; max-width: 68ch; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 10px; background: var(--blue); color: var(--blue-ink); font-weight: 700; text-decoration: none; border: 2px solid var(--blue); }
.btn:hover { filter: brightness(1.07); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink-2); filter: none; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 15px; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 18px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }

/* Cabecera */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand svg { width: 26px; height: 26px; fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 550; }
.nav a:not(.btn):hover { color: var(--ink); }
.menu-btn { display: none; background: none; border: 1px solid var(--rule); color: var(--ink); border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 15px; }

/* Portada */
.hero { padding: 64px 0 72px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.lead { font-size: 20px; color: var(--ink-2); margin-top: 22px; }
.warn { margin-top: 22px; font-size: 14.5px; color: var(--ink-2); padding-left: 12px; border-left: 3px solid var(--amber); }

/* Panel de salidas: lo memorable de la página */
.board { margin: 0; background: var(--board); color: var(--led); border-radius: 14px; padding: 18px 18px 14px; box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.04); font-family: var(--mono); position: relative; overflow: hidden; }
.board::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(255,255,255,.025) 0 1px, transparent 1px 3px); }
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 4px 12px; border-bottom: 1px solid rgba(255,178,26,.22); }
.board-head h2 { font-family: var(--sans); font-size: 16px; font-weight: 700; letter-spacing: 0; color: #dfe7f3; }
.board-clock { font-size: 22px; font-weight: 700; letter-spacing: .04em; text-shadow: 0 0 10px rgba(255,178,26,.45); }
.board-t { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-top: 4px; }
.board-t th { text-align: left; font: 500 11.5px var(--sans); color: var(--led-dim); padding: 9px 6px 5px; }
.board-t td { padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,.06); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; text-shadow: 0 0 8px rgba(255,178,26,.28); }
.board-t tr:last-child td { border-bottom: 0; }
.b-id { font-weight: 700; } .b-id span { color: #dfe7f3; font-weight: 500; text-shadow: none; }
.board-t .b-dl { text-align: right; font-weight: 800; }
.b-dl.r { color: var(--led-red); text-shadow: 0 0 8px rgba(255,106,95,.4); } .b-dl.a { color: var(--led); } .b-dl.g { color: var(--led-green); }
.b-wait { color: #9fb0c8 !important; font-family: var(--sans); white-space: normal !important; text-shadow: none !important; padding: 18px 6px !important; }
.board-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 12px 4px 0; margin-top: 6px; border-top: 1px solid rgba(255,178,26,.22); font: 13.5px var(--sans); color: #b8c4d6; }
.board-foot b { font-family: var(--mono); color: var(--led); font-size: 15px; }
.board-note { font: 12.5px var(--sans); color: #8494ad; margin: 10px 4px 0; }

/* Secciones */
section { padding: 72px 0; }
.sec-h { margin-bottom: 14px; max-width: 22ch; }
.sec-sub { color: var(--ink-2); font-size: 18px; margin-bottom: 28px; }
.intro { background: var(--paper-2); border-block: 1px solid var(--rule); }
.intro h2 { margin-bottom: 20px; }
.intro p { font-size: 18.5px; color: var(--ink-2); }
.note { font-size: 14.5px; color: var(--ink-2); }

/* Funciones con capturas */
.features .sec-h { margin-bottom: 40px; }
.feat { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; padding: 40px 0; border-top: 1px solid var(--rule); }
.feat.rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feat.rev .feat-txt { order: 2; }
.feat-txt h3 { font-size: clamp(22px, 2.3vw, 28px); margin-bottom: 14px; }
.feat-txt p { color: var(--ink-2); }
.ticks { margin: 4px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 16px; }
.ticks li { position: relative; padding-left: 22px; margin: 7px 0; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--blue); }
.shot { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--rule); box-shadow: var(--shadow); background: var(--card); }
.shot:hover { border-color: var(--ink-2); }
.shot-phone { max-width: 300px; justify-self: center; border-radius: 28px; border: 8px solid #1b2433; }
.feat-duo { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.duo { position: relative; padding-bottom: 40px; padding-right: 60px; }
.duo .shot-phone { position: absolute; right: 0; bottom: 0; width: 34%; max-width: 210px; border-width: 6px; border-radius: 22px; }

/* Para quién */
.who { background: var(--paper-2); border-block: 1px solid var(--rule); }
.who-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 28px; border-top: 2px solid var(--ink); }
.who-grid > div { padding: 22px 28px 8px 0; }
.who-grid > div + div { padding-left: 28px; border-left: 1px solid var(--rule); }
.who-grid h3 { margin-bottom: 10px; }
.who-grid p { color: var(--ink-2); font-size: 16.5px; }
.drivers { margin-top: 36px; background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--red); border-radius: 0 12px 12px 0; padding: 22px 26px; }
.drivers h3 { margin-bottom: 8px; }
.drivers p { margin: 0; color: var(--ink-2); max-width: 82ch; }
.drivers b { color: var(--ink); }

/* Datos */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.cmp { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 24px 26px; }
.cmp.next { background: transparent; border-style: dashed; }
.cmp h3 { margin-bottom: 14px; }
.cmp ul { margin: 0 0 8px; padding-left: 20px; color: var(--ink-2); font-size: 16px; }
.cmp li { margin: 8px 0; } .cmp b { color: var(--ink); }
.limits { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 12px 48px; }
.limits h3 { font-size: clamp(22px, 2.3vw, 28px); grid-row: span 2; }
.limits ul { margin: 0; padding: 0; list-style: none; }
.limits li { padding: 11px 0 11px 30px; border-bottom: 1px solid var(--rule); position: relative; font-weight: 550; }
.limits li::before { content: ''; position: absolute; left: 4px; top: 50%; width: 14px; height: 2px; background: var(--amber); }
.limits p { color: var(--ink-2); margin-top: 16px; }

/* Colabora: tres pasos en orden */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.steps li { counter-increment: s; position: relative; padding: 18px 0 0; border-top: 2px solid var(--blue); }
.steps li::before { content: counter(s); position: absolute; top: -15px; left: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: var(--blue-ink); font-weight: 800; font-size: 14px; display: grid; place-items: center; }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--ink-2); font-size: 16px; }
.collab .note { margin-top: 12px; }

.close { text-align: left; background: var(--board); color: #e6ecf5; }
.close h2 { color: #fff; margin-bottom: 12px; }
.close p { color: #b8c4d6; font-size: 19px; }
.close .btn { margin-top: 14px; }

/* Pie */
.foot { padding: 40px 0 48px; border-top: 1px solid var(--rule); font-size: 14.5px; color: var(--ink-2); }
.foot-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.foot-brand { font-weight: 800; font-size: 18px; color: var(--ink); margin-bottom: 6px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-links a { color: var(--ink-2); }

/* Tableta */
@media (max-width: 980px) {
  .hero-in { grid-template-columns: 1fr; gap: 40px; }
  .feat, .feat.rev, .feat-duo { grid-template-columns: 1fr; gap: 24px; }
  .feat.rev .feat-txt { order: 0; }
  .who-grid { grid-template-columns: 1fr; border-top: 0; }
  .who-grid > div, .who-grid > div + div { padding: 18px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .limits { grid-template-columns: 1fr; }
  .limits h3 { grid-row: auto; }
}
/* Móvil */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  section { padding: 52px 0; }
  .hero { padding: 36px 0 52px; }
  .lead { font-size: 18px; }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 17px; }
  .nav .btn { margin-top: 12px; min-height: 48px; }
  .ctas .btn { flex: 1 1 100%; }
  .board { padding: 14px 12px 12px; }
  .board-t { font-size: 13.5px; }
  .board-t .b-next { display: none; }
  .board-t td { max-width: 120px; }
  .compare { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 30px; }
  .foot-in { grid-template-columns: 1fr; gap: 8px; }
  .shot-phone { max-width: 250px; }
  .duo { padding-right: 40px; padding-bottom: 30px; }
}

/* Selector de idioma */
.langs { display: inline-flex; gap: 2px; border: 1px solid var(--rule); border-radius: 8px; padding: 2px; }
.langs a { padding: 4px 7px; border-radius: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); text-decoration: none; }
.langs a[aria-current="page"] { background: var(--ink); color: var(--paper); }
@media (max-width: 720px) { .nav .langs { margin-top: 12px; justify-content: space-between; } .nav .langs a { flex: 1; text-align: center; padding: 8px 0; border-bottom: 0 !important; } }
