/* ==========================================================================
   Digital Do — Sitio corporativo
   Design system basado en la identidad de marca (dorado + magenta)
   ========================================================================== */

:root {
  /* Marca */
  --gold:        #E9D758;
  --gold-deep:   #D4BC2E;
  --gold-soft:   #F4E89A;
  --magenta:     #E6259E;
  --magenta-deep:#C01683;

  /* Neutros oscuros (base del sitio) */
  --bg:          #0E0F12;
  --bg-2:        #15171B;
  --surface:     #1B1E24;
  --surface-2:   #23272F;
  --border:      #2C313A;
  --border-soft: #21252C;

  /* Texto */
  --text:        #F4F6F8;
  --text-muted:  #A2AAB4;
  --text-faint:  #6E7884;

  /* Estados */
  --success:     #12C187;
  --warning:     #FFB84D;
  --error:       #FF5C5C;

  /* Layout */
  --maxw:        1140px;
  --radius:      16px;
  --radius-sm:   10px;
  --gap:         clamp(1rem, 2vw, 1.5rem);
  --section-y:   clamp(3.5rem, 8vw, 7rem);

  /* Sombras y efectos */
  --shadow:      0 10px 40px rgba(0, 0, 0, 0.35);
  --shadow-gold: 0 8px 30px rgba(233, 215, 88, 0.18);
  --ring:        0 0 0 3px rgba(233, 215, 88, 0.45);

  /* Tipografía */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Sora", var(--font-body);
}

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

* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 6px;
}

/* Accesibilidad: saltar al contenido */
.skip-link {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  background: var(--gold);
  color: #14130a;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 10px 10px;
  font-weight: 600;
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

/* --------------------------------------------------------------------------
   Utilidades de layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-2); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--magenta));
  border-radius: 2px;
}

.section-head { max-width: 640px; margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-block: 0.7rem 0.6rem;
}
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

.text-gradient {
  background: linear-gradient(100deg, var(--gold) 0%, var(--magenta) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: linear-gradient(100deg, var(--gold), var(--gold-deep));
  color: #14130a;
  box-shadow: var(--shadow-gold);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(233, 215, 88, 0.3); }

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

.btn--magenta {
  background: linear-gradient(100deg, var(--magenta), var(--magenta-deep));
  color: #fff;
}
.btn--magenta:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(230, 37, 158, 0.28); }

.btn--block { width: 100%; }

/* --------------------------------------------------------------------------
   Header / navegación
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 15, 18, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 72px;
}
.nav__brand { display: flex; align-items: center; gap: 0.65rem; }
.nav__brand img { height: 34px; width: auto; }
.nav__brand-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
  padding: 0;
}
.nav__menu a {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.18s ease;
}
.nav__menu a:hover { color: var(--text); }

.nav__actions { display: flex; align-items: center; gap: 0.75rem; }

.nav__toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: var(--text);
  align-items: center;
  justify-content: center;
}
.nav__toggle svg { width: 22px; height: 22px; }

@media (max-width: 880px) {
  .nav__menu,
  .nav__actions .btn--ghost { display: none; }
  .nav__toggle { display: inline-flex; }

  .nav__menu.is-open {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.1rem 1.2rem;
  }
  .nav__menu.is-open a {
    padding: 0.9rem 0.4rem;
    border-bottom: 1px solid var(--border-soft);
    font-size: 1.05rem;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(4rem, 10vw, 7.5rem) var(--section-y);
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero__glow::before,
.hero__glow::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.hero__glow::before {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(233, 215, 88, 0.35), transparent 70%);
  top: -160px; right: -80px;
}
.hero__glow::after {
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(230, 37, 158, 0.28), transparent 70%);
  bottom: -200px; left: -100px;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 920px) {
  .hero__inner { grid-template-columns: 1fr; }
}

.hero h1 {
  font-size: clamp(2.3rem, 6vw, 4rem);
  line-height: 1.05;
  margin-bottom: 1.2rem;
}
.hero__lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 34ch;
  margin-bottom: 2rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 2.8rem);
  margin-top: 2.8rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.hero__stat .num {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
}
.hero__stat .lbl { font-size: 0.9rem; color: var(--text-muted); }

/* Tarjeta visual del hero */
.hero__visual {
  position: relative;
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  box-shadow: var(--shadow);
}
.hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(140deg, rgba(233,215,88,0.55), transparent 40%, rgba(230,37,158,0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.hero__logo { width: 120px; margin: 0 auto 1.4rem; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.chip {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.chip strong { color: var(--gold); font-weight: 600; }

/* --------------------------------------------------------------------------
   Logos / trust bar
   -------------------------------------------------------------------------- */
.trust {
  padding-block: 2.2rem;
  border-block: 1px solid var(--border);
}
.trust__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 3.5rem);
}
.trust__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}
.trust__brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.trust__brand:hover { color: var(--gold); }

/* --------------------------------------------------------------------------
   Servicios (grid de cards)
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(233, 215, 88, 0.45);
  box-shadow: var(--shadow);
}
.card__icon {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(233,215,88,0.18), rgba(230,37,158,0.14));
  border: 1px solid var(--border);
  margin-bottom: 1.1rem;
  color: var(--gold);
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.98rem; }
.card__list { list-style: none; padding: 0; margin-top: 1rem; display: grid; gap: 0.5rem; }
.card__list li {
  font-size: 0.92rem;
  color: var(--text-muted);
  padding-left: 1.4rem;
  position: relative;
}
.card__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--magenta));
}

/* --------------------------------------------------------------------------
   Productos destacados
   -------------------------------------------------------------------------- */
.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 2.6rem);
}
.product + .product { margin-top: var(--gap); }
.product--reverse .product__media { order: 2; }
@media (max-width: 760px) {
  .product { grid-template-columns: 1fr; }
  .product--reverse .product__media { order: 0; }
}
.product__tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 0.6rem;
}
.product h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 0.7rem; }
.product p { color: var(--text-muted); margin-bottom: 1.2rem; }
.product__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--gold);
}
.product__link:hover { gap: 0.7rem; }
.product__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(233,215,88,0.18), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(230,37,158,0.18), transparent 60%),
    var(--bg-2);
  border: 1px solid var(--border);
}
.product__media img { width: 100%; height: 100%; display: block; }
/* eRev: preview a sangre completa */
.product__media--cover img { object-fit: cover; }
/* TeAvisa: panel sobre fondo verde de marca, con aire */
.product__media--teavisa {
  background:
    radial-gradient(circle at 30% 15%, rgba(18,193,135,0.28), transparent 60%),
    radial-gradient(circle at 85% 90%, rgba(0,163,154,0.22), transparent 60%),
    #0c1413;
}
.product__media--teavisa img { object-fit: contain; padding: clamp(1rem, 3vw, 1.8rem); }

/* --------------------------------------------------------------------------
   Proceso
   -------------------------------------------------------------------------- */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 3.4rem; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--gold);
}
.step h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.step p { color: var(--text-muted); font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Contacto / formulario
   -------------------------------------------------------------------------- */
.contact { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

.contact__info ul { list-style: none; padding: 0; margin-top: 1.6rem; display: grid; gap: 1.1rem; }
.contact__info li { display: flex; gap: 0.85rem; align-items: flex-start; }
.contact__info .ico {
  width: 40px; height: 40px;
  flex: none;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--gold);
}
.contact__info .ico svg { width: 20px; height: 20px; }
.contact__info .k { font-size: 0.8rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.contact__info .v { font-weight: 500; }
.contact__info a.v:hover { color: var(--gold); }

.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 2.4rem);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .form__row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }
.field label { font-size: 0.9rem; font-weight: 500; }
.field label .req { color: var(--magenta); }
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  color: var(--text);
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(233, 215, 88, 0.18);
}
.field textarea { resize: vertical; min-height: 120px; }
.field--error input,
.field--error textarea { border-color: var(--error); }
.field__err { font-size: 0.82rem; color: var(--error); display: none; }
.field--error .field__err { display: block; }

.form__consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1.2rem; }
.form__consent input { margin-top: 0.25rem; accent-color: var(--gold); }
.form__consent a { color: var(--gold); text-decoration: underline; }

.form__status { font-size: 0.92rem; margin-top: 0.9rem; min-height: 1.2em; }
.form__status.is-ok { color: var(--success); }
.form__status.is-err { color: var(--error); }

/* honeypot */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* --------------------------------------------------------------------------
   CTA banner
   -------------------------------------------------------------------------- */
.cta-banner {
  position: relative;
  text-align: center;
  background: linear-gradient(135deg, rgba(233,215,88,0.12), rgba(230,37,158,0.12));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(2.5rem, 6vw, 4rem);
  overflow: hidden;
}
.cta-banner h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 0.8rem; }
.cta-banner p { color: var(--text-muted); max-width: 50ch; margin: 0 auto 1.8rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: 2.5rem;
}
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer__grid { grid-template-columns: 1fr; } }

.footer__brand img { height: 38px; margin-bottom: 1rem; }
.footer__brand p { color: var(--text-muted); font-size: 0.92rem; max-width: 32ch; }
.footer__col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 1rem;
  font-family: var(--font-head);
}
.footer__col ul { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.footer__col a { color: var(--text-muted); font-size: 0.95rem; }
.footer__col a:hover { color: var(--gold); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-faint);
}
.footer__legal-data { line-height: 1.7; }

/* --------------------------------------------------------------------------
   Páginas legales (privacidad / términos)
   -------------------------------------------------------------------------- */
.legal {
  max-width: 800px;
  margin-inline: auto;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 0.5rem; }
.legal .updated { color: var(--text-faint); font-size: 0.9rem; margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.35rem; margin-block: 2rem 0.7rem; color: var(--gold); }
.legal h3 { font-size: 1.08rem; margin-block: 1.4rem 0.4rem; }
.legal p, .legal li { color: var(--text-muted); }
.legal p { margin-bottom: 1rem; }
.legal ul, .legal ol { margin: 0 0 1rem 1.3rem; display: grid; gap: 0.45rem; }
.legal a { color: var(--gold); text-decoration: underline; }
.legal .back {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--text-muted); font-weight: 500; margin-bottom: 2rem;
}
.legal .back:hover { color: var(--gold); }
.legal .toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.4rem;
  margin-bottom: 2.5rem;
}
.legal .toc strong { display: block; margin-bottom: 0.6rem; }
.legal .toc ol { margin-bottom: 0; }

/* placeholder visual (datos legales por completar) */
mark.todo {
  background: rgba(255, 184, 77, 0.18);
  color: var(--warning);
  padding: 0 0.3em;
  border-radius: 4px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
