:root {
  --bg: #43443a;
  --bg-soft: #4d4e43;
  --gold: #c48b4a;
  --cream: #e6dccb;
  --text: #f1ede4;
  --chip: rgba(40, 41, 34, .72);
  --font-display: "Unbounded", "Montserrat", sans-serif;
  --font-body: "Montserrat", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 44px;
  background: #37392d;
  transition: box-shadow .3s;
}
.header.scrolled { box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.logo { display: flex; align-items: center; gap: 12px; }
.logo svg { width: 58px; height: 54px; }
.logo span { display: flex; flex-direction: column; line-height: 1.2; }
.logo strong { font-weight: 400; font-size: 15px; letter-spacing: .06em; color: var(--cream); }
.logo small { font-size: 11px; color: var(--gold); letter-spacing: .05em; }
.nav { display: flex; align-items: center; gap: 32px; font-size: 13px; font-weight: 400; }
.nav a { transition: color .2s; }
.nav a:hover { color: var(--gold); }
.nav-cta { margin-left: 40px; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-btn span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--cream); transition: transform .25s, opacity .25s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Secciones ---------- */
main > section { margin: 0 44px; }
h1, h2 { font-family: var(--font-display); font-weight: 300; line-height: 1.22; }
em { font-style: normal; color: var(--gold); }

.btn {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--gold); border-radius: 12px;
  background: rgba(0,0,0,.08);
  font-size: 13px; font-weight: 400;
  transition: background .25s, transform .25s;
}
.btn:hover { background: rgba(196,139,74,.18); }
.btn svg { width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.btn:hover svg { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(280px, 340px) 1fr; gap: 20px;
  align-items: center;
  padding: 40px 0 56px;
  border-bottom: 1px dotted var(--gold);
}
.brand-tag { font-family: var(--font-display); font-size: 17px; color: var(--gold); margin-bottom: 18px; }
.hero h1 { font-size: clamp(30px, 3.4vw, 40px); margin-bottom: 36px; }
.lead { font-size: 16px; font-weight: 400; max-width: 260px; margin-bottom: 40px; }

.collage {
  /* Proporciones de columnas según qué foto está activa (todo en fr para poder animar) */
  --c-default: 7fr 1.4fr 1.1fr;
  --c-main: 8.6fr 1.2fr 1fr;
  --c-mid: 3.2fr 4.4fr 1.1fr;
  --c-last: 3.2fr 1.4fr 4.4fr;
  display: grid; grid-template-columns: var(--c-default); gap: 10px;
  height: 380px; position: relative;
  transition: grid-template-columns .75s cubic-bezier(.22, .8, .2, 1);
}
.collage[data-active="main"] { grid-template-columns: var(--c-main); }
.collage[data-active="mid"]  { grid-template-columns: var(--c-mid); }
.collage[data-active="last"] { grid-template-columns: var(--c-last); }

.collage .ph { cursor: pointer; min-width: 0; }
.collage .ph img { transition: transform .9s cubic-bezier(.22, .8, .2, 1); }
.collage .ph:hover img, .collage .ph:focus-visible img { transform: scale(1.06); }
.collage .chip-side { transition: opacity .3s; }
.collage[data-active="mid"] .chip-side { opacity: 0; }
.ph { position: relative; margin: 0; overflow: hidden; border-radius: 28px; background: linear-gradient(160deg, #6d6a58, #2c2d27); }
.ph-last { border-radius: 28px; }
.chip {
  position: absolute; display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 20px;
  background: var(--chip); backdrop-filter: blur(4px);
  font-size: 12px; font-weight: 400;
}
.chip svg { width: 38px; height: 38px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.chip-top { top: -2px; left: -2px; border-radius: 22px 0 22px 0; }
.chip-bottom { bottom: -2px; left: -2px; border-radius: 0 22px 0 22px; }
.chip-side { left: -50px; top: 50%; transform: translateY(-50%); width: 130px; font-size: 11px; line-height: 1.3; }
.chip-side svg { width: 30px; height: 30px; }
.ph-last { overflow: visible; }
.ph-last img { border-radius: 28px; }

/* ---------- Servicios ---------- */
.services {
  display: grid; grid-template-columns: minmax(240px, 300px) 1fr; gap: 40px;
  padding: 56px 0;
}
.services h2 { font-size: clamp(24px, 2.6vw, 30px); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; padding-left: 40px; border-left: 1px dotted var(--gold); }
.icon { width: 52px; height: 52px; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.cards h3 { font-weight: 400; font-size: 16px; line-height: 1.4; margin-bottom: 20px; }
.cards p { font-size: 12px; line-height: 1.7; }

/* ---------- No actuar ---------- */
.why { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; padding: 48px 0 40px; }
.why h2 { font-size: clamp(28px, 3vw, 34px); margin-bottom: 36px; }
.why h2 span { display: block; color: var(--gold); }
.why ol { list-style: none; display: grid; gap: 28px; margin-bottom: 40px; }
.why li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.num { display: grid; place-items: center; width: 44px; height: 40px; border: 1px solid var(--gold); border-radius: 10px; font-size: 14px; font-weight: 400; }
.why h3 { font-size: 13px; font-weight: 500; margin-bottom: 10px; max-width: 200px; }
.why li p { font-size: 12px; line-height: 1.7; max-width: 340px; }

.why-photos { position: relative; height: 400px; }
.why-big { position: absolute; inset: 0 -44px 0 90px; border-radius: 40px 0 0 40px; }
.why-small { position: absolute; left: 0; bottom: -20px; width: 155px; height: 240px; border-radius: 26px; z-index: 2; }
.gavel {
  position: absolute; left: 118px; bottom: 56px; z-index: 3;
  display: grid; place-items: center; width: 80px; height: 80px; border-radius: 50%;
  background: var(--bg-soft);
}
.gavel svg { width: 42px; height: 42px; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Footer ---------- */
.footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px 44px;
  margin: 24px 44px 0; padding: 22px 0 28px;
  border-top: 1px dotted var(--gold);
  font-size: 11px; font-weight: 400;
}
.logo-sm { width: 40px; height: 38px; }
.footer-cta { font-weight: 500; }
.footer a:hover { color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .header { padding: 16px 24px; }
  .menu-btn { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 18px;
    padding: 24px; background: var(--bg);
    max-height: 0; overflow: hidden; visibility: hidden; opacity: 0;
    transition: opacity .25s, max-height .3s;
  }
  .nav.open { max-height: 420px; visibility: visible; opacity: 1; box-shadow: 0 12px 20px rgba(0,0,0,.25); }
  .nav-cta { margin-left: 0; }
  main > section, .footer { margin-left: 24px; margin-right: 24px; }
  .hero, .services, .why { grid-template-columns: 1fr; }
  .collage { height: 340px; }
  .cards { padding-left: 0; border-left: 0; grid-template-columns: 1fr; gap: 28px; }
  .why-photos { height: 340px; margin-bottom: 30px; }
  .why-big { right: 0; border-radius: 40px; }
}
@media (max-width: 560px) {
  .collage {
    --c-default: 5fr 1.3fr 1fr;
    --c-main: 5.6fr 1.1fr .9fr;
    --c-mid: 2.4fr 3.6fr 1fr;
    --c-last: 2.4fr 1.3fr 3.6fr;
    height: 280px;
  }
  .chip { font-size: 10px; padding: 8px 12px; }
  .chip svg { width: 26px; height: 26px; }
  .chip-side { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}


/* ---------- Menú desplegable: Nuestros Servicios ---------- */
.dropdown { position: relative; }
.dropdown-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 0; margin: 0;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.dropdown-toggle:hover { color: var(--gold); }
.dropdown-toggle svg { width: 14px; height: 14px; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.dropdown.open .dropdown-toggle svg { transform: rotate(180deg); }
.submenu {
  list-style: none; margin: 0; padding: 10px;
  position: absolute; top: calc(100% + 14px); left: -18px;
  min-width: 320px;
  background: var(--bg-soft);
  border: 1px solid rgba(196, 139, 74, .55);
  border-radius: 18px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, .35);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
/* Puente invisible para que el menú no se cierre al mover el mouse */
.submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.submenu a { display: block; padding: 10px 14px; border-radius: 10px; font-size: 13px; line-height: 1.4; }
.submenu a:hover, .submenu a:focus-visible { background: rgba(196, 139, 74, .16); color: var(--gold); }
@media (hover: hover) and (min-width: 961px) {
  .dropdown:hover .submenu, .dropdown:focus-within .submenu { opacity: 1; visibility: visible; transform: none; }
  .dropdown:hover .dropdown-toggle svg { transform: rotate(180deg); }
}
.dropdown.open .submenu { opacity: 1; visibility: visible; transform: none; }

@media (max-width: 960px) {
  .nav.open { max-height: 85vh; overflow-y: auto; }
  .dropdown { width: 100%; }
  .submenu {
    position: static; min-width: 0; margin-top: 12px;
    max-height: 0; padding: 0; overflow: hidden; border-width: 0;
    box-shadow: none; background: rgba(0, 0, 0, .14);
    opacity: 1; visibility: visible; transform: none;
    transition: max-height .3s, padding .3s;
  }
  .submenu::before { display: none; }
  .dropdown.open .submenu { max-height: 600px; padding: 8px; border-width: 1px; }
}

/* ---------- Menú móvil: mejoras de legibilidad y toque ---------- */
@media (max-width: 960px) {
  .nav {
    gap: 0;
    padding: 4px 24px 24px;
    background: var(--bg);
    border-bottom: 1px solid rgba(196, 139, 74, .55);
  }
  .nav.open { max-height: calc(100dvh - 84px); }

  /* Filas grandes, fáciles de tocar, con separador punteado como el resto del diseño */
  .nav > a,
  .dropdown-toggle {
    display: flex; align-items: center;
    width: 100%; min-height: 54px;
    font-size: 15px;
    border-bottom: 1px dotted rgba(196, 139, 74, .45);
  }
  .dropdown-toggle { justify-content: space-between; }
  .dropdown-toggle svg { width: 18px; height: 18px; }

  /* Submenú: sin hueco cuando está cerrado */
  .submenu { margin: 0; background: rgba(0, 0, 0, .18); border-color: rgba(196, 139, 74, .35); }
  .dropdown.open .submenu { margin: 6px 0 10px; }
  .submenu a { display: flex; align-items: center; min-height: 46px; padding: 8px 14px; font-size: 14px; }

  /* Botón final como en el diseño */
  .nav > a.nav-cta {
    justify-content: center;
    margin-top: 22px; min-height: 50px;
    border: 1px solid var(--gold); border-radius: 12px;
    background: rgba(196, 139, 74, .12);
    font-weight: 500;
  }
}

@media (prefers-reduced-motion: reduce) {
  .collage, .collage .ph img { transition: none; }
}

/* ---------- Menú móvil: panel fijo con scroll propio ---------- */
@media (max-width: 960px) {
  .nav {
    position: fixed;
    top: var(--header-h, 84px);
    left: 0; right: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .nav.open {
    max-height: calc(100vh - var(--header-h, 84px));
    max-height: calc(100dvh - var(--header-h, 84px));
    overflow-y: auto;
  }
  body.menu-open { overflow: hidden; }

  .nav a, .menu-btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

  /* Enlaces del submenú no enfocables mientras está cerrado */
  .submenu { visibility: hidden; transition: max-height .3s, padding .3s, visibility 0s .3s; }
  .dropdown.open .submenu { visibility: visible; transition-delay: 0s; }
}

/* ---------- Collage con una sola foto: ocupa todo el ancho y muestra la parte superior ---------- */
.collage--single { grid-template-columns: 1fr; }
.collage--single[data-active] { grid-template-columns: 1fr; }
.collage:has(> .ph:only-child) { grid-template-columns: 1fr; }
.collage:has(> .ph:only-child)[data-active] { grid-template-columns: 1fr; }

/* Foto centrada y anclada arriba, para que no se corten las cabezas */
.collage .ph img { object-position: center top; transform-origin: center top; }

/* ---------- Collage de una sola foto: se muestra COMPLETA, sin recortes ---------- */
.collage--single,
.collage--single[data-active] { grid-template-columns: 1fr; height: auto; }
.collage--single .ph { height: auto; border-radius: 28px; }
.collage--single .ph img { height: auto; object-fit: contain; }
.collage--single .ph:hover img,
.collage--single .ph:focus-visible img { transform: none; }

/* Mismo comportamiento si no se agrega la clase (navegadores con :has) */
.collage:has(> .ph:only-child) { height: auto; }
.collage:has(> .ph:only-child) .ph { height: auto; }
.collage:has(> .ph:only-child) .ph img { height: auto; object-fit: contain; }
.collage:has(> .ph:only-child) .ph:hover img,
.collage:has(> .ph:only-child) .ph:focus-visible img { transform: none; }

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed; z-index: 60;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex; flex-direction: row-reverse; align-items: center; gap: 12px;
  transition: opacity .25s, transform .25s;
}
.wa-icon { position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #25d366; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); transition: transform .25s; }
.wa-icon svg { width: 32px; height: 32px; fill: #fff; }
.wa-icon::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: wa-pulse 2.4s ease-out infinite; }
.wa-float:hover .wa-icon, .wa-float:focus-visible .wa-icon { transform: scale(1.08); }

.wa-label {
  padding: 10px 16px; border-radius: 20px;
  background: var(--chip); border: 1px solid rgba(196, 139, 74, .55);
  backdrop-filter: blur(4px);
  color: var(--text); font-size: 12px; font-weight: 400; white-space: nowrap;
  opacity: 0; transform: translateX(10px); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.wa-float:hover .wa-label, .wa-float:focus-visible .wa-label { opacity: 1; transform: none; }
/* Se muestra sola unos segundos al cargar la página, para que se note */
.wa-label { animation: wa-hint 7s 3s ease backwards; }

body.menu-open .wa-float { opacity: 0; pointer-events: none; }

@keyframes wa-pulse { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(1.55); opacity: 0; } }
@keyframes wa-hint { 0%, 100% { opacity: 0; transform: translateX(10px); } 10%, 85% { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .wa-icon { width: 56px; height: 56px; }
  .wa-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-icon::before, .wa-label { animation: none; }
}

/* ---------- "No actuar puede salir caro": dos fotos cuadradas, una al lado de la otra ---------- */
.why-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; height: auto; margin-bottom: 0; }
.why-photos .ph {
  position: relative; inset: auto; left: auto; bottom: auto;
  width: 100%; height: auto; aspect-ratio: 1 / 1;
  border-radius: 28px; z-index: auto;
}
.why-photos .ph img { object-position: center top; }
.why-photos .gavel { left: 50%; bottom: 22px; transform: translateX(-50%); }

@media (max-width: 560px) {
  .why-photos { gap: 10px; }
  .why-photos .ph { border-radius: 22px; }
  .why-photos .gavel { width: 64px; height: 64px; bottom: 14px; }
  .why-photos .gavel svg { width: 34px; height: 34px; }
}