/* =============================================================
   MSOLUCION PLUS S.L. — Reformas y construcción
   Archetype: Editorial Dark Warm (adaptado — motivo "plano técnico")
   =============================================================

   1. Tokens
   2. Reset & base
   3. Utilities
   4. Typography
   5. Components (btn, card, nav, form)
   6. Sections (hero, servicios, proceso, portfolio, testimonios, contacto)
   7. Effects (animations, transforms, keyframes)
   8. Responsive
   9. Reduced-motion (solo lo intrusivo)
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #0F0D0A;
  --bg-2:      #17130E;
  --bg-3:      #211A13;
  --bg-4:      #2A2116;
  --cream:     #F3ECDD;
  --cream-2:   #DFD3BC;
  --cream-3:   #8C7F68;
  --accent:    #C9793F;
  --accent-2:  #A85F2C;
  --accent-soft: rgba(201, 121, 63, 0.16);
  --steel:     #8FA39E;
  --line:      rgba(243, 236, 221, 0.12);
  --line-strong: rgba(243, 236, 221, 0.22);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h: 84px;
  --container: 1240px;
}

@property --mesh-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .7rem 1.1rem; background: var(--cream); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 600; font-size: .9rem;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.4rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.section { position: relative; padding-block: clamp(4.5rem, 9vw, 8rem); }
.section-head { max-width: 680px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 4vw, 3rem); }
.section-head h2 em { font-style: italic; color: var(--accent); font-weight: 400; }
.section-head p { margin-top: 1rem; color: var(--cream-2); font-size: 1.05rem; max-width: 52ch; }
.num-index { font-family: var(--mono); font-size: .8rem; color: var(--cream-3); letter-spacing: .06em; }

/* Sin JS (o antes de que cargue): el contenido se ve siempre.
   Solo si <html> tiene la clase "js" (añadida de forma síncrona
   en el <head>) se activa el estado oculto-hasta-revelar. */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1 !important; transform: none !important; } /* defensivo: nunca ocultar texto partido */

/* =============================================================
   4. Typography
   ============================================================= */
.hero-title, .cta-title { font-family: var(--serif); }

/* =============================================================
   5. Components
   ============================================================= */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .95rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .45s var(--ease-out), background .3s var(--ease-out), color .3s var(--ease-out), box-shadow .4s var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: #17110a;
  box-shadow: 0 14px 34px -12px rgba(201, 121, 63, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 42px -12px rgba(201, 121, 63, 0.7); }
.btn-ghost {
  border: 1px solid var(--line-strong); color: var(--cream);
}
.btn-ghost:hover { background: rgba(243,236,221,0.06); transform: translateY(-2px); }
.btn-whatsapp {
  background: #1E3B32; color: var(--cream);
  box-shadow: 0 14px 30px -14px rgba(30,59,50,0.7);
}
.btn-whatsapp:hover { transform: translateY(-2px); background: #244A3E; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 500;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .4s var(--ease-out), border-color .4s var(--ease-out), backdrop-filter .4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(15, 13, 10, 0.82);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.nav-inner { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .65rem; }
.brand-mark { width: 40px; height: 40px; flex: none; color: var(--cream); }
.footer-mark { width: 52px; height: 52px; color: var(--cream); margin-bottom: 1.1rem; }
.brand-word { font-family: var(--serif); font-size: 1.15rem; letter-spacing: -0.01em; }
.brand-word em { font-style: italic; color: var(--accent); }
.brand-sub { display: block; font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; color: var(--cream-3); text-transform: uppercase; }

.nav-links { display: none; align-items: center; gap: 2.1rem; }
.nav-links a { position: relative; font-size: .92rem; color: var(--cream-2); padding-block: .3rem; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--accent);
  transition: right .4s var(--ease-out);
}
.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after { right: 0; }

.nav-actions { display: flex; align-items: center; gap: .8rem; }
.nav-actions .btn { padding: .7rem 1.25rem; font-size: .86rem; }
.nav-actions .btn-ghost { display: none; }

.nav-toggle {
  display: flex; flex-direction: column; gap: 5px; width: 26px; padding: .4rem;
}
.nav-toggle span { display: block; height: 2px; background: var(--cream); border-radius: 2px; transition: transform .35s var(--ease-out), opacity .35s var(--ease-out); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 480;
  background: var(--bg-2);
  padding: 2rem 1.4rem;
  display: flex; flex-direction: column; gap: 1.6rem;
  transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: transform .45s var(--ease-out), opacity .4s var(--ease-out);
}
.mobile-menu.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu a { font-family: var(--serif); font-size: 1.7rem; }
.mobile-menu .btn { align-self: flex-start; margin-top: .5rem; }

/* Cards */
.card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform .5s var(--ease-out), border-color .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), var(--accent), transparent 65%);
  opacity: 0; transition: opacity .5s var(--ease-out);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6); }
.card:hover::before { opacity: 1; }

/* Forms */
.field { display: flex; flex-direction: column; gap: .5rem; }
.field label { font-size: .82rem; color: var(--cream-3); font-family: var(--mono); letter-spacing: .04em; }
.field input, .field select, .field textarea {
  background: rgba(243,236,221,0.04);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: .85rem 1rem;
  color: var(--cream);
  font-family: var(--sans);
  font-size: .96rem;
  transition: border-color .3s var(--ease-out), background .3s var(--ease-out);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); background: rgba(243,236,221,0.07); outline: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field select { appearance: none; 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 1l5 5 5-5' stroke='%238C7F68' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }

/* =============================================================
   6. Sections
   ============================================================= */

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}
.hero-mesh {
  position: absolute; inset: -10% -10% -10% -10%; z-index: 0;
  background:
    radial-gradient(38% 45% at 18% 22%, rgba(201,121,63,0.28), transparent 68%),
    radial-gradient(30% 38% at 85% 78%, rgba(143,163,158,0.14), transparent 70%),
    var(--bg);
  filter: blur(6px);
}
.hero-grain {
  position: absolute; inset: 0; z-index: 1; opacity: .05; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-blueprint {
  position: absolute; z-index: 1; inset: auto -8% -18% auto; width: min(62vw, 760px);
  opacity: .5; pointer-events: none;
}
.hero-blueprint path, .hero-blueprint line, .hero-blueprint circle {
  fill: none; stroke: var(--cream); stroke-opacity: .55; stroke-width: 1;
}
.hero-blueprint .fill-accent { fill: var(--accent); fill-opacity: .9; stroke: none; }
.hero-blueprint .draw {
  stroke-dasharray: var(--len, 1200);
  stroke-dashoffset: var(--len, 1200);
  animation: drawLine 2.6s var(--ease-out) forwards;
  animation-delay: var(--delay, 0s);
}

.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero-content { max-width: 700px; padding-block: 2rem; }
.hero-title {
  font-weight: 500;
  font-size: clamp(2.5rem, 6.4vw, 5rem);
  line-height: 1.02;
  margin-top: 1.1rem;
  max-width: 15ch;
}
.hero-title em { font-style: italic; color: var(--accent); font-weight: 400; }
.hero-sub { margin-top: 1.4rem; font-size: 1.12rem; color: var(--cream-2); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }

.hero-trust {
  margin-top: 3.2rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem 2rem;
  max-width: 560px; padding-top: 1.8rem; border-top: 1px solid var(--line);
}
.trust-item { display: flex; gap: .8rem; align-items: flex-start; }
.trust-item svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--accent); }
.trust-item span { font-size: .88rem; color: var(--cream-2); line-height: 1.35; }

.scroll-cue {
  position: absolute; left: 1.4rem; bottom: 1.6rem; z-index: 2;
  display: none; align-items: center; gap: .6rem;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; color: var(--cream-3); text-transform: uppercase;
}
.scroll-cue .line { width: 30px; height: 1px; background: var(--cream-3); position: relative; overflow: hidden; }
.scroll-cue .line::after {
  content: ""; position: absolute; inset: 0; background: var(--accent);
  animation: scrollCue 2.4s ease-in-out infinite;
}

/* --- Manifesto / about --- */
.manifesto { border-top: 1px solid var(--line); }
.manifesto-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
.manifesto-lead { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.35; color: var(--cream); }
.manifesto-lead em { font-style: italic; color: var(--accent); }
.manifesto-aside { display: flex; flex-direction: column; gap: 1.6rem; color: var(--cream-2); font-size: .98rem; }
.manifesto-aside .num-index { color: var(--accent); font-size: .9rem; }

/* --- Services --- */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
.service-card .icon-wrap {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 1.4rem;
}
.service-card .icon-wrap svg { width: 26px; height: 26px; }
.service-card h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; margin-bottom: .6rem; }
.service-card p { color: var(--cream-2); font-size: .95rem; }
.service-card .tag {
  display: inline-block; margin-top: 1.2rem; font-family: var(--mono); font-size: .7rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--cream-3);
}

/* --- Process --- */
.process { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.process-list { display: grid; grid-template-columns: 1fr; gap: 0; }
.process-item {
  display: grid; grid-template-columns: 64px 1fr; gap: 1.4rem;
  padding-block: 1.8rem; border-top: 1px solid var(--line);
}
.process-item:last-child { border-bottom: 1px solid var(--line); }
.process-num { font-family: var(--mono); font-size: 1rem; color: var(--accent); }
.process-item h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; margin-bottom: .4rem; }
.process-item p { color: var(--cream-2); font-size: .95rem; max-width: 58ch; }

/* --- Portfolio (horizontal scroll-snap showcase) --- */
.portfolio-track {
  display: flex; gap: 1.2rem; overflow-x: auto; overflow-y: visible;
  scroll-snap-type: x mandatory; padding-block: .5rem 2.5rem; margin-inline: -1.4rem; padding-inline: 1.4rem;
  scrollbar-width: thin; scrollbar-color: var(--accent) transparent;
}
.portfolio-track::-webkit-scrollbar { height: 6px; }
.portfolio-track::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.project-card {
  scroll-snap-align: start; flex: 0 0 min(320px, 82vw);
  border-radius: 18px; overflow: hidden; border: 1px solid var(--line);
  background: var(--bg-3);
  transition: transform .5s var(--ease-out), border-color .5s var(--ease-out);
}
.project-card:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.project-visual {
  aspect-ratio: 4/5; position: relative;
  background:
    repeating-linear-gradient(45deg, rgba(243,236,221,0.05) 0 1px, transparent 1px 14px),
    linear-gradient(160deg, var(--bg-4), var(--bg-3));
  display: flex; align-items: flex-end; padding: 1.2rem;
}
.project-visual svg { position: absolute; inset: 0; margin: auto; width: 46%; opacity: .55; color: var(--cream); }
.project-visual .project-badge {
  position: relative; z-index: 1;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: rgba(15,13,10,0.6); padding: .35rem .7rem; border-radius: 999px;
  border: 1px solid var(--line-strong);
}
.project-body { padding: 1.3rem 1.4rem 1.5rem; }
.project-body h3 { font-family: var(--serif); font-size: 1.1rem; font-weight: 500; margin-bottom: .3rem; }
.project-body p { color: var(--cream-3); font-size: .86rem; }
.portfolio-note {
  margin-top: 1rem; font-size: .82rem; color: var(--cream-3); font-style: italic;
}

/* --- Commitments (replaces fabricated testimonials) --- */
.commitments { border-top: 1px solid var(--line); }
.commitments-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.commitment {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.6rem; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2);
}
.commitment svg { width: 24px; height: 24px; flex: none; color: var(--accent); margin-top: .1rem; }
.commitment h3 { font-family: var(--serif); font-weight: 500; font-size: 1.05rem; margin-bottom: .3rem; }
.commitment p { font-size: .88rem; color: var(--cream-2); }

/* --- CTA / Contact --- */
.contact { position: relative; background: var(--bg-2); border-top: 1px solid var(--line); overflow: hidden; }
.contact-mesh {
  position: absolute; inset: -20% -10% auto -10%; height: 60%; z-index: 0;
  background: radial-gradient(45% 55% at 50% 0%, rgba(201,121,63,0.18), transparent 72%);
  filter: blur(10px);
}
.contact-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: 3rem; }
.contact-info h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 4vw, 2.8rem); margin-top: 1rem; }
.contact-info h2 em { font-style: italic; color: var(--accent); }
.contact-info p { color: var(--cream-2); margin-top: 1rem; max-width: 46ch; }
.contact-channels { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.contact-channel { display: flex; align-items: center; gap: .9rem; font-size: .98rem; }
.contact-channel svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.contact-channel a:hover { color: var(--accent); }
.contact-form { background: var(--bg-3); border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.6rem, 3vw, 2.4rem); }
.contact-form .field { margin-bottom: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
.form-submit { width: 100%; margin-top: .4rem; justify-content: center; }
.form-note { margin-top: 1rem; font-size: .78rem; color: var(--cream-3); text-align: center; }
.form-success {
  display: none; text-align: center; padding: 2.4rem 1rem; flex-direction: column; align-items: center; gap: 1rem;
}
.form-success.is-visible { display: flex; }
.form-success svg { width: 46px; height: 46px; color: var(--accent); }
.contact-form.is-sent .field, .contact-form.is-sent .form-submit, .contact-form.is-sent .form-note { display: none; }
.contact-cta-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.8rem; }

/* --- Presupuesto (wizard modal) --- */
.budget-modal { position: fixed; inset: 0; z-index: 900; }
.budget-modal[hidden] { display: none; }
.budget-overlay {
  position: absolute; inset: 0; background: rgba(8, 7, 5, 0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .4s var(--ease-out);
}
.budget-modal.is-open .budget-overlay { opacity: 1; }

.budget-dialog {
  position: relative; z-index: 1; margin: 4vh auto; width: calc(100% - 2rem);
  max-width: 640px; max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--bg-3); border: 1px solid var(--line-strong);
  border-radius: 22px; padding: clamp(1.8rem, 4vw, 2.8rem);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.75);
  opacity: 0; transform: translateY(24px) scale(.98);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out);
}
.budget-modal.is-open .budget-dialog { opacity: 1; transform: none; }

.budget-close {
  position: absolute; top: 1.2rem; right: 1.2rem; z-index: 2; width: 36px; height: 36px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); color: var(--cream-2);
  transition: background .3s var(--ease-out), color .3s var(--ease-out), transform .3s var(--ease-out);
}
.budget-close svg { width: 16px; height: 16px; }
.budget-close:hover { background: rgba(243,236,221,0.08); color: var(--cream); transform: rotate(90deg); }

.budget-head { max-width: 480px; padding-right: 2.2rem; }
.budget-head h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.7rem, 4vw, 2.3rem); margin-top: .6rem; }
.budget-head h2 em { font-style: italic; color: var(--accent); font-weight: 400; }
.budget-lead { margin-top: .7rem; color: var(--cream-2); font-size: .96rem; }

.budget-progress { margin-block: 2rem; }
.budget-progress-top {
  display: flex; justify-content: space-between; font-family: var(--mono); font-size: .72rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--cream-3); margin-bottom: .6rem;
}
.budget-progress-top span:first-child { color: var(--accent); }
.budget-progress-bar { height: 3px; border-radius: 999px; background: var(--line); overflow: hidden; }
.budget-progress-bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .5s var(--ease-out); }

.budget-step { display: none; border: 0; padding: 0; }
.budget-step.is-active { display: block; animation: budgetStepIn .45s var(--ease-out); }
@keyframes budgetStepIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

.budget-step-head .num-index { color: var(--accent); }
.budget-step-head h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.3rem, 3vw, 1.7rem); margin-top: .4rem; }
.budget-step-head h3 em { font-style: italic; color: var(--accent); font-weight: 400; }
.budget-hint { margin-top: .5rem; color: var(--cream-3); font-size: .86rem; font-style: italic; }

.budget-step .form-row { margin-top: 1.4rem; }
.budget-step .field { margin-bottom: 1.1rem; }

.budget-options { margin-top: 1.4rem; display: grid; grid-template-columns: 1fr; gap: .8rem; }
.option-card {
  position: relative; display: flex; align-items: flex-start; gap: .85rem;
  padding: 1rem 1.1rem; border: 1px solid var(--line-strong); border-radius: 14px;
  background: rgba(243,236,221,0.02); cursor: pointer;
  transition: border-color .3s var(--ease-out), background .3s var(--ease-out);
}
.option-card:hover { border-color: var(--cream-3); background: rgba(243,236,221,0.05); }
.option-card input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: -1px; overflow: hidden;
}
.option-card input:focus-visible + .option-radio { outline: 2px solid var(--accent); outline-offset: 3px; }
.option-radio {
  flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); position: relative;
  transition: border-color .3s var(--ease-out);
}
.option-radio::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent);
  transform: scale(0); transition: transform .25s var(--ease-bounce);
}
.option-card input:checked + .option-radio { border-color: var(--accent); }
.option-card input:checked + .option-radio::after { transform: scale(1); }
.option-card.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.option-text { display: flex; flex-direction: column; gap: .2rem; }
.option-text strong { font-size: .96rem; font-weight: 600; color: var(--cream); }
.option-text small { font-size: .82rem; color: var(--cream-3); }
.option-text .option-price { font-family: var(--mono); font-size: .74rem; color: var(--accent); margin-top: .1rem; }

.option-check { display: flex; align-items: flex-start; gap: .7rem; margin-top: 1.4rem; cursor: pointer; }
.option-check input { margin-top: .2rem; width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.option-check span { font-size: .84rem; color: var(--cream-3); line-height: 1.4; }

.budget-error { margin-top: 1rem; font-size: .84rem; color: #E08A6B; text-align: center; animation: budgetErrorIn .3s var(--ease-out); }
.budget-error[hidden] { display: none; }
@keyframes budgetErrorIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.budget-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.8rem; }
.budget-nav .btn { padding: .85rem 1.4rem; }
.budget-nav .btn[hidden] { display: none; }
.budget-nav .btn.is-hidden { visibility: hidden; }
.budget-nav [data-budget-next], .budget-nav [data-budget-submit] { margin-left: auto; }

.budget-success { display: none; text-align: center; padding: 1rem 0 .5rem; flex-direction: column; align-items: center; gap: 1rem; }
.budget-success.is-visible { display: flex; }
.budget-success svg { width: 50px; height: 50px; color: var(--accent); }
.budget-success h3 { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; }
.budget-success p { color: var(--cream-2); max-width: 40ch; }
.budget-success-alt { margin-top: .6rem; display: flex; flex-direction: column; gap: .6rem; font-size: .9rem; color: var(--cream-2); }
.budget-success-alt a:hover { color: var(--accent); }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--line); padding-block: 3rem 2rem; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2.2rem; }
.footer-brand .brand-word { font-size: 1.3rem; }
.footer-brand p { margin-top: .8rem; color: var(--cream-3); font-size: .86rem; max-width: 34ch; }
.footer-col h4 { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cream-3); margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .65rem; }
.footer-col a { font-size: .9rem; color: var(--cream-2); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: .8rem; font-size: .8rem; color: var(--cream-3);
}
.footer-bottom a:hover { color: var(--accent); }

/* =============================================================
   7. Effects / keyframes
   ============================================================= */
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes scrollCue { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }
@keyframes meshDrift {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.08) rotate(6deg); }
}
.hero-mesh { animation: meshDrift 26s ease-in-out infinite; transform-origin: 30% 30%; }

.tilt { will-change: transform; }

/* splash */
.splash {
  position: fixed; inset: 0; z-index: 9999; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  animation: splashSafety .01s 4.5s forwards;
}
.splash svg { width: 72px; height: 72px; color: var(--accent); animation: splashPulse 1.4s ease-in-out infinite; }
.splash.is-out { opacity: 0; pointer-events: none; transition: opacity .6s var(--ease-out); }
@keyframes splashSafety { to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); } }
@keyframes splashPulse { 0%,100% { opacity: .5; transform: scale(.94); } 50% { opacity: 1; transform: scale(1); } }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .hero-trust { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .commitments-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr 1fr; }
  .budget-options { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 720px) {
  .scroll-cue { display: flex; }
  .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-actions .btn-ghost { display: inline-flex; }
  .nav-toggle { display: none; }
  .manifesto-grid { grid-template-columns: .8fr 1fr; }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .process-item { grid-template-columns: 90px 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .commitments-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1280px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-content { max-width: 760px; }
}

/* =============================================================
   9. Reduced-motion — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mesh { animation: none; }
  .scroll-cue .line::after { animation: none; }
  .hero-blueprint .draw { animation-duration: .01s; stroke-dashoffset: 0; }
  /* NO se desactivan: tilt, hover, fade, reveals, contador */
}
