/* ============================================================
   Queremos Escucharte — Grupo Carbón
   Identidad: Montserrat · flama dorada sobre carbón · etiquetas
   doradas espaciadas (tomadas del logotipo de la marca).
   Mobile-first.
   ============================================================ */

:root {
  /* Carbón (oscuros cálidos) */
  --ink:    #1b1714;
  --ink-2:  #24201c;
  --ink-3:  #2f2a25;

  /* Flama (dorados / ámbar de la marca) */
  --gold:        #c9a428;
  --gold-bright: #e8b030;
  --gold-deep:   #a06012;
  --amber-deep:  #7a4808;
  --cream:       #fefaee;

  /* Papel / superficies claras */
  --paper:     #faf7f1;
  --surface:   #ffffff;
  --surface-2: #fbf8f3;
  --line:        #ece5d9;
  --line-strong: #ded4c4;

  /* Texto */
  --text:   #2c2621;
  --text-2: #6b635b;
  --text-3: #938a80;

  /* Estados */
  --danger:    #b23b2e;
  --danger-bg: #fbeeec;
  --ok:        #2f7d4f;

  /* Foco accesible */
  --focus: 0 0 0 4px rgba(201, 164, 40, .38);

  /* Flama en degradado (progreso / firma) */
  --flame: linear-gradient(180deg, #fefaee 0%, #f8e98c 16%, #e8b030 42%, #c9a428 64%, #a06012 100%);
  --flame-h: linear-gradient(90deg, #a06012 0%, #c9a428 38%, #e8b030 72%, #f8e98c 100%);

  /* Radios y sombras */
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(27, 23, 20, .06), 0 1px 3px rgba(27, 23, 20, .05);
  --shadow:    0 4px 14px rgba(27, 23, 20, .08);
  --shadow-lg: 0 18px 48px rgba(27, 23, 20, .16);

  --maxw: 640px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.01em; font-weight: 800; }
p { margin: 0; }
a { color: inherit; }

img, svg { display: block; max-width: 100%; }

.hidden { display: none !important; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--cream); padding: 10px 16px;
  border-radius: var(--r-sm); transition: top .18s ease; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Etiqueta dorada espaciada — dispositivo estructural de la marca */
.eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}

/* ----------------------------------------------------------------
   Marca / flama
   ---------------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { width: 26px; height: 32px; flex: none; }
.brand__name {
  font-weight: 800; letter-spacing: .02em; font-size: .98rem;
  text-transform: uppercase;
}

/* ----------------------------------------------------------------
   Botones
   ---------------------------------------------------------------- */
.btn {
  --bg: var(--gold);
  --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit; font-weight: 700; font-size: 1rem;
  letter-spacing: .01em;
  min-height: 54px; padding: 0 26px;
  border: 0; border-radius: var(--r-pill);
  background: var(--bg); color: var(--fg);
  cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  box-shadow: 0 6px 18px rgba(201, 164, 40, .28);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(201, 164, 40, .36); }
.btn:active { transform: translateY(0); }
.btn--block { width: 100%; }
.btn--lg { min-height: 58px; font-size: 1.05rem; }

.btn--ghost {
  --bg: transparent; --fg: var(--text);
  border: 1.5px solid var(--line-strong);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--surface-2); box-shadow: none; border-color: var(--gold); }

.btn--ghost-light {
  --bg: transparent; --fg: var(--cream);
  border: 1.5px solid rgba(254, 250, 238, .32);
  box-shadow: none;
}
.btn--ghost-light:hover { background: rgba(254, 250, 238, .08); box-shadow: none; border-color: rgba(254, 250, 238, .6); }

.btn--wa { --bg: #1faf57; --fg: #fff; box-shadow: 0 6px 18px rgba(31, 175, 87, .28); }
.btn--wa:hover { box-shadow: 0 10px 24px rgba(31, 175, 87, .36); }

.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ================================================================
   LANDING
   ================================================================ */

/* Encabezado simple sobre el hero */
.topbar { position: absolute; inset: 0 0 auto 0; z-index: 5; }
.topbar .wrap { display: flex; align-items: center; height: 72px; }
.topbar .brand__name { color: var(--cream); }

/* Hero — carbón oscuro con brillo de brasa */
.hero {
  position: relative;
  background: radial-gradient(120% 90% at 50% -10%, #322b25 0%, var(--ink-2) 42%, var(--ink) 100%);
  color: var(--cream);
  padding: 116px 0 68px;
  overflow: hidden;
}
.hero::before { /* brasa dorada difusa */
  content: ""; position: absolute; left: 50%; top: -120px; transform: translateX(-50%);
  width: 560px; height: 560px; pointer-events: none;
  background: radial-gradient(circle, rgba(232, 176, 48, .30) 0%, rgba(201, 164, 40, .12) 34%, transparent 66%);
  filter: blur(6px);
  animation: ember 7s ease-in-out infinite;
}
.hero__inner { position: relative; z-index: 1; }
.hero__mark { width: 46px; height: 56px; margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(2.35rem, 9vw, 3.5rem);
  letter-spacing: .005em;
  margin: 0 0 10px;
}
.hero h1 .accent {
  background: var(--flame-h); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub {
  font-size: clamp(1.1rem, 4.4vw, 1.32rem);
  font-weight: 600; color: #f4ead0;
  margin: 0 0 18px;
}
.hero__lead {
  font-size: 1.02rem; color: rgba(254, 250, 238, .78);
  max-width: 34em; margin: 0 0 30px;
}
.hero__cta { display: flex; flex-direction: column; gap: 12px; }

@keyframes ember {
  0%, 100% { opacity: .85; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1;   transform: translateX(-50%) scale(1.06); }
}

/* Secciones claras */
.section { padding: 62px 0; }
.section--tight { padding: 46px 0; }
.section__head { margin-bottom: 30px; }
.section__title { font-size: clamp(1.55rem, 6vw, 2rem); }
.section__intro { color: var(--text-2); margin-top: 12px; font-size: 1.02rem; }

/* Tarjetas "¿para qué?" */
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card__icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: linear-gradient(160deg, #fff5da, #f6e3ad);
  color: var(--amber-deep);
  border: 1px solid #f0dfb2;
}
.card__icon svg { width: 24px; height: 24px; }
.card__title { font-size: 1.06rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.card__text { color: var(--text-2); font-size: .98rem; }

/* Sección de confianza — panel carbón */
.trust { background: var(--ink); color: var(--cream); }
.trust .eyebrow { color: var(--gold); }
.trust__title { font-size: clamp(1.6rem, 6.5vw, 2.15rem); margin-bottom: 18px; }
.trust__text { color: rgba(254, 250, 238, .76); font-size: 1.02rem; margin-bottom: 26px; max-width: 40em; }
.pull-quote {
  position: relative;
  font-size: clamp(1.35rem, 6vw, 1.85rem); font-weight: 800; line-height: 1.25;
  padding: 26px 0 26px 24px; margin: 0 0 26px;
  border-left: 3px solid transparent;
  border-image: var(--flame) 1;
}
.pull-quote span {
  background: var(--flame-h); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.trust__note { color: rgba(254, 250, 238, .68); font-size: .98rem; max-width: 42em; }

/* Banda CTA */
.cta-band { background: var(--surface-2); border-top: 1px solid var(--line); text-align: center; }
.cta-band h2 { font-size: clamp(1.5rem, 6vw, 2rem); margin-bottom: 8px; }
.cta-band p { color: var(--text-2); margin-bottom: 26px; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(254, 250, 238, .7); padding: 40px 0 46px; font-size: .9rem; }
.site-footer .brand__name { color: var(--cream); }
.site-footer__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; justify-content: space-between; }
.site-footer h3 { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 22px 0 8px; font-weight: 700; }
.site-footer a { color: var(--cream); }
.site-footer .muted { color: rgba(254, 250, 238, .5); }
.site-footer hr { border: 0; border-top: 1px solid rgba(254, 250, 238, .12); margin: 26px 0; }

/* ================================================================
   FORMULARIO
   ================================================================ */
.form-view { min-height: 100dvh; background: var(--paper); display: flex; flex-direction: column; }

/* Barra superior fija con progreso */
.form-top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 247, 241, .92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.form-top__row { display: flex; align-items: center; gap: 12px; height: 60px; }
.iconbtn {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: 0; cursor: pointer; font-family: inherit;
  color: var(--text-2); font-weight: 600; font-size: .95rem; padding: 8px; margin-left: -8px;
  border-radius: var(--r-sm);
}
.iconbtn:hover { color: var(--text); background: var(--surface-2); }
.form-top__title { font-weight: 800; font-size: .98rem; letter-spacing: .02em; margin-left: auto; margin-right: auto; }
.form-top__spacer { width: 40px; }

.progress { padding-bottom: 12px; }
.progress__track { height: 7px; border-radius: var(--r-pill); background: #eadfca; overflow: hidden; }
.progress__fill {
  height: 100%; width: 25%; border-radius: var(--r-pill);
  background: var(--flame-h);
  transition: width .42s cubic-bezier(.4, 0, .2, 1);
}
.progress__label { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); margin-top: 10px; }

/* Lienzo de pasos */
.form-body { flex: 1; padding: 30px 0 40px; }
.step { display: none; }
.step.is-active { display: block; animation: stepIn .32s cubic-bezier(.2, .7, .2, 1); }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.step__eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.step__title { font-size: clamp(1.4rem, 6vw, 1.72rem); margin-bottom: 6px; }
.step__desc { color: var(--text-2); margin-bottom: 24px; }

/* Campos */
.field { margin-bottom: 22px; }
.label { display: block; font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.tag-opt { font-weight: 600; font-size: .78rem; color: var(--text-3); letter-spacing: .04em; }
.req { color: var(--gold-deep); }
.hint { color: var(--text-2); font-size: .9rem; margin: 2px 0 12px; }

.control {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: var(--r); padding: 15px 16px; min-height: 54px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.control:focus { outline: none; border-color: var(--gold); box-shadow: var(--focus); }
textarea.control { min-height: 130px; resize: vertical; line-height: 1.55; }
select.control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237a4808' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 46px;
}

/* Opciones tipo tarjeta (selección única) */
.choices { display: grid; gap: 10px; }
.choice {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; min-height: 56px;
  background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: var(--r); cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.choice:hover { border-color: var(--gold); }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice__dot {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 2px solid var(--line-strong); background: var(--surface);
  display: grid; place-items: center; transition: border-color .15s ease;
}
.choice__dot::after { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--gold); transform: scale(0); transition: transform .16s cubic-bezier(.2, .8, .2, 1); }
.choice__label { font-weight: 600; }
.choice input:checked + .choice__dot { border-color: var(--gold); }
.choice input:checked + .choice__dot::after { transform: scale(1); }
.choice:has(input:checked) { border-color: var(--gold); background: #fdf8ea; box-shadow: 0 0 0 1px var(--gold) inset; }
.choice input:focus-visible + .choice__dot { box-shadow: var(--focus); }

/* Chips (selección múltiple) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px; min-height: 46px;
  background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: var(--r-pill); cursor: pointer; font-weight: 600; font-size: .95rem;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--gold); }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip__check { width: 16px; height: 16px; opacity: .0; transition: opacity .14s ease; color: var(--amber-deep); }
.chip:has(input:checked) { background: #fdf6e4; border-color: var(--gold); color: var(--amber-deep); }
.chip:has(input:checked) .chip__check { opacity: 1; }
.chip input:focus-visible ~ .chip__check,
.chip:focus-within { box-shadow: var(--focus); }

/* Condicionales */
.conditional {
  margin-top: 4px; padding-left: 16px;
  border-left: 2px solid var(--line-strong);
}

/* Nota de WhatsApp */
.wa-note {
  background: #eef8f0; border: 1px solid #cfe9d6; border-radius: var(--r);
  padding: 16px 18px; margin-top: 4px; color: #23553a; font-size: .95rem;
}
.wa-note strong { color: #1c4630; }

/* Errores */
.error { display: none; color: var(--danger); font-size: .9rem; font-weight: 600; margin-top: 8px; }
.error.is-visible { display: block; }
.field.has-error .control,
.field.has-error .choice,
.field.has-error .chip { border-color: var(--danger); }
.formError {
  display: none; background: var(--danger-bg); border: 1px solid #f0cfca;
  color: var(--danger); border-radius: var(--r); padding: 14px 16px; margin-bottom: 18px;
  font-size: .95rem; font-weight: 600;
}
.formError.is-visible { display: block; }

/* Navegación del formulario */
.form-nav { display: flex; gap: 12px; margin-top: 30px; }
.form-nav .btn { flex: 1; }
.form-nav .btn--back { flex: 0 0 auto; min-width: 120px; }

/* Revisión */
.review-list {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.review-row { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 14px 18px; border-top: 1px solid var(--line); }
.review-row:first-child { border-top: 0; }
.review-row dt { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); }
.review-row dd { margin: 0; color: var(--text); white-space: pre-wrap; word-break: break-word; }

.confirm {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; cursor: pointer; margin-bottom: 20px;
}
.confirm input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--gold); flex: none; cursor: pointer; }
.confirm span { font-size: .95rem; color: var(--text); }

/* Éxito */
.success { text-align: center; padding: 24px 0 12px; }
.success__mark { width: 64px; height: 78px; margin: 0 auto 20px; }
.success h2 { font-size: clamp(1.7rem, 7vw, 2.3rem); margin-bottom: 12px; }
.success p { color: var(--text-2); margin-bottom: 22px; }
.folio-pill {
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  background: #fdf8ea; border: 1.5px solid var(--gold); border-radius: var(--r-lg);
  padding: 16px 30px; margin-bottom: 14px;
}
.folio-pill small { font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep); }
.folio-pill b { font-size: 1.5rem; letter-spacing: .06em; color: var(--amber-deep); font-weight: 800; }
.success__note { font-size: .92rem; color: var(--text-2); max-width: 32em; margin: 0 auto 26px; }
.success__actions { display: flex; flex-direction: column; gap: 12px; max-width: 380px; margin: 0 auto; }

/* Overlay de envío */
.sending {
  position: fixed; inset: 0; z-index: 60; display: none;
  place-items: center; background: rgba(27, 23, 20, .5); backdrop-filter: blur(3px);
}
.sending.is-visible { display: grid; }
.sending__box { background: var(--surface); border-radius: var(--r-lg); padding: 30px 34px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow-lg); font-weight: 600; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #eadfca; border-top-color: var(--gold); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------- */
@media (min-width: 620px) {
  .cards { grid-template-columns: 1fr 1fr; gap: 18px; }
  .hero__cta { flex-direction: row; }
  .hero__cta .btn { flex: 0 0 auto; }
  .review-row { grid-template-columns: 190px 1fr; gap: 16px; align-items: baseline; }
  .review-row dt { padding-top: 1px; }
}

@media (min-width: 900px) {
  :root { --maxw: 720px; }
  .hero { padding: 132px 0 84px; }
}

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
