/* ==========================================================================
   Siaca Logistics · Remodelación de oficina — hoja de estilo
   Estructura: 1 Tokens · 2 Base · 3 Utilidades · 4 Cabecera/menú · 5 Hero
               6 Secciones · 7 Visor 3D · 8 Materiales · 9 Galería
               10 Presupuesto · 11 Pago · 12 Acciones · 13 Footer · 14 Overlays
   ========================================================================== */

/* 1 · Tokens ---------------------------------------------------------------- */
:root {
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, .08);
  --bg-light: #f5f5f7;
  --bg-white: #ffffff;
  --bg-dark: #000000;
  --surface-dark: #161618;
  --surface-dark-2: #1d1d1f;

  --navy: #23183e;          /* ICS */
  --pink: #de0554;          /* ICS */
  --green: #16a05d;         /* aprobar */
  --amber: #f2a20c;
  --red: #e5383b;
  --link: #0071e3;

  --glass-light: rgba(255, 255, 255, .62);
  --glass-dark: rgba(30, 30, 34, .55);
  --glass-border-light: rgba(255, 255, 255, .7);
  --glass-border-dark: rgba(255, 255, 255, .14);
  --blur: saturate(180%) blur(22px);

  --radius-s: 12px;
  --radius-m: 20px;
  --radius-l: 28px;
  --pill: 980px;

  /* Escala fluida 360 → 1440 px */
  --fs-xs: clamp(.72rem, .69rem + .12vw, .8rem);
  --fs-s: clamp(.84rem, .8rem + .17vw, .95rem);
  --fs-m: clamp(1rem, .95rem + .25vw, 1.15rem);
  --fs-l: clamp(1.15rem, 1rem + .6vw, 1.5rem);
  --fs-xl: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --fs-xxl: clamp(2.2rem, 1.2rem + 4.6vw, 5.25rem);

  --space-section: clamp(4.5rem, 3rem + 7vw, 9rem);
  --gutter: clamp(1rem, .6rem + 2vw, 2.5rem);
  --container: 1200px;
  --header-h: 64px;

  --ease: cubic-bezier(.28, .11, .32, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* 2 · Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--fs-m);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; letter-spacing: -.022em; line-height: 1.08; }
p { margin: 0; }

/* 3 · Utilidades ------------------------------------------------------------ */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container--narrow { --container: 920px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: #fff; padding: .6rem 1rem; border-radius: 10px; }
.skip-link:focus { top: 1rem; }
.glass {
  background: var(--glass-light);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border-light);
}
.card { background: var(--bg-white); border-radius: var(--radius-l); box-shadow: 0 1px 0 var(--line), 0 18px 50px -30px rgba(0, 0, 0, .25); }
.eyebrow { font-size: var(--fs-s); font-weight: 600; letter-spacing: .01em; color: rgba(255, 255, 255, .78); margin-bottom: .9rem; }
.eyebrow--accent { color: var(--pink); }
.link { color: var(--link); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

/* Botones — pill con cristal estilo Apple */
.btn {
  --b-bg: rgba(255, 255, 255, .16);
  --b-bd: rgba(255, 255, 255, .34);
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 48px;
  padding: .78em 1.6em;
  border-radius: var(--pill);
  font-size: var(--fs-m); font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--b-bd);
  background: var(--b-bg);
  transition: transform .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease);
}
.btn--glass {
  color: #fff;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 30px -12px rgba(0, 0, 0, .5);
}
.hero__cta .btn--glass:not(.btn--primary) { --b-bg: rgba(0, 0, 0, .55); --b-bd: rgba(255, 255, 255, .45); }
.btn--glass:hover { --b-bg: rgba(255, 255, 255, .26); transform: translateY(-1px); }
.btn--primary { --b-bg: rgba(255, 255, 255, .92); --b-bd: rgba(255, 255, 255, .95); color: var(--ink); }
.btn--primary:hover { --b-bg: #fff; }
.btn:active { transform: scale(.97); }

/* 4 · Cabecera y menú -------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  transition: background .25s linear, border-color .25s linear;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.site-header.is-scrolled[data-theme="light"] { background: rgba(250, 250, 252, .8); border-color: var(--line); }
.site-header.is-scrolled[data-theme="dark"] { background: rgba(0, 0, 0, .62); border-color: rgba(255, 255, 255, .08); }
.brand { display: block; height: 30px; position: relative; }
.brand__logo { height: 30px; width: auto; transition: opacity .35s var(--ease); }
.brand__logo--dark { position: absolute; inset: 0; opacity: 0; }
.site-header[data-theme="light"] .brand__logo--light { opacity: 0; }
.site-header[data-theme="light"] .brand__logo--dark { opacity: 1; }

.burger {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-content: center; gap: 7px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  position: relative; z-index: 2;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.burger span { display: block; width: 18px; height: 1.6px; border-radius: 2px; background: #fff; transition: transform .45s var(--ease-out), background .3s; }
.site-header[data-theme="light"] .burger { border-color: rgba(0, 0, 0, .1); background: rgba(255, 255, 255, .6); }
.site-header[data-theme="light"] .burger span { background: var(--ink); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4.3px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4.3px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(8, 8, 12, .78);
  -webkit-backdrop-filter: saturate(160%) blur(30px); backdrop-filter: saturate(160%) blur(30px);
  color: #fff;
  display: grid; place-items: center;
  opacity: 0; transition: opacity .45s var(--ease);
  overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu.is-open { opacity: 1; }
.menu__inner { width: min(100% - 2 * var(--gutter), 960px); padding: calc(var(--header-h) + 2rem) 0 3rem; }
.menu__logo { height: 40px; width: auto; margin-bottom: clamp(1.5rem, 5vh, 3.5rem); }
.menu__list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(.15rem, 1vh, .6rem); }
.menu__list a {
  display: flex; align-items: baseline; gap: 1rem;
  text-decoration: none;
  font-size: clamp(1.9rem, 1rem + 4.2vw, 4.2rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.12;
  color: rgba(255, 255, 255, .92);
  transition: color .3s, transform .5s var(--ease-out);
}
.menu__list a span { font-size: var(--fs-s); font-weight: 400; color: rgba(255, 255, 255, .45); letter-spacing: 0; min-width: 2ch; }
.menu__list a:hover { color: #fff; transform: translateX(8px); }
.menu__list li { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.menu.is-open .menu__list li { opacity: 1; transform: none; }
.menu.is-open .menu__list li:nth-child(2) { transition-delay: .04s; }
.menu.is-open .menu__list li:nth-child(3) { transition-delay: .08s; }
.menu.is-open .menu__list li:nth-child(4) { transition-delay: .12s; }
.menu.is-open .menu__list li:nth-child(5) { transition-delay: .16s; }
.menu.is-open .menu__list li:nth-child(6) { transition-delay: .2s; }
.menu.is-open .menu__list li:nth-child(7) { transition-delay: .24s; }
.menu__meta { margin-top: clamp(1.5rem, 5vh, 3rem); font-size: var(--fs-s); color: rgba(255, 255, 255, .5); }
body.menu-open .site-header { background: transparent !important; border-color: transparent !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.menu-open .site-header .brand { opacity: 0; pointer-events: none; }

/* 5 · Hero ------------------------------------------------------------------ */
.hero {
  position: relative; isolation: isolate;
  min-height: 100svh;
  display: grid; align-content: start; justify-items: center;
  padding: calc(var(--header-h) + clamp(2rem, 8vh, 5.5rem)) var(--gutter) 6rem;
  color: #fff; text-align: center;
  overflow: hidden;
  background: #0b0d10;
}
.hero { background: #000; }
.hero__media { position: absolute; inset: auto 0 0 0; height: min(64%, 60vw); z-index: -2;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 12%, #000 46%); mask-image: linear-gradient(180deg, transparent 0%, transparent 12%, #000 46%); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; transform: scale(1.06); transition: transform 1.8s var(--ease-out); }
.hero.is-in .hero__media img { transform: scale(1); }
.hero__content { max-width: 980px; position: relative; }
.hero__title { font-size: clamp(2.1rem, 1.1rem + 4vw, 4.6rem); font-weight: 600; letter-spacing: -.035em; text-wrap: balance; }
.hero__lead { margin-top: 1.1rem; font-size: var(--fs-l); font-weight: 400; color: #f5f5f7; text-shadow: 0 1px 18px rgba(0, 0, 0, .9); }
.hero__cta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.scroll-cue { position: absolute; bottom: 1.6rem; left: 50%; translate: -50% 0; width: 26px; height: 42px; border-radius: 20px; border: 1.5px solid rgba(255, 255, 255, .6); }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: #fff; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* 6 · Secciones -------------------------------------------------------------- */
.section { padding-block: var(--space-section); position: relative; }
.section--light { background: var(--bg-light); }
.section--white { background: var(--bg-white); }
.section--dark { background: var(--bg-dark); color: #f5f5f7; }
.section__head { text-align: center; max-width: 820px; margin: 0 auto clamp(2.2rem, 5vw, 4rem); }
.section__title { font-size: var(--fs-xl); font-weight: 600; text-wrap: balance; }
.section__lead { margin-top: 1rem; font-size: var(--fs-l); font-weight: 300; color: var(--muted); text-wrap: pretty; }
.section--dark .section__lead { color: #a1a1a6; }

/* 7 · Visor 3D -------------------------------------------------------------- */
.viewer {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 460px;
  max-height: 82svh;
  width: 100%;
  border-radius: var(--radius-l);
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #fbfbfa 0%, #e9e8e4 60%, #dcdbd6 100%);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .35);
}
.viewer:fullscreen { border-radius: 0; max-height: none; aspect-ratio: auto; }
.viewer__stage { position: absolute; inset: 0; touch-action: none; cursor: grab; }
.viewer__stage:active { cursor: grabbing; }
.viewer__stage canvas { display: block; width: 100% !important; height: 100% !important; }
.viewer__loading {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1rem;
  color: var(--muted); font-size: var(--fs-s); transition: opacity .6s var(--ease);
}
.viewer__loading.is-done { opacity: 0; pointer-events: none; }
.ring { width: 44px; height: 44px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 126; stroke-dashoffset: calc(126 - 126 * var(--p, .05)); transition: stroke-dashoffset .4s var(--ease); }

.viewer__views {
  position: absolute; left: 50%; bottom: clamp(.75rem, 2vw, 1.25rem); translate: -50% 0;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px; padding: 4px;
  border-radius: 24px;
  width: max-content; max-width: calc(100% - 1.5rem);
  box-shadow: 0 10px 30px -15px rgba(0, 0, 0, .35);
}
.viewer__views::-webkit-scrollbar { display: none; }
.viewer__views button, .filters button {
  border: 0; background: transparent; white-space: nowrap;
  font-size: var(--fs-s); font-weight: 500; color: var(--ink-2);
  padding: .55em 1.05em; border-radius: var(--pill);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.viewer__views button:hover { color: var(--ink); }
.viewer__views button[aria-selected="true"] { background: var(--ink); color: #fff; }
.viewer__views .divider { width: 1px; height: 18px; background: rgba(0, 0, 0, .14); margin: 0 4px; flex: none; }
.viewer__tools { position: absolute; top: clamp(.75rem, 2vw, 1.25rem); right: clamp(.75rem, 2vw, 1.25rem); display: flex; gap: 2px; padding: 4px; border-radius: var(--pill); }
.icon-btn { width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; transition: background .3s; }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: rgba(0, 0, 0, .06); }
.icon-btn[aria-pressed="true"] { background: var(--ink); }
.icon-btn[aria-pressed="true"] svg { stroke: #fff; }

.specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: clamp(1.5rem, 3vw, 2.5rem) 0 0; background: var(--line); border-radius: var(--radius-m); overflow: hidden; }
.specs div { background: var(--bg-light); padding: 1.1rem 1rem; text-align: center; }
.specs dt { font-size: var(--fs-xs); color: var(--muted); }
.specs dd { margin: .2rem 0 0; font-size: var(--fs-l); font-weight: 600; letter-spacing: -.01em; }
.specs div:last-child dd { font-size: var(--fs-m); font-weight: 500; }

/* 8 · Materiales ------------------------------------------------------------ */
.materials { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.75rem, 1.6vw, 1.25rem); }
.material { background: var(--bg-light); border-radius: var(--radius-m); padding: .6rem .6rem 1.1rem; transition: transform .5s var(--ease-out); }
.material:hover { transform: translateY(-4px); }
.material__swatch { aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: #e9e9ec center / cover no-repeat; }
.material__swatch img { width: 100%; height: 100%; object-fit: cover; }
.material__swatch--frost { background: linear-gradient(135deg, #eef3f2 0%, #d6dedc 100%); position: relative; }
.material__swatch--frost::after { content: ''; position: absolute; inset: 18%; border-radius: 8px; background: rgba(255, 255, 255, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8); }
.material__swatch--drywall { background: linear-gradient(160deg, #ffffff 0%, #ececea 100%); box-shadow: inset 0 0 0 1px var(--line); }
.material__swatch--pvc { background: linear-gradient(160deg, #fafafa 0%, #dcdcdf 60%, #f2f2f4 100%); }
.material h3 { font-size: var(--fs-m); font-weight: 600; margin: .9rem .4rem 0; letter-spacing: -.01em; }
.material p { font-size: var(--fs-s); color: var(--muted); margin: .15rem .4rem 0; }
.material a { display: inline-block; font-size: var(--fs-xs); margin: .55rem .4rem 0; }

/* 9 · Galería --------------------------------------------------------------- */
.filters { display: flex; width: max-content; max-width: 100%; overflow-x: auto; margin: 0 auto clamp(1.5rem, 3vw, 2.5rem); padding: 4px; gap: 2px; border-radius: var(--pill); background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); }
.filters button { color: #d2d2d7; }
.filters button[aria-selected="true"] { background: #f5f5f7; color: var(--ink); }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-flow: dense; gap: clamp(.6rem, 1.2vw, 1rem); }
.gallery li { grid-column: span 4; }
.gallery li.is-wide { grid-column: span 8; grid-row: span 2; }
.gallery li.is-quarter { grid-column: span 3; }
.gallery li[data-cat="arte"] .shot img { object-fit: contain; background: #111; }
.gallery li[hidden] { display: none; }
.shot { position: relative; width: 100%; height: 100%; padding: 0; border: 0; border-radius: var(--radius-m); overflow: hidden; background: var(--surface-dark); display: block; aspect-ratio: 16 / 10; }
.gallery li.is-wide .shot { aspect-ratio: auto; min-height: 100%; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out), opacity .6s; }
.shot:hover img { transform: scale(1.045); }
.shot figcaption {
  position: absolute; left: .7rem; bottom: .7rem; right: .7rem;
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  padding: .55rem .9rem; border-radius: 14px; text-align: left;
  font-size: var(--fs-s); font-weight: 500; color: #fff;
  background: rgba(20, 20, 24, .45); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, .14);
}
.shot figcaption small { font-weight: 400; color: rgba(255, 255, 255, .7); font-size: var(--fs-xs); }

/* 10 · Presupuesto ---------------------------------------------------------- */
.budget-meta { margin-top: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius-m); overflow: hidden; margin-bottom: clamp(1.25rem, 2.5vw, 2rem); }
.budget-meta div { background: var(--bg-white); padding: 1rem 1.2rem; }
.budget-meta dt { font-size: var(--fs-xs); color: var(--muted); }
.budget-meta dd { margin: .15rem 0 0; font-weight: 600; font-size: var(--fs-m); }
.budget-meta dd small .nw { white-space: nowrap; }
.budget-meta dd small { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-xs); }

.budget { display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: clamp(1rem, 2.5vw, 2rem); align-items: start; }
.budget__chart { padding: clamp(1.25rem, 3vw, 2rem); position: sticky; top: calc(var(--header-h) + 1rem); }
.donut { position: relative; width: min(100%, 300px); margin: 0 auto; aspect-ratio: 1; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.donut circle { fill: none; stroke-width: 14; transition: stroke-width .4s var(--ease), opacity .4s var(--ease); cursor: pointer; }
.donut circle.is-dim { opacity: .22; }
.donut circle.is-active { stroke-width: 18; }
.donut__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut__label { font-size: var(--fs-s); color: var(--muted); max-width: 14ch; margin-inline: auto; line-height: 1.25; }
.donut__value { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); font-weight: 700; letter-spacing: -.03em; margin-top: .15rem; }
.donut__pct { font-size: var(--fs-xs); color: var(--muted); }
.legend { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .1rem; }
.legend button { width: 100%; display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: .7rem; padding: .5rem .6rem; border: 0; border-radius: 10px; background: transparent; text-align: left; font-size: var(--fs-s); }
.legend button:hover, .legend button.is-active { background: var(--bg-light); }
.legend i { width: 10px; height: 10px; border-radius: 50%; }
.legend b { font-weight: 600; }

.budget__items { display: grid; gap: .75rem; }
.item { background: var(--bg-white); border-radius: var(--radius-m); box-shadow: 0 1px 0 var(--line); overflow: hidden; transition: box-shadow .4s var(--ease); }
.item.is-active { box-shadow: 0 0 0 2px var(--c, var(--ink)); }
.item__head { width: 100%; display: grid; grid-template-columns: 4px 1fr auto 28px; gap: 1rem; align-items: center; padding: 1.15rem 1.25rem; border: 0; background: transparent; text-align: left; }
.item__bar { align-self: stretch; border-radius: 4px; background: var(--c); }
.item__title { font-weight: 600; font-size: var(--fs-m); letter-spacing: -.01em; }
.item__sub { display: block; font-size: var(--fs-s); color: var(--muted); font-weight: 400; margin-top: .1rem; }
.item__calc { display: block; font-size: var(--fs-xs); color: var(--muted); margin-top: .3rem; font-variant-numeric: tabular-nums; }
.item__amount { font-weight: 600; font-size: var(--fs-l); letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-align: right; }
.item__amount small { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); letter-spacing: 0; }
.item__chev { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-light); display: grid; place-items: center; transition: transform .45s var(--ease-out); }
.item__chev::before { content: ''; width: 7px; height: 7px; border-right: 1.6px solid var(--ink); border-bottom: 1.6px solid var(--ink); transform: translateY(-2px) rotate(45deg); }
.item__head[aria-expanded="true"] .item__chev { transform: rotate(180deg); }
.item__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease-out); }
.item__head[aria-expanded="true"] + .item__body { grid-template-rows: 1fr; }
.item__body > div { overflow: hidden; }
.item__list { list-style: none; margin: 0; padding: 0 1.25rem 0 calc(1.25rem + 4px + 1rem); display: grid; }
.item__list li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--line); font-size: var(--fs-s); color: var(--ink-2); }
.item__list li span:last-child { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.item__note { margin: .6rem 1.25rem 1.2rem calc(1.25rem + 4px + 1rem); padding: .75rem .9rem; border-radius: 12px; background: var(--bg-light); font-size: var(--fs-xs); color: var(--muted); }
.item__body > div > :last-child:not(.item__note) { margin-bottom: 1.1rem; }

.totals { margin-top: clamp(1rem, 2.5vw, 2rem); padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2.5rem); display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 1rem; align-items: end; }
.totals div span { display: block; font-size: var(--fs-s); color: var(--muted); }
.totals div strong { font-size: var(--fs-l); font-weight: 600; font-variant-numeric: tabular-nums; }
.totals .totals__grand { text-align: right; }
.totals .totals__grand strong { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); font-weight: 700; letter-spacing: -.035em; }
.budget__download { text-align: center; margin-top: 1.5rem; font-size: var(--fs-s); }

/* 11 · Pago ----------------------------------------------------------------- */
.section--pay { overflow: hidden; }
.section--pay::before { content: ''; position: absolute; inset: auto -10% -40% -10%; height: 80%; background: radial-gradient(50% 50% at 30% 50%, rgba(222, 5, 84, .28), transparent 70%), radial-gradient(45% 50% at 72% 45%, rgba(122, 108, 240, .26), transparent 70%); filter: blur(30px); pointer-events: none; }
.pay { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.75rem, 1.6vw, 1.25rem); }
.pay__card {
  border-radius: var(--radius-l); padding: clamp(1.4rem, 3vw, 2rem);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  display: flex; flex-direction: column; gap: .8rem;
}
.pay__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); }
.pay__icon svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pay__card h3 { font-size: var(--fs-l); font-weight: 600; }
.pay__card p { color: #a1a1a6; font-size: var(--fs-s); }
.pay__copy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem; padding: .7rem .9rem; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); font-size: var(--fs-s); }
.pay__copy span { font-weight: 500; overflow-wrap: anywhere; }
.pay__copy button { flex: none; border: 0; border-radius: var(--pill); padding: .4rem .85rem; background: #f5f5f7; color: var(--ink); font-size: var(--fs-xs); font-weight: 600; }
.calc { margin-top: auto; display: grid; gap: .5rem; }
.calc label { font-size: var(--fs-xs); color: #a1a1a6; }
.calc__row { display: flex; align-items: center; gap: .4rem; padding: .25rem .9rem .25rem .9rem; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); }
.calc__row span { font-size: var(--fs-s); color: #a1a1a6; white-space: nowrap; }
.calc input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; color: #fff; font: inherit; font-size: var(--fs-m); padding: .5rem 0; outline: none; }
.calc output { font-size: var(--fs-l); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pay__card .link { color: #2997ff; font-size: var(--fs-s); }

/* 12 · Acciones ------------------------------------------------------------- */
.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.75rem, 1.6vw, 1.25rem); }
.action {
  --c: var(--ink);
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .9rem;
  padding: clamp(1.5rem, 3vw, 2.2rem) 1.2rem; border-radius: var(--radius-l);
  text-decoration: none; text-align: center; background: var(--bg-light);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.action:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px var(--c); }
.action__btn {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 52px; padding: .8rem 1.9rem;
  border-radius: var(--pill); font-weight: 600; font-size: var(--fs-m);
  color: #fff; background: var(--c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 26px -12px var(--c);
}
.action__btn svg { width: 18px; height: 18px; fill: currentColor; }
.action small { font-size: var(--fs-s); color: var(--muted); }
.action--approve { --c: var(--green); }
.action--negotiate { --c: var(--amber); }
.action--negotiate .action__btn { color: #2b1d00; }
.action--reject { --c: var(--red); }
.action--reject .action__btn { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1.6px var(--red); }
.action--reject:hover .action__btn { background: var(--red); color: #fff; }
.actions__note { text-align: center; margin-top: 1.5rem; font-size: var(--fs-s); color: var(--muted); }

/* 13 · Footer --------------------------------------------------------------- */
.site-footer { background: var(--bg-light); border-top: 1px solid var(--line); padding: 1.6rem var(--gutter) calc(1.6rem + env(safe-area-inset-bottom)); text-align: center; font-size: var(--fs-xs); color: var(--muted); }

/* 14 · Lightbox y toast ----------------------------------------------------- */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; }
.lightbox::backdrop { background: rgba(0, 0, 0, .9); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.lightbox[open] { display: grid; place-items: center; animation: fade .35s var(--ease); }
.lightbox figure { margin: 0; display: grid; gap: .9rem; justify-items: center; padding: 4rem var(--gutter); max-width: 100%; }
.lightbox img { max-width: min(100%, 1600px); max-height: calc(100dvh - 10rem); width: auto; border-radius: var(--radius-s); object-fit: contain; }
.lightbox figcaption { font-size: var(--fs-s); color: #d2d2d7; text-align: center; }
.lightbox figcaption b { color: #fff; font-weight: 600; }
.lightbox__btn { position: fixed; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; color: #fff; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); }
.lightbox__close { top: 1rem; right: 1rem; font-size: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 1rem; top: 50%; translate: 0 -50%; }
@keyframes fade { from { opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: 1.5rem; translate: -50% 140%; z-index: 80; padding: .7rem 1.2rem; border-radius: var(--pill); background: rgba(29, 29, 31, .86); color: #fff; font-size: var(--fs-s); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); opacity: 0; visibility: hidden; transition: translate .5s var(--ease-out), opacity .3s, visibility .3s; }
.toast.is-show { translate: -50% 0; opacity: 1; visibility: visible; }

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 1024px) {
  .budget { grid-template-columns: 1fr; }
  .budget__chart { position: static; display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 1.5rem; align-items: center; }
  .legend { margin: 0; }
  .gallery li, .gallery li.is-wide, .gallery li.is-quarter { grid-column: span 6; grid-row: auto; }
  .gallery li.is-wide .shot { aspect-ratio: 16 / 10; }
}
@media (max-width: 760px) {
  :root { --header-h: 58px; }
  .viewer { aspect-ratio: 4 / 5; min-height: 420px; }
  .viewer__views { left: .5rem; right: .5rem; translate: none; width: auto; max-width: none; }
  .viewer__views .divider { flex-basis: 100%; height: 0; margin: 0; }
  .viewer__views button { padding: .5em .8em; }
  .specs, .budget-meta, .materials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .budget__chart { grid-template-columns: 1fr; }
  .gallery li, .gallery li.is-wide, .gallery li.is-quarter { grid-column: span 12; }
  .materials li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .materials li:last-child:nth-child(odd) .material__swatch { aspect-ratio: 21 / 9; }
  .pay, .actions { grid-template-columns: minmax(0, 1fr); }
  .totals { grid-template-columns: 1fr 1fr; }
  .totals .totals__grand { grid-column: 1 / -1; text-align: left; border-top: 1px solid var(--line); padding-top: 1rem; }
  .item__head { grid-template-columns: 4px 1fr 28px; }
  .item__amount { grid-column: 2; text-align: left; }
  .item__chev { grid-column: 3; grid-row: 1; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 1rem; translate: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
.viewer__activate { position: absolute; left: 50%; translate: -50% 0; bottom: 8.2rem; border-radius: var(--pill); padding: .75rem 1.3rem; font-size: var(--fs-s); font-weight: 500; color: var(--ink); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .35); }
.viewer__activate[hidden] { display: none; }
