/* ==========================================================
   NIDEA · Sistema visual
   Cal, concreto, cantera, nogal y luz.
   ========================================================== */

:root {
  --cal: #F7F6F3;
  --cal-2: #EFEDE8;
  --concreto: #E4E0D8;
  --linea: #D8D4CC;
  --cantera: #B99B86;
  --nogal: #2A2420;
  --nogal-2: #6B6159;
  --nogal-3: #8F857C;
  --luz: #E2A650;
  --luz-suave: #F3DDB6;
  --papel: #FCFBF9;
  --alerta: #B5533C;

  --sans: "Jost", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;

  --gutter: clamp(20px, 5vw, 56px);
  --section: clamp(96px, 13vw, 184px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --nav-h: 72px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--cal);
  color: var(--nogal);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--luz); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--luz-suave); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sprite symbol, svg use { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--nogal); color: var(--cal); padding: 10px 16px; font-family: var(--sans); }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Tipografía ---------- */
.h2 {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(2.1rem, 4.6vw, 3.9rem);
  line-height: 1.06;
  letter-spacing: -.022em;
  max-width: 20ch;
  text-wrap: balance;
}
.lede {
  margin-top: 1.4rem;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.55;
  color: var(--nogal-2);
  max-width: 38rem;
  text-wrap: pretty;
}
h3 { font-family: var(--sans); font-weight: 400; font-size: 1.35rem; line-height: 1.25; letter-spacing: -.005em; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 1.6rem;
  font-family: var(--sans); font-size: 1rem; font-weight: 400; letter-spacing: .01em;
  background: var(--nogal); color: var(--cal);
  border: 1px solid var(--nogal); border-radius: 3px;
  text-decoration: none;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn:hover { background: #3E3530; border-color: #3E3530; }
.btn-ghost { background: transparent; color: var(--nogal); border-color: var(--linea); }
.btn-ghost:hover { background: var(--cal-2); border-color: var(--cantera); }
.btn-light { background: var(--cal); color: var(--nogal); border-color: var(--cal); }
.btn-light:hover { background: #fff; border-color: #fff; }
.btn-small { min-height: 42px; padding: 0 1.1rem; font-size: .95rem; }
.btn-block { width: 100%; }

/* ---------- Segmentado ---------- */
.seg {
  display: inline-flex; padding: 4px; gap: 2px;
  border: 1px solid var(--linea); border-radius: 4px; background: var(--papel);
  font-family: var(--sans); font-size: .95rem;
}
.seg button, .seg label span {
  display: block; padding: .6rem 1.1rem; border-radius: 2px; color: var(--nogal-2);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.seg [aria-selected="true"], .seg input:checked + span { background: var(--nogal); color: var(--cal); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:focus-visible + span { outline: 2px solid var(--luz); outline-offset: 2px; }

/* ==========================================================
   Navegación
   ========================================================== */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.nav.is-scrolled { background: rgba(247, 246, 243, .88); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); box-shadow: 0 1px 0 rgba(42, 36, 32, .08); }
.nav-inner { height: var(--nav-h); max-width: 1280px; margin: 0 auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--nogal); }
.brand-mark { width: 22px; height: 26px; fill: none; }
.brand-mark path { stroke: currentColor; stroke-width: 4.4; }
.brand-mark circle { fill: var(--luz); }
.brand-word { width: 74px; height: 16px; overflow: visible; }
.brand-word g { fill: none; stroke: currentColor; stroke-width: 2.3; }
.nav-links { display: flex; gap: 1.9rem; margin-left: auto; font-family: var(--sans); font-size: .96rem; }
.nav-links a { text-decoration: none; color: var(--nogal-2); transition: color .25s; }
.nav-links a:hover { color: var(--nogal); }
.nav-cta-mobile { display: none; }
.nav-toggle { display: none; }

@media (max-width: 960px) {
  :root { --nav-h: 64px; }
  .nav-cta { display: none; }
  .nav-toggle {
    display: grid; place-content: center; gap: 7px; width: 44px; height: 44px; margin-left: auto; margin-right: -10px;
  }
  .nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--nogal); transition: transform .35s var(--ease); }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
  .nav-links {
    position: fixed; inset: calc(var(--nav-h) + env(safe-area-inset-top, 0px)) 0 0; z-index: -1;
    flex-direction: column; gap: 0; margin: 0; padding: 12px var(--gutter) 40px;
    background: var(--cal);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s .35s;
  }
  .nav-links.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav-links a { font-size: 1.7rem; font-weight: 300; color: var(--nogal); padding: 14px 0; border-bottom: 1px solid var(--concreto); }
  .nav-links .nav-cta-mobile { display: flex; margin-top: 28px; border: 0; font-size: 1.05rem; font-weight: 400; background: var(--nogal); color: var(--cal); justify-content: center; border-radius: 3px; }
  .nav.menu-open { background: var(--cal); }
}

/* ==========================================================
   1 · Portada
   ========================================================== */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding-block: calc(var(--nav-h) + 32px) 56px; }
.hero-inner { display: block; }
.hero-copy { max-width: 52%; }
.hero-title {
  font-family: var(--sans); font-weight: 300;
  font-size: clamp(2.9rem, 6.2vw, 6rem);
  line-height: 1; letter-spacing: -.035em;
}
.hero-title span { display: block; }
.hero-title span + span { color: var(--nogal-2); }
.hero-lede { margin-top: 2rem; font-size: clamp(1.1rem, 1.45vw, 1.28rem); line-height: 1.55; color: var(--nogal-2); max-width: 30rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2.4rem; }
.hero-cities { margin-top: 2.6rem; font-family: var(--sans); font-size: .9rem; color: var(--nogal-3); }
.hero-art {
  position: absolute; top: 0; right: 0; bottom: 0; width: 44%;
  display: grid; place-items: center;
  background-color: #E3DED6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .16 0 0 0 0 .14 0 0 0 0 .12 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(170deg, #EAE6DF, #DDD7CE);
}
.hero-art svg { height: min(74%, 700px); width: auto; margin-top: calc(var(--nav-h) * .6); }

/* Entrada orquestada de la portada */
.hero-title span, .hero-lede, .hero-actions, .hero-cities { opacity: 0; transform: translateY(14px); animation: rise 1.1s var(--ease) forwards; }
.hero-title span:nth-child(1) { animation-delay: .5s; }
.hero-title span:nth-child(2) { animation-delay: .75s; }
.hero-lede { animation-delay: 1.15s; }
.hero-actions { animation-delay: 1.35s; }
.hero-cities { animation-delay: 1.55s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .hero { display: block; min-height: auto; padding-top: 0; }
  .hero-inner { display: flex; flex-direction: column; }
  .hero-copy { max-width: none; padding-top: 30px; }
  .hero-art { order: -1; position: relative; width: auto; margin-inline: calc(-1 * var(--gutter)); height: min(46svh, 420px); padding-top: var(--nav-h); box-sizing: content-box; }
  .hero-art svg { height: 86%; margin: 4% 0 0; }
  .hero-lede { margin-top: 1.3rem; }
  .hero-actions { margin-top: 1.8rem; }
  .hero-actions .btn { flex: 1 1 200px; }
  .hero-cities { margin-top: 1.6rem; }
}

/* ==========================================================
   2 · Un día en casa
   ========================================================== */
.day { padding-top: var(--section); }
.day-intro { padding-bottom: clamp(40px, 6vw, 72px); }
.day-track { position: relative; height: 640vh; }
.day-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #C9D5DB; }
.day-scene { position: absolute; inset: 0; }
.day-scene svg { width: 100%; height: 100%; }
.day-scene .silhouette { fill: var(--sil, #8E948F); }
.day-scene .silhouette-line { stroke: var(--sil, #8E948F); fill: none; }
.day-scene .curtain { transition: none; }
#flow { animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -14; } }

.day-readout {
  position: absolute; top: calc(var(--nav-h) + 20px); right: var(--gutter);
  display: flex; gap: 2px; margin: 0;
  font-family: var(--sans);
}
.day-readout div { padding: 10px 16px; background: rgba(252, 251, 249, .7); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background .6s; }
.day-readout div:first-child { border-radius: 3px 0 0 3px; }
.day-readout div:last-child { border-radius: 0 3px 3px 0; min-width: 118px; }
.day-readout dt { font-size: .76rem; color: var(--nogal-2); letter-spacing: .02em; }
.day-readout dd { margin: 0; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.day-readout dd#roSolar { color: #9A6420; }

.day-panel {
  position: absolute; left: var(--gutter); top: calc(var(--nav-h) + 20px);
  width: min(410px, 32vw);
  display: flex; flex-direction: column;
  padding: 28px 30px 24px;
  background: rgba(252, 251, 249, .78);
  -webkit-backdrop-filter: blur(18px) saturate(1.1); backdrop-filter: blur(18px) saturate(1.1);
  border-radius: 4px;
  transition: background .8s var(--ease), color .8s var(--ease);
}
.day-clock { font-family: var(--sans); font-weight: 300; font-size: clamp(3.4rem, 6vw, 5.4rem); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.day-captions { display: grid; margin-top: 22px; align-content: start; }
.day-cap { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); transition: opacity .6s var(--ease), transform .6s var(--ease); pointer-events: none; }
.day-cap.is-active { opacity: 1; transform: none; pointer-events: auto; }
.day-cap h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); font-weight: 300; line-height: 1.15; letter-spacing: -.01em; }
.day-cap p { margin-top: 12px; font-size: 1.02rem; line-height: 1.55; color: var(--nogal-2); }
.day-log { margin-top: 18px; font-family: var(--sans); font-size: .9rem; color: var(--nogal-2); }
.day-log li { display: flex; gap: 14px; padding: 7px 0; border-top: 1px solid rgba(42, 36, 32, .1); }
.day-log time { width: 42px; flex: none; color: var(--nogal); font-variant-numeric: tabular-nums; }

.day-timeline { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 26px; padding-top: 14px; font-family: var(--sans); }
.day-progress { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: rgba(42, 36, 32, .12); }
.day-progress span { display: block; height: 100%; width: 0; background: var(--luz); }
.day-timeline button { text-align: left; padding: 4px 0; color: var(--nogal-3); transition: color .3s; }
.day-timeline button span { display: block; font-size: .82rem; }
.day-timeline button small { display: block; font-size: .72rem; opacity: .8; font-variant-numeric: tabular-nums; }
.day-timeline button.is-active { color: var(--nogal); }

/* Etiquetas que aparecen donde la casa reacciona */
.day-chips { position: absolute; inset: 0; pointer-events: none; }
.chip-ev {
  position: absolute; left: 0; top: 0;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px 6px 9px; border-radius: 999px;
  background: rgba(252, 251, 249, .9); color: var(--nogal);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-family: var(--sans); font-size: .82rem; line-height: 1; white-space: nowrap;
  box-shadow: 0 6px 18px -8px rgba(20, 16, 12, .35);
  opacity: 0; will-change: transform, opacity;
}
.chip-ev::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--luz); box-shadow: 0 0 0 3px rgba(226, 166, 80, .25); }
@media (max-width: 900px) { .chip-ev { font-size: .7rem; padding: 5px 9px 5px 7px; gap: 5px; } .chip-ev::before { width: 6px; height: 6px; } }

/* Noche: el panel se oscurece */
.day-sticky.is-night .day-panel { background: rgba(28, 26, 30, .62); color: #EEE8DF; }
.day-sticky.is-night .day-cap p, .day-sticky.is-night .day-log { color: #C9C0B5; }
.day-sticky.is-night .day-log li { border-color: rgba(255, 255, 255, .12); }
.day-sticky.is-night .day-log time { color: #EEE8DF; }
.day-sticky.is-night .day-progress { background: rgba(255, 255, 255, .16); }
.day-sticky.is-night .day-timeline button { color: #9D958C; }
.day-sticky.is-night .day-timeline button.is-active { color: #F4EEE6; }
.day-sticky.is-night .day-readout div { background: rgba(28, 26, 30, .55); color: #EEE8DF; }
.day-sticky.is-night .day-readout dt { color: #B8AFA5; }
.day-sticky.is-night .day-readout dd#roSolar { color: #EBC286; }

@media (max-width: 900px) {
  .day-track { height: 560vh; }
  .day-sticky { top: var(--nav-h); height: calc(100vh - var(--nav-h)); height: calc(100svh - var(--nav-h)); display: flex; flex-direction: column; background: var(--cal); }
  .day-scene { position: relative; inset: auto; flex: none; height: 49%; }
  .day-readout { top: 10px; left: 10px; right: 10px; justify-content: stretch; }
  .day-readout div { flex: 1; padding: 6px 8px; min-width: 0; }
  .day-readout div:last-child { min-width: 0; flex: 1.35; }
  .day-readout dt { font-size: .66rem; }
  .day-readout dd { font-size: .84rem; white-space: nowrap; }
  .day-panel {
    position: relative; inset: auto; width: auto; flex: 1; min-height: 0;
    padding: 16px var(--gutter) calc(14px + env(safe-area-inset-bottom, 0px));
    border-radius: 0; background: var(--cal); -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .day-clock { font-size: 1.05rem; font-weight: 400; letter-spacing: 0; color: var(--nogal-3); margin-bottom: 4px; }
  .day-captions { margin-top: 0; flex: 1; }
  .day-cap h3 { font-size: 1.35rem; }
  .day-cap p { font-size: .98rem; margin-top: 8px; line-height: 1.5; }
  .day-log { margin-top: 10px; font-size: .84rem; }
  .day-log li { padding: 5px 0; }
  .day-sticky.is-night { background: #1D1B1E; }
  .day-sticky.is-night .day-panel { background: #1D1B1E; }
  .day-sticky.is-night .day-clock { color: #8C847B; }
}
@media (max-width: 900px) and (max-height: 700px) {
  .day-log li:nth-child(n+3) { display: none; }
  .day-scene { height: 42%; }
}
@media (max-width: 380px) {
  .day-timeline button span { font-size: .72rem; }
  .day-cap p { font-size: .92rem; }
}

/* ==========================================================
   4 · El problema
   ========================================================== */
.problem { padding-block: var(--section); }
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 112px); align-items: center; }
.problem-list { margin-top: 2rem; display: grid; gap: 1rem; max-width: 34rem; }
.problem-list li { padding-top: 1rem; border-top: 1px solid var(--linea); color: var(--nogal-2); line-height: 1.5; }
.problem-list strong { display: block; font-family: var(--sans); font-weight: 400; color: var(--nogal); font-size: 1.05rem; }
.problem .seg { margin-top: 2.2rem; }
.problem-after { margin-top: 1rem; font-family: var(--sans); font-size: 1.05rem; min-height: 3em; max-width: 30rem; opacity: 0; transition: opacity .5s var(--ease); }
.problem-after.is-on { opacity: 1; }

.apps-field { position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; justify-self: center; }
.app-tile {
  position: absolute; left: var(--x); top: var(--y); width: 18%;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transform: rotate(var(--r));
  transition: left .9s var(--ease), top .9s var(--ease), transform .9s var(--ease), opacity .6s var(--ease);
  font-family: var(--sans); font-size: .78rem; color: var(--nogal-2);
}
.app-tile svg { width: 100%; aspect-ratio: 1; padding: 24%; border-radius: 24%; background: var(--c); color: #fff; box-shadow: 0 10px 24px -14px rgba(42, 36, 32, .5); }
.app-tile svg use { stroke-width: 1.4; }
.app-tile i {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center; border-radius: 11px;
  background: var(--alerta); color: #fff; font-style: normal; font-size: .72rem; font-weight: 500;
  box-shadow: 0 0 0 3px var(--cal);
}
.app-one {
  position: absolute; left: 50%; top: 50%; width: 26%;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transform: translate(-50%, -50%) scale(.6); opacity: 0;
  transition: transform .8s var(--ease) .5s, opacity .6s var(--ease) .5s;
  font-family: var(--sans); font-size: .95rem; letter-spacing: .18em;
}
.app-one-icon { width: 100%; aspect-ratio: 1; border-radius: 24%; background: var(--cal); box-shadow: 0 0 0 1px var(--linea), 0 30px 60px -30px rgba(42, 36, 32, .45); display: grid; place-items: center; }
.app-one-icon svg { width: 42%; fill: none; }
.app-one-icon path { stroke: var(--nogal); stroke-width: 4.2; }
.app-one-icon circle { fill: var(--luz); }
.apps-field[data-mode="calm"] .app-tile { left: 41%; top: 41%; transform: rotate(0) scale(.5); opacity: 0; }
.apps-field[data-mode="calm"] .app-one { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.app-tile:nth-child(2n) { transition-delay: .05s; }
.app-tile:nth-child(3n) { transition-delay: .1s; }

@media (max-width: 860px) {
  .problem-grid { grid-template-columns: 1fr; gap: 16px; }
  .problem-after { min-height: 2.6em; }
  .apps-field { order: 2; max-width: 420px; }
  .app-tile { font-size: .7rem; }
}

/* ==========================================================
   3 · La app
   ========================================================== */
.app { padding-block: var(--section); background: var(--cal-2); overflow: hidden; }
.app-grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.3fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.app-features { margin-top: 2.2rem; display: grid; gap: 4px; }
.app-features button {
  display: flex; gap: 16px; align-items: flex-start; text-align: left;
  padding: 16px 18px; border-radius: 4px; color: var(--nogal-2);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.app-features button:hover { background: rgba(255, 255, 255, .5); }
.app-features button[aria-selected="true"] { background: var(--papel); color: var(--nogal); box-shadow: 0 0 0 1px var(--linea); }
.app-features svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.app-features [aria-selected="true"] svg { color: #B27A2C; }
.app-features span { font-size: .98rem; line-height: 1.5; }
.app-features strong { display: block; font-family: var(--sans); font-weight: 400; font-size: 1.05rem; color: var(--nogal); margin-bottom: 2px; }

.app-devices { position: relative; padding-bottom: 12%; }
.scale-stage { position: relative; }
.scale-target { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.ipad-stage { width: 100%; margin-left: auto; }
.phone-stage { position: absolute; width: 31%; left: -5%; bottom: 0; }

@media (max-width: 1100px) {
  .app-grid { grid-template-columns: 1fr; }
  .app-devices { padding-bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 48px; }
  .phone-stage { position: relative; left: auto; bottom: auto; width: min(76vw, 340px); order: -1; }
  .ipad-stage { width: 100%; max-width: 760px; margin: 0 auto; }
  .app-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .app-features { grid-template-columns: 1fr; }
  .app-features button { padding: 12px 14px; }
}

/* ----- Dispositivos (medidas reales, se escalan desde JS) ----- */
.ipad, .phone { background: #1E1B19; box-shadow: 0 0 0 1.5px #3A3531 inset, 0 60px 120px -50px rgba(42, 36, 32, .55), 0 24px 40px -30px rgba(42, 36, 32, .5); font-family: var(--sans); color: var(--nogal); }
.ipad { width: 1180px; height: 820px; border-radius: 46px; padding: 22px; }
.ipad-screen { width: 100%; height: 100%; border-radius: 26px; overflow: hidden; background: #F4F2EE; display: grid; grid-template-columns: 220px 1fr 300px; }

.phone { width: 390px; height: 844px; border-radius: 64px; padding: 12px; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 52px; overflow: hidden; background: var(--cal); }

/* iPad */
.ip-side { background: #EDEAE4; padding: 28px 18px; display: flex; flex-direction: column; gap: 28px; }
.ip-brand { display: flex; align-items: center; gap: 10px; font-size: 17px; padding-left: 6px; }
.ip-brand svg { width: 20px; height: 24px; fill: none; }
.ip-brand path { stroke: var(--nogal); stroke-width: 4.4; }
.ip-brand circle { fill: var(--luz); }
.ip-side nav { display: grid; gap: 2px; }
.ip-side nav span { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; font-size: 16px; color: var(--nogal-2); }
.ip-side nav span.is-on { background: var(--papel); color: var(--nogal); }
.ip-side svg { width: 20px; height: 20px; }
.ip-side-foot { margin-top: auto; font-size: 14px; padding: 12px; line-height: 1.4; }
.ip-side-foot small { color: var(--nogal-3); font-size: 13px; }
.dot-ok { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #7FA37A; margin-right: 8px; vertical-align: 1px; }
.ip-main { padding: 28px 28px 24px; display: flex; flex-direction: column; min-width: 0; }
.ip-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.ip-head small { color: var(--nogal-3); font-size: 14px; }
.ip-head h4 { font-weight: 300; font-size: 34px; letter-spacing: -.02em; line-height: 1.1; }
.ip-chips { display: flex; gap: 8px; }
.chip { display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; background: var(--papel); font-size: 14px; box-shadow: 0 0 0 1px var(--concreto); white-space: nowrap; }
.chip svg { width: 16px; height: 16px; }
.chip.is-on { background: var(--nogal); color: var(--cal); box-shadow: none; }
.chip.is-on svg { color: var(--luz); }
.ip-plan { flex: 1; margin-top: 22px; background: var(--papel); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; min-height: 0; }
.ip-plan svg { flex: 1; width: 100%; min-height: 0; }
.ip-plan .room { cursor: pointer; }
.ip-plan .room rect { fill: transparent; }
.ip-plan .room .lamp { fill: url(#none); fill: #F3C77F; opacity: 0; transition: opacity .5s var(--ease); filter: blur(18px); }
.ip-plan .room.is-on .lamp { opacity: .55; }
.ip-plan .room text { font-family: var(--sans); font-size: 15px; fill: var(--nogal); }
.ip-plan .room text.val { font-size: 13px; fill: var(--nogal-3); }
.ip-plan .room.is-on text.val { fill: #A0691F; }
.ip-plan .walls { fill: none; stroke: var(--nogal); stroke-width: 5; stroke-linecap: square; }
.ip-plan .doors { fill: none; stroke: var(--nogal-3); stroke-width: 1.2; stroke-dasharray: 3 4; }
.ip-hint { font-size: 13px; color: var(--nogal-3); margin-top: 8px; }
.ip-right { padding: 28px 24px 24px 0; display: grid; grid-template-rows: auto auto 1fr; gap: 14px; }
.ip-card { background: var(--papel); border-radius: 18px; padding: 18px 20px; font-size: 14px; }
.ip-card small { color: var(--nogal-3); font-size: 13px; }
.ip-card p { color: var(--nogal-2); line-height: 1.4; margin-top: 6px; }
.ip-card strong { font-weight: 500; color: var(--nogal); }
.ip-temp { font-size: 64px; font-weight: 300; line-height: 1; letter-spacing: -.04em; margin-top: 8px; }
.ip-temp span { color: var(--luz); }
.ip-bars { display: flex; align-items: flex-end; gap: 4px; height: 70px; margin-top: 12px; }
.ip-bars i { flex: 1; border-radius: 3px 3px 0 0; background: var(--luz); }
.ip-bars i.off { background: var(--concreto); }
.ip-cam { display: flex; flex-direction: column; padding-bottom: 20px; }
.ip-cam .cam-feed { flex: 1; margin-top: 10px; border-radius: 12px; min-height: 120px; }

/* Cámaras (ilustradas) */
.cam-feed { position: relative; overflow: hidden; background-size: cover; background-position: center; }
.cam-feed::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.0) 55%, rgba(0,0,0,.28)); }
.cam-entrada { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 180'%3E%3Crect width='320' height='180' fill='%23bfc2bd'/%3E%3Cpath d='M0 118 320 96V180H0z' fill='%23a9a296'/%3E%3Cpath d='M130 180 170 98h40l40 82z' fill='%23c9bfae'/%3E%3Crect x='40' y='20' width='100' height='90' fill='%23d9d4cb'/%3E%3Crect x='150' y='30' width='70' height='70' fill='%238e6243'/%3E%3Cg fill='%23a57451'%3E%3Crect x='150' y='34' width='70' height='5'/%3E%3Crect x='150' y='44' width='70' height='5'/%3E%3Crect x='150' y='54' width='70' height='5'/%3E%3Crect x='150' y='64' width='70' height='5'/%3E%3Crect x='150' y='74' width='70' height='5'/%3E%3Crect x='150' y='84' width='70' height='5'/%3E%3C/g%3E%3Crect x='220' y='10' width='100' height='96' fill='%23cfc9bf'/%3E%3Cpath d='M20 150c10-30 20-40 30-60 6 20 4 40-4 60zM270 150c8-24 18-36 26-50 4 18 2 34-4 50z' fill='%237f8a68'/%3E%3Ccircle cx='64' cy='140' r='14' fill='%23e3dccf'/%3E%3C/svg%3E"); }
.cam-jardin { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 180'%3E%3Crect width='320' height='180' fill='%23a9b4b3'/%3E%3Cpath d='M0 90c60-14 120-6 180-14s100 4 140 0v104H0z' fill='%23958d7f'/%3E%3Crect x='0' y='110' width='320' height='70' fill='%23b8ab98'/%3E%3Crect x='60' y='118' width='150' height='34' rx='3' fill='%23779aa1'/%3E%3Crect x='64' y='122' width='142' height='26' rx='2' fill='%238fb0b5'/%3E%3Cellipse cx='270' cy='70' rx='46' ry='30' fill='%237f8a68'/%3E%3Cpath d='M268 100v50' stroke='%236e5a48' stroke-width='5'/%3E%3Cpath d='M24 160c-4-16-2-30 6-44 4 14 2 30-6 44z' fill='%238c9477'/%3E%3C/svg%3E"); }

/* iPhone */
.ph-status { position: absolute; top: 0; left: 0; right: 0; height: 54px; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 6px 34px 0 42px; font-size: 16px; font-weight: 500; }
.island { position: absolute; left: 50%; top: 11px; width: 122px; height: 35px; margin-left: -61px; border-radius: 20px; background: #000; }
.ph-icons { display: flex; gap: 6px; align-items: center; }
.ph-icons i { display: block; background: var(--nogal); }
.ph-icons .sig { width: 17px; height: 11px; clip-path: polygon(0 70%, 20% 70%, 20% 100%, 0 100%, 0 70%, 27% 50%, 47% 50%, 47% 100%, 27% 100%, 27% 50%, 53% 28%, 73% 28%, 73% 100%, 53% 100%, 53% 28%, 80% 0, 100% 0, 100% 100%, 80% 100%, 80% 0); }
.ph-icons .wifi { width: 15px; height: 11px; clip-path: polygon(50% 100%, 0 30%, 15% 12%, 50% 0, 85% 12%, 100% 30%); }
.ph-icons .bat { width: 25px; height: 12px; border-radius: 3.5px; background: none; box-shadow: inset 0 0 0 1.2px rgba(42,36,32,.45); position: relative; }
.ph-icons .bat::after { content: ""; position: absolute; inset: 2px 5px 2px 2px; background: var(--nogal); border-radius: 1.5px; }

.ph-view { position: absolute; inset: 54px 0 86px; padding: 14px 22px 0; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .4s var(--ease), transform .4s var(--ease), visibility 0s .4s; overflow: hidden; }
.ph-view.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.ph-greet { display: block; font-size: 15px; color: var(--nogal-3); }
.ph-title { font-weight: 300; font-size: 29px; line-height: 1.12; letter-spacing: -.02em; margin-top: 4px; min-height: 66px; }
.ph-status-row { display: flex; gap: 6px; margin-top: 14px; }
.ph-status-row span { display: flex; align-items: center; gap: 5px; padding: 7px 11px; border-radius: 999px; background: var(--papel); box-shadow: 0 0 0 1px var(--concreto); font-size: 14px; }
.ph-status-row svg { width: 16px; height: 16px; color: var(--nogal-2); }
.ph-view h6 { font-weight: 400; font-size: 15px; color: var(--nogal-3); margin: 20px 0 10px; }
.ph-scenes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph-scenes button { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 13px 12px 12px; border-radius: 18px; background: var(--papel); box-shadow: 0 0 0 1px var(--concreto); font-size: 14px; line-height: 1.15; text-align: left; transition: background .3s, color .3s; }
.ph-scenes svg { width: 22px; height: 22px; color: var(--nogal-2); }
.ph-scenes button.is-on { background: var(--nogal); color: var(--cal); box-shadow: none; }
.ph-scenes button.is-on svg { color: var(--luz); }
.ph-rooms, .ph-lock-row { display: grid; gap: 8px; }
.ph-room { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 12px 16px; border-radius: 16px; background: var(--papel); box-shadow: 0 0 0 1px var(--concreto); cursor: pointer; }
.ph-room span { font-size: 16px; }
.ph-room small { grid-row: 2; font-size: 13px; color: var(--nogal-3); }
.ph-room .sw { grid-row: 1 / 3; grid-column: 2; width: 46px; height: 28px; border-radius: 14px; background: var(--concreto); position: relative; transition: background .3s; }
.ph-room .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .3s var(--ease); }
.ph-room.is-on .sw { background: var(--luz); }
.ph-room.is-on .sw::after { transform: translateX(18px); }
.ph-lock-row .ph-room.is-on .sw { background: var(--nogal); }
.ph-rooms .ph-room:nth-child(3) { opacity: .95; }

.ph-energy-chart { margin-top: 18px; background: var(--papel); border-radius: 18px; padding: 16px 14px 10px; box-shadow: 0 0 0 1px var(--concreto); }
.ph-energy-chart svg { width: 100%; height: 150px; }
.ph-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--nogal-3); padding: 4px 0 0; }
.ph-legend { display: flex; gap: 16px; font-size: 13px; color: var(--nogal-2); margin-top: 10px; }
.ph-legend span, .energy-legend span { display: inline-flex; align-items: center; gap: 7px; }
.lg-sun, .lg-house, .lg-used { display: inline-block; width: 16px; height: 3px; border-radius: 2px; background: var(--luz); }
.lg-house { background: var(--nogal); }
.lg-used { height: 10px; width: 14px; background: rgba(226, 166, 80, .55); }
.ph-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.ph-stats div { background: var(--papel); border-radius: 16px; padding: 12px 14px; box-shadow: 0 0 0 1px var(--concreto); }
.ph-stats .wide { grid-column: span 2; display: flex; justify-content: space-between; align-items: baseline; }
.ph-stats small { display: block; font-size: 13px; color: var(--nogal-3); }
.ph-stats b { font-weight: 400; font-size: 21px; letter-spacing: -.01em; }
.ph-note { display: flex; gap: 8px; align-items: center; margin-top: 14px; font-size: 14px; color: var(--nogal-2); }
.ph-note svg { width: 18px; height: 18px; color: #7F9A6E; flex: none; }

.ph-cam { position: relative; margin-top: 12px; border-radius: 18px; overflow: hidden; }
.ph-cam .cam-feed { height: 150px; }
.ph-cam .live { position: absolute; top: 10px; left: 10px; padding: 3px 9px 3px 20px; border-radius: 999px; background: rgba(0,0,0,.42); color: #fff; font-size: 12px; }
.ph-cam .live::before { content: ""; position: absolute; left: 8px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #E0634B; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.ph-cam .cam-name { position: absolute; left: 12px; bottom: 10px; color: #fff; font-size: 15px; z-index: 1; }
.ph-events li { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--concreto); font-size: 15px; }
.ph-events time { color: var(--nogal-3); font-size: 14px; }

.ph-gate { width: 100%; display: flex; align-items: center; gap: 16px; padding: 18px; margin-top: 16px; border-radius: 22px; background: var(--nogal); color: var(--cal); text-align: left; transition: background .4s; }
.ph-gate svg { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: rgba(255,255,255,.1); color: var(--luz); flex: none; }
.ph-gate b { display: block; font-weight: 400; font-size: 19px; }
.ph-gate small { font-size: 14px; color: #BDB3A8; }
.ph-gate.is-busy { background: #4A3F37; }
.ph-gate.is-open { background: #6E5536; }
.ph-lock-row { margin-top: 10px; }
.ph-keys li { padding: 11px 0; border-top: 1px solid var(--concreto); }
.ph-keys b { display: block; font-weight: 400; font-size: 16px; }
.ph-keys small { font-size: 13px; color: var(--nogal-3); }
.ph-share { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 8px; padding: 13px; border-radius: 16px; box-shadow: 0 0 0 1px var(--linea); font-size: 15px; }
.ph-share svg { width: 18px; height: 18px; }

.ph-tabs { position: absolute; left: 0; right: 0; bottom: 0; height: 86px; padding: 8px 14px 26px; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(247, 246, 243, .92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 -1px 0 var(--concreto); z-index: 2; }
.ph-tabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; color: var(--nogal-3); }
.ph-tabs svg { width: 25px; height: 25px; }
.ph-tabs button.is-on { color: var(--nogal); }
.ph-tabs button.is-on svg { color: #C0852F; }
.home-bar { position: absolute; bottom: 8px; left: 50%; width: 136px; height: 5px; margin-left: -68px; border-radius: 3px; background: var(--nogal); z-index: 3; }

/* ==========================================================
   6 · Energía
   ========================================================== */
.energy { padding-block: var(--section); }
.energy-head { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.energy-head .lede { margin-top: 0; }
.energy-board { margin-top: clamp(40px, 6vw, 72px); padding: clamp(20px, 3vw, 40px); background: var(--papel); border-radius: 6px; box-shadow: 0 0 0 1px var(--concreto); }
.energy-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; }
.energy-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--sans); font-size: .9rem; color: var(--nogal-2); }
.energy-chart { position: relative; height: clamp(260px, 34vw, 400px); margin-top: 28px; font-family: var(--sans); }
.energy-chart svg { width: 100%; height: 100%; overflow: visible; }
.energy-chart .axis text { font-size: 12px; fill: var(--nogal-3); }
.energy-chart .grid line { stroke: var(--concreto); }
.energy-chart .gen-area { fill: rgba(226, 166, 80, .16); }
.energy-chart .used-area { fill: rgba(226, 166, 80, .55); }
.energy-chart .gen-line { fill: none; stroke: var(--luz); stroke-width: 2; }
.energy-chart .cons-line { fill: none; stroke: var(--nogal); stroke-width: 2; }
.energy-chart .dlabel { font-size: 13px; fill: var(--nogal); }
.energy-chart .cross { stroke: var(--nogal-3); stroke-width: 1; stroke-dasharray: 3 3; }
.energy-chart .dot-g { fill: var(--luz); stroke: var(--papel); stroke-width: 2; }
.energy-chart .dot-c { fill: var(--nogal); stroke: var(--papel); stroke-width: 2; }
.tip { position: absolute; top: 0; pointer-events: none; padding: 10px 12px; background: var(--nogal); color: var(--cal); border-radius: 4px; font-size: .84rem; line-height: 1.45; white-space: nowrap; transform: translateX(-50%); opacity: 0; transition: opacity .15s; }
.tip b { font-weight: 500; }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.energy-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--concreto); }
.stat b { display: block; font-family: var(--sans); font-weight: 300; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 10px; font-size: 1rem; color: var(--nogal-2); line-height: 1.45; max-width: 24ch; }
.fine { margin-top: 24px; font-family: var(--sans); font-size: .82rem; color: var(--nogal-3); }
@media (max-width: 860px) {
  .energy-head { grid-template-columns: 1fr; }
  .energy-head .lede { margin-top: 0; }
  .energy-stats { grid-template-columns: 1fr; gap: 22px; }
  .energy-controls .seg { width: 100%; }
  .energy-controls .seg button { flex: 1; }
}

/* ==========================================================
   5 · Cómo trabajamos
   ========================================================== */
.process { padding-block: var(--section); border-top: 1px solid var(--concreto); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(28px, 3vw, 48px); margin-top: clamp(48px, 6vw, 80px); counter-reset: s; }
.step { display: flex; flex-direction: column; }
.step-art { width: 100%; max-width: 180px; height: auto; margin-bottom: 28px; overflow: visible; }
.step-art .draw { fill: none; stroke: var(--nogal); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 700; stroke-dashoffset: 700; transition: stroke-dashoffset 2.2s var(--ease); }
.step-art .draw-dot { fill: var(--luz); opacity: 0; transition: opacity .6s var(--ease) 1.4s; }
.step.in-view .draw { stroke-dashoffset: 0; }
.step.in-view .draw-dot { opacity: 1; }
.step-n { font-family: var(--sans); font-size: .9rem; color: var(--nogal-3); padding-bottom: 12px; border-bottom: 1px solid var(--linea); margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.step h3 { font-size: 1.3rem; }
.step p { margin-top: 10px; color: var(--nogal-2); font-size: 1.02rem; line-height: 1.55; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, 1fr); row-gap: 56px; } }
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; row-gap: 48px; }
  .step { display: grid; grid-template-columns: 96px 1fr; column-gap: 20px; }
  .step-art { grid-row: 1 / 4; margin: 4px 0 0; }
}

/* ==========================================================
   7 · Niveles
   ========================================================== */
.tiers { padding-block: var(--section); background: var(--cal-2); }
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(48px, 6vw, 80px); align-items: stretch; }
.tier { display: flex; flex-direction: column; padding: clamp(26px, 3vw, 40px); background: var(--papel); border-radius: 6px; box-shadow: 0 0 0 1px var(--concreto); }
.tier-full { background: var(--nogal); color: #EEE8DF; box-shadow: none; }
.tier-mark { width: 40px; height: 48px; fill: none; margin-bottom: 32px; }
.tier-mark .arch { stroke: currentColor; stroke-width: 4.2; }
.tier-mark circle { fill: var(--luz); }
.tier-mark .fill-half, .tier-mark .fill-full { fill: var(--luz-suave); stroke: none; }
.tier-full .tier-mark .fill-full { fill: rgba(226, 166, 80, .35); }
.tier h3 { font-size: 1.9rem; font-weight: 300; letter-spacing: -.015em; }
.tier-lead { margin-top: 6px; font-size: 1.12rem; color: var(--nogal-2); }
.tier-full .tier-lead { color: #CFC5B9; }
.tier ul { margin-top: 26px; display: grid; gap: 0; flex: 1; }
.tier li { padding: 11px 0 11px 24px; border-top: 1px solid var(--concreto); position: relative; font-size: 1rem; line-height: 1.45; }
.tier li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 7px; height: 7px; border-radius: 50%; background: var(--luz); }
.tier li:first-child::before { background: transparent; box-shadow: inset 0 0 0 1.2px var(--nogal-3); }
.tier:first-child li:first-child::before { background: var(--luz); box-shadow: none; }
.tier-full li { border-color: rgba(255, 255, 255, .1); }
.tier-fit { margin: 24px 0 20px; font-family: var(--sans); font-size: .9rem; color: var(--nogal-3); }
.tier-full .tier-fit { color: #A69C91; }
.tier .btn { align-self: flex-start; }
.tier-full .btn { background: var(--cal); color: var(--nogal); border-color: var(--cal); }
.tier-full .btn:hover { background: #fff; }
.tier-note { margin-top: 28px; font-size: 1rem; color: var(--nogal-2); max-width: 44rem; }
.tier-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px; }
.tier-cta span { font-size: 1rem; color: var(--nogal-2); max-width: 36ch; }
@media (max-width: 960px) { .tier-grid { grid-template-columns: 1fr; max-width: 560px; } }

/* ==========================================================
   8 · Arquitectos
   ========================================================== */
.arch-section { padding-block: var(--section); background: var(--nogal); color: #EEE8DF; }
.arch-section .lede { color: #C3B9AD; }
.arch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 112px); align-items: start; }
.arch-list { margin: 2.2rem 0 2.4rem; display: grid; }
.arch-list div { padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.arch-list dt { font-family: var(--sans); font-size: 1.06rem; }
.arch-list dd { margin-top: 4px; color: #BDB3A7; font-size: 1rem; line-height: 1.5; }
.plan-card { position: sticky; top: calc(var(--nav-h) + 32px); padding: clamp(18px, 2.4vw, 28px); background: #332C28; border-radius: 6px; }
.plan-layers { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--sans); font-size: .9rem; }
.plan-layers button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 3px; color: #8F867C; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); transition: color .3s, box-shadow .3s; }
.plan-layers button[aria-pressed="true"] { color: #EEE8DF; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.plan-layers i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; opacity: .4; }
.plan-layers [data-layer="light"][aria-pressed="true"] i { background: var(--luz-suave); opacity: 1; }
.plan-layers [data-layer="access"][aria-pressed="true"] i { background: #D3B3A0; opacity: 1; }
.plan-layers [data-layer="energy"][aria-pressed="true"] i { background: var(--luz); opacity: 1; }
.plan { width: 100%; height: auto; margin-top: 20px; }
.plan .p-wall { fill: none; stroke: #D6CDC1; stroke-width: 5; stroke-linecap: square; }
.plan .p-thin { fill: none; stroke: #7E746A; stroke-width: 1; }
.plan .p-label text { font-family: var(--sans); font-size: 13px; fill: #9E9489; }
.plan .layer { transition: opacity .5s var(--ease); }
.plan .layer.is-off { opacity: 0; }
.layer-light circle { fill: var(--luz-suave); }
.layer-light .halo { fill: none; stroke: var(--luz-suave); stroke-opacity: .35; stroke-dasharray: 2 4; }
.layer-light .strip { stroke: var(--luz-suave); stroke-width: 3; stroke-linecap: round; opacity: .7; }
.layer-access rect, .layer-access path:not(.curtain-rail) { fill: #D3B3A0; }
.layer-access .curtain-rail { stroke: #D3B3A0; stroke-width: 2; fill: none; }
.layer-energy .panel { fill: none; stroke: var(--luz); stroke-width: 1.6; }
.layer-energy .wire { fill: none; stroke: var(--luz); stroke-width: 1.6; stroke-dasharray: 5 5; }
.layer-energy text { font-family: var(--sans); font-size: 11px; fill: var(--luz); }
.plan-card figcaption { margin-top: 16px; font-size: .95rem; color: #A69C91; }
@media (max-width: 900px) {
  .arch-grid { grid-template-columns: 1fr; }
  .plan-card { position: relative; top: auto; order: 2; }
}

/* ==========================================================
   9 · Confianza
   ========================================================== */
.trust { padding-block: var(--section); }
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); margin-top: clamp(40px, 5vw, 64px); align-items: center; }
.trust-pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 32px; }
.pillar { padding-top: 18px; border-top: 1px solid var(--nogal); }
.pillar h3 { font-size: 1.2rem; }
.pillar p { margin-top: 8px; font-size: 1rem; color: var(--nogal-2); line-height: 1.55; }
.map svg { width: 100%; height: auto; }
.map .topo path { fill: none; stroke: var(--concreto); stroke-width: 1.2; }
.map .route { fill: none; stroke: var(--cantera); stroke-width: 1.4; stroke-dasharray: 2 6; stroke-linecap: round; }
.map .city circle { fill: var(--nogal); }
.map .city .ring { fill: none; stroke: var(--luz); stroke-width: 1.5; }
.map .city text { font-family: var(--sans); font-size: 20px; fill: var(--nogal); }
.map .city text.sub { font-size: 14px; fill: #A0691F; }
.map .city-minor circle { fill: var(--cantera); }
.map .city-minor text { font-family: var(--sans); font-size: 14px; fill: var(--nogal-3); }
.map figcaption { margin-top: 12px; font-size: 1rem; color: var(--nogal-2); max-width: 32rem; }
@media (max-width: 900px) {
  .trust-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .trust-pillars { grid-template-columns: 1fr; gap: 26px; }
  .map .city text { font-size: 30px; }
  .map .city text.sub { font-size: 22px; }
  .map .city-minor text { font-size: 21px; }
}

/* ==========================================================
   10 · Cierre
   ========================================================== */
.visit { padding-block: var(--section); background: var(--cal-2); position: relative; overflow: hidden; }
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 112px); align-items: start; }
.visit-title { font-size: clamp(2.4rem, 5.4vw, 4.6rem); max-width: 14ch; }
.visit-points { margin-top: 2.2rem; display: grid; gap: 12px; }
.visit-points li { display: flex; gap: 14px; color: var(--nogal-2); font-size: 1.02rem; }
.visit-points li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: .6em; border-radius: 50%; background: var(--luz); }
.visit-form { position: relative; padding: clamp(24px, 3vw, 40px); background: var(--papel); border-radius: 6px; box-shadow: 0 0 0 1px var(--concreto), 0 40px 80px -60px rgba(42, 36, 32, .5); display: grid; gap: 18px; font-family: var(--sans); }
.seg-wide { display: flex; margin: 0 0 4px; min-width: 0; }
.seg-wide label { flex: 1; text-align: center; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { font-size: .92rem; color: var(--nogal-2); }
.opt { color: var(--nogal-3); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font-size: 1.02rem; font-family: var(--sans);
  background: #fff; border: 1px solid var(--linea); border-radius: 3px;
  transition: border-color .25s, box-shadow .25s;
  -webkit-appearance: none; appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236B6159' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: #ADA49B; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--nogal-2); box-shadow: 0 0 0 3px rgba(226, 166, 80, .28); }
.field .err { display: none; font-size: .85rem; color: var(--alerta); }
.field.has-error input { border-color: var(--alerta); }
.field.has-error .err { display: block; }
.form-fine { font-size: .82rem; color: var(--nogal-3); text-align: center; }
.form-done { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(28px, 4vw, 48px); background: var(--papel); border-radius: 6px; animation: rise .6s var(--ease); outline: none; }
.form-done svg { width: 34px; height: 40px; fill: none; margin-bottom: 28px; }
.form-done path { stroke: var(--nogal); stroke-width: 4.2; }
.form-done circle { fill: var(--luz); }
.form-done h3 { font-size: 1.9rem; font-weight: 300; letter-spacing: -.015em; max-width: 16ch; }
.form-done p { margin-top: 12px; font-family: var(--serif); font-size: 1.1rem; color: var(--nogal-2); max-width: 30ch; }
@media (max-width: 900px) { .visit-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
  .seg-wide label span { padding-inline: .5rem; font-size: .9rem; }
}

/* ---------- Pie ---------- */
.foot { padding-block: 72px 32px; background: var(--cal); font-family: var(--sans); font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.foot-brand img { width: 150px; height: auto; }
.foot-brand p { margin-top: 18px; color: var(--nogal-2); max-width: 26ch; font-family: var(--serif); font-size: 1.02rem; }
.foot h4 { font-weight: 400; font-size: .95rem; margin-bottom: 8px; }
.foot p { color: var(--nogal-2); line-height: 1.6; }
.foot-base { display: flex; justify-content: space-between; margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--concreto); color: var(--nogal-3); font-size: .85rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
}
