/* ============================================================================
   style.css — Estilos de la landing. Variables arriba para re-tematizar rápido.
   ============================================================================ */

:root {
  /* Estos valores son el fallback; theme.js los sobreescribe en runtime. */
  --color-primary: #c9a227;
  --color-primary-dark: #a8851d;
  --color-on-primary: #1a1206;
  --color-text: #f2f4f8;
  --color-muted: #9aa4b2;
  --color-bg: #0b0f16;
  --color-bg-alt: #111722;
  --color-surface: #161d2b;
  --color-border: #2a3345;
  --color-star: #ffb400;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 960px;
  --radius: 12px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --btn-gradient: none;
  --bg-image: none;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background-color: var(--color-bg);
  /* Fondo con degradado sutil para que no quede plano aunque no haya imagen.
     Si theme.js define --bg-image, esa gana (se apila delante). */
  background-image:
    var(--bg-image),
    radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--color-primary) 12%, transparent), transparent 70%),
    linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  background-repeat: no-repeat;
  line-height: 1.6;
  font-size: 18px;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  text-align: center;
  padding: 16px 32px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease;
  border: none;
}
.btn--primary {
  background: var(--color-primary);
  background-image: var(--btn-gradient);
  color: var(--color-on-primary);
  box-shadow: var(--shadow);
}
.btn--primary:hover { filter: brightness(1.05); transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); }
.btn--lg { font-size: 22px; padding: 20px 48px; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  z-index: 10;
}
.site-header__inner { display: flex; align-items: center; gap: 10px; }
.site-header__logo { max-height: 36px; width: auto; }
.site-header__name { font-weight: 800; font-size: 20px; }

/* ---------- Hero ---------- */
/* Banda con degradado de acento: la landing se ve "diseñada" aunque no haya
   imagen de hero. */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  position: relative;
  background:
    radial-gradient(900px 420px at 50% 0%, color-mix(in srgb, var(--color-primary) 22%, transparent), transparent 68%);
  border-bottom: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
}
.hero__headline {
  font-size: clamp(30px, 5.4vw, 50px);
  line-height: 1.12;
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
/* Subrayado de acento debajo del titular (puro CSS, sin nodo extra) */
.hero__headline::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin: 20px auto 0;
  border-radius: 999px;
  background: var(--color-primary);
  background-image: var(--btn-gradient);
}
.hero__subheadline {
  font-size: clamp(18px, 2.6vw, 23px);
  color: var(--color-muted);
  margin: 0 auto 32px;
  max-width: 640px;
}
.hero__image {
  border-radius: var(--radius);
  margin: 0 auto 28px;
  box-shadow: var(--shadow);
  width: 100%;
}
.hero__cta { margin-top: 8px; }

/* ---------- Video ---------- */
.video { padding: 24px 0; text-align: center; }
.video__frame {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.video__caption { color: var(--color-muted); margin-top: 14px; }

/* ---------- Sections ---------- */
.sections { padding: 56px 20px 40px; }
.section-block {
  display: flex;
  gap: 32px;
  align-items: center;
  margin: 28px 0;
}
.section-block--reverse { flex-direction: row-reverse; }
.section-block__media { flex: 1 1 45%; }
.section-block__media img { border-radius: var(--radius); box-shadow: var(--shadow); }
/* La columna de texto es una tarjeta: así una sección sin imagen se ve
   intencional en vez de "texto abandonado". */
.section-block__text {
  flex: 1 1 55%;
  background: color-mix(in srgb, var(--color-surface) 55%, transparent);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.section-block__text h2 { font-size: clamp(22px, 3.4vw, 30px); margin: 0 0 12px; }
.section-block__text p { color: var(--color-muted); margin: 0; }

/* ---------- Testimonials ---------- */
.testimonials { background: var(--color-bg-alt); padding: 56px 0; }
.testimonials__title { text-align: center; font-size: clamp(24px, 4vw, 32px); margin: 0 0 36px; }
.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.testimonial {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.testimonial__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
}
.testimonial__avatar--initial {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 26px;
  color: var(--color-on-primary);
  background: var(--color-primary);
  background-image: var(--btn-gradient);
}
.testimonial__stars { color: var(--color-star); font-size: 18px; letter-spacing: 2px; margin-bottom: 8px; }
.testimonial__quote { font-style: italic; margin: 0 0 14px; }
.testimonial__meta { display: flex; flex-direction: column; gap: 2px; }
.testimonial__name { font-weight: 700; }
.testimonial__location { color: var(--color-muted); font-size: 15px; }

/* ---------- CTA final ---------- */
.cta-final { padding: 64px 0; text-align: center; }
.cta-final__disclaimer { color: var(--color-muted); font-size: 15px; margin-top: 16px; }

/* ---------- Footer ---------- */
.site-footer {
  background: #111;
  color: #bbb;
  padding: 32px 0;
  text-align: center;
  font-size: 15px;
}
.site-footer__links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.site-footer__links a { color: #bbb; text-decoration: none; }
.site-footer__links a:hover { color: #fff; text-decoration: underline; }

/* ---------- Formulario de captura ---------- */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0; overflow: hidden;
}
.signup { padding: 40px 20px; display: flex; justify-content: center; }
.signup__card {
  width: 100%;
  max-width: 460px;
  background: color-mix(in srgb, var(--color-surface) 92%, #000);
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius) + 4px);
  padding: 28px 26px;
  box-shadow: var(--shadow);
}
.signup__title { font-size: 26px; font-weight: 800; margin: 0 0 6px; }
.signup__subtitle { color: var(--color-muted); margin: 0 0 22px; font-size: 16px; }

.signup__form { display: flex; flex-direction: column; gap: 16px; }
.signup__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; color: var(--color-text); }
.field input {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text);
  font-size: 16px;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder { color: color-mix(in srgb, var(--color-muted) 70%, transparent); }
.field input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 25%, transparent);
}
.field input.is-invalid { border-color: #e5484d; }
.field__error { color: #ff6b6b; font-size: 13px; min-height: 0; }
.field__error:empty { display: none; }

/* Teléfono con selector de país */
.phone { display: flex; gap: 8px; }
.phone__country { position: relative; flex: 0 0 auto; }
.phone__country-btn {
  display: flex; align-items: center; gap: 6px;
  height: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text);
  font-size: 15px;
  padding: 0 12px;
  cursor: pointer;
}
.phone__iso { font-weight: 700; }
.phone__dial { color: var(--color-primary); font-weight: 700; }
.phone__caret { color: var(--color-muted); font-size: 12px; }
.phone .field-input, .phone input[type="tel"] { flex: 1 1 auto; }
.phone input[type="tel"] {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text);
  font-size: 16px;
  padding: 13px 14px;
  outline: none;
}
.phone input[type="tel"]:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 25%, transparent);
}

.phone__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  margin: 0; padding: 6px;
  list-style: none;
  width: 260px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.phone__option {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
}
.phone__option:hover { background: color-mix(in srgb, var(--color-primary) 16%, transparent); }
.phone__opt-iso { font-weight: 700; }
.phone__opt-name { color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone__opt-dial { color: var(--color-muted); }

/* Consentimiento */
.consent { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--color-primary); flex: 0 0 auto; }
.consent__text { font-size: 14px; color: var(--color-muted); line-height: 1.5; }
.consent__text a { color: var(--color-primary); text-decoration: underline; }

.signup__submit { width: 100%; margin-top: 4px; }

.signup__status { text-align: center; font-size: 15px; margin: 4px 0 0; }
.signup__status--ok { color: #4ade80; }
.signup__status--error { color: #ff6b6b; }

/* ---------- Páginas legales ---------- */
.legal__header { justify-content: space-between; }
.legal__back { color: var(--color-primary); text-decoration: none; font-weight: 700; }
.legal__back:hover { text-decoration: underline; }
.legal { padding: 40px 20px 64px; max-width: 800px; }
.legal h1 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 6px; }
.legal__updated { color: var(--color-muted); font-size: 14px; margin: 0 0 28px; }
.legal h2 { font-size: 20px; margin: 28px 0 8px; }
.legal p { color: var(--color-text); margin: 0 0 12px; }
.legal__disclaimer {
  margin-top: 32px;
  padding: 14px 16px;
  border-left: 3px solid var(--color-primary);
  background: var(--color-surface);
  border-radius: 8px;
  color: var(--color-muted);
  font-size: 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  body { font-size: 17px; }
  .section-block, .section-block--reverse { flex-direction: column; gap: 20px; }
  .btn--lg { width: 100%; }
  .signup__row { grid-template-columns: 1fr; }
  .phone__list { width: 240px; }
}
