/* BastaGestion · web de producto */

/* ---------- Fuentes (alojadas en el propio sitio, licencia OFL) ---------- */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/bricolage-grotesque-700.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/bricolage-grotesque-800.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/source-sans-3-400.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/source-sans-3-600.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/source-sans-3-700.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --green: #1F4D2E;
  --green-2: #2E6B3F;
  --cream: #F5F0E4;
  --paper: #FBF8F1;
  --line: #E2D9C5;
  --field: #B9AE95;
  --ink: #1C2A20;
  --muted: #3F4B42;
  --muted-2: #4F5B52;
  --gold: #F1D98A;
  --black: #111A14;

  --font-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1200px;
  --gutter: 32px;
  --section-y: 96px;
  --r-btn: 12px;
  --r-card: 20px;
  --header-h: 76px;
}

@media (max-width: 760px) {
  :root { --gutter: 20px; --section-y: 56px; --header-h: 64px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}
@media (max-width: 760px) { body { font-size: 17px; } }

h1, h2, h3 { font-family: var(--font-display); color: var(--green); margin: 0; }
h1 { font-size: 64px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; }
h2 { font-size: 44px; font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
h3 { font-size: 22px; font-weight: 700; line-height: 1.25; }
@media (max-width: 760px) {
  h1 { font-size: 42px; }
  h2 { font-size: 32px; }
  h3 { font-size: 20px; }
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { display: block; }

:focus-visible {
  outline: 3px solid var(--green-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--green);
  color: #fff;
  border-radius: var(--r-btn);
}
.skip:focus { top: 12px; }

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.narrow { max-width: 820px; }

.icon {
  width: 24px; height: 24px;
  flex: none;
  fill: none;
  stroke: var(--green);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-lg { width: 32px; height: 32px; }

.eyebrow {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--green-2);
  margin-bottom: 14px;
}
@media (max-width: 760px) { .eyebrow { font-size: 13px; } }

.lead { color: var(--muted); }
.small { font-size: 15px; color: var(--muted-2); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--r-btn);
  border: 2px solid var(--green);
  font: 700 17px/1.2 var(--font-body);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--black); border-color: var(--black); }
.btn-secondary { background: transparent; color: var(--green); }
.btn-secondary:hover { background: var(--green); color: #fff; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font: 800 22px/1 var(--font-display);
  color: var(--green);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand-logo {
  width: 44px; height: 33px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-desktop { margin-left: auto; }
.nav-desktop ul { display: flex; gap: 4px; }
.nav-desktop a,
.nav-mobile nav a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}
.nav-desktop a:hover { color: var(--green); text-decoration: underline; }

.header-actions { display: flex; align-items: center; gap: 16px; }

.lang { display: flex; align-items: center; font-weight: 700; font-size: 15px; }
.lang li + li::before { content: "|"; color: var(--field); padding: 0 2px; }
.lang li { display: flex; align-items: center; }
.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--muted-2);
  text-decoration: none;
}
.lang a[aria-current="page"] { color: var(--green); text-decoration: underline; text-decoration-thickness: 2px; }
.lang a:hover { color: var(--green); }

.btn-header { min-height: 44px; padding: 10px 18px; font-size: 16px; }

/* Menú móvil: <details> sin JS */
.nav-mobile { display: none; position: relative; }
.nav-mobile summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border: 2px solid var(--green);
  border-radius: var(--r-btn);
  cursor: pointer;
  list-style: none;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile[open] summary { background: var(--green); }
.nav-mobile[open] summary .icon { stroke: #fff; }
.nav-mobile nav {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(300px, calc(100vw - 2 * var(--gutter)));
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: 0 12px 32px rgba(17, 26, 20, .14);
}
.nav-mobile nav a:not(.btn) { min-height: 48px; font-size: 18px; }
.nav-mobile nav .btn { width: 100%; margin-top: 8px; }

@media (max-width: 1100px) {
  .nav-desktop { display: none; }
  .header-actions { margin-left: auto; }
  .nav-mobile { display: block; }
}
@media (max-width: 760px) {
  .btn-header { display: none; }
  .header-inner { gap: 12px; }
  .header-actions { gap: 4px; }
  .brand { font-size: 19px; gap: 8px; }
  .brand-logo { width: 32px; height: 24px; }
  .lang li + li::before { padding: 0; }
  .nav-mobile summary { width: 44px; height: 44px; }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--section-y); }
.section-alt { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head .lead { margin-top: 16px; font-size: 20px; }
@media (max-width: 760px) {
  .section-head { margin-bottom: 32px; }
  .section-head .lead { font-size: 18px; }
}

/* ---------- Hero ---------- */
.hero { padding-block: 72px var(--section-y); }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 48px;
}
.hero-text .lead { margin-top: 24px; font-size: 20px; max-width: 34em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 20px; }

@media (max-width: 1100px) {
  .hero { padding-top: 56px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { justify-self: center; }
}
@media (max-width: 760px) {
  .hero { padding-top: 40px; }
  .hero-text .lead { font-size: 18px; }
  .hero-ctas .btn { flex: 1 1 auto; }
}

/* Composición de dispositivos (todo en em: --u = 1em) */
.devices {
  position: relative;
  font-size: 10px;
  width: 64em;
  height: 47em;
  font-family: var(--font-body);
  line-height: 1.25;
  user-select: none;
}
@media (min-width: 1101px) and (max-width: 1279px) {
  .devices { font-size: 0.8vw; }
}

.screen { background: var(--paper); color: var(--ink); overflow: hidden; }

.tablet {
  position: absolute;
  left: 0; top: 0;
  width: 50em;
  height: 34em;
  padding: 1.4em;
  background: var(--black);
  border-radius: 2.8em;
  box-shadow: 0 2.4em 4.8em rgba(17, 26, 20, .18);
}
.tablet-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 1.6em;
}
.t-bar {
  padding: 1em 1.6em;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 1.3em;
}
.t-body { flex: 1; display: grid; grid-template-columns: 15.5em 1fr; min-height: 0; }
.t-main { padding: 1.2em 1.4em; }
.t-tabs { display: flex; gap: .6em; margin-bottom: 1.2em; }
.t-tabs span {
  padding: .45em 1em;
  border-radius: 99em;
  border: 1px solid var(--line);
  font-size: 1.1em;
  font-weight: 600;
  color: var(--muted);
}
.t-tabs .is-active { background: var(--green); border-color: var(--green); color: #fff; }
.t-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9em; }
.t-prod {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .6em;
  min-height: 7.4em;
  padding: 1em;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.2em;
}
.t-prod span { font-size: 1.15em; font-weight: 600; line-height: 1.2; }
.t-prod b { font-size: 1.25em; color: var(--green); }

.t-note {
  display: flex;
  flex-direction: column;
  gap: .7em;
  padding: 1.2em;
  background: var(--cream);
  border-right: 1px solid var(--line);
  order: -1;
}
.t-note-title { font-family: var(--font-display); font-weight: 800; font-size: 1.4em; color: var(--green); }
.t-line { display: flex; justify-content: space-between; gap: .6em; font-size: 1.05em; color: var(--muted); }
.t-total {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: .7em;
  border-top: 1px solid var(--line);
  font-weight: 700;
  font-size: 1.3em;
}
.t-pay {
  padding: .8em;
  background: var(--green);
  color: #fff;
  border-radius: .9em;
  text-align: center;
  font-weight: 700;
  font-size: 1.1em;
}

.phone {
  position: absolute;
  right: 0; bottom: 0;
  width: 22em;
  height: 44em;
  padding: 1em;
  background: var(--black);
  border-radius: 4.4em;
  box-shadow: 0 2.4em 4.8em rgba(17, 26, 20, .25);
}
.phone-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 3.4em;
}
.p-bar {
  padding: 2.6em 1.6em .9em;
  font-weight: 700;
  font-size: 1.2em;
  text-align: center;
  color: var(--green);
  border-bottom: 1px solid var(--line);
}
.p-body { flex: 1; padding: 1.2em 1.4em; display: flex; flex-direction: column; gap: .9em; }
.p-hello { font-family: var(--font-display); font-weight: 800; font-size: 1.5em; color: var(--green); line-height: 1.1; }
.p-num { font-size: 1.05em; color: var(--muted); margin-top: -.5em; }
.p-balance {
  padding: 1.2em;
  background: var(--green);
  color: #fff;
  border-radius: 1.4em;
}
.p-balance-label { font-size: 1.05em; }
.p-balance-value { font-family: var(--font-display); font-weight: 800; font-size: 2.6em; color: var(--gold); line-height: 1.1; }
.p-balance-sub { font-size: 1em; }
.p-add {
  margin-top: .8em;
  padding: .55em;
  background: #fff;
  color: var(--green);
  border-radius: .8em;
  text-align: center;
  font-weight: 700;
  font-size: 1.05em;
}
.p-card {
  padding: .8em 1em;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.1em;
  font-size: 1.05em;
  color: var(--muted);
}
.p-card-title { font-weight: 700; color: var(--ink); }
.p-nav {
  display: flex;
  justify-content: space-between;
  padding: .9em .8em 1.8em;
  background: var(--green);
  color: #fff;
  font-size: .85em;
  font-weight: 600;
}
.p-nav .is-active { color: var(--gold); }

/* Móvil: solo el teléfono */
@media (max-width: 760px) {
  .devices { font-size: 11px; width: 22em; height: 44em; }
  .tablet { display: none; }
}

/* ---------- Franja de ventajas ---------- */
.perks { background: var(--paper); border-block: 1px solid var(--line); }
.perks-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-block: 28px;
}
.perks-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--green);
  line-height: 1.3;
}
.perks-list .icon { width: 28px; height: 28px; }
@media (max-width: 1100px) { .perks-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .perks-list { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- Rejillas y tarjetas ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 1100px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 16px; }
}

.card {
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.card h3 { margin: 18px 0 8px; }
.card p { color: var(--muted); }

.blocks h3 { margin: 18px 0 8px; }
.blocks p { color: var(--muted); }
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px; height: 60px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}

/* ---------- Para la junta ---------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split .lead { margin-top: 16px; font-size: 20px; }
.checks { display: grid; gap: 14px; margin-top: 28px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks .icon { stroke: var(--green-2); margin-top: 2px; }

.summary-card {
  padding: 36px;
  background: var(--green);
  color: #fff;
  border-radius: var(--r-card);
}
.summary-card h3 { color: #fff; margin-bottom: 20px; }
.summary-card dl { margin: 0; }
.summary-card dl > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-block: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}
.summary-card dt { font-size: 18px; }
.summary-card dd { margin: 0; font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
.summary-card .summary-total { border-bottom: 0; padding-top: 20px; }
.summary-card .summary-total dt { font-weight: 700; font-size: 20px; }
.summary-card .summary-total dd { font-family: var(--font-display); font-weight: 800; font-size: 40px; color: var(--gold); line-height: 1; }
.summary-note { margin-top: 12px; font-size: 15px; color: #E4ECE6; }

@media (max-width: 1100px) { .split { gap: 40px; } }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .split .lead { font-size: 18px; }
  .summary-card { padding: 28px 24px; }
  .summary-card .summary-total dd { font-size: 34px; }
}

/* ---------- Planes ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 24px 24px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.plan h3 { min-height: 2.5em; }
.plan-tagline { margin: 8px 0 20px; color: var(--muted); min-height: 3.1em; }
.plan-items { display: grid; gap: 10px; margin-bottom: 28px; flex: 1; align-content: start; }
.plan-items li { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; line-height: 1.35; }
.plan-items .yes .icon { stroke: var(--green-2); width: 22px; height: 22px; }
.plan-items .no { color: var(--muted-2); }
.plan-items .dash { display: inline-flex; justify-content: center; width: 22px; flex: none; color: var(--field); }
.plan .btn { width: 100%; }

.plan-featured { border: 2px solid var(--green); background: var(--paper); padding: 27px 23px 23px; }
.plan-badge {
  position: absolute;
  top: -14px;
  left: 22px;
  padding: 4px 12px;
  background: var(--green);
  color: #fff;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
}

@media (max-width: 1100px) {
  .plans { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
}
@media (max-width: 760px) {
  .plans { grid-template-columns: 1fr; }
  .plan h3, .plan-tagline { min-height: 0; }
}

/* ---------- Pasos ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: none; }
.steps h3 { margin: 18px 0 8px; }
.steps p { color: var(--muted); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border: 2px solid var(--green-2);
  border-radius: 50%;
  font: 800 24px/1 var(--font-display);
  color: var(--green-2);
}
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Preguntas ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding-block: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
  color: var(--green);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border: 2px solid var(--green);
  border-radius: 50%;
  font: 700 20px/1 var(--font-body);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 48px 24px 0; color: var(--muted); }
@media (max-width: 760px) {
  .faq summary { font-size: 18px; }
  .faq details p { padding-right: 0; }
}

/* ---------- Contacto ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 64px;
  align-items: start;
}
.contact-intro .lead { margin-top: 16px; font-size: 20px; }
.contact-email { margin-top: 24px; font-weight: 700; font-size: 20px; overflow-wrap: anywhere; }

.form {
  display: grid;
  gap: 18px;
  padding: 36px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 16px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  background: #fff;
  border: 1.5px solid var(--field);
  border-radius: var(--r-btn);
  color: var(--ink);
  font: 400 17px/1.4 var(--font-body);
}
.field textarea { resize: vertical; min-height: 120px; }
.field select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F4D2E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline-offset: 1px; border-color: var(--green); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.check-field { display: flex; align-items: flex-start; gap: 12px; }
.check-field input {
  flex: none;
  width: 24px; height: 24px;
  margin: 2px 0 0;
  accent-color: var(--green);
}
.check-field label { font-size: 16px; padding-block: 2px; }

.btn-submit { justify-self: start; min-width: 180px; }
.btn-submit:disabled { opacity: .7; cursor: progress; }
.form-status { font-weight: 700; color: var(--green); }
.form-status:empty { display: none; }
.form-legal { font-size: 15px; color: var(--muted-2); }

@media (max-width: 1100px) {
  .contact { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 760px) {
  .contact-intro .lead { font-size: 18px; }
  .form { padding: 24px 20px; }
  .field-row { grid-template-columns: 1fr; }
  .btn-submit { justify-self: stretch; }
}

/* ---------- Pie ---------- */
.site-footer { background: var(--green); color: #fff; padding-block: 48px; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}
.brand-light { color: #fff; }
.footer-brand p { margin-top: 12px; font-size: 15px; color: #E4ECE6; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #fff;
  font-size: 16px;
}
.site-footer :focus-visible { outline-color: var(--gold); }
@media (max-width: 760px) {
  .footer-links { flex-direction: column; gap: 0; }
}

/* ---------- Páginas legales ---------- */
.legal { max-width: 820px; }
.legal h1 { font-size: 52px; }
.legal-date { margin-top: 12px; color: var(--muted-2); font-size: 16px; }
.legal > p { margin-top: 20px; }
.legal section { margin-top: 48px; }
.legal h2 { font-size: 30px; margin-bottom: 14px; }
.legal section p { color: var(--muted); }
.legal section ul { display: grid; gap: 10px; padding-left: 1.2em; list-style: disc; color: var(--muted); }
.legal section ul li::marker { color: var(--green-2); }

.toc {
  margin-top: 32px;
  padding: 24px 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.toc ol { display: grid; gap: 2px; padding-left: 1.4em; list-style: decimal; }
.toc li::marker { color: var(--green-2); font-weight: 700; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

.legal .callout {
  padding: 28px;
  background: var(--paper);
  border: 2px solid var(--green);
  border-radius: var(--r-card);
}
.legal .callout p { color: var(--ink); }

@media (max-width: 760px) {
  .legal h1 { font-size: 38px; }
  .legal h2 { font-size: 26px; }
  .legal section { margin-top: 36px; }
  .toc, .legal .callout { padding: 20px; }
}

.footer-links a[aria-current="page"] { text-decoration-thickness: 2px; }

/* ---------- Pie siempre abajo + 404 ---------- */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
.page-404 main { display: flex; align-items: center; }
.notfound { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.notfound h1, .notfound h2 { font-size: 48px; font-weight: 800; line-height: 1.1; }
.notfound p { margin: 12px 0 24px; color: var(--muted); font-size: 20px; }
@media (max-width: 760px) {
  .notfound { grid-template-columns: 1fr; gap: 40px; }
  .notfound h1, .notfound h2 { font-size: 34px; }
}

/* ---------- Formulario: estados ---------- */
:root { --error: #9B2C1F; }
.field-error { margin-top: 2px; font-size: 15px; font-weight: 600; color: var(--error); }
.check-field { flex-wrap: wrap; }
.check-field .field-error { flex-basis: 100%; padding-left: 36px; }
.field [aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.check-field [aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 2px; }
.form-status.is-error { color: var(--error); }

/* Avisos tras un envío sin JS: se muestran con el ancla (#enviado / #error) */
.form-notice { display: none; padding: 14px 16px; border: 2px solid var(--green); border-radius: var(--r-btn); background: #fff; font-weight: 700; color: var(--green); }
.form-notice-error { border-color: var(--error); color: var(--error); }
.form-notice:target { display: block; }
.form.is-sending .form-notice { display: none; }
