/* ============================================================
   VeriListo /es/reserva — pre-sale landing + funnel pages
   Loads AFTER /styles.css. Tokens, @font-face, reset, header,
   wordmark, footer and .container come from there; only
   additions live here. Prefixes: lp- landing, ty- thanks,
   ok- confirmed, legal- policy pages, cookie- consent UI.
   ============================================================ */

:root {
  --accent-700: #086B4A;   /* button hover; 6.5:1 with white */
  --radius-lg:  16px;
  --tap:        44px;      /* minimum touch target */
}

/* ============================================================
   Utilities
   ============================================================ */
[hidden] { display: none !important; }

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

/* Anchored sections clear the sticky header */
[id] { scroll-margin-top: 4.5rem; }

/* Skip link (from styles.css) reaches the 44 px target once focused */
.skip-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

/* ============================================================
   Section rhythm — a little tighter than the business-card site
   ============================================================ */
.section { padding-block: clamp(3.25rem, 7vw, 5.5rem); }

.lp-section-head {
  max-width: 46rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.lp-section-head h2 { margin-bottom: 0; }

/* ============================================================
   Header — wordmark + anchors; no language switch on this page
   ============================================================ */
.site-header .wordmark { min-height: var(--tap); }

.site-nav {
  justify-content: flex-end;
  gap: clamp(0.75rem, 2.5vw, 1.75rem);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding-inline: 0.5rem;
}

/* Funnel pages keep their single back-link visible on phones */
@media (max-width: 639px) {
  .site-nav--always { display: flex; }
}

/* ============================================================
   Buttons — all interactive targets are at least 44×44
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.1s ease;
}

.btn:active { transform: translateY(1px); }

/* Fill uses --accent-600: white text reaches 5.1:1 (the lighter --accent gives 3.5:1) */
.btn--primary { background: var(--accent-600); color: var(--on-dark); }
.btn--primary:hover { background: var(--accent-700); }

.btn--dark { background: var(--ink); color: var(--on-dark); }
.btn--dark:hover { background: #163C33; }

/* On the dark hero: mint fill, ink text (8.3:1) */
.btn--mint { background: var(--on-dark-mono); color: var(--ink); }
.btn--mint:hover { background: #82E0BC; }

.btn--lg { font-size: 1.0625rem; padding: 0.875rem 1.75rem; }
.btn--block { width: 100%; }

.btn--link {
  min-height: var(--tap);
  padding: 0.5rem 0.75rem;
  background: none;
  color: var(--accent-600);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.btn--link:hover { color: var(--ink); }

.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ============================================================
   Hero — headline pair is chosen by utm_campaign
   <html data-variant> is set by an inline <head> script before
   first paint, so the wrong headline is never painted.
   Without JS the default (vl_plazo) shows.
   ============================================================ */
[data-vo] { display: none; }

html:not([data-variant]) [data-vo="vl_plazo"],
html[data-variant="vl_plazo"]     [data-vo="vl_plazo"],
html[data-variant="vl_cambio"]    [data-vo="vl_cambio"],
html[data-variant="vl_volumen"]   [data-vo="vl_volumen"],
html[data-variant="vl_autonomos"] [data-vo="vl_autonomos"] {
  display: inline;
}

.lp-hero {
  background: var(--ink);
  padding-block: clamp(2.5rem, 7vw, 5rem);
  border-bottom: 1px solid rgba(95, 211, 168, 0.12);
}

.lp-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.lp-hero__title {
  font-size: clamp(1.875rem, 4.4vw + 0.4rem, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--on-dark);
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

.lp-hero__sub {
  max-width: 52ch;
  margin-bottom: 1.5rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  line-height: 1.6;
  color: var(--on-dark-sub);
}

.lp-hero__visual {
  display: flex;
  justify-content: flex-end;
}

.lp-hero__visual img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: var(--radius);
}

/* Phones and small tablets: text only, so the CTA stays above the fold
   and the decorative SVG is never downloaded (loading="lazy" + display:none) */
@media (max-width: 899px) {
  .lp-hero__grid { grid-template-columns: 1fr; }
  .lp-hero__visual { display: none; }
}

/* ============================================================
   Three pillars — mint cards; row on desktop, column on phones
   ============================================================ */
.lp-pillars {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.lp-pillar {
  background: var(--mint-wash);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.5rem 1.75rem;
}

.lp-pillar__idx {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-600);
}

.lp-pillar__title {
  margin-bottom: 0.625rem;
  font-size: 1.125rem;
  line-height: 1.25;
}

.lp-pillar__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

@media (max-width: 899px) {
  .lp-pillars { grid-template-columns: 1fr; }
}

/* ============================================================
   Plans — 4 columns → 2 → 1. The Profesional card carries a flag;
   every card has a slot for it so prices stay on one line in a row.
   ============================================================ */
.section--plans {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.lp-plans {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.lp-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.lp-plan--featured {
  padding: calc(1.25rem - 1px) calc(1.25rem - 1px) calc(1.5rem - 1px);
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: 0 12px 32px -16px rgba(15, 157, 110, 0.5);
}

.lp-plan__slot {
  min-height: 3.25rem;
  margin-bottom: 0.5rem;
}

.lp-plan__flag {
  display: inline-block;
  padding: 0.3rem 0.625rem;
  border-radius: 6px;
  background: var(--mint-wash);
  color: var(--accent-700);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

.lp-plan__name {
  margin-bottom: 0.25rem;
  font-size: 1.25rem;
}

.lp-plan__quota {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.lp-plan__num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.lp-plan__price {
  margin-block: 1rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.lp-plan__per {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.lp-plan__cta { margin-top: auto; }

.lp-plans__note {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #5C726A;   /* lighter than --ink-soft, still 5.1:1 on --surface (AA) */
}

/* One line once there's room (measured: the text needs ~631px; the
   container clears that with margin from 900px up — the same point
   .lp-plans itself is still 4-up). Wraps normally below that so it
   never pushes the page into horizontal scroll. */
@media (min-width: 900px) {
  .lp-plans__note { white-space: nowrap; }
}

@media (max-width: 999px) {
  .lp-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-plan__slot { min-height: 2rem; }
}

@media (max-width: 599px) {
  .lp-plans { grid-template-columns: 1fr; }
  .lp-plan__slot { min-height: 0; margin-bottom: 0; }
  .lp-plan__slot:empty { display: none; }
  .lp-plan--featured .lp-plan__slot { margin-bottom: 0.5rem; }
}

/* ============================================================
   FAQ — native details/summary, no JS
   ============================================================ */
.lp-faq {
  display: grid;
  gap: 0.625rem;
  max-width: 52rem;
}

.lp-faq__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.lp-faq__item[open] { border-color: #B4D8C9; }

.lp-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding: 0.75rem 1.25rem;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.lp-faq__q::-webkit-details-marker { display: none; }

.lp-faq__q::after {
  content: '';
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  border-right: 2px solid var(--accent-600);
  border-bottom: 2px solid var(--accent-600);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.lp-faq__item[open] .lp-faq__q::after {
  transform: rotate(-135deg) translateY(-2px);
}

.lp-faq__a {
  max-width: 64ch;
  padding: 0 1.25rem 1.25rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ============================================================
   Thanks page (/es/reserva/gracias) and confirmation page
   Dark band with the heading, then two actions side by side on
   desktop: booking (left) and form (right). One column on phones
   in DOM order: paths → booking → form → call link.
   ============================================================ */
.ty-hero {
  background: var(--ink);
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2.25rem, 5vw, 3.5rem);
  border-bottom: 1px solid rgba(95, 211, 168, 0.12);
}

.ty-hero__title {
  max-width: 20ch;
  margin-bottom: 1.25rem;
  font-size: clamp(2.125rem, 5.5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--on-dark);
  text-wrap: balance;
}

.ty-hero__lead {
  max-width: 62ch;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.65;
  color: var(--on-dark-sub);
}

/* Chosen plan — mono chip, hidden until JS knows the plan */
.ty-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(95, 211, 168, 0.35);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--on-dark-mono);
}

.ty-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.ty-paths {
  display: grid;
  gap: 1rem;
}

.ty-path {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.25rem 1.5rem;
  background: var(--mint-wash);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

/* Point marker — the rounded-square motif from the wordmark, so each
   card reads as one distinct point instead of a wall of paragraph text */
.ty-path__mark {
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  margin-top: 0.55em;
  border-radius: 3px;
  background: var(--accent);
}

.ty-path p {
  line-height: 1.65;
  color: var(--ink-soft);
}

.ty-path strong { color: var(--ink); }

.ty-reserve {
  margin-top: 1.5rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px -16px rgba(15, 157, 110, 0.5);
}

.ty-reserve h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
}

.ty-reserve p { color: var(--ink-soft); line-height: 1.65; }

.ty-reserve .btn { margin-top: 1.25rem; }

.ty-reserve__note {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.ty-reserve__note a {
  color: var(--accent-600);
  font-weight: 600;
  text-underline-offset: 0.2em;
}

.ty-form {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.ty-form h2 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

/* Reserved height keeps the layout still while the Tally iframe loads */
/* 34rem is reserved so the real Tally iframe never shifts the layout when it
   loads (CLS); the placeholder before that centers inside the same space
   instead of hugging the top and leaving a dead gap below it. */
.ty-form__mount {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34rem;
}

.ty-form__mount iframe {
  display: block;
  width: 100%;
  min-height: 34rem;
  border: 0;
}

.ty-form__placeholder {
  display: grid;
  place-items: center;
  min-height: 12rem;
  max-width: 28rem;
  margin-inline: auto;
  padding: 1.5rem;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.ty-form__placeholder a {
  color: var(--accent-600);
  font-weight: 600;
  text-underline-offset: 0.2em;
}

.ty-form__done {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--mint-wash);
  color: var(--ink);
  font-weight: 500;
}

.ty-call {
  margin-top: 0.5rem;
  text-align: center;
}

@media (max-width: 899px) {
  .ty-layout { grid-template-columns: 1fr; }
  .ty-form__mount,
  .ty-form__mount iframe { min-height: 30rem; }
}

/* Confirmation card */
.ok-card {
  max-width: 44rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px -16px rgba(15, 157, 110, 0.5);
}

.ok-card p { color: var(--ink-soft); line-height: 1.7; }
.ok-card p + p { margin-top: 0.875rem; }
.ok-card .btn { margin-top: 1.5rem; }

/* ============================================================
   Policy pages — placeholders until the customer sends the texts
   ============================================================ */
.legal { max-width: 46rem; }

.legal h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
}

.legal__pending {
  padding: 1rem 1.25rem;
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-soft);
}

/* ============================================================
   Cookie banner — in normal flow at the very top of the page,
   never fixed or sticky, so it can't cover the "Empezar" buttons.
   Present in the static HTML (no layout shift); the inline <head>
   script sets <html data-consent="set"> to hide it for returning
   visitors before first paint. "Aceptar" and "Rechazar" share size
   and weight: rejecting takes one click, same as accepting.
   ============================================================ */
.cookie-banner {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

html[data-consent="set"] .cookie-banner { display: none; }

.cookie-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 0.875rem;
}

.cookie-banner__text {
  flex: 1 1 24rem;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.cookie-banner__text a {
  color: var(--accent-600);
  text-underline-offset: 0.2em;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.cookie-banner__actions .btn--primary,
.cookie-banner__actions .btn--dark {
  flex: 1 1 8rem;
}

/* Phones: the three buttons share one row, which keeps the banner short */
@media (max-width: 639px) {
  .cookie-banner__actions { width: 100%; flex-wrap: nowrap; }
  .cookie-banner__actions .btn {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 0.5rem;
    font-size: 0.9375rem;
  }
}

/* Preferences dialog — built by JS on demand */
.cookie-dialog {
  width: min(32rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px -20px rgba(14, 42, 36, 0.55);
  overflow: auto;
}

.cookie-dialog::backdrop { background: rgba(14, 42, 36, 0.55); }

.cookie-dialog__body { padding: clamp(1.25rem, 4vw, 1.75rem); }

.cookie-dialog h2 {
  margin-bottom: 0.5rem;
  font-size: 1.375rem;
}

.cookie-dialog__intro {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.cookie-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  min-height: var(--tap);
  padding: 0.875rem 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.cookie-opt input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  accent-color: var(--accent-600);
}

.cookie-opt__name {
  display: block;
  font-weight: 600;
}

.cookie-opt__desc {
  display: block;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.cookie-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.cookie-dialog__actions .btn { flex: 1 1 10rem; }

/* ============================================================
   Footer — operator data (LSSI art. 10), policy links, disclaimer
   ============================================================ */
.site-footer { margin-top: 0; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin-bottom: 0.75rem;
  list-style: none;
}

.footer-legal a,
.footer-legal button {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--on-dark);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.footer-legal a:hover,
.footer-legal button:hover { color: var(--on-dark-mono); }

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

.footer-disclaimer {
  max-width: 64ch;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--on-dark-sub);
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .lp-faq__q::after { transition: none; }
}
