/* =============================================================
   Castell Inmo — estilos
   1. Tokens · 2. Reset · 3. Utilidades · 4. Tipografía
   5. Componentes · 6. Secciones · 7. Efectos · 8. Responsive · 9. Movimiento reducido
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #0b1220;
  --bg-2: #0f1a2e;
  --navy: #13213a;
  --surface: #ffffff;
  --cream: #f7f3ea;
  --ink: #0b1220;
  --ink-2: #4a5468;
  --line: rgba(255, 255, 255, 0.1);
  --line-dark: #e6e1d6;
  --text: #e9edf5;
  --muted: #9aa6bd;
  --gold: #c9a86a;
  --gold-2: #e4c993;
  --gold-deep: #a8874b;
  --danger: #d9534f;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1240px;
  --header-h: 76px;
  --demo-h: 0px;

  --shadow-lg: 0 30px 80px -20px rgba(5, 10, 20, 0.55);
  --shadow-md: 0 14px 40px -12px rgba(11, 18, 32, 0.18);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--demo-h) + 12px); }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, iframe { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.08; letter-spacing: -0.02em; font-weight: 400; }
::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* =============================================================
   3. Utilidades
   ============================================================= */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--cream); color: var(--bg); border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   4. Tipografía
   ============================================================= */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 168, 106, .18);
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  font-variation-settings: "opsz" 96;
  margin-top: .8rem;
}
.section-title em, .hero-title em { font-style: italic; color: var(--gold); font-weight: 300; }

/* =============================================================
   5. Componentes
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.35rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em; white-space: nowrap;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .3s, color .3s, border-color .3s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, var(--gold-deep));
  color: #1a1408;
  box-shadow: 0 8px 24px -8px rgba(201, 168, 106, .6), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(201, 168, 106, .75), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-lg { padding: 1rem 1.6rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.link-btn { margin-top: 1rem; font-size: .88rem; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); }

/* ----- Logo ----- */
.logo { display: inline-flex; align-items: center; gap: .65rem; color: var(--text); }
.logo-mark { width: 36px; height: 36px; color: var(--gold); }
.logo-text { font-family: var(--serif); font-size: 1.35rem; letter-spacing: -.01em; }
.logo-text em { font-style: italic; color: var(--gold); margin-left: .12em; font-weight: 300; }

/* ----- Formularios (dentro de la tarjeta clara) ----- */
.field { display: block; border: 0; margin-bottom: 1.1rem; min-width: 0; }
.field label, .field legend { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-2); margin-bottom: .45rem; letter-spacing: .01em; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="number"] {
  width: 100%; height: 52px; padding: 0 1rem;
  border: 1px solid var(--line-dark); border-radius: var(--radius-sm);
  background: #fbfaf7; color: var(--ink);
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.field input::placeholder { color: #a3a9b6; }
.field input:focus { outline: none; border-color: var(--gold); background: #fff; box-shadow: 0 0 0 4px rgba(201, 168, 106, .18); }
.field.has-error input { border-color: var(--danger); }
.field-error { display: none; font-size: .78rem; color: var(--danger); margin-top: .35rem; }
.has-error > .field-error, .field-error.is-visible { display: block; }

input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--gold-deep); stroke-width: 1.8; pointer-events: none; }
.input-icon input { padding-left: 2.6rem !important; }

.input-suffix { position: relative; }
.input-suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: .9rem; color: var(--ink-2); pointer-events: none; }
.input-suffix input { padding-right: 2.8rem !important; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }

.stepper { display: grid; grid-template-columns: 44px 1fr 44px; height: 52px; border: 1px solid var(--line-dark); border-radius: var(--radius-sm); background: #fbfaf7; overflow: hidden; }
.stepper button { color: var(--ink); font-size: 1.3rem; transition: background .2s; }
.stepper button:hover { background: rgba(201, 168, 106, .15); }
.stepper input { border: 0 !important; height: 100% !important; text-align: center; background: transparent !important; padding: 0 !important; box-shadow: none !important; font-weight: 600; }

.type-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.type-card { position: relative; cursor: pointer; }
.type-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.type-inner {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: .85rem .4rem; border: 1px solid var(--line-dark); border-radius: var(--radius-sm);
  background: #fbfaf7; color: var(--ink-2); font-weight: 600; font-size: .9rem;
  transition: border-color .25s, background .25s, color .25s, transform .3s var(--ease-out);
}
.type-inner svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.type-card:hover .type-inner { border-color: var(--gold); }
.type-card input:checked + .type-inner { border-color: var(--gold); background: #fff8ea; color: var(--ink); box-shadow: 0 0 0 3px rgba(201, 168, 106, .2); }
.type-card input:checked + .type-inner svg { stroke: var(--gold-deep); }
.type-card input:focus-visible + .type-inner { outline: 2px solid var(--gold); outline-offset: 2px; }

.check { display: flex; gap: .65rem; align-items: flex-start; font-size: .82rem; color: var(--ink-2); line-height: 1.45; cursor: pointer; }
.check input { flex: none; margin-top: 2px; width: 18px; height: 18px; accent-color: var(--gold-deep); }
.check a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

.micro { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: .85rem; font-size: .76rem; color: #7d8597; }
.micro svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

/* =============================================================
   6. Secciones
   ============================================================= */

/* ----- Cabecera ----- */
.site-header {
  position: fixed; inset: var(--demo-h) 0 auto; z-index: 100; height: var(--header-h);
  transition: background .4s, box-shadow .4s, backdrop-filter .4s;
}
.site-header.is-scrolled {
  background: rgba(11, 18, 32, .95);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 1.6rem; }
.main-nav { display: flex; gap: 1.8rem; margin-left: auto; }
.main-nav a { font-size: .92rem; color: var(--muted); font-weight: 500; position: relative; transition: color .25s; }
.main-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease-out);
}
.main-nav a:not(.btn):hover { color: var(--text); }
.main-nav a:not(.btn):hover::after { transform: scaleX(1); }
.nav-mobile-cta { display: none; }
.nav-toggle { display: none; }

/* ----- Hero ----- */
.hero { position: relative; padding: calc(var(--header-h) + var(--demo-h) + clamp(40px, 7vw, 90px)) 0 clamp(60px, 8vw, 110px); overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 80% at 0% 0%, #16264a 0%, transparent 55%), linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.hero-glow { position: absolute; width: 60vw; height: 60vw; max-width: 820px; max-height: 820px; right: -10%; top: -20%; border-radius: 50%; background: radial-gradient(circle, rgba(201, 168, 106, .22), transparent 65%); filter: blur(20px); }
.hero-lines { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 55%; opacity: .12; }
.hero-lines path { fill: none; stroke: var(--gold); stroke-width: 1; vector-effect: non-scaling-stroke; }

.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-title { font-family: var(--serif); font-size: clamp(2.4rem, 5.4vw, 4.4rem); font-variation-settings: "opsz" 144; margin: 1.2rem 0 1.4rem; }
.hero-lead { font-size: clamp(1rem, 1.3vw, 1.15rem); color: var(--muted); max-width: 54ch; }

.hero-stats { display: flex; gap: clamp(20px, 3.5vw, 44px); margin-top: 2.4rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.hero-stats li { display: flex; flex-direction: column; gap: .3rem; }
.hero-stats strong { font-family: var(--serif); font-size: clamp(1.9rem, 3vw, 2.6rem); font-weight: 400; color: var(--gold-2); line-height: 1; }
.hero-stats li > span { font-size: .8rem; color: var(--muted); line-height: 1.35; }

.hero-trust { display: flex; align-items: center; gap: .8rem; margin-top: 1.8rem; font-size: .88rem; color: var(--muted); }
.hero-trust strong { color: var(--text); }
.stars { color: var(--gold); letter-spacing: 2px; font-size: 1rem; }

/* ----- Calculadora ----- */
.valuator {
  position: relative;
  background: var(--surface); color: var(--ink);
  border-radius: 24px; padding: clamp(22px, 3vw, 34px);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(201, 168, 106, .25);
  scroll-margin-top: calc(var(--header-h) + var(--demo-h) + 16px);
}
.valuator::before {
  content: ""; position: absolute; inset: -1px; border-radius: 25px; z-index: -1;
  background: linear-gradient(140deg, var(--gold-2), transparent 35%, transparent 65%, var(--gold));
  opacity: .7;
}
.valuator-head { margin-bottom: 1.4rem; }
.valuator-head h2 { font-family: var(--serif); font-size: clamp(1.55rem, 2.4vw, 1.95rem); margin: .8rem 0 .3rem; }
.valuator-head p { color: var(--ink-2); font-size: .92rem; }
.ai-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .75rem; border-radius: 999px;
  background: var(--bg); color: var(--gold-2); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.ai-badge svg { width: 14px; height: 14px; fill: currentColor; }

.v-step { display: none; }
.v-step.is-active { display: block; animation: stepIn .55s var(--ease-out) both; }
.valuator.is-busy .valuator-head p { visibility: hidden; }

/* Carga */
[data-step="loading"] { text-align: center; padding: 1.2rem 0 .4rem; }
.scanner { position: relative; width: 112px; height: 112px; margin: 0 auto 1.6rem; display: grid; place-items: center; }
.scanner svg { width: 44px; height: 44px; fill: none; stroke: var(--gold-deep); stroke-width: 1.6; stroke-linejoin: round; position: relative; }
.scanner-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(201, 168, 106, .5); animation: pulseRing 1.8s var(--ease-soft) infinite; }
.scanner-ring.r2 { animation-delay: .9s; }
.scanner::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--gold); animation: spin 1s linear infinite; }
.loading-title { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); min-height: 2.6em; }
.progress { height: 6px; border-radius: 99px; background: #efe9dc; overflow: hidden; margin: 1rem 0 1.4rem; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-2), var(--gold-deep)); border-radius: inherit; transition: width .3s linear; }
.loading-checks { text-align: left; display: grid; gap: .55rem; font-size: .88rem; color: #9aa1ae; }
.loading-checks li { display: flex; align-items: center; gap: .6rem; transition: color .3s; }
.loading-checks li::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #d9d3c5; transition: background .3s, border-color .3s; }
.loading-checks li.is-done { color: var(--ink); }
.loading-checks li.is-done::before { border-color: var(--gold); background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }

/* Resultado */
.result-label { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); }
.result-range { font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.1; margin: .4rem 0 .6rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1em .35em; font-variation-settings: "opsz" 144; }
.result-range i { font-style: normal; color: #b9b2a2; font-weight: 300; }
.result-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.result-meta span { font-size: .78rem; padding: .3rem .65rem; border-radius: 99px; background: #f4efe4; color: var(--ink-2); font-weight: 600; }
.confidence { padding: .9rem 1rem; border-radius: var(--radius-sm); background: #f8f6f1; margin-bottom: 1.3rem; }
.confidence-bar { height: 4px; border-radius: 9px; background: #e7e0d0; overflow: hidden; margin-bottom: .55rem; }
.confidence-bar span { display: block; height: 100%; width: 82%; background: var(--gold); border-radius: inherit; }
.confidence p { font-size: .78rem; color: var(--ink-2); line-height: 1.45; }
.lead-form { border-top: 1px dashed var(--line-dark); padding-top: 1.2rem; }
.lead-title { font-weight: 600; font-size: .98rem; line-height: 1.45; margin-bottom: 1rem; color: var(--ink); }
.lead-form .check { margin: .2rem 0 .3rem; }
.lead-form .btn { margin-top: 1rem; }
.lead-form .link-btn, [data-step="thanks"] .link-btn, [data-step="error"] .link-btn { display: block; margin-inline: auto; }

/* Gracias / error */
[data-step="thanks"], [data-step="error"] { text-align: center; padding: .6rem 0; }
[data-step="thanks"] h3, [data-step="error"] h3 { font-family: var(--serif); font-size: 1.6rem; margin-bottom: .6rem; }
[data-step="thanks"] p, [data-step="error"] p { color: var(--ink-2); margin-bottom: 1.4rem; font-size: .95rem; }
.thanks-icon { width: 68px; height: 68px; margin: 0 auto 1.2rem; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold-2), var(--gold-deep)); }
.thanks-icon svg { width: 32px; height: 32px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ----- Franja portales ----- */
.strip { border-block: 1px solid var(--line); background: var(--bg-2); }
.strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.4rem; flex-wrap: wrap; }
.strip p { font-size: .8rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.strip ul { display: flex; flex-wrap: wrap; gap: clamp(18px, 3.5vw, 48px); }
.strip li { font-family: var(--serif); font-size: 1.15rem; color: #6f7b93; letter-spacing: -.01em; }

/* ----- Secciones generales ----- */
.section { padding-block: clamp(72px, 10vw, 130px); }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-note { margin-top: .8rem; font-size: .8rem; color: var(--muted); }

/* ----- Método ----- */
.method { background: var(--cream); color: var(--ink); }
.method .section-title em { color: var(--gold-deep); }
.method .eyebrow { color: var(--gold-deep); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; }
.step { background: var(--cream); padding: clamp(24px, 3vw, 36px); transition: background .4s; }
.step:hover { background: #fffdf8; }
.step-num { display: block; font-family: var(--serif); font-size: 2.6rem; font-style: italic; font-weight: 300; color: var(--gold-deep); line-height: 1; margin-bottom: 1.4rem; }
.step h3 { font-family: var(--serif); font-size: 1.35rem; margin-bottom: .7rem; }
.step p { color: var(--ink-2); font-size: .94rem; }

/* ----- Casos ----- */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); }
.case { background: var(--navy); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .5s var(--ease-out), border-color .4s; }
.case:hover { transform: translateY(-6px); border-color: rgba(201, 168, 106, .45); }
.case-visual { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.case-visual::before { content: ""; position: absolute; inset: 0; transition: transform .8s var(--ease-out); }
.case:hover .case-visual::before { transform: scale(1.05); }
.case-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(11, 18, 32, .7)); }
/* Ilustraciones arquitectónicas en CSS (sustituibles por fotos: background-image: url(assets/img/caso-1.webp)) */
.v1::before {
  background:
    linear-gradient(180deg, transparent 84%, #1a2a47 84%),
    linear-gradient(90deg, transparent 18%, #213659 18%, #213659 82%, transparent 82%) bottom / 100% 70% no-repeat,
    linear-gradient(90deg, transparent 30%, #2b456f 30%, #2b456f 70%, transparent 70%) bottom / 100% 86% no-repeat,
    radial-gradient(60% 70% at 70% 20%, #e4c993 0%, #b57a52 35%, #3a3557 75%);
}
.v2::before {
  background:
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(228, 201, 147, .35) 22px 30px) 20% 40% / 60% 30% no-repeat,
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(228, 201, 147, .25) 22px 30px) 20% 78% / 60% 18% no-repeat,
    linear-gradient(90deg, transparent 12%, #1c2d4c 12%, #1c2d4c 88%, transparent 88%) bottom / 100% 82% no-repeat,
    linear-gradient(180deg, #5d7aa6, #b8c4d8 70%, #e3d6be);
}
.v3::before {
  background:
    linear-gradient(180deg, transparent 72%, #2e4a35 72%),
    conic-gradient(from 135deg at 50% 22%, transparent 0 90deg, #26395e 90deg 270deg, transparent 270deg) 50% 0 / 70% 60% no-repeat,
    linear-gradient(90deg, transparent 22%, #31507f 22%, #31507f 78%, transparent 78%) bottom / 100% 55% no-repeat,
    linear-gradient(180deg, #7fa6c9, #d9e3ea 70%, #c9d7c0);
}
.case-tag { position: absolute; top: 14px; left: 14px; z-index: 2; padding: .3rem .7rem; border-radius: 99px; background: rgba(11, 18, 32, .75); backdrop-filter: blur(6px); color: var(--gold-2); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.case-body { padding: clamp(20px, 2.4vw, 28px); display: flex; flex-direction: column; flex: 1; }
.case-place { font-size: .82rem; font-weight: 600; color: var(--gold); letter-spacing: .04em; }
.case-figures { display: flex; gap: 1.6rem; margin: 1rem 0 1.2rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.case-figures div { display: flex; flex-direction: column; }
.case-figures strong { font-family: var(--serif); font-size: 2rem; font-weight: 400; line-height: 1; color: var(--text); }
.case-figures span { font-size: .76rem; color: var(--muted); margin-top: .3rem; }
.case blockquote { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 1.05rem; line-height: 1.5; color: #d5dbe7; flex: 1; }
.case-author { margin-top: 1rem; font-size: .84rem; color: var(--muted); }

/* ----- Cobertura ----- */
.coverage { background: var(--bg-2); }
.coverage-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.coverage-copy > p:not(.eyebrow):not(.coverage-foot) { color: var(--muted); margin-top: 1.2rem; max-width: 48ch; }
.zone-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.8rem; }
.zone-chips li { padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 99px; font-size: .84rem; color: var(--text); transition: border-color .3s, background .3s; }
.zone-chips li:hover { border-color: var(--gold); background: rgba(201, 168, 106, .08); }
.coverage-foot { margin-top: 1.6rem; font-size: .88rem; color: var(--muted); }
.coverage-foot a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; }
.map-wrap { position: relative; aspect-ratio: 4 / 3.2; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: #1a2640; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(.92) hue-rotate(180deg) contrast(.9) brightness(.95); }
.map-overlay { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 70% at 55% 45%, rgba(201, 168, 106, .14), transparent 70%); }
.pin { position: absolute; left: var(--x); top: var(--y); width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(201, 168, 106, .3); }
.pin::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--gold); animation: pulseRing 2.4s var(--ease-soft) infinite; }
.map-card { position: absolute; left: 16px; top: 16px; pointer-events: none; padding: .8rem 1rem; border-radius: 14px; background: rgba(11, 18, 32, .85); backdrop-filter: blur(10px); border: 1px solid var(--line); display: flex; flex-direction: column; }
.map-card strong { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; color: var(--gold-2); line-height: 1.1; }
.map-card span { font-size: .78rem; color: var(--muted); }

/* ----- Contacto ----- */
.contact-card {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 4vw, 60px); align-items: center;
  padding: clamp(28px, 5vw, 64px); border-radius: 28px;
  background: radial-gradient(90% 120% at 100% 0%, rgba(201, 168, 106, .18), transparent 55%), var(--navy);
  border: 1px solid rgba(201, 168, 106, .25);
}
.contact-copy > p:not(.eyebrow) { color: var(--muted); margin-top: 1.1rem; max-width: 52ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.contact-info { display: grid; gap: 1.2rem; }
.contact-info li { display: flex; flex-direction: column; gap: .2rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.contact-info li:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-info span { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 600; }
.contact-info strong { font-weight: 500; }
.contact-info a:hover { color: var(--gold-2); }

/* ----- Pie ----- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.4rem 6rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.logo-sm .logo-text { font-size: 1.15rem; }
.footer-inner nav { display: flex; gap: 1.4rem; font-size: .85rem; color: var(--muted); }
.footer-inner nav a:hover { color: var(--text); }
.footer-inner p { flex-basis: 100%; font-size: .78rem; color: #6c778d; }

/* ----- Email flotante ----- */
.mail-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, var(--gold-deep)); color: #1a1408;
  box-shadow: 0 12px 30px -8px rgba(201, 168, 106, .6);
  transition: transform .4s var(--ease-out);
}
.mail-float svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mail-float:hover { transform: scale(1.08); }

/* =============================================================
   7. Efectos
   ============================================================= */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .steps .reveal:nth-child(2), .js .case-grid .reveal:nth-child(2) { transition-delay: .08s; }
.js .steps .reveal:nth-child(3), .js .case-grid .reveal:nth-child(3) { transition-delay: .16s; }
.js .steps .reveal:nth-child(4) { transition-delay: .24s; }

@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseRing { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.shake { animation: shake .35s; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (max-width: 1279px) {
  .main-nav { gap: 1.3rem; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 959px) {
  :root { --header-h: 66px; }
  .header-cta { display: none; }
  .nav-toggle {
    display: grid; place-content: center; gap: 6px; width: 44px; height: 44px; margin-left: auto;
    border: 1px solid var(--line); border-radius: 12px;
  }
  .nav-toggle span { display: block; width: 18px; height: 1.5px; background: var(--text); transition: transform .35s var(--ease-out); }
  .nav-open .nav-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav-open .nav-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .main-nav {
    position: fixed; inset: calc(var(--header-h) + var(--demo-h)) 0 auto; margin: 0;
    flex-direction: column; gap: 0; padding: 1rem var(--gutter) 1.6rem;
    background: rgba(11, 18, 32, .97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .3s, transform .4s var(--ease-out), visibility .3s;
  }
  .nav-open .main-nav { opacity: 1; transform: none; visibility: visible; }
  .nav-open .site-header { background: rgba(11, 18, 32, .97); }
  .main-nav a:not(.btn) { padding: .95rem 0; font-size: 1.05rem; color: var(--text); border-bottom: 1px solid var(--line); }
  .main-nav a:not(.btn)::after { display: none; }
  .nav-mobile-cta { display: inline-flex; margin-top: 1.2rem; }

  .hero-grid, .coverage-grid, .contact-card { grid-template-columns: 1fr; }
  .hero-copy { text-align: left; }
  .case-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
}

@media (max-width: 539px) {
  .hero-stats { gap: 18px; justify-content: space-between; }
  .hero-stats li > span { font-size: .72rem; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .type-inner { padding: .7rem .2rem; font-size: .84rem; }
  .contact-actions .btn { width: 100%; }
  .strip-inner { justify-content: center; text-align: center; }
  .strip ul { justify-content: center; gap: 14px 22px; }
  .map-wrap { aspect-ratio: 1 / 1; }
  .mail-float { width: 54px; height: 54px; right: 14px; bottom: 14px; }
}

/* =============================================================
   9. Movimiento reducido (solo efectos intrusivos)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pin::after, .scanner-ring { animation: none; opacity: 0; }
}

/* =============================================================
   10. Barra demo B2B · selector de idioma · chips · ficha de mercado · FAQ
   ============================================================= */
.demo-bar {
  position: fixed; inset: 0 0 auto; z-index: 110;
  background: linear-gradient(90deg, #1a1408, #2a2110 50%, #1a1408);
  border-bottom: 1px solid rgba(201, 168, 106, .35);
  color: var(--gold-2); font-size: .84rem;
}
.demo-bar[hidden] { display: none; }
.demo-bar-inner { display: flex; align-items: center; gap: 1rem; padding-block: .55rem; }
.demo-bar p { flex: 1; line-height: 1.4; color: #e9dcc0; }
.demo-bar strong { color: var(--gold-2); font-weight: 700; letter-spacing: .02em; }
.demo-bolt { color: var(--gold); }
.demo-bar-cta {
  flex: none; padding: .42rem .9rem; border-radius: 999px; font-weight: 700; font-size: .8rem; white-space: nowrap;
  background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a1408;
  transition: transform .3s var(--ease-out), box-shadow .3s;
}
.demo-bar-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -6px rgba(201, 168, 106, .7); }
.demo-bar-close { flex: none; width: 30px; height: 30px; border-radius: 50%; font-size: 1.25rem; line-height: 1; color: #bba57a; }
.demo-bar-close:hover { background: rgba(255, 255, 255, .08); color: var(--gold-2); }

.lang-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; gap: 2px; }
.lang-switch button {
  min-width: 34px; height: 28px; padding: 0 .5rem; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .06em; color: var(--muted);
  transition: background .25s, color .25s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: rgba(201, 168, 106, .18); color: var(--gold-2); }

.field legend small { font-weight: 500; color: #8b93a3; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .5rem .85rem; border: 1px solid var(--line-dark); border-radius: 999px;
  background: #fbfaf7; color: var(--ink-2); font-size: .84rem; font-weight: 600;
  transition: border-color .2s, background .2s, color .2s;
}
.chip:hover span { border-color: var(--gold); }
.chip input:checked + span { border-color: var(--gold); background: #fff3dc; color: var(--ink); box-shadow: 0 0 0 3px rgba(201, 168, 106, .18); }
.chip input[type="checkbox"]:checked + span::before { content: "✓"; color: var(--gold-deep); font-weight: 800; }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.result-zone { font-size: .86rem; font-weight: 600; color: var(--ink-2); margin-bottom: 1rem; }
.market-card { border: 1px solid #ece4d3; border-radius: var(--radius-sm); background: linear-gradient(180deg, #fffdf8, #f8f4ea); padding: 1rem 1.1rem; margin-bottom: 1.3rem; }
.market-title { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: .75rem; }
.market-grid { display: grid; gap: 0; }
.market-grid div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 0; border-top: 1px solid #efe7d6; }
.market-grid div:first-child { border-top: 0; padding-top: 0; }
.market-grid dt { font-size: .8rem; color: #6f7788; line-height: 1.3; }
.market-grid dd { margin: 0; font-family: var(--serif); font-size: 1.1rem; color: var(--ink); line-height: 1.25; text-align: right; white-space: nowrap; }
.demand-pill { display: inline-block; white-space: normal; font-family: var(--sans); font-size: .76rem; font-weight: 700; padding: .25rem .55rem; border-radius: 999px; background: #e9f7ee; color: #1d7a43; line-height: 1.3; }
.demand-pill[data-level="medium"] { background: #fff4dd; color: #8a5b0b; }
.market-note { margin-top: .8rem; font-size: .74rem; color: var(--ink-2); line-height: 1.45; }

.section-lead { margin-top: 1rem; color: var(--ink-2); font-size: 1.02rem; max-width: 62ch; }
.steps-3 { grid-template-columns: repeat(3, 1fr); }
.step-tag { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); background: rgba(201, 168, 106, .14); padding: .25rem .6rem; border-radius: 999px; margin-bottom: .9rem; }

.faq { background: var(--bg); }
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.faq-list { display: grid; gap: .7rem; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--navy); transition: border-color .3s; }
.faq-item[open] { border-color: rgba(201, 168, 106, .45); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1.1rem 1.25rem; padding-right: 3rem; position: relative;
  font-weight: 600; font-size: 1rem; color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 300; color: var(--gold); transition: transform .3s var(--ease-out);
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { padding: 0 1.25rem 1.2rem; color: var(--muted); font-size: .95rem; }

.main-nav a { white-space: nowrap; }
@media (max-width: 1279px) {
  .main-nav { gap: 1.1rem; }
  .header-cta { display: none; }
  .steps-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 959px) {
  .lang-switch { margin-left: auto; }
  .nav-toggle { margin-left: .5rem; }
  .steps-3 { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .demo-bar-inner { flex-wrap: wrap; gap: .5rem .8rem; padding-right: 2.2rem; position: relative; }
  .demo-bar p { flex-basis: 100%; font-size: .8rem; }
  .demo-bar-close { position: absolute; right: var(--gutter); top: .35rem; }
}
@media (max-width: 539px) {
  .demo-bar [data-i18n="demo.text"] { display: none; }
  .demo-bar-inner { flex-wrap: nowrap; padding-block: .45rem; padding-right: 2.6rem; }
  .demo-bar p { flex: 1 1 auto; flex-basis: auto; font-size: .76rem; }
  .demo-bar-cta { padding: .35rem .7rem; font-size: .72rem; white-space: normal; text-align: center; max-width: 52%; }
  .demo-bar-close { top: 50%; transform: translateY(-50%); }
  .lang-switch button { min-width: 30px; padding: 0 .35rem; }
  .logo-text { font-size: 1.15rem; }
  .logo-mark { width: 30px; height: 30px; }
}

/* =============================================================
   11. Motor avanzado: selector de planta, desglose, marca blanca, modal
   ============================================================= */
.field label small { font-weight: 500; color: #8b93a3; }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select-wrap select {
  width: 100%; height: 52px; padding: 0 2.4rem 0 1rem; appearance: none; -webkit-appearance: none;
  border: 1px solid var(--line-dark); border-radius: var(--radius-sm); background: #fbfaf7; color: var(--ink); font-size: .92rem; cursor: pointer;
}
.select-wrap select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201, 168, 106, .18); }
[data-floor-field][hidden] { display: none; }

.calc-brand { margin-top: .7rem; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.calc-brand + h2 { margin-top: .3rem; }

.breakdown { border: 1px solid #ece4d3; border-radius: var(--radius-sm); margin-bottom: 1.3rem; background: #fff; }
.breakdown summary { list-style: none; cursor: pointer; padding: .85rem 2.6rem .85rem 1rem; position: relative; font-size: .86rem; font-weight: 700; color: var(--ink); }
.breakdown summary::-webkit-details-marker { display: none; }
.breakdown summary::after { content: "+"; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-size: 1.2rem; color: var(--gold-deep); transition: transform .3s var(--ease-out); }
.breakdown[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.breakdown-list { padding: 0 1rem; }
.bd-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: .6rem 0; border-top: 1px solid #f1ebdf; }
.bd-row dt { font-size: .82rem; font-weight: 600; color: var(--ink); line-height: 1.35; }
.bd-row dt small { display: block; font-size: .72rem; font-weight: 500; color: #8a91a0; margin-top: .1rem; }
.bd-row dd { margin: 0; font-size: .86rem; font-weight: 700; color: var(--ink); text-align: right; white-space: nowrap; }
.bd-total { border-top: 1.5px solid var(--gold); }
.bd-total dt, .bd-total dd { color: var(--gold-deep); font-size: .92rem; }
.breakdown-note { padding: .5rem 1rem .9rem; font-size: .72rem; font-style: italic; color: #7d8597; }

.is-white-label .logo-text { font-size: 1.2rem; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-bar [data-demo-agency] strong { color: var(--gold-2); }

.integration-modal {
  margin: auto;                                   /* el reset global quita el centrado nativo de <dialog> */
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  border: 1px solid rgba(201, 168, 106, .35); border-radius: 24px; padding: clamp(24px, 4vw, 40px);
  background: radial-gradient(120% 80% at 100% 0%, rgba(201, 168, 106, .14), transparent 60%), var(--navy);
  color: var(--text); box-shadow: var(--shadow-lg);
}
.integration-modal::backdrop { background: rgba(5, 9, 18, .72); backdrop-filter: blur(4px); }
.integration-modal[open] { animation: stepIn .45s var(--ease-out) both; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; font-size: 1.5rem; color: var(--muted); }
.modal-close:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.modal-title { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.1rem); margin: .7rem 0 1.4rem; }
.modal-title em { font-style: italic; font-weight: 300; color: var(--gold); }
.modal-steps { display: grid; gap: 1.1rem; margin-bottom: 1.6rem; }
.modal-steps li { display: grid; grid-template-columns: 40px 1fr; gap: .9rem; align-items: start; }
.modal-num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 1.2rem; color: #1a1408; background: linear-gradient(135deg, var(--gold-2), var(--gold-deep)); }
.modal-steps h3 { font-size: 1rem; font-weight: 700; letter-spacing: 0; margin-bottom: .25rem; font-family: var(--sans); }
.modal-steps p { font-size: .9rem; color: var(--muted); }
.modal-foot { margin-top: .9rem; text-align: center; font-size: .78rem; color: var(--muted); }
.thanks-sent { background: #eef8f1; color: #1d6b3d !important; border-radius: var(--radius-sm); padding: .7rem .9rem; font-size: .88rem !important; margin-bottom: 1rem !important; }
.thanks-sent[hidden] { display: none; }
