/* ============ Tokens (cambiar aquí paleta y tipografía) ============ */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f4f2;
  --ink: #0d0d0d;
  --text: #3a3a3a;
  --muted: #7a7a7a;
  --line: #e4e2de;
  --dark: #000000;
  --wa: #25a35a;

  --font-display: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1240px;
  --gutter: clamp(24px, 5vw, 72px);
  --section-y: clamp(96px, 13vw, 176px);
  --box: 64px;          /* tamaño de las cajas del encabezado */
  --frame: 28px;        /* marco blanco alrededor del hero */
  --track: 0.22em;      /* espaciado de las líneas chicas */
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 40px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-weight: 400; font-size: 15.5px; line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 300; color: var(--ink); line-height: 1.1; margin: 0; text-transform: uppercase; }
h2 { font-size: clamp(34px, 5.4vw, 80px); letter-spacing: -0.01em; }
h3 { font-size: 15px; font-weight: 500; letter-spacing: .12em; line-height: 1.5; }
p { margin: 0; }
.container { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Líneas chicas: mayúsculas espaciadas, con una línea fina delante */
.eyebrow, .work-cap, .step-n, .brand-sub, .header-cta, .ba-tag, .nav-foot,
.form label, .contact-list span, .footer-copy, .tag-ph {
  text-transform: uppercase; letter-spacing: var(--track);
}
.eyebrow { display: flex; align-items: center; gap: 18px; font-size: 11px; font-weight: 500; color: var(--ink); margin-bottom: 30px; }
.eyebrow::before { content: ""; width: 48px; height: 1px; background: currentColor; }

.section { padding-block: var(--section-y); }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--dark); color: #d6d6d6; }
.section-dark h2, .section-dark .eyebrow { color: #fff; }
.section-dark .section-intro { color: #a8a8a8; }
.section-head { max-width: 820px; margin-bottom: clamp(56px, 8vw, 104px); }
.section-intro { color: var(--text); margin-top: 30px; max-width: 480px; }

/* ============ Botones ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 18px 40px; background: var(--ink); color: #fff; text-decoration: none;
  font: 500 11px var(--font-body); letter-spacing: var(--track); text-transform: uppercase;
  border: 1px solid var(--ink); border-radius: 0; cursor: pointer; transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: #fff; color: var(--ink); }
.btn-light { background: transparent; color: #fff; border-color: #fff; }
.btn-light:hover { background: #fff; color: var(--ink); }
.btn-wa { background: var(--ink); width: 100%; }

/* ============ Encabezado: cajas flotantes ============ */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 70; height: 0; pointer-events: none; }
.site-header > *, .header-right > * { pointer-events: auto; }
.menu-btn {
  position: absolute; top: 0; left: 0; width: var(--box); height: var(--box);
  display: grid; place-items: center; background: #000; color: #fff; border: 0; cursor: pointer; padding: 0;
}
.menu-icon { position: relative; width: 22px; height: 14px; }
.menu-icon i { position: absolute; left: 0; height: 1px; background: currentColor; transition: transform .3s, opacity .3s, width .3s; }
.menu-icon i:nth-child(1) { top: 0; width: 22px; }
.menu-icon i:nth-child(2) { top: 6px; width: 14px; }
.menu-icon i:nth-child(3) { top: 12px; width: 22px; }
.menu-btn[aria-expanded="true"] .menu-icon i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-icon i:nth-child(3) { top: 6px; width: 22px; transform: rotate(-45deg); }

.header-right { position: absolute; top: 0; right: 0; display: flex; height: var(--box); }
.header-cta { display: flex; align-items: center; padding: 0 30px; background: #000; color: #fff; font-size: 11px; font-weight: 500; text-decoration: none; transition: background .25s; }
.header-cta:hover { background: #333; }
.brand { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px; padding: 0 clamp(24px, 3vw, 44px); background: #fff; color: var(--ink); text-decoration: none; line-height: 1; box-shadow: 0 8px 32px rgba(0,0,0,.1); }
.brand-name { font-weight: 300; font-size: 19px; letter-spacing: .55em; margin-right: -.55em; text-transform: uppercase; }
.brand-sub { font-size: 7.5px; letter-spacing: .34em; margin-right: -.34em; color: var(--muted); }

/* ============ Menú ============ */
.nav { position: fixed; z-index: 65; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s, transform .3s; }
.nav.open { opacity: 1; visibility: visible; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; text-transform: uppercase; color: #fff; }
.nav-foot { display: none; }

/* Escritorio: barra negra junto al cuadro del menú */
@media (min-width: 1360px) {
  .nav { top: 0; left: var(--box); height: var(--box); background: #000; transform: translateX(-12px); }
  .nav.open { transform: none; }
  .nav ul { display: flex; height: 100%; padding: 0 12px; }
  .nav a { display: flex; align-items: center; height: 100%; padding: 0 20px; font-size: 11px; font-weight: 500; letter-spacing: .16em; transition: background .2s; }
  .nav a:hover { background: #222; }
}
/* Celular y tablet: pantalla completa */
@media (max-width: 1359px) {
  .nav { inset: 0; background: #000; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--box) + 24px) var(--gutter) 48px; }
  .nav a { display: block; font-size: clamp(26px, 6vw, 44px); font-weight: 300; letter-spacing: .06em; line-height: 1.5; }
  .nav a:hover { opacity: .6; }
  .nav-foot { display: block; margin-top: 40px; font-size: 10px; color: #8a8a8a; }
}

/* ============ Hero enmarcado ============ */
.hero { padding: var(--frame); background: #fff; }
.hero-frame { position: relative; height: calc(100vh - 2 * var(--frame)); height: calc(100svh - 2 * var(--frame)); min-height: 520px; overflow: hidden; background: #2a2622; color: #fff; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.1s ease, visibility 1.1s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; transform: scale(1.06); transition: transform 7s ease-out; }
.slide.is-active img { transform: scale(1); }
.hero-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0,0,0,.28) 0, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 36%, rgba(0,0,0,.72) 100%); }

/* Titular abajo a la derecha: línea fina + frase en mayúsculas finas */
.headline {
  position: absolute; right: clamp(24px, 4vw, 64px); bottom: clamp(36px, 8vh, 80px); z-index: 2; margin: 0; max-width: 88%;
  text-align: right; text-transform: uppercase; font-weight: 300; line-height: 1.12; letter-spacing: .01em;
  font-size: clamp(30px, 5.2vw, 82px); text-shadow: 0 2px 30px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(18px); transition: opacity .9s ease .35s, transform .9s ease .35s;
}
.headline::before { content: ""; display: block; width: clamp(56px, 7vw, 110px); height: 1px; background: #fff; margin: 0 0 clamp(18px, 2.4vw, 30px) auto; }
.headline span { display: block; font-size: clamp(10px, .95vw, 13px); font-weight: 500; letter-spacing: .34em; margin: 0 -.34em 1.4em 0; opacity: .92; }
.slide.is-active .headline { opacity: 1; transform: none; }

/* Flechas cuadradas, indicadores verticales y botón */
.hero-arrow {
  position: absolute; top: 50%; z-index: 3; width: 52px; height: 52px; margin-top: -26px;
  display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.45); border: 0; cursor: pointer; transition: background .25s;
}
.hero-arrow:hover { background: #000; }
.hero-prev { left: 0; }
.hero-next { right: 0; }
.hero-dots { position: absolute; left: clamp(20px, 2.4vw, 36px); top: 50%; z-index: 3; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; margin-top: 90px; }
.hero-dots button { width: 11px; height: 11px; padding: 0; background: transparent; border: 1px solid rgba(255,255,255,.75); cursor: pointer; transition: background .25s; }
.hero-dots button[aria-selected="true"] { background: #fff; }
.hero-foot { position: absolute; left: clamp(24px, 4vw, 64px); bottom: clamp(36px, 8vh, 80px); z-index: 3; }

/* ============ Trabajos ============ */
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 4vw, 56px) clamp(20px, 2.4vw, 32px); }
.work { display: flex; flex-direction: column; text-decoration: none; }
.work .ph { overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg-alt); }
.work img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.work:hover img { transform: scale(1.035); }
.work-cap { margin-top: 18px; font-size: 11px; font-weight: 500; color: var(--ink); }
.work-large { grid-column: span 2; grid-row: span 2; }
.work-large .ph { aspect-ratio: auto; flex: 1; min-height: 0; }

/* ============ Antes y después ============ */
.ba-grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: clamp(40px, 8vw, 120px); align-items: center; }
.ba { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #000; user-select: none; touch-action: pan-y; }
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 1px; background: #fff; pointer-events: none; }
.ba-handle span { position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; transform: translate(-50%, -50%); background: #000; }
.ba-handle span::before, .ba-handle span::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; border: solid #fff; border-width: 0 0 1px 1px; }
.ba-handle span::before { left: 15px; transform: translateY(-50%) rotate(45deg); }
.ba-handle span::after { right: 15px; transform: translateY(-50%) rotate(-135deg); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba-tag { position: absolute; top: 0; padding: 12px 16px; font-size: 10px; background: #000; color: #fff; pointer-events: none; }
.ba-tag-before { left: 0; }
.ba-tag-after { right: 0; }

/* ============ Proceso ============ */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 3vw, 44px); }
.step-img { aspect-ratio: 4 / 5; overflow: hidden; margin-bottom: 28px; background: var(--bg-alt); }
.step-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .6s; }
.step:hover .step-img img { filter: none; }
.step-n { font-size: 11px; font-weight: 500; color: var(--muted); display: block; margin-bottom: 14px; }
.step h3 { margin-bottom: 14px; }
.step p { color: var(--text); font-size: 14.5px; }

/* ============ Materiales ============ */
.materials-list { margin: 0; border-top: 1px solid var(--ink); }
.materials-list > div { display: grid; grid-template-columns: 0.8fr 1.4fr; gap: 24px; align-items: baseline; padding: 28px 0; border-bottom: 1px solid var(--line); }
.materials-list dt { font-size: 11px; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; color: var(--ink); }
.materials-list dd { margin: 0; font-size: clamp(17px, 1.6vw, 21px); font-weight: 300; line-height: 1.5; color: var(--ink); }
@media (max-width: 560px) { .materials-list > div { grid-template-columns: 1fr; gap: 8px; } }
.materials-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 8vw, 120px); align-items: start; }

/* ============ Testimonios ============ */
.quotes { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.quote { margin: 0; padding-top: 32px; border-top: 1px solid var(--ink); }
.quote blockquote { margin: 0 0 32px; font-size: clamp(17px, 1.5vw, 20px); font-weight: 300; line-height: 1.7; color: var(--ink); }
.quote figcaption { font-size: 13px; color: var(--muted); }
.quote figcaption strong { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; color: var(--ink); }
.quote figcaption span { display: block; }
.tag-ph { margin-left: 8px; padding: 2px 8px; font-size: 9px; letter-spacing: .14em; border: 1px dashed var(--muted); color: var(--muted); }

/* ============ Zona ============ */
.zone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 120px); align-items: center; }
.places { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid #333; }
.places li { padding: 24px 4px; border-bottom: 1px solid #333; font-size: 15px; font-weight: 300; text-transform: uppercase; letter-spacing: .2em; color: #fff; }

/* ============ Contacto ============ */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 8vw, 120px); align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 56px 0 0; border-top: 1px solid var(--ink); }
.contact-list li { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.contact-list span { font-size: 10px; color: var(--muted); align-self: center; }
.contact-list a { text-decoration: underline; text-underline-offset: 4px; }
.form { display: grid; gap: 30px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.form label { display: grid; gap: 4px; font-size: 10px; font-weight: 500; color: var(--muted); }
.form input, .form select, .form textarea {
  font: 400 16px var(--font-body); color: var(--ink); background: transparent; letter-spacing: 0; text-transform: none;
  border: 0; border-bottom: 1px solid #b5b5b5; border-radius: 0; padding: 12px 0; width: 100%;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 0; border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.form .invalid { border-bottom-color: #b5452f; box-shadow: 0 1px 0 #b5452f; }
.form-note { font-size: 12.5px; color: var(--muted); }

/* ============ Footer ============ */
.site-footer { background: var(--dark); color: #bdbdbd; padding-top: 72px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 48px; }
.site-footer .brand-name { color: #fff; font-size: 17px; }
.site-footer p, .site-footer a { font-size: 13px; letter-spacing: .08em; }
.footer-copy { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 24px; border-top: 1px solid #262626; padding-block: 26px 92px; font-size: 10px; color: #777; } /* el espacio inferior deja libre el botón flotante de WhatsApp */
.footer-credit strong { margin-left: 4px; font-weight: 500; color: #fff; }

/* ============ WhatsApp flotante ============ */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 55; width: 54px; height: 54px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 22px rgba(0,0,0,.22); transition: transform .2s;
}
.wa-float:hover { transform: scale(1.07); }

/* ============ Animación de entrada ============ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .work img, .nav, .slide img, .headline { transition: none; }
  .slide img { transform: none; }
}

/* ============ Responsive ============ */
@media (max-width: 960px) {
  :root { --box: 56px; --frame: 16px; }
  .ba-grid, .materials-grid, .zone-grid, .contact-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .quotes { grid-template-columns: 1fr; }
  .works { grid-template-columns: repeat(2, 1fr); }
  .work-large { grid-column: span 2; grid-row: auto; }
  .work-large .ph { aspect-ratio: 4 / 3.4; flex: none; }
  .brand-name { font-size: 16px; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  :root { --frame: 10px; }
  .header-cta { display: none; }
  .brand { padding: 0 20px; }
  .brand-sub { display: none; }
  .hero-frame { min-height: 480px; }
  .hero-arrow { width: 40px; height: 40px; margin-top: -20px; top: 42%; }
  .hero-dots { display: none; }
  .headline { bottom: 104px; font-size: clamp(26px, 8.4vw, 38px); }
  .hero-foot { bottom: 32px; left: 20px; }
  .steps { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .btn { padding: 17px 30px; }
}

/* ============ Nosotros ============ */
.about-statement { font-size: clamp(24px, 3.4vw, 50px); font-weight: 300; line-height: 1.32; letter-spacing: -0.005em; color: #fff; max-width: 1040px; }
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 120px); margin-top: clamp(64px, 9vw, 128px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid #333; }
.about-cols p:not(.eyebrow) { color: #b5b5b5; max-width: 460px; }
.about-quote { margin: 40px 0 0; padding-left: 24px; border-left: 1px solid #fff; font-size: clamp(17px, 1.6vw, 21px); font-weight: 300; line-height: 1.6; color: #fff; max-width: 460px; }
.about-quote cite { display: block; margin-top: 18px; font-style: normal; font-size: 10.5px; text-transform: uppercase; letter-spacing: var(--track); color: #8d8d8d; }
@media (max-width: 960px) { .about-cols { grid-template-columns: 1fr; } }

/* ============ Carrusel de antes y después ============ */
.ba-stack { display: grid; }
.ba-stack > .ba { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.ba-stack > .ba.is-active { opacity: 1; visibility: visible; }
.ba-dots { display: flex; justify-content: center; gap: 14px; margin-top: 26px; }
.ba-dots button { position: relative; width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 1px solid var(--ink); background: transparent; cursor: pointer; transition: background .25s, transform .25s; }
.ba-dots button::after { content: ""; position: absolute; inset: -10px; }
.ba-dots button:hover { transform: scale(1.25); }
.ba-dots button[aria-selected="true"] { background: var(--ink); }
@media (prefers-reduced-motion: reduce) { .ba-stack > .ba { transition: none; } }

/* ============ Llamados a cotizar ============ */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-top: clamp(56px, 8vw, 104px); padding-top: clamp(24px, 3vw, 36px); border-top: 1px solid var(--ink); }
.cta-text { font-size: clamp(20px, 2.3vw, 32px); font-weight: 300; line-height: 1.3; color: var(--ink); max-width: 620px; }
.cta-inline { margin-top: 36px; }
@media (max-width: 760px) { .cta { flex-direction: column; align-items: flex-start; gap: 24px; } }

/* ============ Galería por categoría (lightbox) ============ */
.work { cursor: pointer; }
body.lb-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.97);
  display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: 1fr auto; align-items: center; column-gap: clamp(8px, 2vw, 28px);
  padding: clamp(72px, 9vh, 96px) clamp(12px, 2.4vw, 32px) 0;
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lb-fig { grid-column: 2; grid-row: 1; margin: 0; display: flex; justify-content: center; align-items: center; min-height: 0; height: 100%; }
.lb-fig img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lb-nav { grid-row: 1; width: 52px; height: 52px; display: grid; place-items: center; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.35); cursor: pointer; transition: background .25s, border-color .25s; }
.lb-nav:hover { background: #fff; color: #000; border-color: #fff; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
.lightbox.single .lb-nav { visibility: hidden; }
.lb-close { position: absolute; top: 0; right: 0; width: var(--box); height: var(--box); display: grid; place-items: center; background: #fff; color: #000; border: 0; cursor: pointer; }
.lb-bar { grid-column: 1 / -1; grid-row: 2; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0 clamp(20px, 3vh, 32px); }
.lb-meta { margin: 0; color: #fff; font-size: 11px; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; }
.lb-meta span + span { margin-left: 16px; color: #8d8d8d; }
@media (max-width: 760px) {
  .lightbox { grid-template-columns: 1fr; padding-inline: 12px; }
  .lb-fig { grid-column: 1; }
  .lb-nav { position: absolute; top: 50%; margin-top: -26px; width: 44px; height: 44px; background: rgba(0,0,0,.55); }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
  .lb-bar { grid-column: 1; }
  .lb-bar .btn { padding: 15px 18px; white-space: nowrap; }
  .lb-meta { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .lightbox { transition: none; } }
