:root {
  --bg: #0a0c10;
  --bg-2: #11151c;
  --bg-3: #171c26;
  --card: #161b24;
  --line: rgba(232, 196, 122, 0.18);
  --text: #e8edf4;
  --muted: #9aa6b8;
  --gold: #e8c47a;
  --gold-2: #c9a15a;
  --accent: #6ec8d4;
  --white: #ffffff;
  --danger: #e05a5a;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --max: 1180px;
  --nav-h: 78px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Manrope", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; }

.wrap { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.eyebrow {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 700;
}
h1, h2, h3, .display {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.6rem, 6vw, 5.1rem); }
h2 { font-size: clamp(2rem, 4vw, 3.3rem); }
h3 { font-size: 1.55rem; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.2s ease;
}
.btn-gold { background: linear-gradient(180deg, #f0d39a, var(--gold-2)); color: #1a1408; }
.btn-gold:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-ghost { border-color: rgba(255,255,255,0.18); color: var(--white); background: rgba(255,255,255,0.03); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  backdrop-filter: blur(16px);
  background: rgba(10, 12, 16, 0.78);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.logo-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(45deg, #1b1b1b 0 4px, #2a2a2a 4px 8px),
    linear-gradient(180deg, #e8c47a, #8a6a32);
  background-blend-mode: overlay;
  box-shadow: inset 0 0 0 1px rgba(232,196,122,0.4);
}
.logo span { color: var(--gold); font-weight: 500; }
.nav-links { display: flex; gap: 26px; align-items: center; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.menu-btn {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  width: 44px; height: 44px;
  border-radius: 10px;
}

/* HERO */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: end start;
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,12,16,0.15), rgba(10,12,16,0.82) 70%),
    url("../images/proyectos/04-catedral/cover.jpg") center/cover no-repeat;
}
.hero-content { position: relative; padding: 80px 0 72px; max-width: 760px; }
.hero p.lead { margin: 18px 0 32px; color: #c9d3e0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0,0,0,0.28);
  font-size: 0.82rem;
  color: #d7deea;
}

/* STATS */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: #0e1218;
}
.stat { padding: 28px 18px; text-align: center; border-right: 1px solid rgba(255,255,255,0.05); }
.stat:last-child { border-right: 0; }
.stat b {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  color: var(--gold);
}
.stat span { color: var(--muted); font-size: 0.9rem; }

/* SECTIONS */
section { padding: 92px 0; }
.section-head { margin-bottom: 42px; max-width: 720px; }
.section-head p { margin-top: 12px; color: var(--muted); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 12px 0 8px; }
.icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(232,196,122,0.1);
  color: var(--gold);
  font-weight: 800;
}

.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step {
  padding: 24px 20px;
  border-radius: 16px;
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,0.06);
}
.step em {
  font-style: normal;
  color: var(--gold);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
}

.project {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.07);
  background: var(--card);
}
.project img { width: 100%; height: 240px; object-fit: cover; }
.project-body { padding: 22px; }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.about-photo {
  border-radius: 24px;
  overflow: hidden;
  min-height: 420px;
  background:
    linear-gradient(180deg, rgba(10,12,16,0.05), rgba(10,12,16,0.55)),
    url("../images/proyectos/03-harisa/cover.jpg") center/cover no-repeat;
  border: 1px solid rgba(255,255,255,0.08);
}
.checklist { list-style: none; margin-top: 18px; }
.checklist li {
  padding: 9px 0 9px 28px;
  position: relative;
  color: #d5dce7;
}
.checklist li:before {
  content: "";
  position: absolute;
  left: 0; top: 16px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

.cta {
  background:
    linear-gradient(180deg, rgba(10,12,16,0.55), rgba(10,12,16,0.82)),
    url("../images/proyectos/06-tuberia-nejapa/cover.jpg") center/cover;
  border-block: 1px solid rgba(232,196,122,0.15);
}
.cta-box {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}

form { display: grid; gap: 14px; }
label { font-size: 0.82rem; color: var(--muted); }
input, textarea, select {
  width: 100%;
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  border-radius: 12px;
  padding: 13px 14px;
}
textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 0.82rem; color: var(--muted); }

footer {
  padding: 48px 0 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}
footer a:hover { color: var(--gold); }
.copy { font-size: 0.82rem; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 16px; }

.page-hero {
  padding: 72px 0 36px;
  background:
    radial-gradient(800px 280px at 10% 0%, rgba(232,196,122,0.12), transparent 60%),
    var(--bg);
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #0d1118;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 10px 20px 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; }
  .menu-btn { display: grid; place-items: center; }
  .stats, .grid-3, .process, .footer-grid, .grid-2, .cta-box { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
  .gallery, .meta { grid-template-columns: 1fr; }
}

.portrait-fallback {
  width: 220px; height: 220px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(160deg,#2a2418,#111);
  border: 3px solid rgba(232,196,122,0.45);
  font-family: "Cormorant Garamond", serif;
  font-size: 4.2rem;
  color: var(--gold);
}
.portrait {
  width: 220px; height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(232,196,122,0.45);
}
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 18px 0; }
.meta div { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 12px 14px; }
.meta b { display: block; color: var(--gold); font-size: 0.72rem; letter-spacing: .12em; text-transform: uppercase; }
.gallery { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; }
.gallery img { width: 100%; height: 220px; object-fit: cover; border-radius: 14px; border: 1px solid rgba(255,255,255,.08); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip-btn { border: 1px solid rgba(255,255,255,.12); background: transparent; color: var(--muted); border-radius: 999px; padding: 7px 12px; cursor: pointer; font-weight: 600; }
.chip-btn.on, .chip-btn:hover { border-color: var(--gold); color: var(--gold); }

.timeline { list-style: none; display: grid; gap: 0; margin-top: 8px; }
.timeline li {
  position: relative;
  padding: 0 0 28px 28px;
  border-left: 1px solid rgba(232,196,122,0.28);
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li:before {
  content: "";
  position: absolute;
  left: -5px; top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(232,196,122,0.15);
}
.timeline .when {
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
}
.timeline h3 { margin: 4px 0 6px; font-size: 1.15rem; }
.timeline p { color: var(--muted); }
