/* ── RESET & VARIABLES ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:       #0A0A0A;
  --bg-alt:   #0f0e0c;
  --bg-card:  #131210;
  --gold:     #C39A3C;
  --gold-lt:  #EFD98A;
  --gold-dk:  #A87D2A;
  --gold-rim: rgba(195,154,60,0.18);
  --text:     #F2EEE3;
  --text-sec: #BDB39C;
  --text-lbl: #8A7A55;
  --serif:    'EB Garamond', Georgia, serif;
  --sans:     'Montserrat', sans-serif;
  --ease:     cubic-bezier(.25,.46,.45,.94);
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--gold); color: var(--bg); }

/* ── TYPOGRAPHY ── */
h1,h2,h3 { font-family: var(--serif); font-weight: 500; }
.label-gold {
  font-family: var(--sans); font-size: 0.65rem;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.8rem; font-weight: 500;
}
.body-text {
  font-size: 0.88rem; color: var(--text-sec);
  line-height: 1.9; font-weight: 300; margin-bottom: 1rem;
}
.gold-bar { width: 48px; height: 1px; background: var(--gold); margin-top: 1.2rem; }
.gold-bar.center { margin: 1.2rem auto 0; }

/* ── REVEAL ANIMATION ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── BUTTONS ── */
.btn-gold {
  display: inline-block; background: var(--gold); color: var(--bg);
  padding: 0.85rem 2rem; font-family: var(--sans);
  font-size: 0.68rem; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 600; border: none; cursor: pointer;
  transition: background 0.3s, transform 0.2s; border-radius: 1px;
}
.btn-gold:hover { background: var(--gold-lt); transform: translateY(-2px); }
.btn-ghost {
  display: inline-block; border: 1px solid rgba(242,238,227,0.35);
  color: var(--text); padding: 0.85rem 2rem;
  font-size: 0.68rem; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 400; transition: border-color 0.3s, color 0.3s; border-radius: 1px;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ── PILLS ── */
.pill {
  display: inline-block; border: 1px solid var(--gold-rim);
  color: var(--text-lbl); font-size: 0.68rem; letter-spacing: 1px;
  padding: 0.35rem 0.9rem; border-radius: 50px; font-weight: 400;
}

/* ════════════════════════════
   NAV
════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem;
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s;
}
.nav.scrolled {
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(195,154,60,0.15);
  padding: 0.7rem 2rem;
}
.nav__logo img { height: 70px; width: auto; object-fit: contain; }
.nav__links {
  display: flex; align-items: center; gap: 2rem;
}
.nav__links a {
  font-size: 0.68rem; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 500; color: rgba(242,238,227,0.8);
  transition: color 0.3s;
}
.nav__links a:hover { color: var(--gold); }
.nav__cta {
  border: 1px solid var(--gold) !important;
  color: var(--gold) !important; padding: 0.45rem 1.2rem;
  transition: background 0.3s !important;
}
.nav__cta:hover { background: var(--gold) !important; color: var(--bg) !important; }
.nav__burger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; background: none; border: none; cursor: pointer;
  padding: 6px; z-index: 1100;
}
.nav__burger span {
  display: block; width: 22px; height: 1px;
  background: var(--text); transition: 0.35s var(--ease);
}
.nav__burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ════════════════════════════
   HERO
════════════════════════════ */
.hero {
  position: relative; height: 100svh; min-height: 560px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  transform: scale(1.06); transition: transform 10s var(--ease);
}
.hero:not(:hover) .hero__bg { transform: scale(1.06); }
.hero:hover .hero__bg { transform: scale(1); }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,10,0.45) 0%,
    rgba(10,10,10,0.6) 55%,
    rgba(10,10,10,0.92) 100%
  );
}
.hero__content { position: relative; z-index: 2; padding: 2rem 1.5rem; max-width: 820px; }
.hero__title {
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  font-weight: 500; line-height: 1.1; color: var(--text); margin-bottom: 1.2rem;
}
.hero__title em { font-style: italic; color: var(--gold-lt); }
.hero__sub {
  font-size: clamp(0.82rem, 2vw, 0.95rem); color: rgba(242,238,227,0.65);
  font-weight: 300; letter-spacing: 0.5px; line-height: 1.8; margin-bottom: 2.2rem;
}
.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 2;
}
.hero__scroll span {
  display: block; width: 1px; height: 48px;
  background: linear-gradient(to bottom, transparent, var(--gold));
  animation: scrollPulse 2.2s ease infinite;
}
@keyframes scrollPulse {
  0%,100% { opacity:0; transform:scaleY(0); transform-origin:top; }
  50%      { opacity:1; transform:scaleY(1); transform-origin:top; }
}

/* ════════════════════════════
   MÉTRICAS
════════════════════════════ */
.metrics {
  background: var(--bg-alt);
  border-top: 1px solid #181614; border-bottom: 1px solid #181614;
  display: flex; flex-wrap: wrap; justify-content: center;
}
.metric {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 1.6rem 2.5rem; text-align: center;
}
.metric__num {
  font-family: var(--serif); font-size: 2.2rem;
  color: var(--gold); font-weight: 500; line-height: 1;
}
.metric__label {
  font-size: 0.62rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-lbl); font-weight: 500;
}
.metric__sep { width: 1px; background: #222; margin: 1rem 0; align-self: stretch; }

/* ════════════════════════════
   SECCIONES
════════════════════════════ */
.section { padding: 6rem 1.5rem; max-width: 1160px; margin: 0 auto; }
.dark-bg { max-width: 100%; background: var(--bg-alt); padding: 6rem 1.5rem; }
.dark-bg > * { max-width: 1160px; margin-left: auto; margin-right: auto; }
.section__header { text-align: center; margin-bottom: 3.5rem; }
.section__header h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 500; line-height: 1.2;
}
.section__header h2 em { font-style: italic; color: var(--gold-lt); }

/* ════════════════════════════
   SOBRE NOSOTROS
════════════════════════════ */
.about {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 5rem; align-items: center;
}
.about__img { position: relative; }
.about__img img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: center; }
.about__badge {
  position: absolute; bottom: -1.5rem; right: -1.5rem;
  background: var(--gold); color: var(--bg);
  padding: 1.5rem; text-align: center; min-width: 110px;
}
.about__badge-num { display: block; font-family: var(--serif); font-size: 2.2rem; font-weight: 600; line-height: 1; }
.about__badge-label { font-size: 0.6rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; }
.about__text h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 500; line-height: 1.2; margin-bottom: 0.3rem;
}
.about__text h2 em { font-style: italic; color: var(--gold-lt); }
.about__text .body-text { margin-top: 1.2rem; }
.about__pills { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }

/* ════════════════════════════
   SERVICIOS
════════════════════════════ */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: #1a1714;
}
.service {
  background: var(--bg-card); overflow: hidden;
  border: 1px solid var(--gold-rim);
  transition: border-color 0.4s, box-shadow 0.4s;
}
.service:hover {
  border-color: rgba(195,154,60,0.5);
  box-shadow: 0 0 28px rgba(195,154,60,0.08);
}
.service__img { overflow: hidden; aspect-ratio: 4/3; }
.service__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.service:hover .service__img img { transform: scale(1.06); }
.service__body { padding: 1.5rem 1.4rem; }
.service__icon { color: var(--gold); font-size: 0.8rem; letter-spacing: 4px; margin-bottom: 0.7rem; }
.service__body h3 {
  font-family: var(--serif); font-size: 1.25rem;
  font-weight: 500; margin-bottom: 0.6rem; color: var(--text);
}
.service__body p { font-size: 0.8rem; color: var(--text-sec); line-height: 1.75; font-weight: 300; }

/* ════════════════════════════
   PORTAFOLIO
════════════════════════════ */
.portfolio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 4px;
}
.portfolio__card { position: relative; overflow: hidden; cursor: pointer; }
.portfolio__card.large { grid-row: span 2; }
.portfolio__card img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  min-height: 220px; transition: transform 0.6s var(--ease);
}
.portfolio__card:hover img { transform: scale(1.07); }
.portfolio__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.92) 0%, rgba(10,10,10,0.1) 60%, transparent 100%);
  padding: 1.5rem; display: flex; flex-direction: column; justify-content: flex-end;
  transform: translateY(40%); transition: transform 0.45s var(--ease);
}
.portfolio__card:hover .portfolio__overlay { transform: translateY(0); }
.portfolio__tag {
  font-size: 0.58rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--gold);
  padding: 0.2rem 0.6rem; display: inline-block;
  margin-bottom: 0.5rem; align-self: flex-start;
}
.portfolio__overlay h3 {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 500; margin-bottom: 0.35rem;
}
.portfolio__overlay p { font-size: 0.75rem; color: rgba(242,238,227,0.7); font-weight: 300; line-height: 1.6; }

/* ════════════════════════════
   GALERÍA
════════════════════════════ */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.gallery__item {
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #111;
}
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transition: transform 0.6s var(--ease), filter 0.4s;
  filter: brightness(0.88);
}
.gallery__item:hover img { transform: scale(1.06); filter: brightness(1); }

/* ── Servicio obra nueva con logo ── */
.service__img--logo {
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.service__img--logo img {
  width: 100%; height: 100%; object-fit: cover;
}

/* ── Métrica con subíndice ── */
.metric__sub {
  font-size: 0.6rem; color: var(--text-lbl);
  letter-spacing: 0.5px; margin-top: 0.2rem;
  font-style: italic; max-width: 160px; text-align: center; line-height: 1.4;
}

/* ════════════════════════════
   TESTIMONIOS
════════════════════════════ */
.testimonials {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.testimonial {
  background: var(--bg-card); border: 1px solid var(--gold-rim);
  padding: 2rem; display: flex; flex-direction: column; gap: 1rem;
  transition: border-color 0.4s;
}
.testimonial:hover { border-color: rgba(195,154,60,0.4); }
.testimonial__stars { color: var(--gold); font-size: 0.85rem; letter-spacing: 3px; }
.testimonial__text {
  font-family: var(--serif); font-size: 1.05rem; font-style: italic;
  color: var(--text-sec); line-height: 1.75; font-weight: 400; flex: 1;
}
.testimonial__author { display: flex; align-items: center; gap: 0.9rem; margin-top: auto; }
.testimonial__avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(195,154,60,0.15); border: 1px solid var(--gold-rim);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 600; color: var(--gold); flex-shrink: 0;
}
.testimonial__name { font-size: 0.82rem; font-weight: 500; color: var(--text); }
.testimonial__type { font-size: 0.7rem; color: var(--text-lbl); margin-top: 0.1rem; }

/* ── Testimonios vacíos ── */
.testimonials-empty {
  text-align: center; padding: 4rem 2rem;
  border: 1px solid var(--gold-rim); max-width: 560px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
}
.testimonials-empty__icon { color: var(--gold); font-size: 1.8rem; }
.testimonials-empty__text {
  font-family: var(--serif); font-size: 1.1rem; font-style: italic;
  color: var(--text-sec); line-height: 1.8;
}

/* ════════════════════════════
   CONTACTO
════════════════════════════ */
.contact {
  display: grid; grid-template-columns: 1fr 1.8fr;
  gap: 5rem; align-items: start;
  max-width: 1100px; margin: 0 auto;
}
.contact__info .body-text { margin-bottom: 2rem; }
.contact__items { display: flex; flex-direction: column; gap: 1.1rem; margin-bottom: 2.5rem; }
.contact__item { display: flex; align-items: center; gap: 0.9rem; font-size: 0.82rem; color: var(--text-sec); font-weight: 300; }
.contact__icon { color: var(--gold); width: 18px; text-align: center; font-size: 0.95rem; flex-shrink: 0; }
.contact__logo { height: 56px; width: auto; opacity: 0.6; margin-top: 1rem; }
.contact__form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.45rem; }
.form-field label {
  font-size: 0.6rem; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--gold); font-weight: 500;
}
.form-field input, .form-field select, .form-field textarea {
  background: rgba(255,255,255,0.03); border: 1px solid #252320;
  color: var(--text); padding: 0.8rem 0.9rem;
  font-size: 0.82rem; font-family: var(--sans); font-weight: 300;
  transition: border-color 0.3s; border-radius: 1px; width: 100%;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--text-lbl); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--gold);
}
.form-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23C39A3C'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
.form-field select option { background: #111; color: var(--text); }
.form__success { color: var(--gold); font-size: 0.8rem; min-height: 1.2rem; margin-top: 0.3rem; }

/* ════════════════════════════
   FOOTER
════════════════════════════ */
.footer {
  background: #050504; border-top: 1px solid #131210;
  text-align: center; padding: 4rem 1.5rem 2.5rem;
}
.footer__top { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.footer__logo { height: 70px; width: auto; opacity: 0.85; }
.footer__tagline { font-size: 0.65rem; letter-spacing: 3px; text-transform: uppercase; color: var(--text-lbl); }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin-top: 0.5rem; }
.footer__nav a { font-size: 0.65rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-lbl); transition: color 0.3s; }
.footer__nav a:hover { color: var(--gold); }
.footer__divider { width: 40px; height: 1px; background: #222; margin: 2rem auto; }
.footer__legal { display: flex; gap: 0.8rem; justify-content: center; align-items: center; margin-bottom: 0.8rem; }
.footer__legal a { font-size: 0.65rem; color: var(--text-lbl); letter-spacing: 1px; transition: color 0.3s; }
.footer__legal a:hover { color: var(--gold); }
.footer__legal span { color: #333; font-size: 0.65rem; }
.footer__copy { font-size: 0.65rem; color: #333; }

/* ── WHATSAPP FLOTANTE ── */
.whatsapp-btn {
  position: fixed; bottom: 1.8rem; right: 1.8rem; z-index: 999;
  background: #25D366; color: #fff;
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}
.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.55);
}

/* ════════════════════════════
   COOKIE BANNER
════════════════════════════ */
.cookie-banner {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9998;
  background: #131210;
  border-top: 1px solid var(--gold-rim);
  padding: 1.2rem 2rem;
  flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
}
.cookie-banner.show { display: flex; }
.cookie-banner p { font-size: 0.8rem; color: var(--text-sec); font-family: var(--sans); max-width: 680px; }
.cookie-banner p a { color: var(--gold); text-decoration: underline; }
.cookie-banner__btns { display: flex; gap: 0.75rem; flex-shrink: 0; }
.cookie-banner .btn-gold, .cookie-banner .btn-ghost { padding: 0.5rem 1.4rem; font-size: 0.75rem; }

/* ════════════════════════════
   LIGHTBOX
════════════════════════════ */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.95);
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox__img {
  max-width: 90vw; max-height: 90vh;
  object-fit: contain; border: 1px solid rgba(195,154,60,0.2);
}
.lightbox__close {
  position: absolute; top: 1.2rem; right: 1.5rem;
  background: none; border: none; color: var(--gold);
  font-size: 1.8rem; cursor: pointer; line-height: 1;
  transition: opacity 0.2s;
}
.lightbox__close:hover { opacity: 0.7; }
.lightbox__prev, .lightbox__next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text);
  font-size: 3.5rem; cursor: pointer; padding: 0 1rem;
  transition: color 0.2s; line-height: 1; font-weight: 300;
}
.lightbox__prev { left: 0.5rem; }
.lightbox__next { right: 0.5rem; }
.lightbox__prev:hover, .lightbox__next:hover { color: var(--gold); }
.gallery__item { cursor: pointer; }

/* ════════════════════════════
   RESPONSIVE TABLET (≤900px)
════════════════════════════ */
@media (max-width: 900px) {
  /* Nav */
  .nav__links {
    position: fixed; inset: 0;
    flex-direction: column; justify-content: center; align-items: center;
    background: rgba(10,10,10,0.97); gap: 2rem;
    transform: translateX(100%); transition: transform 0.4s var(--ease);
    z-index: 1000;
  }
  .nav__links.open { transform: translateX(0); }
  .nav__links a { font-size: 0.85rem; }
  .nav__burger { display: flex; }

  /* Sections */
  .section, .dark-bg { padding: 4.5rem 1.2rem; }

  /* About */
  .about { grid-template-columns: 1fr; gap: 3.5rem; }
  .about__badge { right: 0; bottom: -1rem; }

  /* Services */
  .services { grid-template-columns: repeat(2, 1fr); }

  /* Portfolio */
  .portfolio { grid-template-columns: 1fr 1fr; }
  .portfolio__card.large { grid-row: span 1; }
  .portfolio__overlay { transform: translateY(0); }

  /* Gallery */
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .gallery__item.wide { grid-column: span 1; }

  /* Testimonials */
  .testimonials { grid-template-columns: 1fr; }

  /* Contact */
  .contact { grid-template-columns: 1fr; gap: 3rem; }
  .contact__logo { display: none; }

  /* Metrics */
  .metric__sep { display: none; }
  .metric { padding: 1.2rem 1.5rem; }
}

/* ════════════════════════════
   RESPONSIVE MOBILE (≤520px)
════════════════════════════ */
@media (max-width: 520px) {
  .nav { padding: 0.9rem 1.2rem; }
  .nav.scrolled { padding: 0.6rem 1.2rem; }
  .hero__title { font-size: 2.4rem; }
  .hero__actions { flex-direction: column; align-items: center; }
  .btn-gold, .btn-ghost { width: 100%; text-align: center; }
  .services { grid-template-columns: 1fr; }
  .portfolio { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .gallery__item.tall { grid-row: span 1; }
  .form-row { grid-template-columns: 1fr; }
  .about__badge { right: 0.5rem; }
}
