/* Estilos de la web de N-orbis: portada (index.html) y páginas interiores (privacidad/). */

:root {
  --brand: #0b3d8c;
  --brand-deep: #06265c;
  --brand-ink: #e8f0ff;
  --orange: #ff6f00;

  --bg: #f6f8fb;
  --surface: #ffffff;
  --fg: #16202e;
  --muted: #566376;
  --line: #dce3ec;
  --link: #1565c0;
  --soft: #eaf0f8;

  /* Acentos de dominio: los mismos que la app (src/theme/theme.ts). */
  --c-blue: #1976d2;
  --c-purple: #7b1fa2;
  --c-orange: #e64a19;
  --c-green: #388e3c;
  --c-teal: #00838f;
  --c-brown: #5d4037;

  --radius: 18px;
  --shadow: 0 1px 2px rgb(16 32 64 / 6%), 0 8px 24px rgb(16 32 64 / 8%);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1018;
    --surface: #131b26;
    --fg: #e5eaf1;
    --muted: #9aa7b8;
    --line: #243041;
    --link: #8ab8ff;
    --soft: #172233;
    --c-blue: #64a8f0;
    --c-purple: #c27ad8;
    --c-orange: #ff8a5c;
    --c-green: #6cc070;
    --c-teal: #4fc3cf;
    --c-brown: #c19a8b;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--link); }
img { display: block; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
@media (min-width: 720px) { .wrap { padding-left: 32px; padding-right: 32px; } }

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  background: var(--surface); color: var(--fg); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn:hover { transform: translateY(-1px); }
.btn-store { background: #fff; color: var(--brand); cursor: default; }
.btn-store:hover { transform: none; }
.btn-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 45%); }
.btn-ghost:hover { background: rgb(255 255 255 / 10%); }
.btn-light { background: #fff; color: var(--brand); margin-top: 28px; }
.btn-primary { background: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary { background: #2f6fd6; } }

.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #ffb06b; margin-bottom: 14px;
}
.eyebrow-dark { color: var(--orange); }
@media (prefers-color-scheme: dark) { .eyebrow-dark { color: #ffa057; } }

/* ---------- Cabecera / héroe ---------- */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1200px 600px at 85% 20%, #1a5bc4 0%, transparent 60%),
    linear-gradient(160deg, var(--brand) 0%, var(--brand-deep) 100%);
  padding-bottom: 72px;
}

.hero-orbit {
  position: absolute; width: 900px; height: 900px; right: -260px; top: -120px;
  pointer-events: none; opacity: .9;
}
.hero-orbit circle { fill: none; stroke: rgb(255 255 255 / 9%); stroke-width: 1.5; }
.hero-orbit-arrow { transform-origin: 300px 300px; animation: orbit 60s linear infinite; }
.hero-orbit-arrow path { fill: var(--orange); }
@keyframes orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-orbit-arrow { animation: none; } }

.topbar {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 20px; padding-bottom: 20px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem;
}
.logo img { border-radius: 10px; box-shadow: 0 0 0 1px rgb(255 255 255 / 20%); }
.nav-links { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav-links a {
  color: rgb(255 255 255 / 85%); text-decoration: none; font-size: .95rem;
  padding: 8px 12px; border-radius: 999px;
}
.nav-links a:hover { color: #fff; background: rgb(255 255 255 / 10%); }
@media (max-width: 560px) { .nav-links li:not(:first-child) { display: none; } }

.hero-body {
  position: relative; display: grid; gap: 56px; align-items: center;
  padding-top: 32px;
}
@media (min-width: 900px) {
  .hero-body { grid-template-columns: 1.05fr .95fr; padding-top: 48px; }
}

.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -.02em; }
.hero-lead { margin-top: 20px; font-size: 1.15rem; color: var(--brand-ink); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-tags {
  list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px;
  color: rgb(255 255 255 / 80%); font-size: .95rem;
}
.hero-tags li { display: inline-flex; align-items: center; gap: 8px; }
.hero-tags li::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange);
}

/* Móvil de ejemplo: una ilustración en HTML del día de Toledo del tutorial, no una captura. */
.hero-visual { position: relative; display: flex; justify-content: center; padding: 8px 0 24px; }

.phone {
  width: min(300px, 78vw);
  border-radius: 40px;
  padding: 10px;
  background: #0d1420;
  box-shadow: 0 0 0 1.5px rgb(255 255 255 / 14%), 0 30px 60px rgb(0 0 0 / 35%);
  transform: rotate(-2deg);
}
.phone-screen {
  border-radius: 31px; overflow: hidden; background: #f6f8fb; color: #16202e;
  padding: 18px 14px 22px; min-height: 520px;
}
.ph-bar { display: flex; align-items: center; gap: 12px; padding: 8px 4px 14px; }
.ph-back {
  width: 10px; height: 10px; border-left: 2.5px solid #16202e; border-bottom: 2.5px solid #16202e;
  transform: rotate(45deg); margin-left: 4px;
}
.ph-title { font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.ph-sub { font-size: .78rem; color: #566376; }
.ph-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px 14px; }
.ph-chip {
  font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  color: var(--k); background: color-mix(in srgb, var(--k) 12%, #fff);
}
.ph-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ph-timeline li {
  display: grid; grid-template-columns: 44px 1fr; align-items: start; gap: 8px;
  background: #fff; border-radius: 14px; padding: 10px 12px;
  box-shadow: 0 1px 2px rgb(16 32 64 / 8%);
  border-left: 4px solid var(--k);
}
.ph-timeline time { font-size: .78rem; font-weight: 700; color: var(--k); padding-top: 1px; }
.ph-timeline span { font-size: .85rem; font-weight: 600; line-height: 1.3; }
.ph-timeline small { display: block; font-weight: 400; font-size: .74rem; color: #566376; margin-top: 2px; }

/* Colores fijos dentro del móvil: la ilustración es siempre en tema claro. */
.c-blue { --k: #1976d2; }
.c-green { --k: #388e3c; }
.c-orange { --k: #e64a19; }
.c-purple { --k: #7b1fa2; }

.pass {
  position: absolute; right: max(0px, calc(50% - 250px)); bottom: -6px;
  width: 200px; padding: 14px 16px 12px; border-radius: 16px;
  background: #fff; color: #16202e;
  box-shadow: 0 20px 40px rgb(0 0 0 / 30%);
  transform: rotate(4deg);
}
.pass-kicker { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #566376; }
.pass-route { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 4px; font-size: 1.35rem; }
.pass-route svg { width: 20px; height: 20px; fill: var(--orange); transform: rotate(90deg); }
.pass-meta { display: flex; justify-content: space-between; font-size: .72rem; color: #566376; }
/* Barras en SVG, no con un degradado repetido: con la tarjeta girada, el degradado se
   rasteriza con moiré y el código se ve ondulado. */
.pass-code { display: block; width: 100%; height: 34px; margin: 10px 0 8px; fill: #16202e; }
.pass-offline { font-size: .7rem; font-weight: 600; color: #388e3c; display: flex; align-items: center; gap: 6px; }
.pass-offline::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.pass-meta span { white-space: nowrap; }

@media (max-width: 420px) {
  .pass { width: 176px; right: 0; bottom: -18px; padding: 12px 12px 10px; }
  .pass-route { font-size: 1.15rem; }
  .pass-meta { font-size: .64rem; gap: 6px; }
}

/* El guion de la marca no debe partir el nombre entre dos líneas. */
.nb { white-space: nowrap; }

/* ---------- Pilares ---------- */

.pillars {
  position: relative; z-index: 1;
  display: grid; gap: 16px; margin-top: -36px;
}
@media (min-width: 800px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillars article {
  background: var(--surface); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow);
}
.pillar-icon {
  width: 44px; height: 44px; padding: 10px; border-radius: 12px;
  fill: var(--brand); background: var(--soft);
}
@media (prefers-color-scheme: dark) { .pillar-icon { fill: #8ab8ff; } }
.pillars h2 { font-size: 1.15rem; margin: 16px 0 6px; }
.pillars p { color: var(--muted); font-size: .98rem; }

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

.section { padding-top: 96px; padding-bottom: 8px; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -.015em; }
.section-head p:not(.eyebrow) { margin-top: 14px; color: var(--muted); font-size: 1.08rem; }

.features { display: grid; gap: 16px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; transition: border-color .15s ease, transform .15s ease;
}
.feature:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); transform: translateY(-2px); }
.feature svg {
  width: 44px; height: 44px; padding: 10px; border-radius: 12px;
  fill: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent);
}
.feature h3 { font-size: 1.1rem; margin: 16px 0 6px; }
.feature p { color: var(--muted); font-size: .97rem; }

/* Pasos */
.steps-section { padding-bottom: 0; }
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; gap: 16px;
}
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.steps li {
  counter-increment: step; position: relative;
  padding: 24px; border-radius: var(--radius); background: var(--soft);
}
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 16px;
}
.steps h3 { font-size: 1.1rem; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: .97rem; }
.steps-note { margin-top: 24px; color: var(--muted); max-width: 720px; }

/* Privacidad */
.privacy {
  margin-top: 96px; color: #fff;
  background:
    radial-gradient(800px 400px at 10% 0%, #1a5bc4 0%, transparent 60%),
    linear-gradient(160deg, var(--brand) 0%, var(--brand-deep) 100%);
  padding: 80px 0;
}
.privacy-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) { .privacy-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.privacy h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -.015em; }
.privacy-lead { margin-top: 16px; color: var(--brand-ink); font-size: 1.08rem; }
.privacy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.privacy-list li {
  position: relative; padding: 16px 18px 16px 52px; border-radius: 14px;
  background: rgb(255 255 255 / 7%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%);
  color: var(--brand-ink);
}
.privacy-list li::before {
  content: ""; position: absolute; left: 18px; top: 19px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.privacy-list b { color: #fff; }

/* Preguntas */
.faq { display: grid; gap: 10px; max-width: 800px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 20px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 32px 18px 0; position: relative;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform .15s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; margin-top: -4px; }

/* Llamada final */
.cta {
  display: grid; justify-items: center; text-align: center; gap: 16px;
  padding-top: 96px; padding-bottom: 96px;
}
.cta img { border-radius: 16px; box-shadow: var(--shadow); }
.cta h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-top: 8px; }
.cta p { color: var(--muted); max-width: 34em; }
.cta .btn { margin-top: 8px; }

/* Pie */
.footer { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: .92rem; }
.footer-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.logo-dark { color: var(--fg); font-size: 1rem; }
.logo-dark img { border-radius: 8px; box-shadow: none; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-note { color: var(--muted); width: 100%; }

/* ---------- Páginas interiores (política de privacidad) ---------- */

.hero-compact { padding-bottom: 48px; }
.hero-compact .hero-orbit { width: 640px; height: 640px; right: -200px; top: -200px; }
.page-head { position: relative; padding-top: 24px; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.02em; margin-top: 20px; }
.page-meta { margin-top: 10px; color: var(--brand-ink); opacity: .85; font-size: .95rem; }

.back {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 16px 0 12px; border-radius: 999px;
  color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem;
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 40%);
}
.back::before {
  content: ""; width: 8px; height: 8px; margin-left: 4px;
  border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
}
.back:hover { background: rgb(255 255 255 / 10%); }
.back-dark { color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--line); }
.back-dark:hover { background: var(--soft); }

.doc { max-width: 800px; padding-top: 48px; padding-bottom: 72px; }
.doc .lead { font-size: 1.12rem; }
.doc h2 { font-size: 1.35rem; margin: 44px 0 12px; color: var(--fg); }
.doc p, .doc ul { margin: 0 0 14px; }
.doc p, .doc li { color: var(--fg); }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--orange); }
.doc-back { margin-top: 48px !important; }

.doc table {
  width: 100%; border-collapse: separate; border-spacing: 0; font-size: .95rem; margin: 8px 0 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.doc th, .doc td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.doc tr:last-child td { border-bottom: none; }
.doc th { background: var(--soft); color: var(--muted); font-weight: 600; font-size: .85rem; }
.doc td:first-child { font-weight: 600; width: 22%; }
@media (max-width: 640px) {
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: auto; }
  .doc table { background: none; border: none; }
  .doc thead { display: none; }
  .doc tr { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px 0; margin-bottom: 12px; }
  .doc td { border: none; padding: 6px 16px; }
  .doc td:first-child { width: auto; }
  .doc td::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 600; color: var(--muted); }
}
