/* ==========================================================================
   Página de valoración — rediseño editorial (3-nov-2026)
   Brief en ../README.md («Rediseño "que se vea cara"»). Qué cambia frente a la versión anterior:
   tipografía propia (Newsreader + Instrument Sans, alojadas aquí: nada se pide a Google),
   foto del South Bay a sangre, líneas finas en vez de cajas y sombras, un solo bloque numerado.
   Lo que NO cambia: las clases e ids que usa script.js (estados de error, envío, acordeón,
   barra fija, franja de demo…). Cada estado está al final, en «Estados que pone script.js».
   Contraste medido: todo texto ≥ 4,5:1 sobre su fondo (botón: blanco sobre #AD5B1A = 4,9:1).
   ========================================================================== */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/newsreader.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/newsreader-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/instrument-sans.woff2") format("woff2");
}

:root {
  --ink: #13223A;          /* titulares, pie, texto sobre claro */
  --ink-soft: #2C3B53;
  --text: #1D2430;
  --muted: #565C67;        /* 6,4:1 sobre --paper */
  --paper: #FBF8F3;        /* fondo general: blanco cálido, no blanco puro */
  --sand: #F2EDE4;         /* secciones alternas */
  --white: #FFFFFF;
  --line: #DDD5C7;         /* filetes */
  --line-strong: #13223A;
  --accent: #AD5B1A;       /* SOLO botones y numerales: 4,9:1 con blanco */
  --accent-dark: #8F4A14;
  --focus: #2E6F95;
  --error: #B3261E;
  --success: #1E6B47;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --maxw: 1200px;
  --maxw-narrow: 760px;
  --gutter: 20px;
  --tap: 48px;
  --radius: 3px;
}

/* ----- reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
h1, h2, h3 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: var(--maxw-narrow); }
.center { text-align: center; }
.mt { margin-top: 36px; }

/* visually hidden but accessible */
.hp-field {
  position: absolute !important;
  left: -5000px;
  width: 1px; height: 1px; overflow: hidden;
}

/* ----- buttons (the ONLY accent-colored elements, with the step numerals) ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 14px 28px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-block { width: 100%; }
.btn-lg { font-size: 1.05rem; padding: 17px 36px; }

/* keyboard focus visibility (WCAG) */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ----- header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 248, 243, .96);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
}
.brand { text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.header-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.lang-toggle:hover { border-color: var(--ink); background: var(--white); }
.lang-flag { display: inline-flex; line-height: 0; }
.lang-flag svg { width: 20px; height: auto; border-radius: 1px; box-shadow: 0 0 0 1px rgba(19, 34, 58, .18); }
.header-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 4px 8px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.header-call-icon { flex: none; }
.header-call-text { font-size: .95rem; font-variant-numeric: tabular-nums; }

/* ----- hero ----- */
.hero { position: relative; isolation: isolate; }
.hero-grid { display: grid; }
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--ink); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
/* Velo: el texto blanco siempre ≥ 7:1, también sobre la parte más clara del cielo */
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 19, 33, .62) 0%, rgba(10, 19, 33, .78) 100%);
}
.hero-copy { position: relative; color: var(--white); margin: 0 calc(var(--gutter) * -1); padding: 56px var(--gutter) 72px; }
.hero-headline {
  color: var(--white);
  font-size: clamp(2.35rem, 1.2rem + 4.6vw, 4.4rem);
  font-weight: 450;
  line-height: 1.03;
  letter-spacing: -0.02em;
  max-width: 15ch;
  margin-bottom: .45em;
}
.hero-sub {
  font-size: clamp(1.05rem, .95rem + .5vw, 1.25rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, .9);
  max-width: 38ch;
}
.hero-cta-mobile { margin-top: 26px; }
.hero-bullets {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .28);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}
.hero-bullets li {
  position: relative;
  padding-left: 20px;
  font-size: .92rem;
  color: rgba(255, 255, 255, .9);
}
.hero-bullets li::before {
  content: "";
  position: absolute; left: 0; top: .62em;
  width: 10px; height: 1px;
  background: rgba(255, 255, 255, .75);
}
.hero-form-wrap { position: relative; margin-top: -36px; }

/* ----- form card ----- */
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: 0 30px 60px -36px rgba(10, 19, 33, .45);
}
.form-title { font-size: 1.6rem; margin-bottom: 6px; }
.form-subtitle { color: var(--muted); font-size: .95rem; margin-bottom: 20px; }

.field { margin-bottom: 16px; }
.field-row { display: grid; gap: 0 14px; }
.field label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink);
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  font-size: 16px; /* ≥16px prevents iOS zoom */
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  border: 1px solid #BFB6A8;
  border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(46, 111, 149, .22);
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 3px rgba(179, 38, 30, .12); }
.field-error { display: none; color: var(--error); font-size: .85rem; margin-top: 6px; }

/* TCPA consent checkbox (compliance requirement — see README) */
.consent-field { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 16px; }
.consent-field input[type="checkbox"] {
  width: 20px; height: 20px; min-height: 0; flex: none; margin-top: 2px;
  accent-color: var(--ink);
}
.consent-field label { font-size: .8rem; line-height: 1.5; color: var(--muted); }

.btn-submit { margin-top: 4px; position: relative; }
.btn-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-top-color: var(--white);
  border-radius: 50%;
  display: none;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-reassure { text-align: center; font-size: .82rem; color: var(--muted); margin: 12px 0 0; }
.form-reassure.light { color: rgba(255, 255, 255, .82); }
.form-feedback { margin: 10px 0 0; font-size: .92rem; }

/* success state */
.form-success { text-align: center; padding: 18px 6px; }
.form-success-check {
  width: 60px; height: 60px; margin: 0 auto 16px;
  border-radius: 50%;
  border: 1px solid var(--success);
  color: var(--success);
  font-size: 1.7rem;
  display: grid; place-items: center;
}
.form-success h3 { font-size: 1.6rem; }
.form-success p { color: var(--muted); }

/* ----- trust bar: una línea fina, no una franja ----- */
.trust-bar { border-bottom: 1px solid var(--line); background: var(--paper); }
.trust-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; padding-top: 22px; padding-bottom: 22px; }
.trust-item {
  display: flex; align-items: center; gap: 10px;
  font-size: .76rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft);
}
.trust-dot { width: 5px; height: 5px; background: var(--accent); transform: rotate(45deg); flex: none; }

/* ----- generic section ----- */
.section { padding: 72px 0; }
.section-alt { background: var(--sand); }
.section-title { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem); max-width: 22ch; margin-bottom: 28px; }
.split { display: grid; gap: 8px; }

/* problem: lista con filetes, sin cajas */
.pain-list { border-top: 1px solid var(--line-strong); }
.pain-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.08rem;
  color: var(--text);
}
.pain-icon { display: none; }

/* what you get: columnas con filete arriba */
.columns-3 { display: grid; gap: 34px; }
.value-col { border-top: 1px solid var(--line-strong); padding-top: 20px; }
.value-col h3 { font-size: 1.45rem; margin-bottom: 10px; }
.value-col p { color: var(--muted); margin: 0; }

/* steps: el único bloque numerado */
.steps { display: grid; gap: 30px; counter-reset: none; }
.step { border-top: 1px solid var(--line); padding-top: 18px; }
.step-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 12px;
  font-variant-numeric: lining-nums;
}
.step p { margin: 0; font-size: 1.08rem; max-width: 30ch; }

/* why the agent */
.section-agent { border-top: 1px solid var(--line); }
.why-grid { display: grid; gap: 34px; align-items: center; }
.why-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--sand);
}
.why-bio { font-size: 1.08rem; color: var(--text); max-width: 56ch; }
.why-quote {
  margin: 28px 0 30px;
  padding: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 1.1rem + .9vw, 1.7rem);
  line-height: 1.4;
  color: var(--ink);
  max-width: 34ch;
}

/* testimonials (las tarjetas las crea script.js) */
.cards-3 { display: grid; gap: 28px; }
.testi-card { border-top: 1px solid var(--line-strong); padding-top: 20px; }
.testi-card.is-placeholder { border-top-style: dashed; }
.testi-quote { font-family: var(--serif); font-style: italic; font-size: 1.2rem; line-height: 1.45; color: var(--ink); }
.testi-author { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.testi-note { color: var(--muted); font-size: .9rem; margin-top: 24px; }

/* faq accordion: filetes */
.accordion { border-top: 1px solid var(--line-strong); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-trigger {
  width: 100%;
  min-height: var(--tap);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0;
  background: none; border: none;
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.acc-icon { flex: none; width: 14px; height: 14px; position: relative; }
.acc-icon::before, .acc-icon::after {
  content: ""; position: absolute; background: var(--ink);
  transition: transform .2s ease;
}
.acc-icon::before { top: 6.5px; left: 0; width: 14px; height: 1px; }
.acc-icon::after { top: 0; left: 6.5px; width: 1px; height: 14px; }
.acc-trigger[aria-expanded="true"] .acc-icon::after { transform: scaleY(0); }
.acc-panel { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.acc-panel p { padding: 0 0 22px; margin: 0; color: var(--muted); max-width: 62ch; }

/* final cta: vuelve la foto */
.final-cta {
  position: relative;
  isolation: isolate;
  color: var(--white);
  padding: 96px 0;
  background: var(--ink) url("assets/south-bay-1400.webp") 72% 50% / cover no-repeat;
}
.final-cta::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: rgba(10, 19, 33, .8);
}
.final-cta-title { color: var(--white); font-size: clamp(2rem, 1.3rem + 2.6vw, 3.2rem); max-width: 20ch; }
.final-cta-sub { color: rgba(255, 255, 255, .88); font-size: 1.1rem; margin-bottom: 30px; max-width: 46ch; }

/* footer */
.site-footer {
  background: #0E1A2C;
  color: rgba(255, 255, 255, .82);
  padding: 44px 0 96px; /* extra bottom for sticky bar on mobile */
  font-size: .9rem;
}
.footer-inner { display: grid; gap: 24px; }
.site-footer strong { color: var(--white); font-family: var(--serif); font-size: 1.15rem; font-weight: 500; }
.footer-muted { color: rgba(255, 255, 255, .66); }
.footer-contact { display: grid; gap: 8px; }
.footer-contact a { color: var(--white); text-decoration: none; font-variant-numeric: tabular-nums; }
.footer-contact a:hover { text-decoration: underline; }
.footer-legal { color: rgba(255, 255, 255, .66); }
.footer-legal a { color: rgba(255, 255, 255, .85); }
.footer-copy { margin-top: 14px; font-size: .82rem; }
.footer-disclosure { margin-top: 10px; font-size: .8rem; color: rgba(255, 255, 255, .62); }
.footer-credit { margin-top: 10px; font-size: .78rem; color: rgba(255, 255, 255, .6); }

/* sticky mobile cta */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(251, 248, 243, .97);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  transform: translateY(120%);
  transition: transform .25s ease;
}

/* =========================================================
   RESPONSIVE — scale up from mobile
   ========================================================= */
@media (min-width: 600px) {
  :root { --gutter: 32px; }
  .trust-row { grid-template-columns: repeat(4, auto); justify-content: space-between; }
  .columns-3, .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .form-card { padding: 32px 30px; }
}

@media (min-width: 900px) {
  .section { padding: 104px 0; }
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
  .split .section-title { margin-bottom: 0; }

  /* Escritorio: la foto cubre todo el hero (la .hero-media se posiciona contra .hero) */
  .hero { min-height: 680px; }
  .hero-copy { position: static; margin: 0; padding: 0; }
  .hero-copy > :not(.hero-media) { position: relative; }
  .hero-media::after {
    background: linear-gradient(90deg, rgba(10, 19, 33, .86) 0%, rgba(10, 19, 33, .7) 42%, rgba(10, 19, 33, .28) 100%);
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    align-items: center;
    gap: 72px;
    padding-top: 88px;
    padding-bottom: 96px;
  }
  .hero-form-wrap { margin-top: 0; }
  /* on desktop the form is visible beside the headline; hide the "scroll to form" mobile button */
  .hero-cta-mobile { display: none; }

  .why-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 80px; }
  /* sticky bottom bar is a mobile pattern — hide on desktop */
  .sticky-cta { display: none; }
  .site-footer { padding-bottom: 44px; }
  .footer-inner { grid-template-columns: 1.2fr 1fr 1.4fr; align-items: start; }
}

/* Phones: keep the call icon, drop the number text so the header fits */
@media (max-width: 479px) {
  .header-call-text { display: none; }
  .header-call { padding: 4px 6px; }
  .brand-name { font-size: 1.15rem; }
  .brand-sub { font-size: .66rem; letter-spacing: .06em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* =========================================================
   Estados que pone script.js — no renombrar
   ========================================================= */
/* Elements toggled from config.js use the `hidden` attribute; no component rule may override it. */
[hidden] { display: none !important; }
.field-error.show { display: block; }
.form-feedback.error { color: var(--error); }
.is-loading .btn-label { opacity: .6; }
.is-loading .btn-spinner { display: inline-block; }
.sticky-cta.visible { transform: translateY(0); }
.sticky-cta.hidden-by-form { transform: translateY(120%); }
/* The phone number never breaks across lines (script.js wraps it in this span) */
.nowrap { white-space: nowrap; }

/* Demo strip: only on the sample page (config.demo = true) */
.demo-banner {
  background: #F6EBDC;
  color: #6E4310;
  border-bottom: 1px solid #E6D3B8;
  text-align: center;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 8px 16px;
  margin: 0;
}
.photo-note { text-align: center; font-size: .82rem; color: var(--muted); margin: 12px 0 0; }
/* Shown in the success box when the form has no destination configured */
.success-testmode {
  margin: 14px 0 0;
  padding: 8px 12px;
  background: #F6EBDC;
  color: #6E4310;
  border-radius: var(--radius);
  font-size: .85rem;
}
