:root {
  --bg: #FFFFFF;
  --surface: #F7FAFC;
  --ink: #0A2540;
  --ink-2: #4A5568;
  --ink-3: #718096;
  --line: #E2E8F0;
  --accent: #0A2540;
  --accent-hover: #1E3A5F;
  --whatsapp: #25D366;
  --whatsapp-hover: #1FB257;

  --max: 1200px;
  --pad: clamp(1rem, 4vw, 2rem);
  --radius: 8px;
  --radius-lg: 12px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;

  --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.06);
  --shadow-md: 0 4px 12px rgba(10, 37, 64, 0.08);
  --shadow-lg: 0 10px 30px rgba(10, 37, 64, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--ink-3);
  font-weight: 600;
  margin: 0 0 1rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-text strong {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.brand-text small {
  font-size: 1rem;
  letter-spacing: 0.32em;
  color: var(--ink-3);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-2);
  padding: 0.5rem 0;
  position: relative;
}

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

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 40px;
  height: 40px;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.08s ease, box-shadow 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; box-shadow: var(--shadow-md); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-whatsapp:hover { background: var(--whatsapp-hover); color: #fff; box-shadow: var(--shadow-md); }

.btn-lg {
  padding: 1.1rem 2rem;
  font-size: 1.05rem;
  min-width: 220px;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse at top right, rgba(10, 37, 64, 0.05), transparent 60%),
    linear-gradient(to bottom, #FBFCFE, var(--bg));
  padding: clamp(3rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 5rem);
  border-bottom: 1px solid var(--line);
}

.hero-inner { max-width: 820px; }

.hero h1 {
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-2);
  max-width: 620px;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.section-alt { background: var(--surface); }

.section-lede {
  max-width: 680px;
  color: var(--ink-2);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: 3rem;
}

.about-copy p { font-size: 1rem; }
.about-copy p:last-child { margin-bottom: 0; }

.stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
  align-content: start;
}

.stats li {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--ink-3);
}

/* ---------- Specialties cards ---------- */
.specialties {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.95rem; color: var(--ink-2); margin: 0; }

.section-alt .card { background: var(--bg); }

/* ---------- Project blocks ---------- */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-block {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.project-block:hover {
  box-shadow: var(--shadow-md);
}

.project-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--ink);
  padding: 1rem 1.5rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.project-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 1.1em;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  flex-shrink: 0;
}

.project-block .gallery {
  padding: 1.25rem;
}

/* ---------- Gallery ---------- */
.gallery {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.gallery-item {
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  background: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

/* ---------- Contact ---------- */
.section-contact {
  background: linear-gradient(to bottom, var(--surface), var(--bg));
  text-align: center;
}

.contact-inner { max-width: 720px; margin: 0 auto; }

.contact-inner .section-lede {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.5rem;
}

.contact-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.contact-address {
  font-size: 0.9rem;
  color: var(--ink-3);
  line-height: 1.7;
  margin: 0 0 2rem;
}

.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  max-width: 860px;
  margin: 0 auto;
}

.map-wrap iframe {
  display: block;
  width: 100%;
  height: 380px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-3);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 64, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pad);
  z-index: 100;
  animation: fadein 0.2s ease;
}

.lightbox[hidden] { display: none; }

.lightbox-img {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }

@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 49;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 1rem var(--pad);
    transform: translateY(-110%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
    box-shadow: var(--shadow-md);
  }

  .nav-links a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a:last-child { border-bottom: 0; }

  body.nav-open .nav-links {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.25s ease, visibility 0s linear 0s;
  }

  .btn-lg { min-width: unset; width: 100%; }
  .contact-ctas .btn-lg { flex: 1 1 240px; }

  .map-wrap iframe { height: 240px; }

  .project-block .gallery { padding: 0.75rem; }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 480px) {
  .brand-text strong {
    font-size: 1rem;
    letter-spacing: 0.02em;
  }

  .brand-text small {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
  }

  h1 { font-size: clamp(1.6rem, 7vw, 2.4rem); }

  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; justify-content: center; }

  .stats li { padding: 1rem; }
  .stat-number { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
