/* =========================================================
   Alfagold · Consultora Legal Minera
   ========================================================= */
:root {
  --ink: #14110c;
  --ink-2: #1e1a13;
  --ink-3: #2a241a;
  --ivory: #fbf8f2;
  --sand: #f3ecdf;
  --line: #e4d9c4;
  --text: #1b1711;
  --muted: #675e50;
  --muted-dark: #b9ad97;
  --gold-1: #e6c66a;
  --gold-2: #cf9330;
  --gold-3: #a3530a;
  --gold: #c98a1c;
  --gold-grad: linear-gradient(135deg, var(--gold-1) 0%, var(--gold-2) 50%, var(--gold-3) 100%);
  --wa: #25d366;
  --radius: 18px;
  --shadow: 0 20px 50px -24px rgba(40, 26, 5, .35);
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ivory);
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.container--narrow { width: min(820px, 100% - 32px); }

.ico { width: 1.15em; height: 1.15em; flex: none; }

.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: .8rem; font-weight: 600;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold-1);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--gold-grad); }
.eyebrow--dark { color: var(--gold-3); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  text-decoration: none; border-radius: 999px;
  padding: 13px 24px; border: 1.5px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--gold-1); outline-offset: 3px; }
.btn--gold { background: var(--gold-grad); color: #1a1206; box-shadow: 0 12px 30px -12px rgba(207, 147, 48, .75); }
.btn--gold:hover { box-shadow: 0 16px 36px -12px rgba(207, 147, 48, .95); }
.btn--ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn--ghost:hover { border-color: var(--gold-1); color: var(--gold-1); }
.btn--lg { padding: 16px 30px; font-size: 1.05rem; }
.btn--sm { padding: 9px 18px; font-size: .92rem; }

/* ---------- Cabecera ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(20, 17, 12, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(230, 198, 106, .12);
  color: #fff;
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__icon { width: 40px; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.25rem; letter-spacing: .32em;
}
.brand__name b { font-weight: 600; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand__tag { font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted-dark); margin-top: 6px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) {
  text-decoration: none; font-size: .95rem; font-weight: 500; color: #e9e2d4;
  position: relative; padding: 6px 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--gold-grad); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav a:not(.btn):hover::after { transform: scaleX(1); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; transition: transform .25s, opacity .25s; }
.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; isolation: isolate; overflow: hidden;
  background: var(--ink); color: #fff;
  margin-top: calc(var(--header-h) * -1);
  padding: calc(var(--header-h) + 64px) 0 96px;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(20,17,12,.97) 0%, rgba(20,17,12,.88) 45%, rgba(20,17,12,.55) 100%),
    linear-gradient(0deg, var(--ink) 0%, transparent 35%),
    url("../assets/img/hero-mina.webp") center / cover no-repeat;
}
.hero__bg::after {
  /* curvas de nivel, como en las piezas gráficas */
  content: ""; position: absolute; inset: 0; opacity: .16;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cg fill='none' stroke='%23e6c66a' stroke-width='1.2'%3E%3Cpath d='M120 300c0-90 70-150 160-150s170 50 170 140-60 170-170 170-160-70-160-160z'/%3E%3Cpath d='M160 300c0-65 50-110 120-110s130 40 130 105-45 125-130 125-120-55-120-120z'/%3E%3Cpath d='M200 300c0-40 35-70 80-70s90 25 90 70-30 80-90 80-80-35-80-80z'/%3E%3Cpath d='M240 300c0-18 18-32 40-32s45 12 45 32-15 38-45 38-40-18-40-38z'/%3E%3Cpath d='M80 300C80 180 170 110 290 110s200 70 200 190-80 210-210 210S80 420 80 300z'/%3E%3Cpath d='M40 300C40 160 160 70 300 70s240 90 240 230-100 250-250 250S40 440 40 300z'/%3E%3Cpath d='M0 300C0 130 140 30 300 30s290 110 290 270-120 290-290 290S0 470 0 300z'/%3E%3C/g%3E%3C/svg%3E") right -120px bottom -160px / 820px no-repeat;
  mask-image: linear-gradient(90deg, transparent 20%, #000 70%);
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 70%);
}
/* Titular rotativo: las frases se apilan en la misma celda para reservar
   la altura de la más larga y que el contenido de abajo no salte */
.rotator { display: grid; }
.rotator__item {
  grid-area: 1 / 1;
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
  pointer-events: none;
}
.rotator__item.is-active { opacity: 1; transform: none; pointer-events: auto; }
.rotator__item.is-leaving { opacity: 0; transform: translateY(-18px); }

.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero__lead { margin-top: 22px; font-size: 1.12rem; color: #d8cfbe; max-width: 560px; }
.hero__checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.hero__checks li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.hero__checks .ico {
  width: 26px; height: 26px; padding: 5px; border-radius: 50%;
  background: rgba(230,198,106,.14); color: var(--gold-1);
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.hero__media { position: relative; justify-self: center; }
.phone {
  position: relative; width: min(320px, 78vw); aspect-ratio: 9 / 16;
  border-radius: 34px; overflow: hidden;
  border: 8px solid #2a241a;
  box-shadow: 0 0 0 1px rgba(230,198,106,.35), 0 40px 80px -30px rgba(0,0,0,.8), 0 0 120px -30px rgba(207,147,48,.55);
  background: #000;
}
.phone video { width: 100%; height: 100%; object-fit: cover; }
.phone__sound {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(20,17,12,.75); color: #fff; font: 600 .85rem var(--font-display);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
}
.phone__sound:hover { background: rgba(20,17,12,.92); }
.hero__badge {
  position: absolute; left: -64px; top: 18%;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-radius: 14px;
  background: rgba(251,248,242,.96); color: var(--text);
  font-size: .85rem; line-height: 1.3;
  box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- Franja de entidades ---------- */
.strip { background: var(--ink-2); color: var(--muted-dark); border-top: 1px solid rgba(230,198,106,.12); }
.strip__inner { display: flex; align-items: center; gap: 32px; padding: 22px 0; flex-wrap: wrap; justify-content: center; }
.strip__label { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.strip__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 30px; justify-content: center; }
.strip__list li { font-family: var(--font-display); font-weight: 700; letter-spacing: .08em; color: #efe6d3; }

/* ---------- Secciones ---------- */
.section { padding: 104px 0; }
.section--sand { background: var(--sand); }
.section--dark { background: var(--ink); color: #fff; }
.section__head { max-width: 720px; margin-bottom: 56px; }
.section__lead { margin-top: 16px; color: var(--muted); font-size: 1.08rem; }
.section--dark .section__lead { color: var(--muted-dark); }

/* Servicios */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 30px 28px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card::before {
  content: ""; position: absolute; left: 28px; right: 28px; top: -1px; height: 3px;
  background: var(--gold-grad); border-radius: 0 0 4px 4px; transform: scaleX(0); transition: transform .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, #fbf1d9, #f2dfb4); color: var(--gold-3); margin-bottom: 6px;
}
.card__icon svg { width: 26px; height: 26px; }
.card p { color: var(--muted); font-size: .98rem; flex: 1; }
.card__link {
  font-family: var(--font-display); font-weight: 600; text-decoration: none; color: var(--gold-3);
  display: inline-flex; gap: 6px; margin-top: 6px;
}
.card__link span { transition: transform .2s ease; }
.card__link:hover span { transform: translateX(4px); }

/* Campaña destacada */
.feature { background: var(--ink); color: #fff; padding: 96px 0; position: relative; overflow: hidden; }
.feature::before {
  content: ""; position: absolute; width: 620px; height: 620px; left: -200px; top: -200px;
  background: radial-gradient(circle, rgba(207,147,48,.28), transparent 65%);
}
.feature__inner { position: relative; display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.feature__img { position: relative; max-width: 460px; width: 100%; margin-inline: auto; }
.feature__img::before {
  /* marco dorado desplazado detrás de la foto */
  content: ""; position: absolute; inset: 18px -18px -18px 18px;
  border: 2px solid var(--gold-2); border-radius: var(--radius); opacity: .6;
}
.feature__img img {
  position: relative; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 30% center;
  border-radius: var(--radius); box-shadow: 0 40px 80px -30px rgba(0,0,0,.8);
}
.feature__copy h2 { margin-bottom: 18px; }
.feature__copy > p { color: #d8cfbe; font-size: 1.1rem; }
.feature__copy strong { color: #fff; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0; }
.pills span {
  font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 1.15rem;
  padding: 8px 20px; border-radius: 10px; background: var(--gold-grad); color: #1a1206;
}
.feature__note { margin-bottom: 30px; }

/* Proceso */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s; }
.step { position: relative; padding: 30px 26px; background: var(--ivory); border-radius: var(--radius); border: 1px solid var(--line); }
.step__num {
  display: block; font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: 1;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 18px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .97rem; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 50px; right: -18px; width: 14px; height: 14px;
  border-top: 2px solid var(--gold-2); border-right: 2px solid var(--gold-2); transform: rotate(45deg);
}

/* Videos */
.videos, .posters { max-width: 980px; margin-inline: auto; }
.videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.vcard { margin: 0; }
.vcard__frame {
  position: relative; aspect-ratio: 9 / 16; border-radius: var(--radius); overflow: hidden; background: #000;
  border: 1px solid rgba(230,198,106,.25);
}
.vcard__frame video { width: 100%; height: 100%; object-fit: cover; }
.vcard__play {
  position: absolute; inset: 0; display: grid; place-items: center; border: 0; cursor: pointer;
  background: linear-gradient(0deg, rgba(20,17,12,.65), rgba(20,17,12,.05) 50%);
  transition: background .25s ease;
}
.vcard__play svg {
  width: 74px; height: 74px; padding: 22px 20px 22px 24px; border-radius: 50%;
  background: var(--gold-grad); color: #1a1206;
  box-shadow: 0 0 0 10px rgba(230,198,106,.18);
  transition: transform .25s ease;
}
.vcard__play:hover svg { transform: scale(1.08); }
.vcard.is-playing .vcard__play { display: none; }
.vcard figcaption { padding: 18px 4px 0; color: var(--muted-dark); font-size: .95rem; }
.vcard figcaption strong { display: block; color: #fff; font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 2px; }
.vcard__tag {
  display: inline-block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-1); margin-bottom: 8px;
}

/* Piezas gráficas */
.posters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: stretch; }
.poster {
  position: relative; display: block; border-radius: var(--radius); overflow: hidden;
  text-decoration: none; box-shadow: var(--shadow); background: var(--ink);
  aspect-ratio: 9 / 16;
}
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.poster:hover img { transform: scale(1.04); }
.poster__cta {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px; border-radius: 12px; background: rgba(20,17,12,.88); color: #fff;
  font-family: var(--font-display); font-weight: 600;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .2s ease, color .2s ease;
}
.poster:hover .poster__cta { background: var(--wa); color: #fff; }
.poster--text {
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
  padding: 36px 30px 100px; color: #fff;
  background: radial-gradient(circle at 30% 20%, rgba(207,147,48,.35), transparent 60%), var(--ink);
}
.poster--text img { width: 84px; height: auto; transition: none; }
.poster--text:hover img { transform: none; }
.poster--text strong { font-family: var(--font-display); font-size: 1.8rem; line-height: 1.15; }
.poster--text span:not(.poster__cta) { color: var(--muted-dark); }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--ivory); border: 1px solid var(--line); border-radius: 14px; padding: 0 24px;
  transition: border-color .2s ease;
}
.faq details[open] { border-color: var(--gold-2); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 36px 20px 0; position: relative;
  font-family: var(--font-display); font-weight: 600; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold-grad); color: #1a1206; font-size: 1.2rem; font-weight: 700; line-height: 1;
  transition: transform .25s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding-bottom: 22px; color: var(--muted); }

/* CTA final */
.cta {
  position: relative; overflow: hidden; text-align: center; color: #fff;
  padding: 110px 0;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(207,147,48,.45), transparent 60%),
    var(--ink);
}
.cta__inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cta__icon { width: 72px; height: auto; margin-bottom: 6px; }
.cta p { color: #d8cfbe; font-size: 1.12rem; margin-bottom: 12px; }

/* Pie */
.footer { background: #0e0c08; color: var(--muted-dark); padding: 56px 0 28px; font-size: .95rem; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid rgba(230,198,106,.12); }
.footer__brand { display: flex; align-items: center; gap: 16px; }
.footer__brand img { width: 48px; height: auto; }
.footer__brand .brand__name { color: #fff; font-size: 1.15rem; }
.footer__brand p { margin-top: 6px; }
.footer__nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__nav a { text-decoration: none; }
.footer__nav a:hover { color: var(--gold-1); }
.footer__legal { padding-top: 24px; font-size: .85rem; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  height: 62px; padding: 0 16px; border-radius: 999px;
  background: var(--wa); color: #fff; text-decoration: none;
  box-shadow: 0 14px 30px -8px rgba(18, 140, 70, .6);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.05); }
.wa-float svg { width: 30px; height: 30px; }
.wa-float__label { font-family: var(--font-display); font-weight: 600; padding-right: 4px; }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: var(--wa); animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.35); opacity: 0; } }

/* Animación de entrada */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:not(:last-child)::after { display: none; }
  .hero__badge { left: -24px; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 16px 24px; background: rgba(20,17,12,.98);
    border-bottom: 1px solid rgba(230,198,106,.15);
    transform: translateY(-110%); visibility: hidden; transition: transform .3s ease, visibility .3s;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.07); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 16px; }

  .hero { padding: calc(var(--header-h) + 40px) 0 72px; }
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__bg { background:
    linear-gradient(180deg, rgba(20,17,12,.88) 0%, rgba(20,17,12,.95) 60%, var(--ink) 100%),
    url("../assets/img/hero-mina.webp") center top / cover no-repeat; }
  .hero__badge { left: auto; right: -12px; top: auto; bottom: 70px; }

  .feature__inner { grid-template-columns: 1fr; gap: 48px; }
  .feature__img { width: calc(100% - 12px); margin-left: 0; }
  .feature__img::before { inset: 12px -12px -12px 12px; }
  .feature__img img { aspect-ratio: 4 / 3; }
  .videos { grid-template-columns: 1fr; max-width: 380px; margin-inline: auto; }
  .posters { grid-template-columns: 1fr; max-width: 380px; margin-inline: auto; }
  .section { padding: 80px 0; }
  .section__head { margin-bottom: 40px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .services, .steps { grid-template-columns: 1fr; }
  .brand__tag { display: none; }
  .brand__name { font-size: 1.1rem; letter-spacing: .26em; }
  .hero__ctas .btn { width: 100%; }
  .hero__badge { display: none; }
  .wa-float { right: 16px; bottom: 16px; width: 60px; height: 60px; padding: 0; justify-content: center; }
  .wa-float__label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
