/* ---------- Fonts ---------- */
@font-face {
  font-family: "Staatliches";
  src: url("../assets/fonts/Staatliches-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Code Pro";
  src: url("../assets/fonts/SourceCodePro-VariableFont_wght.ttf") format("truetype-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Code Pro";
  src: url("../assets/fonts/SourceCodePro-Italic-VariableFont_wght.ttf") format("truetype-variations");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0b0c10;
  --bg-alt: #131419;
  --surface: #1a1c23;
  --surface-2: #22242c;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f3ef;
  --text-muted: #a7a9b3;
  --accent: #f3a935;
  --accent-hover: #ffc262;
  --accent-contrast: #1a1305;
  --font-display: "Staatliches", "Arial Narrow", sans-serif;
  --font-body: "Source Code Pro", ui-monospace, "SF Mono", Menlo, monospace;
  --container: 1180px;
  --radius: 14px;
  --shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.02em; margin: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.75rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}

.accent-text { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-accent {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-accent:hover, .btn-accent:focus-visible {
  background: var(--accent-hover);
  transform: translateY(-2px);
}
.btn-ghost {
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(11, 12, 16, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.site-header.scrolled {
  background: rgba(11, 12, 16, 0.92);
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand-logo { height: 48px; width: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.main-nav ul {
  display: flex;
  gap: 1.75rem;
}
.nav-link {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text); border-color: var(--accent); }
.nav-cta { padding: 0.6rem 1.3rem; font-size: 0.85rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
}
.nav-toggle span {
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 10, 14, 0.55) 0%, rgba(9, 10, 14, 0.55) 40%, rgba(9, 10, 14, 0.95) 100%),
    linear-gradient(90deg, rgba(9, 10, 14, 0.85) 0%, rgba(9, 10, 14, 0.35) 60%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 6rem;
}
.hero-title {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.05;
  text-transform: uppercase;
  max-width: 16ch;
}
.hero-subtitle {
  margin: 1.5rem 0 0;
  max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 26px;
  height: 42px;
  border: 2px solid var(--border);
  border-radius: 999px;
}
.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  animation: scrollcue 1.6s ease-in-out infinite;
}
@keyframes scrollcue {
  0% { opacity: 1; top: 8px; }
  70% { opacity: 0; top: 22px; }
  100% { opacity: 0; top: 22px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: clamp(2rem, 4vw, 2.9rem);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-lead {
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0 0 3rem;
}

/* ---------- Nosotros ---------- */
.about-grid {
  display: grid;
  gap: 2.5rem;
  margin-top: 2rem;
  grid-template-columns: 1fr;
}
.about-text p {
  color: var(--text-muted);
  font-size: 1.02rem;
}
.about-text p strong { color: var(--text); }
.about-cards {
  display: grid;
  gap: 1.25rem;
}
.mv-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.mv-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.mv-card p { color: var(--text-muted); margin: 0; }

/* ---------- Servicios ---------- */
.services-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, background 0.2s ease;
}
.service-card:hover { transform: translateY(-4px); background: var(--surface-2); }
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(243, 169, 53, 0.12);
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.service-icon svg { width: 28px; height: 28px; }
.service-card h3 {
  font-size: 1.4rem;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.service-card p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }

/* ---------- Galeria ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 4 / 3;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.45), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.gallery-item:hover::after { opacity: 1; }

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
}
.contact-card h3 {
  font-size: 1.6rem;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.contact-detail {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}
.contact-detail a { color: var(--text); word-break: break-word; }
.contact-detail a:hover { color: var(--accent); }
.contact-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.contact-btn { margin-top: 0.5rem; }
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 320px;
}
.map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  filter: grayscale(0.3) invert(0.92) contrast(0.9);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}
.footer-logo { height: 40px; opacity: 0.9; }
.footer-legal, .footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 6, 9, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(90vw, 1000px);
  max-height: 75vh;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.lightbox-caption {
  color: var(--text-muted);
  margin-top: 1rem;
  font-size: 0.9rem;
}
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-size: 2rem;
  line-height: 1;
  color: var(--text);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--text);
  padding: 0.75rem;
}
.lightbox-nav:hover { color: var(--accent); }
.lightbox-prev { left: 0.75rem; }
.lightbox-next { right: 0.75rem; }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 860px) {
  .about-grid { grid-template-columns: 1.3fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1.1fr; }
}

@media (min-width: 980px) {
  .nav-toggle { display: none; }
  .main-nav {
    position: static;
    flex-direction: row;
    background: none;
    height: auto;
    width: auto;
    padding: 0;
  }
  .main-nav ul { flex-direction: row; }
}

@media (max-width: 979px) {
  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    height: calc(100vh - 72px);
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    overflow-y: auto;
  }
  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
  }
  .nav-link { font-size: 1rem; display: block; }
  .nav-toggle { display: flex; }
}

@media (min-width: 1200px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-card, .hero-content { padding-left: 0; padding-right: 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .service-card, .btn, .gallery-item img, .nav-link, .scroll-cue span { transition: none; animation: none; }
}
