:root {
  --navy: #0b1f3a;
  --navy-2: #143154;
  --blue: #1f5c93;
  --blue-2: #2f74b3;
  --sky: #e8f1f8;
  --mist: #f4f7fb;
  --line: #d5e0ea;
  --ink: #172433;
  --muted: #5c6d7e;
  --white: #ffffff;
  --danger: #8d2e2e;
  --ok: #1d6a43;
  --shadow: 0 18px 50px rgba(11, 31, 58, 0.08);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 4vw, 3.5rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.6rem, 2.4vw, 2.15rem); margin: 0 0 .8rem; }
h3 { font-size: 1.25rem; margin: 0 0 .4rem; }
p { margin: 0 0 1rem; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--navy);
  color: white;
  padding: .6rem .8rem;
  z-index: 20;
}
.skip:focus { top: 1rem; }

#app { display: block; }

.setup-card {
  width: min(460px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem 1.5rem;
}
.setup-card h1 { font-size: 1.85rem; }
.field { margin-bottom: 1rem; }
.field label, .check span { display: block; font-size: .92rem; font-weight: 650; margin-bottom: .4rem; }
.field input, .field select, .field textarea, .combo input {
  width: 100%;
  border: 1px solid #b7c6d4;
  background: white;
  border-radius: 4px;
  padding: .75rem .8rem;
  outline: none;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .combo input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 92, 147, .15); }
.field-error { color: var(--danger); font-size: .88rem; margin: .35rem 0 0; }
.hint { color: var(--muted); font-size: .88rem; margin: .35rem 0 0; }

.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  padding: .85rem 1.1rem;
  font-weight: 650;
  letter-spacing: .02em;
  cursor: pointer;
}
.btn:hover { background: var(--navy-2); }
.btn-line { background: transparent; color: var(--navy); }
.btn-line:hover { background: var(--sky); }
.btn-block { width: 100%; }
.btn-small { padding: .65rem .9rem; }

.topline, .header-inner, .wrap, .footer-inner { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
.topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  background: var(--navy);
  color: #d5e4f2;
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .45rem 0;
}
.header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 4.4rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--navy); text-decoration: none; margin-right: auto; }
.brand-mark { width: .7rem; height: 1.7rem; background: var(--blue); border-radius: 1px; }
.brand-name { font-family: var(--serif); font-size: 1.2rem; letter-spacing: -.03em; line-height: 1.15; max-width: 16rem; }
.nav { display: flex; align-items: center; gap: .2rem; }
.nav a, .drop > button {
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: 0;
  padding: .7rem .65rem;
  cursor: pointer;
}
.nav a[aria-current="page"], .drop.current > button { color: var(--blue); box-shadow: inset 0 -2px 0 var(--blue); }
.drop { position: relative; }
.drop-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 16rem;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: .4rem;
}
.drop:hover .drop-panel, .drop:focus-within .drop-panel, .drop.open .drop-panel { display: grid; }
.drop-panel a { padding: .7rem .8rem; }
.drop-panel a:hover { background: var(--mist); }
.nav-check { position: absolute; left: 0; top: 0; opacity: 0; appearance: none; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 4px; padding: .5rem .7rem; cursor: pointer; }

.hero { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 34rem; background: var(--navy); color: white; }
.hero-copy { padding: clamp(2rem, 6vw, 5rem) 0 clamp(2rem, 6vw, 5rem) max(1rem, calc((100% - var(--max)) / 2 + 1rem)); }
.hero h1, .hero p { color: white; }
.kicker { color: #9dc0df; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .8rem; }
.lead { font-size: 1.15rem; max-width: 38rem; }
.scope { color: #c5d6e6; font-size: .95rem; max-width: 38rem; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.3rem 0; }
.hero .btn { background: white; color: var(--navy); border-color: white; }
.hero .btn-line { background: transparent; color: white; border-color: rgba(255,255,255,.5); }
.hero-media { position: relative; min-height: 18rem; }
.hero-media img, .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-media figcaption, .frame figcaption { position: absolute; left: .8rem; bottom: .8rem; background: rgba(11,31,58,.82); color: white; font-size: .78rem; padding: .35rem .5rem; }

.section { padding: 4.2rem 0; }
.section-mist { background: var(--mist); }
.section-head { max-width: 42rem; margin-bottom: 1.8rem; }
.section-head p:last-child { margin-bottom: 0; color: var(--muted); }

.module-grid, .card-grid, .value-grid, .reason-grid { display: grid; gap: 1rem; }
.module-grid { grid-template-columns: repeat(4, 1fr); }
.card-grid, .reason-grid { grid-template-columns: repeat(3, 1fr); }
.value-grid { grid-template-columns: repeat(4, 1fr); }
.module, .card, .reason, .value {
  display: block;
  background: white;
  border: 1px solid var(--line);
  padding: 1.15rem;
  text-decoration: none;
  color: inherit;
  min-height: 100%;
}
.module:hover, .card:hover { border-color: var(--blue); }
.module-index, .step-num { color: var(--blue); font-weight: 700; letter-spacing: .08em; }
.module-go { display: inline-block; margin-top: .8rem; color: var(--blue); font-weight: 650; }
.card p, .reason p, .value p, .module p { color: var(--muted); }

.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; }
.frame { position: relative; min-height: 22rem; background: var(--navy); }
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.2rem; }
.anchor { scroll-margin-top: 5.5rem; }

.service { padding: 1.5rem 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; }
.service ul, .plain-list { margin: .4rem 0 1rem; padding-left: 1.1rem; }
.service li, .plain-list li { margin: .25rem 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li { display: grid; grid-template-columns: 3.2rem 1fr; gap: 1rem; position: relative; padding-bottom: 1.4rem; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 1rem; top: 2.3rem; bottom: .2rem; width: 1px; background: var(--line); }
.step-num { width: 2.1rem; height: 2.1rem; border: 1px solid var(--blue); border-radius: 50%; display: grid; place-items: center; background: white; }

.crumbs { display: flex; flex-wrap: wrap; gap: .35rem; color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.page-hero { padding: 3rem 0 1rem; }
.page-hero p { max-width: 42rem; color: var(--muted); }

.faq details { border-top: 1px solid var(--line); padding: .9rem 0; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq details p { color: var(--muted); margin: .7rem 0 0; }

.layout { display: grid; grid-template-columns: 1.4fr .8fr; gap: 1.5rem; align-items: start; }
.panel { background: var(--mist); border: 1px solid var(--line); padding: 1.1rem; }
.notice { border: 1px solid #e2c4c4; background: #fbf4f4; color: #6d2424; padding: .9rem 1rem; margin: 0 0 1rem; }
.notice.ok { border-color: #b7d8c6; background: #f1f8f4; color: #145233; }
.check { display: flex; gap: .65rem; align-items: flex-start; margin: .85rem 0; }
.check input { margin-top: .3rem; }
.check span { font-weight: 450; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.pendiente { display: inline; border-bottom: 1px dashed var(--blue); background: var(--sky); padding: 0 .2rem; }
.nota-legal { border-left: 3px solid var(--blue); background: var(--sky); padding: .9rem 1rem; margin: 1rem 0 1.4rem; }
.edit-link { font-size: .9rem; }

.cookie {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 30;
  width: min(46rem, calc(100% - 2rem)); background: white; color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--shadow); padding: 1.1rem;
}
.cookie h2 { font-size: 1.35rem; }
.cookie-actions, .modal-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.modal-back { position: fixed; inset: 0; background: rgba(11,31,58,.48); z-index: 40; display: grid; place-items: center; padding: 1rem; }
.modal { width: min(40rem, 100%); background: white; padding: 1.2rem; max-height: min(88vh, 44rem); overflow: auto; }
.switch { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding: .8rem 0; }
.switch p { margin: .2rem 0 0; color: var(--muted); font-size: .92rem; }

.footer { background: var(--navy); color: #d5e2ee; padding: 3rem 0 1.4rem; margin-top: 2rem; }
.footer a { color: white; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .9fr; gap: 1.5rem; }
.footer h2 { color: white; font-size: 1.15rem; }
.footer p, .footer li { color: #c5d4e2; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin: .35rem 0; }
.footer .as-link { background: none; border: 0; padding: 0; color: white; cursor: pointer; font: inherit; text-align: left; }
.footer .as-link:hover { text-decoration: underline; }
.legal-line { border-top: 1px solid rgba(255,255,255,.15); margin-top: 1.5rem; padding-top: 1rem; font-size: .92rem; }

.combo { position: relative; }
.combo-row { display: grid; grid-template-columns: 1fr auto; }
.combo-row button { border: 1px solid #b7c6d4; border-left: 0; background: var(--mist); padding: 0 .8rem; cursor: pointer; }
.combo-list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); max-height: 16rem; overflow: auto; background: white; border: 1px solid var(--line); box-shadow: var(--shadow); margin: 0; padding: .25rem; list-style: none; }
.combo-list button { width: 100%; text-align: left; background: none; border: 0; padding: .55rem .6rem; cursor: pointer; }
.combo-list button[aria-selected="true"], .combo-list button:hover { background: var(--sky); }
.config-block { margin: 2rem 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }

:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 980px) {
  .hero, .split, .layout, .footer-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 2.5rem 1rem; }
  .module-grid, .value-grid { grid-template-columns: 1fr 1fr; }
  .card-grid, .reason-grid { grid-template-columns: 1fr 1fr; }
  .service { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: white; border-bottom: 1px solid var(--line); padding: .4rem 1rem 1rem; flex-direction: column; align-items: stretch; }
  .nav-check:checked ~ .nav, .header.open .nav { display: flex; }
  .drop-panel { position: static; display: grid; box-shadow: none; border: 0; padding: 0 0 .4rem .6rem; }
  .header .btn-small { display: none; }
}
@media (max-width: 640px) {
  .module-grid, .card-grid, .reason-grid, .value-grid, .two { grid-template-columns: 1fr; }
  .topline { display: none; }
  .cookie-actions, .modal-actions { flex-direction: column; }
  .cookie-actions .btn, .modal-actions .btn { width: 100%; }
}
