/* Bona Mà · estilos. Mobile first: la base es móvil, los @media amplían a pantallas grandes. */

@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/dm-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/dm-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/dm-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/bricolage-grotesque-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/bricolage-grotesque-latin-800-normal.woff2') format('woff2'); }

:root {
  --green: #1F3D2B;
  --green-dark: #142A1D;
  --green-mid: #2C5039;
  --green-soft: #E6EEE7;
  --mustard: #E0A93B;
  --mustard-dark: #6B4A0E;
  --ink: #17201A;
  --text: #2E3B32;
  --muted: #4A5A4F;
  --line: #DCE2DC;
  --line-strong: #B7C2B9;
  --bg: #F5F6F2;
  --white: #FFFFFF;
  --danger: #A52A1A;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 8px 24px rgba(23, 32, 26, 0.08);
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
  --gutter: 16px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 12px; color: inherit; }
h1 { font-size: clamp(2rem, 7vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 12px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }

.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: 8px; top: -60px; background: var(--white); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 8px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border-radius: 12px; border: 2px solid transparent; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; text-align: center; transition: background-color .15s, color .15s, border-color .15s; }
.btn-lg { min-height: 54px; font-size: 1.05rem; padding: 14px 24px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); color: var(--white); }
.btn-accent { background: var(--mustard); color: var(--ink); }
.btn-accent:hover { background: #ECBB55; color: var(--ink); }
.btn-outline { border-color: var(--green); color: var(--green); background: transparent; }
.btn-outline-light { border-color: var(--mustard); color: var(--white); background: transparent; }
.btn-outline-light:hover { background: rgba(224, 169, 59, 0.15); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row .btn { flex: 1 1 auto; }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--green); color: var(--white); }
.header-bar { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; }
.brand:hover { color: var(--white); }
.brand-mark { color: var(--mustard); }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.02em; }
.menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; background: transparent; color: var(--white); cursor: pointer; border-radius: 10px; }
.menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after { display: block; width: 24px; height: 2.5px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s; }
.menu-toggle-bars::before, .menu-toggle-bars::after { content: ''; position: absolute; left: 0; }
.menu-toggle-bars::before { top: -7px; }
.menu-toggle-bars::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

.main-nav { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: var(--green); padding: 8px var(--gutter) 32px; display: none; flex-direction: column; gap: 16px; overflow-y: auto; }
.main-nav.is-open { display: flex; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav li a { display: block; padding: 14px 4px; color: var(--white); text-decoration: none; font-size: 1.15rem; font-weight: 500; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.main-nav li a[aria-current="page"] { color: var(--mustard); }
body.menu-open { overflow: hidden; }

@media (min-width: 960px) {
  .menu-toggle { display: none; }
  .main-nav { position: static; display: flex; flex-direction: row; align-items: center; padding: 0; background: transparent; overflow: visible; gap: 24px; }
  .main-nav ul { display: flex; gap: 22px; }
  .main-nav li a { padding: 8px 0; border: 0; font-size: 0.95rem; }
  .main-nav li a:hover { color: var(--mustard); }
  .nav-cta { min-height: 44px; padding: 10px 16px; }
}

/* Hero */
.hero { background: var(--green); color: var(--white); padding: 32px 0 64px; }
.hero-compact { padding-bottom: 48px; }
.hero-grid { display: grid; gap: 28px; }
.eyebrow { color: var(--mustard); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 12px; }
.lead { font-size: 1.15rem; color: #DCE6DE; max-width: 42rem; margin-bottom: 24px; }
.lead-dark { font-size: 1.15rem; color: var(--muted); }
.hero-media { position: relative; background: var(--green-mid); border-radius: var(--radius-lg); aspect-ratio: 4 / 3; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media-wide { aspect-ratio: 16 / 10; }
.hero-badge { position: absolute; left: 14px; bottom: 14px; margin: 0; background: var(--white); color: var(--ink); border-radius: 12px; padding: 10px 14px; font-size: 0.9rem; box-shadow: var(--shadow); }
.hero-badge strong { color: var(--green); }
.placeholder-label { color: #C9D6CC; text-align: center; font-size: 0.95rem; }
@media (min-width: 900px) {
  .hero { padding: 64px 0 96px; }
  .hero-grid { grid-template-columns: 1.2fr 1fr; align-items: center; gap: 48px; }
  .btn-row .btn { flex: 0 0 auto; }
}

/* Compromisos */
.promises { margin-top: -40px; position: relative; }
.promise-list { list-style: none; margin: 0; padding: 20px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.promise-list li { display: flex; flex-direction: column; gap: 2px; }
.promise-list strong { font-size: 1rem; }
.promise-list span { color: var(--muted); font-size: 0.92rem; }
@media (min-width: 900px) { .promise-list { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 24px 28px; } }

/* Secciones */
.section { padding: 56px 0; }
.section-tinted { background: var(--green-soft); }
.section-dark { background: var(--green); color: var(--white); }
.section-dark .lead { color: #DCE6DE; }
.section-lead { color: var(--muted); font-size: 1.1rem; margin-bottom: 28px; max-width: 44rem; }
.section-tinted .section-lead { color: var(--text); }
@media (min-width: 900px) { .section { padding: 80px 0; } }

.cards-3 { display: grid; gap: 16px; }
@media (min-width: 720px) { .cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.service-card { display: flex; flex-direction: column; gap: 8px; background: var(--white); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 24px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.service-card { overflow: hidden; }
.service-media { display: block; margin: -24px -24px 8px; aspect-ratio: 4 / 3; overflow: hidden; background: var(--green-soft); }
.service-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.service-card:hover .service-media img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .service-card:hover .service-media img { transform: none; } }
.service-card svg { color: var(--green); margin-bottom: 4px; }

/* Bloque texto + imagen */
.split { display: grid; gap: 24px; margin-bottom: 24px; align-items: center; }
.split .section-lead { margin-bottom: 0; }
.split-media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; background: var(--green-soft); }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 48px; } }
.service-card p { color: var(--muted); margin: 0; }
.service-card:hover { border-color: var(--green); color: var(--ink); }
.card-link { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--green); }

.info-card { background: var(--white); border-radius: var(--radius); padding: 24px; }
.info-card p { color: var(--muted); margin: 0; }

.feature-grid, .route-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.feature-grid li, .route-list li { background: var(--white); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.feature-grid span, .route-list span { color: var(--muted); }
.route-list { margin-bottom: 16px; }
@media (min-width: 720px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1000px) { .feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.steps li { background: var(--white); border-radius: var(--radius); padding: 18px; font-weight: 500; }
.step-big { display: block; font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--green); line-height: 1; margin-bottom: 6px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Vídeo "Así de fácil" */
.video-head { max-width: 46rem; margin-bottom: 24px; }
.video-head .lead { margin-bottom: 0; }
.video-frame { max-width: 960px; border-radius: var(--radius-lg); overflow: hidden; background: var(--green-mid); aspect-ratio: 16 / 9; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); }
.promo-video { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-cta { margin-top: 24px; }

/* Planes */
.plan-card { background: var(--white); border-radius: var(--radius-lg); padding: 28px 24px; display: flex; flex-direction: column; gap: 12px; }
.plan-kicker { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mustard-dark); margin: 0; }
.plan-price { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; color: var(--green); line-height: 1; margin: 0 0 4px; }
.plan-price span { font-family: var(--font-body); font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan-card ul { margin: 0 0 8px; padding-left: 20px; color: var(--text); }
.plan-card li { margin-bottom: 6px; }
.plan-card .btn { margin-top: auto; }

/* Personas */
.person-card { background: var(--white); border-radius: var(--radius); padding: 18px; display: flex; gap: 16px; align-items: center; }
.person-card strong { display: block; }
.person-card span { color: var(--muted); font-size: 0.95rem; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--line); flex: none; }
.person-card-empty { justify-content: center; min-height: 100px; }

/* FAQ */
details { background: var(--white); border-radius: var(--radius); margin-bottom: 10px; }
summary { cursor: pointer; padding: 18px 20px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.5rem; color: var(--green); line-height: 1; }
details[open] summary::after { content: '−'; }
details p { padding: 0 20px 18px; color: var(--text); margin: 0; }

/* Formularios */
.form { display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--white); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card { padding: 28px; } }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--white); font-size: 16px; color: var(--ink); }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); outline: 3px solid rgba(31, 61, 43, 0.15); outline-offset: 0; }
.field-group { border: 0; padding: 0; margin: 0; }
.field-group legend { font-weight: 500; margin-bottom: 8px; padding: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; color: var(--text); cursor: pointer; min-height: 32px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--green); }
.check-light { color: #DCE6DE; }
.check-light a { color: var(--white); }
.check-row { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.form-error { color: var(--danger); font-weight: 500; margin: 0; }
.section-dark .form-error { color: #FFC9BE; }
.section-dark .field { color: var(--white); }
.section-dark .field input { border-color: transparent; }
.notice { background: #FBEBD0; color: var(--mustard-dark); border-radius: 10px; padding: 12px 16px; }

.segmented { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.segmented button { min-height: 46px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--line-strong); background: var(--white); font-weight: 700; cursor: pointer; }
.segmented button[aria-checked="true"] { background: var(--green); border-color: var(--green); color: var(--white); }

/* Calculadora */
.calc { display: grid; gap: 24px; align-items: start; }
.calc-steps { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.calc-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.calc-step legend { font-weight: 700; font-size: 1.2rem; margin-bottom: 14px; padding: 0; display: flex; align-items: center; gap: 10px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: var(--white); font-size: 0.95rem; flex: none; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--line-strong); background: var(--white); font-weight: 700; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--white); }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.option-grid-wide { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .option-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .option-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.option { width: 100%; min-height: 64px; text-align: left; padding: 14px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--white); cursor: pointer; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.option:hover { border-color: var(--line-strong); }
.option[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); }
.option-title { font-weight: 700; color: var(--ink); line-height: 1.25; }
.option-sub { font-size: 0.88rem; color: var(--muted); }
.option-sub::first-letter { text-transform: uppercase; }

.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--white); border: 2px solid var(--line); border-radius: var(--radius); padding: 4px; }
.stepper button { width: 48px; height: 48px; border: 0; border-radius: 10px; background: var(--green-soft); font-size: 1.5rem; font-weight: 700; cursor: pointer; color: var(--green); }
.stepper button:disabled { opacity: 0.4; cursor: default; }
.stepper output { min-width: 48px; text-align: center; font-size: 1.4rem; font-weight: 700; }
.calc-note { color: var(--muted); font-size: 0.92rem; margin: 12px 0 0; }
.calc-step .check { margin-top: 14px; }

.calc-summary { background: var(--white); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
.summary-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mustard-dark); margin-bottom: 8px; }
.summary-empty { color: var(--muted); margin: 0; }
.summary-job { font-weight: 700; font-size: 1.1rem; margin: 0 0 2px; }
.summary-detail { color: var(--muted); margin: 0 0 10px; }
.summary-price { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--green); line-height: 1.1; margin: 0 0 8px; }
.summary-meta { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.summary-meta li { color: var(--text); }
.summary-meta li::first-letter { text-transform: uppercase; }
.summary-fine { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* Barra inferior fija en móvil */
.calc-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(23, 32, 26, 0.1); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calc-bar > div { min-width: 0; display: flex; flex-direction: column; }
.calc-bar-label { font-size: 0.85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calc-bar-price { font-family: var(--font-display); font-size: 1.3rem; color: var(--green); }
.calc-bar .btn { flex: none; }
.calc-bar[hidden] { display: none; }
body.has-calc-bar { padding-bottom: 76px; }
/* En móvil, con la barra visible, el botón de la barra es la llamada a la acción: ocultamos el flotante */
body.has-calc-bar .wa-float { display: none; }

@media (min-width: 960px) {
  .calc { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
  .calc-summary { position: sticky; top: calc(var(--header-h) + 20px); }
  .calc-bar { display: none !important; }
  body.has-calc-bar { padding-bottom: 0; }
  body.has-calc-bar .wa-float:not([hidden]) { display: flex; }
}

/* Portal (vista previa) */
.portal-preview { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 20px; }
.portal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.portal-rows { list-style: none; margin: 0; padding: 0; }
.portal-rows li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.badge-open { background: #FBEBD0; color: var(--mustard-dark); }
.badge-progress { background: #DCE7F5; color: #1D3E6B; }
.badge-done { background: var(--green-soft); color: var(--green); }
.badge-soon { background: var(--bg); color: var(--muted); }

/* Texto legal */
.prose h1 { font-size: 2rem; }
.prose p { color: var(--text); }

/* Pie */
.site-footer { background: var(--ink); color: #C9D6CC; padding: 40px 0 24px; }
.footer-grid { display: grid; gap: 24px; }
.footer-brand { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--white); margin-bottom: 6px; }
.footer-small { font-size: 0.9rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.footer-links a { color: var(--white); text-decoration: none; display: inline-block; padding: 6px 0; }
.footer-links a:hover { color: var(--mustard); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 24px; padding-top: 16px; font-size: 0.85rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

/* Botón flotante de WhatsApp */
.wa-float { position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 45; width: 58px; height: 58px; border-radius: 50%; background: #1F7A43; color: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.wa-float:hover { color: var(--white); background: #186437; }
.wa-float[hidden] { display: none; }
