/* ===== TOKENS ===== */
:root {
  --bg: #080808;
  --surface: #111111;
  --surface-2: #181818;
  --gold: #C4943A;
  --gold-light: #dba94a;
  --text: #f0f0f0;
  --text-muted: #888888;
  --border: rgba(196, 148, 58, 0.15);
  --font: 'Montserrat', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 200ms;
  --dur-normal: 400ms;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== TYPOGRAPHY ===== */
.section-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-top: 1rem;
  max-width: 560px;
  font-weight: 300;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.9rem 2.2rem;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: all var(--dur-normal) var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: #000000;
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

/* ===== LAYOUT ===== */
.section-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.section-header {
  margin-bottom: 4rem;
}

/* ===== HEADER / NAV ===== */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.75rem 2.5rem;
  transition: all var(--dur-normal) var(--ease-out);
}

#header.scrolled {
  background: rgba(8, 8, 8, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 1rem 2.5rem;
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo { display: flex; align-items: center; }
.logo-svg { width: 190px; height: 52px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(240, 240, 240, 0.65);
  transition: color var(--dur-fast);
}

.nav-links a:hover { color: var(--gold); }

.nav-phone {
  color: var(--gold) !important;
  border: 1px solid var(--border);
  padding: 0.45rem 1.1rem;
  transition: all var(--dur-fast) !important;
}

.nav-phone:hover {
  background: var(--gold) !important;
  color: #000 !important;
  border-color: var(--gold) !important;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  padding: 4px;
  z-index: 101;
}

.menu-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text);
  transition: all var(--dur-fast);
  transform-origin: center;
}

.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* ===== HERO ===== */
#hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(8, 8, 8, 0.88) 0%,
    rgba(8, 8, 8, 0.55) 55%,
    rgba(8, 8, 8, 0.15) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 2.5rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.hero-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out) 0.2s forwards;
}

.hero-title {
  font-size: clamp(4rem, 9.5vw, 9rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out) 0.4s forwards;
}

.hero-title span { color: var(--gold); }

.hero-desc {
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: rgba(240, 240, 240, 0.7);
  line-height: 1.75;
  max-width: 480px;
  margin-bottom: 2.75rem;
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out) 0.6s forwards;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out) 0.8s forwards;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px;
  height: 64px;
  background: linear-gradient(to bottom, rgba(196, 148, 58, 0.8), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; transform: scaleY(0.75); }
  50% { opacity: 1; transform: scaleY(1); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== SERVICES ===== */
#servicios {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: var(--border);
}

.service-card {
  background: var(--bg);
  padding: 3rem 2.5rem;
  transition: background var(--dur-normal);
}

.service-card:hover { background: var(--surface); }

.service-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.75rem;
}

.service-card h3 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.service-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
  font-weight: 300;
}

/* ===== GALLERY ===== */
#galeria {
  padding: clamp(5rem, 10vw, 9rem) 0 0;
  background: var(--surface);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: 4px;
  margin-top: 3rem;
}

.gallery-item:nth-child(1) { grid-column: span 2; }

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s var(--ease-out);
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  transition: background var(--dur-normal);
}

.gallery-overlay span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--dur-normal) var(--ease-out);
}

.gallery-item:hover .gallery-overlay { background: rgba(8, 8, 8, 0.52); }
.gallery-item:hover .gallery-overlay span { opacity: 1; transform: translateY(0); }

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-normal);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  transform: scale(0.94);
  transition: transform var(--dur-normal) var(--ease-out);
}

.lightbox.active .lightbox-content { transform: scale(1); }

.lightbox-content img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  font-size: 2.2rem;
  color: rgba(255, 255, 255, 0.5);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--dur-fast);
  line-height: 1;
}

.lightbox-close:hover { color: var(--gold); }

/* ===== ABOUT / STATS ===== */
#nosotros {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7rem;
  align-items: center;
}

.about-text .section-title {
  margin-top: 0.75rem;
  margin-bottom: 2rem;
}

.about-text p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 0.85rem;
  font-weight: 300;
}

.about-text .btn { margin-top: 1.75rem; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5px;
  background: var(--border);
}

.stat-item {
  background: var(--surface);
  padding: 2.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-number {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ===== CONTACT ===== */
#contacto {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: var(--border);
  margin-top: 1.5rem;
}

.contact-card {
  background: var(--surface);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  transition: background var(--dur-normal);
}

.contact-card:hover { background: var(--surface-2); }

.contact-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.5rem;
}

.contact-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  transition: color var(--dur-fast);
  word-break: break-all;
}

.contact-card:hover .contact-value { color: var(--gold); }

/* ===== FOOTER ===== */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 3.5rem 2.5rem;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-logo .logo-svg { width: 180px; height: 50px; }

.footer-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--dur-fast);
}

.footer-links a:hover { color: var(--gold); }

.footer-copy {
  font-size: 0.7rem;
  color: rgba(136, 136, 136, 0.45);
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.service-card:nth-child(2).reveal { transition-delay: 0.08s; }
.service-card:nth-child(3).reveal { transition-delay: 0.16s; }
.service-card:nth-child(4).reveal { transition-delay: 0.24s; }
.service-card:nth-child(5).reveal { transition-delay: 0.32s; }
.service-card:nth-child(6).reveal { transition-delay: 0.40s; }

.gallery-item:nth-child(2).reveal { transition-delay: 0.06s; }
.gallery-item:nth-child(3).reveal { transition-delay: 0.12s; }
.gallery-item:nth-child(4).reveal { transition-delay: 0.18s; }
.gallery-item:nth-child(5).reveal { transition-delay: 0.24s; }
.gallery-item:nth-child(6).reveal { transition-delay: 0.30s; }
.gallery-item:nth-child(7).reveal { transition-delay: 0.36s; }
.gallery-item:nth-child(8).reveal { transition-delay: 0.42s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 4rem; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item:nth-child(1) { grid-column: span 1; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--surface);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 4rem 2.5rem;
    gap: 2rem;
    transition: right var(--dur-normal) var(--ease-out);
    border-left: 1px solid var(--border);
    z-index: 99;
  }

  .nav-links.open { right: 0; }
  .nav-links a { font-size: 0.85rem; }
  .nav-phone { padding: 0.5rem 0 !important; border: none !important; }

  .menu-toggle { display: flex; }

  .services-grid { grid-template-columns: 1fr; }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 220px;
  }

  .contact-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }

  .hero-cta { flex-direction: column; align-items: flex-start; }

  .section-container { padding: 0 1.5rem; }
  #header { padding: 1.25rem 1.5rem; }
  #header.scrolled { padding: 0.85rem 1.5rem; }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }

  .about-stats { grid-template-columns: 1fr; }
  .footer-links { gap: 1.25rem; }
  .hero-title { font-size: clamp(3rem, 15vw, 5rem); }
}
