/* ─────────────────────────────────────────────────────────────
   Portada (index.html). Hoja propia: no comparte reglas con estilos.css.
   Modo claro = propuesta original · modo oscuro = variante B (hero azul noche).
   El tema lo pone theme.js en <html data-theme="light|dark">.
   ───────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #F2F4EA;
  --fg: #01070A;
  --mute: #53606a;
  --blue: #07456b;
  --hero: #07456b;
  --cream: #F2F4EA;
  --line: rgba(1, 7, 10, .14);
  --card: #fff;
  --num: #07456b;
  --field: #fff;
  --danger: #b3261e;
  --ok: #1f7a4d;
  color-scheme: light;
}
/* Sin JavaScript: seguir al dispositivo */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #01070A; --fg: #F2F4EA; --mute: #98a5a8; --hero: #04263b;
    --line: rgba(242, 244, 234, .16); --card: #0a1418; --num: #6fb1da; --field: #01070A;
    --danger: #f2a29c; --ok: #7fd3a7; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #01070A;
  --fg: #F2F4EA;
  --mute: #98a5a8;
  --hero: #04263b;
  --line: rgba(242, 244, 234, .16);
  --card: #0a1418;
  --num: #6fb1da;
  --field: #01070A;
  --danger: #f2a29c;
  --ok: #7fd3a7;
  color-scheme: dark;
}

html { scroll-behavior: smooth; scroll-padding-top: env(safe-area-inset-top, 0px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.65 "Montserrat", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ── Hero ── */
.hero {
  background: var(--hero);
  color: var(--cream);
  padding-top: env(safe-area-inset-top, 0px);
  min-height: 92vh;
  display: flex;
  flex-direction: column;
}
.hero .wrap { flex: 1; display: flex; flex-direction: column; width: 100%; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 26px 0; }
.brand { font-size: .85rem; font-weight: 500; white-space: nowrap; }

/* Píldoras del menú (bordes redondeados, como en la portada anterior) */
.pills { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid rgba(242, 244, 234, .75);
  color: var(--cream);
  border-radius: 999px;
  padding: .45rem 1.1rem;
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
a.pill:hover, a.pill:focus-visible { background: var(--cream); border-color: var(--cream); color: var(--hero); outline: none; }
.pill.is-soon { opacity: .45; border-style: dashed; cursor: default; }

/* Botón de tema (lo crea theme.js dentro de [data-theme-slot]) */
.pills .theme-toggle {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(242, 244, 234, .75);
  border-radius: 50%;
  background: none;
  color: var(--cream);
  cursor: pointer;
  padding: 0;
  transition: background .15s, color .15s;
}
.pills .theme-toggle:hover, .pills .theme-toggle:focus-visible { background: var(--cream); color: var(--hero); outline: none; }
.theme-toggle .ic-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }

.hero-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 6vh 0 8vh; }
.mark { font-weight: 800; font-size: clamp(4.5rem, 21vw, 15rem); letter-spacing: -.055em; line-height: .9; margin: 0; }
.hero-body p { max-width: 40ch; font-size: 1.15rem; margin: 28px 0 0; opacity: .88; }
.hero-foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-bottom: 32px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; opacity: .7;
}

/* ── Secciones ── */
section { padding: 96px 0; }
section.flush { padding-top: 0; }
section.divided { border-top: 1px solid var(--line); }
.tag { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--mute); }
h2 { font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -.035em; line-height: 1.12; margin: 14px 0 0; max-width: 22ch; }

.flow { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 56px; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--card); }
.step { padding: 36px 32px 40px; border-right: 1px solid var(--line); }
.step:last-child { border: 0; }
.step b { display: block; font-size: .8rem; font-weight: 600; color: var(--num); margin-bottom: 56px; }
.step h3 { margin: 0 0 10px; font-size: 1.2rem; font-weight: 600; letter-spacing: -.02em; }
.step p { margin: 0; color: var(--mute); font-size: .95rem; }

.vals { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 56px; }
.vals div { padding: 0 32px 0 0; }
.vals h3 { font-size: 2rem; font-weight: 800; letter-spacing: -.04em; margin: 0 0 12px; }
.vals p { margin: 0; color: var(--mute); font-size: .95rem; }

.quote { background: var(--card); border-radius: 24px; border: 1px solid var(--line); padding: clamp(32px, 6vw, 72px); }
.quote p { margin: 0; font-weight: 600; font-size: clamp(1.3rem, 3vw, 2rem); line-height: 1.35; letter-spacing: -.025em; max-width: 30ch; }
.quote span { display: block; margin-top: 24px; color: var(--mute); font-size: .85rem; }

/* El bloque de contacto mantiene el azul de marca en los dos modos */
.cta {
  background: var(--blue); color: var(--cream); border-radius: 28px; padding: clamp(36px, 6vw, 72px);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px;
}
.cta h2 { margin: 0; max-width: 16ch; }
.cta a { font-weight: 600; font-size: clamp(1.1rem, 3vw, 1.6rem); border-bottom: 2px solid var(--cream); padding-bottom: 4px; }
.cta a:hover { opacity: .85; }

/* ── Formulario de contacto desplegable ── */
.contact-panel {
  margin-top: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(24px, 5vw, 48px);
  scroll-margin-top: 24px;
}
.contact-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.contact-head h3 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }
.contact-sub { margin: 4px 0 0; color: var(--mute); font-size: .95rem; }
.contact-close {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px solid var(--line); background: none; color: var(--fg); font-size: 1rem; cursor: pointer;
}
.contact-close:hover, .contact-close:focus-visible { border-color: var(--fg); outline: none; }
.contact-form { margin-top: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: .8rem; font-weight: 600; color: var(--mute); }
.field input, .field textarea {
  font: inherit; font-size: .95rem; color: var(--fg); background: var(--field);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--num); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn-send {
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  background: var(--blue); color: var(--cream); border: 0; border-radius: 999px; padding: 12px 26px;
}
.btn-send:hover { opacity: .9; }
.btn-send:disabled { opacity: .6; cursor: default; }
.form-error { color: var(--danger); font-size: .9rem; margin: 0 0 12px; }
.form-success { color: var(--ok); font-weight: 600; margin: 16px 0 0; }
.form-note { color: var(--mute); font-size: .8rem; margin: 16px 0 0; }
.form-note a { text-decoration: underline; }

footer {
  padding: 16px 0 calc(40px + env(safe-area-inset-bottom, 0px));
  color: var(--mute); font-size: .8rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
}
footer a:hover { color: var(--fg); }

/* ── Móvil ── */
@media (max-width: 860px) {
  .bar { flex-direction: column; align-items: flex-start; gap: 14px; }
  .pills { justify-content: flex-start; gap: 6px; }
  .pill { padding: .38rem .8rem; font-size: .8rem; }
  .pills .theme-toggle { width: 32px; height: 32px; }
}
@media (max-width: 720px) {
  .flow, .vals, .form-row { grid-template-columns: 1fr; }
  .form-row { gap: 0; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .step b { margin-bottom: 24px; }
  .vals div { padding: 0 0 32px; }
  section { padding: 64px 0; }
}
