/* Casa Bien · web v2 */

@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-serif-display-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/work-sans-latin.woff2') format('woff2');
}

:root {
  --sea: #1C5D8F;
  --cal: #FBF8F2;
  --clay: #C2603A;
  --clay-dark: #8A3B1E;
  --bloom: #B53A6E;
  --ink: #14324A;
  --text-2: #3D5266;
  --text-3: #4F6577;
  --line: #E7DECF;
  --field: #D6CCBA;
  --sand: #F6E3D9;
  --peach: #F2B79B;
  --on-blue: #CFE0EE;
  --white: #FFFFFF;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--cal); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
a { color: var(--sea); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; }
[id] { scroll-margin-top: 88px; }

.serif { font-family: var(--serif); font-weight: 400; }
.muted { color: var(--text-3); }
.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 { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--cal); padding: 10px 16px; border-radius: 6px; z-index: 100; }
.skip:focus { top: 12px; color: var(--cal); }

.wrap { max-width: 1140px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.section { padding-top: 80px; padding-bottom: 72px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.stack-lg { display: flex; flex-direction: column; gap: 40px; }
.section-head { display: flex; flex-direction: column; gap: 10px; }
.section-head p { font-size: 17px; color: var(--text-2); }
h2.serif { font-size: clamp(32px, 4.4vw, 42px); line-height: 1.1; }

.band { padding: 72px 0; }
.band-blue { background: var(--sea); color: var(--cal); }
.band-blue a { color: var(--cal); }
.band-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-sand { background: var(--sand); padding: 48px 0; }
.on-blue { color: var(--on-blue); font-size: 17px; }

/* Botones y pastillas */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 12px 20px; border-radius: 6px; font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; border: 1px solid var(--sea); transition: background-color .15s, color .15s; }
.btn-primary { background: var(--sea); color: var(--cal); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--cal); }
.btn-outline { background: transparent; color: var(--sea); }
.btn-outline:hover { background: var(--sea); color: var(--cal); }
.btn-light { background: var(--cal); color: var(--sea); border-color: var(--cal); font-weight: 600; }
.btn-light:hover { background: var(--white); color: var(--ink); }
.btn-lg { padding: 16px 26px; font-size: 16px; }
.btn-sm { padding: 10px 18px; }
.btn[disabled] { opacity: .6; cursor: wait; }

.pill { display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.pill-peach { background: var(--peach); color: var(--ink); }
.pill-bloom { background: #F7E1EA; color: #7A1F48; }
.pill-cal { background: var(--cal); color: var(--clay-dark); align-self: flex-start; }
.kicker { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--sea); font-weight: 600; }
.kicker-clay { color: var(--clay-dark); letter-spacing: 2px; }

.ico { flex: none; margin-top: 1px; fill: var(--sea); stroke: var(--white); }
.ico:not(.ico-off) circle { stroke: none; }
.ico-off { fill: none; stroke: #8C99A6; }
.ico-off circle { stroke: #B9C2CB; }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 248, 242, .96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.2) blur(6px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--sea); }
.brand .serif { font-size: 28px; line-height: 1; }
.brand:hover { color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.site-nav > a:not(.btn) { text-decoration: none; padding: 8px 0; }
.site-nav > a:not(.btn):hover { text-decoration: underline; }
.lang-switch { display: flex; gap: 6px; align-items: center; color: var(--text-3); font-size: 14px; }
.lang-switch a { text-decoration: none; padding: 6px 2px; }
.lang-switch a[aria-current] { color: var(--ink); font-weight: 600; }
.nav-toggle { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; font: inherit; font-weight: 500; color: var(--sea); background: transparent; border: 1px solid var(--sea); border-radius: 6px; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 1px; position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--cal); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; box-shadow: 0 12px 24px rgba(20, 50, 74, .08); }
  .site-nav.open { display: flex; }
  .site-nav > a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .lang-switch { padding: 14px 0; font-size: 16px; gap: 10px; }
  .site-nav .btn { margin-top: 8px; }
  .brand .serif { font-size: 24px; }
}

/* Hero */
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 64px; }
.hero-text { flex: 1 1 440px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.hero h1 { font-size: clamp(40px, 6vw, 60px); line-height: 1.04; }
.lead { font-size: 18px; line-height: 1.55; color: var(--text-2); }
.hero .lead { font-size: 19px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

.report { flex: 1 1 380px; margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 18px 40px -24px rgba(20, 50, 74, .25); min-width: 0; }
.report-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.report-head > div { display: flex; flex-direction: column; gap: 2px; }
.report-head .muted { font-size: 14px; }
.report-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photo { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 5 / 4; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--sand); }
.photo span { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 600; background: rgba(251, 248, 242, .92); color: var(--ink); padding: 2px 7px; border-radius: 999px; }
.report-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.report-checks li { display: flex; gap: 10px; align-items: flex-start; }
.report-foot { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.report-status { display: flex; align-items: center; gap: 12px; }
.report-status > span { display: flex; flex-direction: column; gap: 1px; }
.report-status strong { font-size: 18px; font-weight: 600; color: #1F5E36; }
.report-status .muted { font-size: 14px; }
.ico-ok { flex: none; fill: #2E7D4F; }
.report-sign { font-size: 17px; color: var(--sea); }

/* Plazas de fundador */
.founder-wrap { padding-bottom: 56px; }
.founder { background: var(--white); border: 2px solid var(--sea); border-radius: 12px; padding: 28px 32px; display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; }
.founder-text { flex: 1 1 480px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.founder-text .pill { align-self: flex-start; }
.founder h2.serif { font-size: clamp(26px, 3.4vw, 32px); }
.founder-text p { color: var(--text-2); font-size: 17px; }
.founder-check.full { background: #EAF1F7; border-radius: 8px; padding: 12px 14px; color: var(--ink); font-weight: 500; }

/* Cómo funciona */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.steps li { display: flex; flex-direction: column; gap: 10px; border-top: 2px solid #E08A63; padding-top: 20px; }
.step-num { font-size: 36px; color: var(--peach); line-height: 1; }
.steps h3 { font-size: 20px; font-weight: 600; }
.steps p { color: var(--on-blue); line-height: 1.55; }

/* Planes */
.type-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { font: inherit; font-size: 15px; font-weight: 500; min-height: 44px; padding: 10px 20px; border-radius: 999px; cursor: pointer; border: 1px solid var(--sea); background: var(--white); color: var(--sea); }
.chip[aria-pressed="true"] { background: var(--sea); color: var(--cal); }
.chip:hover:not([aria-pressed="true"]) { background: #EAF1F7; }
.type-note { font-size: 15px; color: var(--text-3); min-height: 1.5em; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.plan { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.plan h3 { font-size: 28px; }
.plan-price .amount { font-size: 44px; font-weight: 600; color: var(--sea); line-height: 1.1; }
.plan-price .per, .plan-price .from { color: var(--text-3); }
.plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; line-height: 1.4; }
.plan-list li { display: flex; gap: 10px; align-items: flex-start; }
.plan-list li.off { color: #5F6F7D; }
.plan-cta { margin-top: auto; padding: 14px; }
.plan-featured { background: var(--sea); border-color: var(--sea); color: var(--cal); }
.plan-featured .amount { color: var(--cal); }
.plan-featured .per { color: var(--on-blue); }
.plan-featured .ico { fill: var(--peach); stroke: var(--ink); }
.plan-featured .ico-off { fill: none; stroke: #A9C1D7; }
.plan-featured .ico-off circle { stroke: #7FA2C2; }
.plan-featured li.off { color: #C8D7E4; }

.summer-wrap { padding-top: 16px; padding-bottom: 72px; }
.summer { background: var(--sand); border-radius: 12px; padding: 32px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.summer-text { flex: 1 1 480px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.summer h3 { font-size: 30px; }
.summer-text p { color: var(--text-2); }
.summer-cta { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.summer-cta .amount { font-size: 36px; }
.summer-cta .from, .summer-cta .per { color: var(--text-2); }

/* Extras */
.extras { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 0 40px; }
.extras li { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.extras li > div { display: flex; flex-direction: column; gap: 4px; }
.extras strong { font-weight: 600; font-size: 17px; }
.extras li > div span { font-size: 15px; color: var(--text-3); }
.extra-price { font-weight: 600; font-size: 18px; color: var(--sea); white-space: nowrap; }

/* Sensores */
.sensors { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.sensors-text { flex: 1 1 440px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sensor-steps { flex: 1 1 380px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sensor-steps li { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.sensor-steps .muted { font-size: 13px; }
.sensor-steps strong { font-weight: 600; }
.sensor-steps .sensor-report { background: var(--sea); border-color: var(--sea); color: var(--cal); }
.sensor-report span { font-size: 13px; color: var(--on-blue); }
.sensor-report strong.serif { font-size: 20px; font-weight: 400; }

/* Zonas */
.areas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.areas li { background: var(--cal); color: var(--ink); padding: 10px 18px; border-radius: 999px; font-weight: 500; }

/* Confianza */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.trust h3 { font-size: 22px; color: var(--sea); margin-bottom: 6px; }
.trust p { font-size: 15px; color: var(--text-2); }

/* Preguntas */
.faq { display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }
.faq h2 { margin-bottom: 8px; font-size: clamp(32px, 4vw, 38px); }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.faq summary { font-size: 18px; font-weight: 500; cursor: pointer; padding: 18px 52px 18px 22px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 24px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--sea); border-bottom: 2px solid var(--sea); transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 22px 18px; color: var(--text-2); line-height: 1.55; }

/* Contacto */
.contact { display: flex; flex-wrap: wrap; gap: 48px; padding-bottom: 80px; }
.contact-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; min-width: 0; }
.wa-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 17px; text-decoration: none; min-height: 44px; }
.wa-link:hover { text-decoration: underline; }
.mail-link { font-size: 16px; }
.contact-form { flex: 1 1 460px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; align-content: start; min-width: 0; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.contact-form .opt { font-weight: 400; color: var(--text-3); }
.contact-form input:not([type="checkbox"]), .contact-form select, .contact-form textarea { font: inherit; font-weight: 400; font-size: 16px; color: var(--ink); padding: 13px 14px; border: 1px solid var(--field); border-radius: 6px; background: var(--white); width: 100%; }
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--sea); outline: 2px solid rgba(28, 93, 143, .25); outline-offset: 0; }
.contact-form .invalid { border-color: #B3261E !important; }
.prefer { border: 0; margin: 0; padding: 0; min-width: 0; }
.prefer legend { font-size: 14px; font-weight: 500; padding: 0; margin-bottom: 6px; }
.prefer-options { display: flex; flex-wrap: wrap; gap: 8px; }
.prefer-options label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; font-size: 15px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--field); border-radius: 999px; background: var(--white); cursor: pointer; }
.prefer-options input { width: 18px; height: 18px; margin: 0; accent-color: var(--sea); }
.prefer-options label:has(input:checked) { border-color: var(--sea); background: #EAF1F7; }
.prefer.invalid .prefer-options label { border-color: #B3261E; }
.consent.full { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 14px; color: var(--text-2); }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--sea); }
.choice { background: var(--sand); border-radius: 8px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; font-size: 15px; }
.choice[hidden] { display: none; }
.choice strong { font-weight: 600; }
.form-status { font-size: 15px; min-height: 0; }
.form-status.ok { background: #E3EFE6; color: #1F4D2B; border-radius: 8px; padding: 14px 16px; }
.form-status.error { background: #F9E1DE; color: #7A1E16; border-radius: 8px; padding: 14px 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Pie */
.site-footer { background: var(--ink); color: var(--on-blue); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding-top: 32px; padding-bottom: 32px; font-size: 14px; }
.footer-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-brand .serif { font-size: 20px; color: var(--cal); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--on-blue); }
.footer-links a:hover { color: var(--white); }

/* Cookies */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 720px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; box-shadow: 0 18px 40px -12px rgba(20, 50, 74, .35); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; font-size: 15px; }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { flex: 1 1 320px; color: var(--text-2); }
.cookie-actions { display: flex; gap: 10px; }

/* Páginas legales */
.prose { display: flex; flex-direction: column; gap: 14px; line-height: 1.6; color: var(--text-2); }
.prose h1 { font-size: clamp(34px, 5vw, 44px); color: var(--ink); margin-bottom: 8px; }
.prose h2 { font-size: 20px; font-weight: 600; color: var(--ink); margin-top: 18px; }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.prose strong { color: var(--ink); }

@media (max-width: 600px) {
  .wrap, .wrap-narrow { padding-left: 16px; padding-right: 16px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .band { padding: 56px 0; }
  .hero { padding-top: 40px; gap: 36px; }
  .plan, .summer { padding: 24px; }
  .sensor-steps { grid-template-columns: minmax(0, 1fr); }
  .actions .btn { flex: 1 1 100%; }
  .report { padding: 18px; }
  .site-nav { padding-left: 16px; padding-right: 16px; }
}
