/* ============ RESET & TOKENS ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:        #0f6d5c;   /* verde aislamiento/energía */
  --brand-dark:   #0a4d41;
  --brand-light:  #e6f4f1;
  --accent:       #f5a623;   /* naranja CTA/energía */
  --ink:          #14211f;
  --muted:        #5c6b68;
  --line:         #dfe6e4;
  --bg:           #ffffff;
  --bg-soft:      #f4f8f7;
  --error:        #d13b3b;
  --radius:       14px;
  --shadow:       0 10px 40px rgba(15, 109, 92, .12);
  --shadow-sm:    0 2px 10px rgba(20, 33, 31, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
sup a { text-decoration: none; }
img { max-width: 100%; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4em;
  font-family: inherit; font-size: 1rem; font-weight: 700;
  border: none; border-radius: var(--radius);
  padding: .85em 1.6em; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none; line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #3a2600; box-shadow: 0 6px 18px rgba(245,166,35,.35); }
.btn--primary:hover { background: #ffb733; }
.btn--light { background: #fff; color: var(--brand-dark); }
.btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--bg-soft); }
.btn--lg { font-size: 1.1rem; padding: 1em 1.9em; }
.btn--sm { font-size: .85rem; padding: .55em 1em; }
.btn--block { width: 100%; }

/* ============ HERO ============ */
.hero {
  background: linear-gradient(160deg, var(--brand-dark) 0%, var(--brand) 60%, #128a74 100%);
  color: #fff;
  padding: 0 clamp(1rem, 4vw, 3rem) clamp(2rem, 6vw, 4rem);
}
.hero__brand { padding: 1.4rem 0; }
.hero__logo { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.hero__content {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: 1fr;
  max-width: 1140px; margin: 0 auto;
  align-items: start;
}
@media (min-width: 940px) {
  .hero__content { grid-template-columns: 1.05fr .95fr; align-items: center; }
}
.hero__badge {
  display: inline-block; background: rgba(255,255,255,.15);
  padding: .3em .9em; border-radius: 999px; font-size: .8rem; font-weight: 700;
  margin-bottom: 1rem; backdrop-filter: blur(4px);
}
.hero__title {
  font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.1;
  font-weight: 800; letter-spacing: -.02em; margin-bottom: 1rem;
}
.hero__title-accent { color: var(--accent); display: block; }
.hero__subtitle { font-size: clamp(1rem, 2.2vw, 1.2rem); opacity: .95; margin-bottom: 1.2rem; max-width: 34ch; }
.hero__subtitle sup a { color: var(--accent); }
.hero__points { list-style: none; margin-bottom: 1.6rem; display: grid; gap: .5rem; }
.hero__points li { padding-left: 1.7rem; position: relative; opacity: .96; }
.hero__points li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 800;
}
.hero__cta { margin-bottom: .8rem; }
.hero__reassure { font-size: .82rem; opacity: .8; }

/* ============ CALCULADORA ============ */
.calc {
  background: #fff; color: var(--ink);
  border-radius: 20px; padding: clamp(1.3rem, 3vw, 2rem);
  box-shadow: var(--shadow);
  position: relative;
}
.calc__progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: .6rem; }
.calc__progress-bar { height: 100%; width: 12.5%; background: var(--brand); border-radius: 999px; transition: width .35s ease; }
.calc__step-label { font-size: .78rem; color: var(--muted); margin-bottom: 1.2rem; font-weight: 600; }

.step { display: none; border: none; }
.step.is-active { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.step__title { font-size: 1.3rem; font-weight: 800; margin-bottom: 1.1rem; line-height: 1.25; }
.step__title--sm { font-size: 1.1rem; margin-top: .4rem; }
.step__help { font-size: .9rem; color: var(--muted); margin: -.7rem 0 1rem; }

.options { display: grid; gap: .6rem; }
.options--grid { grid-template-columns: 1fr 1fr; }
.option {
  font-family: inherit; font-size: 1rem; font-weight: 600; text-align: left;
  padding: 1em 1.1em; border: 2px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink); cursor: pointer;
  transition: all .12s ease;
}
.options--grid .option { text-align: center; }
.option:hover { border-color: var(--brand); background: var(--brand-light); }
.option.is-selected { border-color: var(--brand); background: var(--brand-light); box-shadow: inset 0 0 0 1px var(--brand); }

/* Inputs */
.input {
  width: 100%; font-family: inherit; font-size: 1rem;
  padding: .85em 1em; border: 2px solid var(--line); border-radius: var(--radius);
  color: var(--ink); background: #fff; margin-bottom: .3rem;
}
.input:focus { outline: none; border-color: var(--brand); }
.input--big { font-size: 1.4rem; text-align: center; letter-spacing: .15em; margin-bottom: 1rem; }
.field-label { display: block; font-weight: 700; font-size: .9rem; margin: .8rem 0 .35rem; }
.field-error { color: var(--error); font-size: .82rem; margin: .1rem 0 .3rem; font-weight: 600; }
.next-btn { margin-top: .4rem; }

/* Honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Consentimientos */
.consent {
  display: flex; gap: .65rem; align-items: flex-start;
  font-size: .86rem; color: var(--muted); line-height: 1.45;
  margin-top: 1rem; cursor: pointer;
}
.consent input { margin-top: .2rem; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--brand); }
.consent--optional { opacity: .9; }
.consent .req { color: var(--error); font-weight: 700; }
.calc__legal-note { font-size: .72rem; color: var(--muted); margin-top: 1rem; line-height: 1.4; }

.calc__back {
  background: none; border: none; color: var(--muted); font-family: inherit;
  font-size: .88rem; font-weight: 600; cursor: pointer; margin-top: 1rem; padding: .3rem 0;
}
.calc__back:hover { color: var(--ink); }

/* Calculando */
.step--calculating.is-active { text-align: center; padding: 2rem 0; }
.calculating__spinner {
  width: 54px; height: 54px; border-radius: 50%;
  border: 5px solid var(--brand-light); border-top-color: var(--brand);
  margin: 0 auto 1.2rem; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.calculating__text { font-weight: 700; color: var(--muted); }

/* Resultado */
.result {
  background: var(--brand-light); border-radius: var(--radius);
  padding: 1.4rem; text-align: center; margin-bottom: 1.2rem;
  border: 2px solid #c9e6df;
}
.result__eyebrow { font-size: .8rem; font-weight: 700; color: var(--brand-dark); text-transform: uppercase; letter-spacing: .05em; }
.result__value { font-size: 2.6rem; font-weight: 800; color: var(--brand); line-height: 1.1; margin: .2rem 0; }
.result__label { font-size: .92rem; color: var(--muted); }
.result__label sup a { color: var(--brand); }

/* ============ SECTIONS ============ */
.section { padding: clamp(2.5rem, 7vw, 5rem) clamp(1rem, 4vw, 3rem); max-width: 1140px; margin: 0 auto; }
.section__title { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; text-align: center; letter-spacing: -.02em; margin-bottom: 2.5rem; }

.benefits__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; }
.benefit { background: var(--bg-soft); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.benefit__icon { font-size: 2rem; margin-bottom: .6rem; }
.benefit h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.benefit p { color: var(--muted); font-size: .95rem; }

.how { background: var(--bg-soft); max-width: none; }
.how > * { max-width: 1140px; margin-left: auto; margin-right: auto; }
.how__steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.how__step { text-align: center; padding: 1rem; }
.how__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 1.3rem; margin-bottom: .8rem;
}
.how__step h3 { margin-bottom: .4rem; }
.how__step p { color: var(--muted); font-size: .95rem; }
.how__cta { text-align: center; margin-top: 2.5rem; }

.trust { background: var(--brand-dark); color: #fff; max-width: none; padding: 2rem 1rem; }
.trust__inner { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; text-align: center; }
.trust__item strong { display: block; font-size: 1.1rem; }
.trust__item span { opacity: .8; font-size: .9rem; }

.faq__list { max-width: 720px; margin: 0 auto; display: grid; gap: .8rem; }
.faq__item { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; background: #fff; }
.faq__item summary { font-weight: 700; cursor: pointer; list-style: none; position: relative; padding-right: 1.6rem; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: 0; top: -.1rem; font-size: 1.3rem; color: var(--brand); font-weight: 700; }
.faq__item[open] summary::after { content: "−"; }
.faq__item p { color: var(--muted); font-size: .95rem; margin-top: .7rem; }

.final-cta { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; text-align: center; max-width: none; }
.final-cta h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: .5rem; }
.final-cta p { opacity: .9; margin-bottom: 1.6rem; }

/* ============ FOOTER ============ */
.footer { background: #0a1614; color: #b8c4c1; padding: 2.5rem clamp(1rem, 4vw, 3rem); font-size: .85rem; }
.footer__legal-links { display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: center; margin-bottom: 1.2rem; }
.footer__legal-links a, .footer__link-btn { color: #e6efed; text-decoration: none; }
.footer__legal-links a:hover, .footer__link-btn:hover { text-decoration: underline; }
.footer__link-btn { background: none; border: none; font-family: inherit; font-size: inherit; cursor: pointer; padding: 0; }
.footer__company { text-align: center; margin-bottom: 1rem; opacity: .85; }
.footer__disclaimer { text-align: center; font-size: .75rem; opacity: .6; max-width: 720px; margin: 0 auto; line-height: 1.5; }

/* ============ COOKIE BANNER ============ */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  background: #fff; box-shadow: 0 -6px 30px rgba(0,0,0,.15);
  padding: 1rem clamp(1rem, 4vw, 2rem);
}
.cookie-banner__inner { max-width: 1140px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.cookie-banner__text { font-size: .85rem; color: var(--muted); flex: 1 1 340px; }
.cookie-banner__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.cookie-config { max-width: 1140px; margin: 1rem auto 0; border-top: 1px solid var(--line); padding-top: 1rem; display: grid; gap: .7rem; }
.cookie-config__row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .85rem; }
.cookie-config__row input { width: 20px; height: 20px; accent-color: var(--brand); }

/* ============ LEGAL PAGES ============ */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem); }
.legal__back { display: inline-block; margin-bottom: 1.5rem; font-weight: 600; text-decoration: none; }
.legal h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: .5rem; letter-spacing: -.02em; }
.legal .legal__updated { color: var(--muted); font-size: .85rem; margin-bottom: 2rem; }
.legal h2 { font-size: 1.25rem; margin: 2rem 0 .7rem; }
.legal h3 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; }
.legal p, .legal li { color: #33403d; margin-bottom: .8rem; }
.legal ul, .legal ol { padding-left: 1.4rem; margin-bottom: 1rem; }
.legal li { margin-bottom: .4rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .9rem; }
.legal th, .legal td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: left; vertical-align: top; }
.legal th { background: var(--bg-soft); }
.legal .placeholder { background: #fff4d6; padding: 0 .3em; border-radius: 4px; font-weight: 600; }
.legal__note { background: var(--brand-light); border-left: 4px solid var(--brand); padding: 1rem 1.2rem; border-radius: 8px; font-size: .9rem; margin: 1.5rem 0; }
