/* Electromobility & Energy — hoja de estilos principal */
:root {
  --bg: #0b0c0d;
  --bg-2: #101213;
  --surface: #15181a;
  --surface-2: #1b1f22;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #eeeee9;
  --muted: #9b9e99;
  --faint: #6b6e6a;
  --accent: #99cc33;
  --accent-2: #b8e05c;
  --accent-ink: #0b0c0d;
  --graphite: #5b5b5e;
  /* Paleta de marca extendida: marfil solar y verde profundo para secciones claras */
  --ivory: #f3f1ea;
  --ivory-2: #e9e6dc;
  --ink: #121314;
  --green-deep: #4d7a14;
  --danger: #e2735c;
  --radius: 18px;
  --radius-sm: 10px;
  --max: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --font: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Cormorant Garamond", "Calisto MT", Georgia, serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 300; letter-spacing: -.025em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(44px, 7.4vw, 104px); }
h2 { font-size: clamp(34px, 4.8vw, 64px); }
h3 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 400; letter-spacing: -.015em; line-height: 1.2; }
h1 em, h2 em, h3 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--accent); }
p { margin: 0; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 640px; line-height: 1.55; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 28px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent;
  font-size: 15px; font-weight: 500; letter-spacing: .01em; cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
  white-space: nowrap;
}
.btn:hover { border-color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-light { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-light:hover { background: #fff; }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.link-arrow { display: inline-flex; gap: 8px; align-items: center; color: var(--text); font-weight: 500; border-bottom: 1px solid var(--line-2); padding-bottom: 4px; transition: border-color .3s; }
.link-arrow:hover { border-color: var(--accent); }

/* ---------- Encabezado ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled, .site-header.solid {
  background: rgba(11, 12, 13, .78);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-color: var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 24px; }
.brand img { height: 38px; width: auto; }
.nav-links { display: flex; gap: 34px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 14px; color: var(--muted); letter-spacing: .02em; transition: color .25s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 1px; background: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.cart-btn {
  position: relative; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-2); background: transparent; cursor: pointer;
  display: grid; place-items: center; transition: border-color .25s;
}
.cart-btn:hover { border-color: var(--text); }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; display: none; align-items: center; justify-content: center;
}
.cart-count.show { display: inline-flex; }
.menu-toggle { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; cursor: pointer; }
.menu-toggle span { display: block; width: 16px; height: 1.5px; background: var(--text); margin: 4px auto; transition: transform .3s; }

@media (max-width: 960px) {
  .nav-links {
    position: fixed; inset: 84px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(11, 12, 13, .97); backdrop-filter: blur(18px);
    padding: 12px var(--gutter) 28px; border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .35s var(--ease);
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { display: block; padding: 16px 0; font-size: 20px; color: var(--text); border-bottom: 1px solid var(--line); }
  .nav-links a.active::after { display: none; }
  .menu-toggle { display: block; }
  .nav-actions .btn { display: none; }
  .brand img { height: 32px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding: 140px 0 72px; overflow: hidden; isolation: isolate; }
.hero-art { position: absolute; inset: 0; z-index: -1; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,12,13,.2) 0%, rgba(11,12,13,0) 40%, rgba(11,12,13,.85) 88%, var(--bg) 100%); }
.hero-ring { position: absolute; right: -14vw; top: 50%; width: min(1100px, 92vw); aspect-ratio: 1; transform: translateY(-56%); }
.hero-ring .ring-arc { stroke-dasharray: 2600; stroke-dashoffset: 2600; animation: draw 3.2s .2s var(--ease) forwards; }
.hero-ring .glow { animation: breathe 7s ease-in-out infinite; transform-origin: center; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes breathe { 0%,100% { opacity: .55; transform: scale(1); } 50% { opacity: .85; transform: scale(1.04); } }
.hero-content { position: relative; }
.hero h1 { max-width: 980px; }
.hero .lead { margin-top: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px; }
.hero-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 88px; padding-top: 28px; border-top: 1px solid var(--line); max-width: 900px; }
.hero-meta strong { display: block; font-weight: 300; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.02em; }
.hero-meta span { color: var(--muted); font-size: 14px; }
@media (max-width: 640px) { .hero-meta { grid-template-columns: 1fr; gap: 18px; margin-top: 56px; } .hero-ring { right: -40vw; top: 34%; width: 130vw; } }

/* ---------- Secciones ---------- */
section { position: relative; }
.section { padding: clamp(88px, 12vw, 168px) 0; }
.section-tight { padding: clamp(64px, 8vw, 112px) 0; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: clamp(48px, 6vw, 88px); }
.section-head .lead { justify-self: end; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; gap: 24px; } .section-head .lead { justify-self: start; } }
.section-head h2 { margin-top: 20px; }
.divider { height: 1px; background: var(--line); }

/* Manifiesto */
.manifesto p { font-size: clamp(26px, 3.4vw, 46px); font-weight: 300; letter-spacing: -.02em; line-height: 1.22; max-width: 1080px; }
.manifesto p span { color: var(--faint); }

/* Secciones claras (marfil) */
.light { background: var(--ivory); color: var(--ink); }
.light .eyebrow { color: #5c5f5a; }
.light .eyebrow::before { background: var(--green-deep); }
.light .lead, .light .step p { color: #55585a; }
.light .step { border-color: rgba(18,19,20,.16); }
.light .step::before { color: var(--green-deep); }
.light h1 em, .light h2 em, .light h3 em { color: var(--green-deep); }
.light.manifesto p span { color: #8d8f89; }
.light .btn { border-color: rgba(18,19,20,.25); }
.light .btn:hover { border-color: var(--ink); }
.footer-slogan { font-family: var(--font-serif); font-style: italic; font-size: 22px; color: var(--accent) !important; margin-bottom: 10px; }

/* Himno de la marca */
.anthem { display: inline-flex; align-items: center; gap: 18px; margin-top: 56px; padding: 12px 24px 12px 12px; border-radius: 999px; border: 1px solid rgba(18,19,20,.14); background: rgba(255,255,255,.5); }
.anthem-btn { position: relative; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--ink); color: var(--accent); cursor: pointer; display: grid; place-items: center; flex-shrink: 0; transition: transform .3s var(--ease); }
.anthem-btn:hover { transform: scale(1.05); }
.anthem-btn svg.ring { position: absolute; inset: -4px; width: 64px; height: 64px; transform: rotate(-90deg); }
.anthem-btn .ring circle { fill: none; stroke: var(--green-deep); stroke-width: 2; stroke-dasharray: 188.5; stroke-dashoffset: 188.5; transition: stroke-dashoffset .25s linear; }
.anthem-btn .i-pause { display: none; }
.anthem.playing .anthem-btn .i-play { display: none; }
.anthem.playing .anthem-btn .i-pause { display: block; }
.anthem-label { display: block; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #5c5f5a; }
.anthem-title { display: block; font-family: var(--font-serif); font-style: italic; font-size: 21px; line-height: 1.2; color: var(--ink); }
.anthem-eq { display: inline-flex; gap: 3px; align-items: flex-end; height: 18px; margin-left: 4px; }
.anthem-eq i { width: 3px; height: 4px; background: var(--green-deep); border-radius: 2px; }
.anthem.playing .anthem-eq i { animation: eq .9s ease-in-out infinite; }
.anthem.playing .anthem-eq i:nth-child(2) { animation-delay: .15s; } .anthem.playing .anthem-eq i:nth-child(3) { animation-delay: .3s; } .anthem.playing .anthem-eq i:nth-child(4) { animation-delay: .45s; }
@keyframes eq { 0%,100% { height: 4px; } 50% { height: 18px; } }
.anthem-time { font-size: 13px; color: #5c5f5a; font-variant-numeric: tabular-nums; min-width: 40px; }
@media (max-width: 520px) { .anthem { gap: 12px; padding-right: 16px; } .anthem-title { font-size: 17px; } .anthem-eq { display: none; } }

/* Servicios */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.service { background: var(--bg); padding: clamp(32px, 4vw, 56px); display: flex; flex-direction: column; gap: 20px; min-height: 380px; position: relative; transition: background .5s var(--ease); }
.service:hover { background: var(--bg-2); }
.service .num { font-size: 13px; color: var(--faint); letter-spacing: .1em; }
.service .icon { width: 52px; height: 52px; color: var(--accent); }
.service p { color: var(--muted); max-width: 440px; }
.service ul { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.service li { font-size: 13px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); }
@media (max-width: 780px) { .services { grid-template-columns: 1fr; } .service { min-height: 0; } }

/* Proceso */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.step { border-top: 1px solid var(--line-2); padding-top: 28px; }
.step::before { counter-increment: step; content: "0" counter(step); display: block; font-size: 13px; color: var(--accent); letter-spacing: .1em; margin-bottom: 40px; }
.step h3 { margin-bottom: 12px; }
.step p { color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Herramientas (calculadoras) */
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.tool-card {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface);
  padding: clamp(32px, 4vw, 52px); min-height: 440px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  transition: border-color .4s var(--ease), transform .5s var(--ease);
}
.tool-card:hover { border-color: var(--line-2); transform: translateY(-4px); }
.tool-card .art { position: absolute; right: -60px; top: -60px; width: 320px; height: 320px; opacity: .9; pointer-events: none; }
.tool-card h3 { font-size: clamp(28px, 3vw, 40px); font-weight: 300; letter-spacing: -.02em; line-height: 1.1; max-width: 380px; }
.tool-card p { color: var(--muted); max-width: 420px; margin-top: 16px; }
@media (max-width: 780px) { .tools { grid-template-columns: 1fr; } .tool-card { min-height: 360px; } }

/* Noticias */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.news-card { display: flex; flex-direction: column; gap: 18px; group: card; }
.news-thumb { aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); position: relative; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.news-card:hover .news-thumb img, .news-card:hover .news-thumb svg { transform: scale(1.04); }
.news-thumb svg { width: 100%; height: 100%; transition: transform 1.2s var(--ease); }
.news-tag { position: absolute; left: 14px; top: 14px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; background: rgba(11,12,13,.72); backdrop-filter: blur(8px); padding: 6px 10px; border-radius: 999px; }
.news-tag.solar { color: var(--accent); }
.news-meta { font-size: 13px; color: var(--faint); display: flex; gap: 10px; flex-wrap: wrap; }
.news-card h3 { font-size: 21px; line-height: 1.3; transition: color .3s; }
.news-card:hover h3 { color: var(--accent); }
.news-card p { color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-feature { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; margin-bottom: 72px; }
.news-feature .news-thumb { aspect-ratio: 16 / 10; }
.news-feature h3 { font-size: clamp(28px, 3vw, 42px); font-weight: 300; line-height: 1.12; letter-spacing: -.02em; }
.news-feature p { -webkit-line-clamp: 5; font-size: 17px; }
@media (max-width: 960px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .news-feature { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; transition: .25s; }
.chip:hover { color: var(--text); border-color: var(--text); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.6s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Productos */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .35s var(--ease), transform .45s var(--ease); cursor: pointer; }
.product:hover { border-color: var(--line-2); transform: translateY(-4px); }
.product-media { aspect-ratio: 1; background: radial-gradient(120% 90% at 50% 0%, #22272a 0%, var(--surface) 70%); display: grid; place-items: center; padding: 18%; position: relative; }
.product-media svg, .product-media img { width: 100%; height: 100%; object-fit: contain; }
.product-badge { position: absolute; left: 14px; top: 14px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.product-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-cat { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.product-name { font-size: 17px; line-height: 1.35; font-weight: 500; }
.product-spec { font-size: 14px; color: var(--muted); }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 14px; gap: 10px; }
.price { font-size: 20px; font-weight: 400; letter-spacing: -.01em; }
.price small { font-size: 12px; color: var(--faint); display: block; letter-spacing: 0; }
.add-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; cursor: pointer; display: grid; place-items: center; transition: .25s; flex-shrink: 0; }
.add-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (max-width: 1080px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .product-body { padding: 16px; } .product-name { font-size: 15px; } .price { font-size: 17px; } }

.shop-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 40px; }
.search { position: relative; min-width: 260px; flex: 0 1 340px; }
.search input { width: 100%; height: 44px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; padding: 0 18px 0 44px; outline: none; transition: border-color .25s; }
.search input:focus { border-color: var(--text); }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
@media (max-width: 600px) { .search { min-width: 0; flex: 1 1 100%; } }

/* Drawer (carrito) y modal */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); }
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--bg-2); border-left: 1px solid var(--line); z-index: 90; transform: translateX(100%); transition: transform .45s var(--ease); display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 24px 28px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 22px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--text); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 28px; }
.drawer-foot { padding: 24px 28px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item .thumb { width: 64px; height: 64px; border-radius: 10px; background: var(--surface); padding: 10px; }
.cart-item .name { font-size: 15px; line-height: 1.35; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; margin-top: 8px; }
.qty button { width: 30px; height: 30px; border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.qty button:hover { color: var(--text); }
.qty span { min-width: 22px; text-align: center; font-size: 14px; }
.cart-empty { text-align: center; padding: 72px 0; color: var(--muted); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; }
.total-row strong { font-size: 26px; font-weight: 300; }

.modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); width: min(980px, 100%); max-height: 92vh; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; transform: translateY(16px); transition: transform .45s var(--ease); position: relative; }
.modal.open .modal-card { transform: none; }
.modal-card .product-media { aspect-ratio: auto; min-height: 380px; padding: 14%; border-radius: var(--radius) 0 0 var(--radius); }
.modal-info { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 16px; }
.modal-info h3 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 300; }
.spec-list { list-style: none; padding: 0; margin: 4px 0; border-top: 1px solid var(--line); }
.spec-list li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec-list li span:first-child { color: var(--muted); }
.spec-list li span:last-child { text-align: right; }
.modal-close { position: absolute; top: 16px; right: 16px; z-index: 2; background: var(--bg-2); }
@media (max-width: 760px) { .modal-card { grid-template-columns: 1fr; } .modal-card .product-media { min-height: 240px; border-radius: var(--radius) var(--radius) 0 0; } }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .label { font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.field .hint { font-size: 12px; color: var(--faint); }
.input, .select, .textarea {
  width: 100%; height: 50px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--bg-2); padding: 0 16px; outline: none; transition: border-color .25s, background .25s;
  font-size: 16px;
}
.textarea { height: auto; min-height: 120px; padding: 14px 16px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); background: var(--bg); }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%239b9e99' stroke-width='1.5'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.select option { background: var(--bg-2); }
.input-unit { position: relative; }
.input-unit .input { padding-right: 70px; }
.input-unit .unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--faint); pointer-events: none; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.segmented { display: inline-flex; padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; gap: 2px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; cursor: pointer; color: var(--muted); font-size: 14px; transition: .25s; }
.segmented button.active { background: var(--text); color: var(--bg); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 2px; background: var(--line-2); border-radius: 2px; outline: none; margin: 14px 0; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 4px solid var(--bg); box-shadow: 0 0 0 1px var(--accent); }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 4px solid var(--bg); box-shadow: 0 0 0 1px var(--accent); }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.form-msg { font-size: 14px; min-height: 20px; }
.form-msg.ok { color: var(--accent); }
.form-msg.err { color: var(--danger); }

/* ---------- Calculadoras ---------- */
.page-hero { padding: 168px 0 64px; position: relative; overflow: hidden; }
.page-hero h1 { font-size: clamp(42px, 6vw, 84px); margin-top: 22px; max-width: 980px; }
.page-hero .lead { margin-top: 24px; }
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: start; }
@media (max-width: 1000px) { .calc { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3.4vw, 44px); }
.panel + .panel { margin-top: 24px; }
.panel-title { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 26px; display: flex; align-items: center; gap: 12px; }
.panel-title b { color: var(--accent); font-weight: 500; }
.stack { display: grid; gap: 22px; }
.months { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.months .field label { font-size: 12px; }
.months .input { height: 44px; font-size: 15px; padding: 0 10px; }
@media (max-width: 480px) { .months { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.results { position: sticky; top: 108px; }
.result-hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.kpi { background: var(--surface); padding: 22px; }
.kpi .k-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi .k-value { font-size: clamp(28px, 3.2vw, 40px); font-weight: 300; letter-spacing: -.02em; margin-top: 6px; line-height: 1.1; }
.kpi .k-value small { font-size: 15px; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.kpi.highlight { background: var(--accent); color: var(--accent-ink); }
.kpi.highlight .k-label, .kpi.highlight .k-value small { color: rgba(11,12,13,.7); }
.kpi.wide { grid-column: 1 / -1; }
.detail-list { list-style: none; padding: 0; margin: 24px 0 0; }
.detail-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.detail-list li span:first-child { color: var(--muted); }
.detail-list li span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.chart { margin-top: 28px; }
.chart-legend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: middle; }
.chart svg text { fill: var(--faint); font-size: 11px; font-family: var(--font); }
.note { font-size: 13px; color: var(--faint); line-height: 1.55; margin-top: 18px; }
.time-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 15px; }
.time-table th, .time-table td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.time-table th { color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.time-table td:last-child, .time-table th:last-child { text-align: right; }
.compare-bar { margin-top: 18px; display: grid; gap: 14px; }
.compare-bar .row { display: grid; grid-template-columns: 110px 1fr 90px; gap: 14px; align-items: center; font-size: 14px; }
.compare-bar .track { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.compare-bar .fill { height: 100%; border-radius: 6px; transition: width .6s var(--ease); }
.compare-bar .row span:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 96px); }
.contact-info { display: grid; gap: 28px; align-content: start; }
.contact-info .item span { display: block; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.contact-info .item a, .contact-info .item p { font-size: 20px; font-weight: 300; }
.contact-info .item a:hover { color: var(--accent); }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

/* CTA final */
.cta-band { border-radius: calc(var(--radius) + 8px); background: var(--surface); border: 1px solid var(--line); padding: clamp(40px, 7vw, 96px); position: relative; overflow: hidden; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; }
.cta-band .art { position: absolute; right: -120px; bottom: -220px; width: 560px; opacity: .8; pointer-events: none; }
.cta-band > * { position: relative; }
.cta-band .actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 860px) { .cta-band { grid-template-columns: 1fr; } .cta-band .actions { justify-content: flex-start; } }

/* ---------- Pie ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 80px 0 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-grid h4 { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin-bottom: 18px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--muted); font-size: 15px; transition: color .25s; }
.footer-grid a:hover { color: var(--text); }
.footer-brand img { height: 40px; width: auto; margin-bottom: 20px; }
.footer-brand p { color: var(--muted); max-width: 340px; font-size: 15px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* WhatsApp flotante */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 12px 40px rgba(153,204,51,.28); transition: transform .3s var(--ease); }
.wa-float:hover { transform: scale(1.06); }

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 14px 22px; border-radius: 999px; font-size: 14px; z-index: 120; opacity: 0; pointer-events: none; transition: .4s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
