/* ═══════════════════════════════════════════════════════════
   GRUPO DEN — Design System
   Tipografía: Cormorant Garamond (display) + Outfit (body)
   Paleta: Ink / Surface / Red / Gold
   ═══════════════════════════════════════════════════════════ */

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  --ink:          #0e0e0e;
  --ink-soft:     #3a3a3a;
  --ink-muted:    #888888;
  --surface:      #f7f5f2;
  --surface-alt:  #f0ede9;
  --white:        #ffffff;
  --red:          #c0271e;
  --red-dark:     #9b1e17;
  --gold:         #b8986e;
  --border:       rgba(14,14,14,0.10);
  --border-strong:rgba(14,14,14,0.22);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Outfit', sans-serif;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.45, 0, 0.55, 1);

  --max-w: 1280px;
  --gutter: clamp(24px, 5vw, 80px);
}

/* ─── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { display: block; max-width: 100%; }
a { color: inherit; }

body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── NAVBAR ─────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  height: 72px;
  background: rgba(247,245,242,0.93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s var(--ease-out);
}
.navbar.scrolled { box-shadow: 0 4px 32px rgba(0,0,0,0.07); }

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.nav-logo-mark {
  width: 32px; height: 32px;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
}
.nav-logo-mark span {
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600;
  letter-spacing: 0.02em;
}
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-logo-text strong {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--ink);
}
.nav-logo-text small {
  font-size: 8.5px; letter-spacing: 0.20em;
  text-transform: uppercase; color: var(--ink-muted); font-weight: 400;
}

.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  text-decoration: none; font-size: 12.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 500; color: var(--ink-soft);
  position: relative; padding-bottom: 3px;
  transition: color 0.25s;
}
.nav-links a::after {
  content: ''; position: absolute;
  left: 0; bottom: 0; width: 0; height: 1px;
  background: var(--red);
  transition: width 0.3s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--red); }
.nav-links a.active::after { width: 100%; }

/* Mobile menu */
.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
  background: none; border: none;
}
.nav-toggle span {
  display: block; width: 24px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 768px) {
  /* Mostrar hamburguesa */
  .nav-toggle { display: flex; z-index: 201; }

  /* CLAVE: ocultar los links con display:none por defecto en móvil */
  .nav-links {
    display: none;
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px 0 16px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.08);
    z-index: 199;
  }
  /* Solo mostrar cuando está abierto */
  .nav-links.open {
    display: flex;
  }
  .nav-links li a {
    display: block;
    padding: 16px var(--gutter);
    font-size: 13px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links li:last-child a { border-bottom: none; }
}

/* ─── HERO BASE ───────────────────────────────────────────── */
.page-hero {
  padding-top: 72px;
  min-height: 55vh;
  display: flex; align-items: flex-end;
  position: relative; overflow: hidden;
  background: var(--ink);
}
.hero-grid-bg {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(160deg, rgba(192,39,30,0.10) 0%, transparent 50%),
    linear-gradient(to bottom, rgba(14,14,14,0.65) 0%, rgba(14,14,14,0.45) 100%);
}
.hero-img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.70;
}
.hero-bar {
  position: absolute;
  left: var(--gutter); top: 120px;
  width: 2px; height: 0;
  background: var(--red); z-index: 2;
  animation: growBar 1.2s 0.4s var(--ease-out) forwards;
}
@keyframes growBar { to { height: 110px; } }

.hero-body {
  position: relative; z-index: 2;
  padding: clamp(60px, 8vw, 110px) var(--gutter);
  max-width: 900px;
}
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
  opacity: 0;
  animation: fadeUp 0.9s 0.2s var(--ease-out) forwards;
}
.eyebrow-line { display: block; width: 32px; height: 1px; background: var(--gold); }
.eyebrow span {
  font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold); font-weight: 500;
}
.hero-body h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 86px);
  font-weight: 300; line-height: 1.0;
  color: #fff; letter-spacing: -0.01em;
  margin-bottom: 22px;
  opacity: 0;
  animation: fadeUp 1s 0.35s var(--ease-out) forwards;
}
.hero-body h1 em { font-style: italic; color: var(--red); }
.hero-body p {
  font-size: 15px; font-weight: 300;
  color: rgba(255,255,255,0.58);
  letter-spacing: 0.02em; max-width: 500px;
  line-height: 1.8;
  opacity: 0;
  animation: fadeUp 1s 0.5s var(--ease-out) forwards;
}

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

/* ─── SECTION UTILITIES ───────────────────────────────────── */
.section { padding: clamp(72px, 10vw, 130px) var(--gutter); }
.section--dark { background: var(--ink); }
.section--alt  { background: var(--surface-alt); }
.section--white{ background: var(--white); }

.section-label {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.section-label-dot {
  width: 5px; height: 5px;
  background: var(--red); border-radius: 50%;
}
.section-label span {
  font-size: 10.5px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--red); font-weight: 600;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 300; line-height: 1.06;
  letter-spacing: -0.01em;
}
.section-title em { font-style: italic; color: var(--red); }
.section-title--light { color: #fff; }
.section-title--light em { color: var(--gold); }

.divider {
  width: 48px; height: 2px;
  background: var(--red); margin: 24px 0;
}
.divider--gold { background: var(--gold); }

/* ─── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  border: none; transition: all 0.25s var(--ease-out);
}
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(192,39,30,0.28); }
.btn--outline {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--border-strong);
}
.btn--outline:hover { border-color: var(--red); color: var(--red); }
.btn--outline-light {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255,255,255,0.35);
}
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn-arrow {
  width: 16px; height: 16px;
  transition: transform 0.25s var(--ease-out);
}
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ─── PROCESS STRIP ───────────────────────────────────────── */
.process-strip { background: var(--red); }
.process-inner {
  display: flex; align-items: stretch;
  border-left: 1px solid rgba(255,255,255,0.15);
  border-right: 1px solid rgba(255,255,255,0.15);
  padding: 0 var(--gutter);
}
.process-step {
  flex: 1; padding: 28px 32px;
  border-right: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: flex-start; gap: 16px;
}
.process-step:last-child { border-right: none; }
.step-num {
  font-family: var(--font-display); font-size: 28px;
  font-weight: 300; color: rgba(255,255,255,0.30);
  line-height: 1; flex-shrink: 0; margin-top: 2px;
}
.step-text strong {
  display: block; font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #fff; font-weight: 600; margin-bottom: 4px;
}
.step-text p { font-size: 12.5px; color: rgba(255,255,255,0.62); font-weight: 300; line-height: 1.5; }

@media (max-width: 700px) {
  .process-inner { flex-direction: column; padding: 0 var(--gutter); }
  .process-step { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.15); }
  .process-step:last-child { border-bottom: none; }
}

/* ─── REVEAL ANIMATIONS ───────────────────────────────────── */
/* Sin JS todo es visible. Las animaciones solo corren cuando    */
/* main.js agrega 'js-ready' al <html>.                         */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}
.js-ready .reveal.visible { opacity: 1; transform: translateY(0); }
.js-ready .reveal-d1 { transition-delay: 0.08s; }
.js-ready .reveal-d2 { transition-delay: 0.16s; }
.js-ready .reveal-d3 { transition-delay: 0.24s; }
.js-ready .reveal-d4 { transition-delay: 0.32s; }
.js-ready .reveal-d5 { transition-delay: 0.40s; }
.js-ready .reveal-d6 { transition-delay: 0.48s; }

/* ─── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 56px;
  padding: 72px var(--gutter) 56px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
@media (max-width: 900px) { .footer-main { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-main { grid-template-columns: 1fr; gap: 40px; } }

.footer-brand {}
.footer-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; margin-bottom: 20px;
}
.footer-logo-mark {
  width: 34px; height: 34px; background: var(--red);
  display: flex; align-items: center; justify-content: center;
}
.footer-logo-mark span {
  color: #fff; font-family: var(--font-display);
  font-size: 16px; font-weight: 600;
}
.footer-logo-text strong {
  display: block; font-family: var(--font-display);
  font-size: 17px; font-weight: 500; color: #fff;
}
.footer-logo-text small {
  font-size: 8px; letter-spacing: 0.20em;
  text-transform: uppercase; color: rgba(255,255,255,0.28);
}
.footer-brand p {
  font-size: 13px; font-weight: 300;
  color: rgba(255,255,255,0.42); line-height: 1.8;
  max-width: 260px;
}

.footer-col-title {
  font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold);
  font-weight: 600; margin-bottom: 20px;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  font-size: 13px; font-weight: 300;
  color: rgba(255,255,255,0.48); text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: rgba(255,255,255,0.85); }

.footer-contact-item {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 14px;
}
.fc-icon {
  width: 26px; height: 26px; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.10);
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.fc-icon svg {
  width: 11px; height: 11px; stroke: var(--gold);
  fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.footer-contact-item a,
.footer-contact-item span {
  font-size: 12.5px; font-weight: 300;
  color: rgba(255,255,255,0.48); text-decoration: none;
  transition: color 0.2s; line-height: 1.6;
}
.footer-contact-item a:hover { color: rgba(255,255,255,0.82); }

.footer-bottom {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 20px var(--gutter);
}
.footer-copy {
  font-size: 11.5px; color: rgba(255,255,255,0.26);
  font-weight: 300; letter-spacing: 0.03em;
}
.footer-copy a { color: rgba(255,255,255,0.38); text-decoration: none; transition: color 0.2s; }
.footer-copy a:hover { color: var(--gold); }
.footer-social {
  display: flex; align-items: center; gap: 6px;
}
.footer-social span { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.25); }
.footer-social a {
  font-size: 12.5px; color: rgba(255,255,255,0.42);
  text-decoration: none; font-weight: 300;
  transition: color 0.2s; margin-left: 8px;
}
.footer-social a:hover { color: var(--red); }
