:root {
  --bg: #f0f0f0;
  --surface: #ffffff;
  --text: #0b0b0b;
  --muted: #5e5e5e;
  --accent: #00786c;
  --accent-dark: #003d37;
  --line: #e2e2e2;
  --radius: 22px;
  --serif: "Inria Serif", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
figure { margin: 0; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; margin: 0; }
h1 em, h2 em, .logo em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.section { padding-block: clamp(72px, 10vw, 130px); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px; border: 0;
  font: 600 15px/1 var(--sans); cursor: pointer;
  transition: transform .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--dark { background: #000; color: #fff; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dark); }
.btn--full { width: 100%; padding-block: 16px; }

/* Pills */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); padding: 6px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
}
.pill--grey { background: var(--bg); }
.pill--dark { background: rgba(255,255,255,.1); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.pill--dark .dot { background: #5fd3c5; }

/* Tarjetas con marco blanco */
.card {
  background: var(--surface);
  padding: 6px;
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  overflow: hidden;
}
.card > img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius) - 6px); }

/* Navegación */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(240,240,240,.85);
  backdrop-filter: blur(12px);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; }
.logo em { color: var(--accent); }
.nav__links { display: flex; align-items: center; gap: 40px; font-weight: 500; font-size: 15px; }
.nav__links a:not(.btn):hover { color: var(--accent); }
.nav__toggle { display: none; }

/* Hero */
.hero { padding-top: 40px; }
.hero__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 48px; }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; margin-bottom: 20px; }
.hero h1 { font-size: clamp(38px, 7vw, 88px); }
.hero__side { max-width: 340px; text-align: right; }
.hero__side p { color: var(--muted); font-size: 19px; line-height: 1.45; margin: 0 0 20px; }
.hero__gallery { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 16px; align-items: end; }
.hero__gallery .card { aspect-ratio: 4 / 5; }
.hero__gallery .card--tall { aspect-ratio: 4 / 5.4; }

/* Nosotros */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about__images { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; height: 520px; }
.about__img1 { grid-row: span 2; }
.about__text h2 { font-size: clamp(36px, 4.6vw, 56px); margin: 18px 0 20px; }
.about__text p { color: var(--muted); margin: 0 0 14px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.stats strong { display: block; color: var(--accent); font-size: clamp(30px, 3.4vw, 44px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.stats span { font-size: 14px; color: var(--muted); line-height: 1.3; display: block; margin-top: 6px; }

/* Cabeceras de sección */
.section__head { text-align: center; max-width: 820px; margin: 0 auto 56px; }
.section__head h2 { font-size: clamp(36px, 4.6vw, 56px); margin: 18px 0 12px; }
.section__head p { color: var(--muted); margin: 0; }

/* Servicios */
.services__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.services__tabs { display: flex; flex-direction: column; gap: 10px; }
.tab {
  display: flex; gap: 12px; align-items: center; text-align: left;
  padding: 24px; border: 0; border-radius: 16px; background: transparent;
  font: 500 19px/1.2 var(--sans); color: var(--text); cursor: pointer;
  transition: background .25s;
}
.tab span { color: var(--muted); font-size: 15px; }
.tab:hover { background: rgba(0,0,0,.04); }
.tab.is-active { background: #dcdcdc; }
.tab.is-active span { color: var(--accent); }
.services__img { aspect-ratio: 4 / 3; }
.services__panel { animation: fade .35s ease; }
.services__panel[hidden] { display: none; }
.services__panel h3 { font-size: 24px; margin: 24px 0 0; }
.services__panel p { color: var(--muted); margin: 10px 0 22px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Zona de trabajo */
.zone__list {
  list-style: none; padding: 0; margin: 0 auto; max-width: 900px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.zone__list li {
  background: var(--surface); padding: 8px 16px; border-radius: 999px;
  font-size: 15px; font-weight: 500; box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.zone__list li:first-child { background: var(--accent); color: #fff; }
.zone__note { text-align: center; color: var(--muted); margin: 28px 0 0; }
.zone__note a { color: var(--accent); font-weight: 600; }

/* Trabajos (carrusel) */
.work__wrap { position: relative; }
.work__track {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px max(16px, (100% - 1120px) / 2) 24px;
  scrollbar-width: none;
}
.work__track::-webkit-scrollbar { display: none; }
.work__item {
  position: relative; flex: 0 0 min(360px, 78vw); aspect-ratio: 4 / 5;
  scroll-snap-align: center; cursor: zoom-in;
}
.work__item img { transition: transform .6s ease; }
.work__item:hover img { transform: scale(1.04); }
.work__item figcaption {
  position: absolute; inset: auto 6px 6px 6px; padding: 60px 22px 22px;
  border-radius: 0 0 calc(var(--radius) - 6px) calc(var(--radius) - 6px);
  background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff;
}
.work__item h3 { font-size: 24px; margin: 10px 0 4px; }
.work__item p { margin: 0; font-size: 14px; opacity: .85; }
.tag {
  display: inline-block; font-size: 13px; padding: 4px 12px; border-radius: 999px;
  background: rgba(255,255,255,.18); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.3);
}
.work__arrow {
  position: absolute; top: 45%; z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: rgba(30,30,30,.55); color: #fff; font-size: 30px; line-height: 1; cursor: pointer;
  backdrop-filter: blur(6px); transition: background .2s;
}
.work__arrow:hover { background: var(--accent); }
.work__arrow--prev { left: max(12px, (100% - 1180px) / 2); }
.work__arrow--next { right: max(12px, (100% - 1180px) / 2); }

/* FAQ */
.faq__card { max-width: 680px; margin-inline: auto; padding: 28px; }
.faq__card h2 { font-size: clamp(32px, 4vw, 44px); margin: 18px 0 28px; }
details { background: var(--bg); border-radius: 16px; margin-bottom: 12px; }
summary {
  list-style: none; cursor: pointer; padding: 20px 60px 20px 22px; position: relative;
  font-weight: 500;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 18px; line-height: 1; transition: transform .25s;
}
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { margin: 0; padding: 0 22px 20px; color: var(--muted); }
details a { color: var(--accent); font-weight: 600; }

/* Contacto */
.contact { background: var(--accent-dark); color: #fff; }
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.contact__text h2 { font-size: clamp(40px, 5.4vw, 68px); margin: 18px 0 18px; }
.contact__text p { color: rgba(255,255,255,.75); margin: 0; }
.contact__phone {
  display: inline-block; margin: 32px 0 8px; font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 500; letter-spacing: -0.02em; border-bottom: 2px solid #5fd3c5;
}
.contact__zone { font-size: 15px; }
.contact__form { padding: 28px; color: var(--text); display: grid; gap: 16px; }
.contact__form > label, fieldset { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; margin-bottom: 8px; }
input[type="text"], input[type="tel"], textarea {
  width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 12px;
  padding: 12px 14px; font: 400 16px var(--sans); color: var(--text); resize: vertical;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); cursor: pointer; font-weight: 500; transition: all .2s;
}
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Footer */
.footer { padding: 48px 0; background: var(--bg); }
.footer__inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.footer p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.footer__links { display: flex; gap: 24px; flex-wrap: wrap; font-weight: 500; font-size: 15px; }
.footer__links a:hover, .footer__contact a:hover { color: var(--accent); }
.footer__contact { text-align: right; font-weight: 600; }

/* Botón flotante de llamada */
.call-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #fff; display: none; place-items: center;
  box-shadow: 0 8px 24px rgba(0,61,55,.35);
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.88);
  display: grid; place-items: center; padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 90vh; max-width: 100%; border-radius: 16px; }
.lightbox__close {
  position: absolute; top: 16px; right: 20px; background: none; border: 0; color: #fff;
  font-size: 44px; line-height: 1; cursor: pointer;
}

/* Animaciones de entrada */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Responsive */
@media (max-width: 900px) {
  .nav__toggle {
    display: grid; gap: 6px; background: none; border: 0; padding: 10px; cursor: pointer;
  }
  .nav__toggle span { width: 24px; height: 2px; background: var(--text); transition: transform .25s; }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav__links {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 4px;
    background: var(--bg); padding: 8px 16px 24px; align-items: stretch;
    display: none; box-shadow: 0 12px 24px rgba(0,0,0,.08);
  }
  .nav__links.is-open { display: flex; }
  .nav__links a:not(.btn) { padding: 12px 4px; font-size: 18px; }
  .nav__cta { margin-top: 8px; }

  .hero__top { flex-direction: column; align-items: flex-start; }
  .hero__side { text-align: left; }
  .about, .services__grid, .contact__inner { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .about__images { height: 420px; }
  .services__tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .tab { flex: none; padding: 14px 18px; font-size: 16px; }
  .call-fab { display: grid; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero__gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__gallery .card:first-child { display: none; }
  .hero__gallery .card, .hero__gallery .card--tall { aspect-ratio: 3 / 4; }
  .about__images { height: 340px; gap: 10px; }
  .stats { gap: 12px; }
  .work__arrow { display: none; }
  .footer__contact { text-align: left; }
}
