/* =========================================================
   DM Cumbres — hoja de estilos principal
   ========================================================= */

:root {
  /* Color */
  --ink:        #12161c;
  --ink-soft:   #1b212a;
  --graphite:   #333a45;
  --body:       #4a5361;
  --muted:      #6b7482;
  --line:       #e3e6ea;
  --bg:         #ffffff;
  --bg-alt:     #f6f7f8;
  --gold:       #b8912f;
  --gold-soft:  #d9b658;
  --gold-tint:  #f7f1e2;

  /* Tipografía */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Medidas */
  --container: 1160px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(18, 22, 28, .06), 0 4px 12px rgba(18, 22, 28, .05);
  --shadow-md: 0 10px 30px rgba(18, 22, 28, .10);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

/* ---------- Utilidades ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin: 0 0 .8rem;
}
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--ink); color: rgba(255,255,255,.72); }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .section__lead { color: rgba(255,255,255,.6); }

.section__head { max-width: 660px; margin-bottom: clamp(36px, 5vw, 60px); }
.section__title { font-size: clamp(1.85rem, 3.4vw, 2.7rem); margin-bottom: .45em; }
.section__lead { color: var(--muted); font-size: 1.05rem; margin: 0; }
.text { max-width: 56ch; }

.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--gap-lg { gap: clamp(32px, 5vw, 72px); }
.grid--center { align-items: center; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-body); font-size: .96rem; font-weight: 600; line-height: 1;
  padding: 15px 26px; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), background-color .2s, color .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--gold); color: #16130a; box-shadow: 0 6px 18px rgba(184,145,47,.28); }
.btn--primary:hover { background: var(--gold-soft); }
.btn--ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }
.btn--sm { padding: 11px 20px; font-size: .88rem; }
.btn--block { width: 100%; }

.link {
  display: inline-flex; align-items: center; gap: .4em;
  font-weight: 600; font-size: .93rem; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--gold); padding-bottom: 2px;
  transition: gap .2s var(--ease), color .2s;
}
.link:hover { gap: .75em; color: var(--gold); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 20px rgba(18,22,28,.05);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: 24px; }

.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.site-header.is-stuck .logo { color: var(--ink); }
.logo__mark { width: 34px; height: 34px; flex: none; color: var(--gold); }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__text strong { font-family: var(--font-display); font-size: 1.22rem; font-weight: 600; letter-spacing: .01em; }
.logo__text em {
  font-style: normal; font-size: .63rem; letter-spacing: .19em;
  text-transform: uppercase; opacity: .68; margin-top: 3px;
}

.nav__list { display: flex; align-items: center; gap: 30px; }
.nav__list a {
  text-decoration: none; font-size: .95rem; font-weight: 500; color: rgba(255,255,255,.85);
  transition: color .2s;
}
.nav__list a:hover { color: #fff; }
.site-header.is-stuck .nav__list a { color: var(--body); }
.site-header.is-stuck .nav__list a:hover { color: var(--ink); }
.nav__list .btn { color: #16130a !important; }

.nav-toggle {
  display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding: 0;
}
.nav-toggle span { width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.site-header.is-stuck .nav-toggle span, .nav-open .nav-toggle span { background: var(--ink); }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 190px 0 clamp(70px, 9vw, 110px); color: #fff; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 480px at 78% 12%, rgba(184,145,47,.28), transparent 62%),
    linear-gradient(200deg, #1b222c 0%, #12161c 55%, #0d1116 100%);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 30%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 30%, #000 20%, transparent 80%);
}
.hero__title { color: #fff; font-size: clamp(2.3rem, 5.6vw, 4rem); letter-spacing: -.015em; margin-bottom: .35em; }
.hero__title span { color: var(--gold-soft); font-style: italic; }
.hero__lead { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: rgba(255,255,255,.74); max-width: 60ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ---------- Nosotros ---------- */
.figure {
  position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md);
  background:
    linear-gradient(160deg, rgba(18,22,28,.55), rgba(18,22,28,.15)),
    repeating-linear-gradient(90deg, #cfd5db 0 2px, transparent 2px 34px),
    repeating-linear-gradient(0deg, #c6ccd3 0 2px, transparent 2px 46px),
    linear-gradient(180deg, #8c97a3, #5d6773);
}
.figure--tall { aspect-ratio: 4 / 3; }

.mission { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.mission article { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.mission h3 { font-size: 1.05rem; margin-bottom: .35em; }
.mission p { font-size: .92rem; margin: 0; color: var(--muted); }

/* ---------- Cards / Servicios ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; border-radius: 12px; margin-bottom: 18px;
  background: var(--gold-tint); color: var(--gold);
}
.card__icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.2rem; }
.card p { margin: 0; font-size: .95rem; color: var(--muted); }

/* ---------- Proceso ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.steps li { padding-top: 26px; border-top: 1px solid rgba(255,255,255,.16); }
.steps__num { font-family: var(--font-display); font-size: 1.1rem; color: var(--gold-soft); display: block; margin-bottom: 14px; }
.steps h3 { font-size: 1.15rem; margin-bottom: .4em; }
.steps p { font-size: .93rem; margin: 0; color: rgba(255,255,255,.6); }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.features li { border-left: 2px solid var(--gold); padding-left: 20px; }
.features h3 { font-size: 1.06rem; margin-bottom: .3em; }
.features p { font-size: .92rem; margin: 0; color: var(--muted); }

/* ---------- Contacto ---------- */
.contact__inner { max-width: 640px; text-align: center; }
.contact .eyebrow,
.contact .section__title,
.contact .section__lead { margin-inline: auto; }
.contact .section__lead { max-width: 46ch; }

.contact__mail {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 34px;
  font-family: var(--font-display); font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  color: #fff; text-decoration: none;
  padding: 16px 30px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.04);
  transition: border-color .25s var(--ease), background-color .25s var(--ease), color .25s;
  word-break: break-word;
}
.contact__mail:hover { border-color: var(--gold); background: rgba(184,145,47,.12); color: var(--gold-soft); }
.contact__mail-icon { flex: none; display: inline-flex; color: var(--gold); }
.contact__mail-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.contact__address {
  display: flex; gap: 12px; justify-content: center; text-align: left;
  margin: 40px auto 0; padding-top: 32px; max-width: 420px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-style: normal; font-size: .95rem; line-height: 1.6;
  color: rgba(255,255,255,.7);
}
.contact__address-icon { flex: none; color: var(--gold); margin-top: 2px; }
.contact__address-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.contact__address em {
  display: block; margin-top: 8px; font-style: normal;
  font-size: .84rem; color: rgba(255,255,255,.45);
}

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.6); padding: clamp(52px, 7vw, 76px) 0 0; }
.footer__inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 48px; padding-bottom: 48px; }
.footer .logo { color: #fff; }
.footer__brand p { font-size: .92rem; max-width: 34ch; margin-top: 18px; }
.footer__nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; align-content: start; }
.footer__nav h4 { color: #fff; font-family: var(--font-body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1em; }
.footer__nav ul { display: grid; gap: 10px; }
.footer__nav a { font-size: .92rem; text-decoration: none; transition: color .2s; }
.footer__nav a:hover { color: var(--gold-soft); }
.footer__legal {
  border-top: 1px solid rgba(255,255,255,.1); padding: 22px 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .84rem;
}
.footer__legal p { margin: 0; }
.footer__legal a { text-decoration: none; }
.footer__legal a:hover { color: var(--gold-soft); }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 820px) {
  .grid--2 { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }

  .nav {
    position: fixed; inset: 78px 0 auto 0;
    background: #fff; border-bottom: 1px solid transparent;
    max-height: 0; overflow: hidden;
    transition: max-height .35s var(--ease), border-color .35s var(--ease);
  }
  .nav-open .nav {
    max-height: 420px;
    border-bottom-color: var(--line);
    box-shadow: var(--shadow-md);
  }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: 12px 24px 24px; }
  .nav__list li { border-bottom: 1px solid var(--line); }
  .nav__list li:last-child { border: 0; padding-top: 18px; }
  .nav__list a { display: block; padding: 15px 0; color: var(--ink) !important; font-size: 1rem; }
  .nav__list .btn { justify-content: center; padding: 14px 20px; }
  .nav-toggle { display: flex; }
  .nav-open .site-header { background: #fff; border-bottom-color: var(--line); }
  .nav-open .logo { color: var(--ink); }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: 148px; }
  .grid--3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .mission { grid-template-columns: 1fr; }
  .footer__nav { grid-template-columns: 1fr 1fr; }
  .contact__mail { font-size: 1rem; padding: 15px 22px; gap: 10px; }
  .hero__actions .btn { flex: 1 1 100%; }
}
