/* ============================================================
   L’Ehcir Solar — sistema visual
   ============================================================ */

:root {
  --bg: #0b0b0c;
  --bg-elev: #141416;
  --bg-deep: #0f0f11;
  --fg: #f3efe7;
  --fg-muted: #a7a29a;
  --accent: #f2b544;
  --accent-soft: rgba(242, 181, 68, 0.12);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --danger: #ff8080;
  --radius: 20px;
  --radius-sm: 12px;
  --max: 1240px;
  --gap: clamp(16px, 3vw, 40px);
  --pad-x: clamp(20px, 5vw, 64px);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  /* COLORES CTA: Azul eléctrico con texto blanco */
  --btn-bg: #00a8ff;
  --btn-fg: #ffffff;
  --btn-hover: #0091ea;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

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

body.modal-open { overflow: hidden; }

/* ---------- Tipografía ---------- */
.display {
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.95;
  font-size: clamp(2.6rem, 7.2vw, 6rem);
  margin: 0 0 0.4em;
  text-wrap: balance;
}
.display em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.display--lg { font-size: clamp(2.8rem, 9vw, 8rem); }
.display--md { font-size: clamp(2rem, 5vw, 4rem); }
.display--sm { font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.05; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 18px;
  font-weight: 600;
}
.lede {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--fg-muted);
  max-width: 56ch;
  margin: 0;
}
.muted { color: var(--fg-muted); }
.small { font-size: 0.85rem; }

/* ---------- Layout ---------- */
.section {
  padding: clamp(64px, 10vw, 140px) var(--pad-x);
  max-width: var(--max);
  margin: 0 auto;
}
.section__header { margin-bottom: clamp(32px, 6vw, 64px); max-width: 900px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
  background: none;
  color: inherit;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
  text-transform: uppercase;
}
.btn--primary:hover { background: var(--btn-hover); }

.btn--ghost {
  border-color: var(--border-strong);
  color: var(--fg);
}
.btn--ghost:hover { border-color: var(--fg); }

.btn--lg { padding: 18px 30px; font-size: 0.95rem; }
.btn--sm { padding: 8px 14px; font-size: 0.8rem; }

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad-x);
  background: rgba(11, 11, 12, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.nav__logo { width: 30px; height: 30px; flex-shrink: 0; }

.nav__menu {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav__menu a {
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--fg-muted);
  font-size: 0.92rem;
  transition: color .2s, background .2s;
}
.nav__menu a:hover { color: var(--fg); background: rgba(255,255,255,0.05); }
.nav__menu .btn { margin-left: 6px; }

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--fg);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav__menu.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav__menu a { padding: 14px; }
  .nav__menu .btn { width: 100%; margin: 4px 0 0; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 9vw, 120px) var(--pad-x) clamp(64px, 9vw, 120px);
  max-width: var(--max);
  margin: 0 auto;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.hero__copy .display { margin-bottom: 24px; }
.hero__lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--fg-muted);
  max-width: 52ch;
  margin: 0 0 32px;
}
.hero__meta {
  display: flex;
  gap: 32px;
  margin: 0 0 32px;
  flex-wrap: wrap;
}
.meta { display: flex; flex-direction: column; gap: 4px; }
.meta__label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.meta__value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--fg);
}
.hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 560px;
  margin-left: auto;
}
.hero__blob {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero__img {
  position: absolute;
  border-radius: var(--radius);
  overflow: hidden;
  background: #1a1a1c;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}
.hero__img img { width: 100%; height: 100%; object-fit: cover; }

.hero__img--panel {
  top: 0;
  left: 0;
  right: 18%;
  bottom: 22%;
  z-index: 2;
}
.hero__img--battery {
  width: 46%;
  right: 0;
  bottom: 0;
  aspect-ratio: 1 / 1;
  z-index: 3;
}

/* ---------- PREMIO ---------- */
.prize__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}
.card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .25s, transform .25s;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.card__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #1a1a1c;
  margin: -8px -8px 4px;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--accent);
}
.card__title {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}
.card__text {
  color: var(--fg-muted);
  margin: 0;
}

/* ---------- STEPS ---------- */
.steps__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.step {
  padding: 28px 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}
.step h3 {
  font-size: 1.05rem;
  margin: 4px 0 0;
  letter-spacing: -0.01em;
}
.step p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
}
.step strong { color: var(--fg); }

/* ---------- PAYCARD ---------- */
.paycard {
  margin-top: 40px;
  display: grid;
  gap: 4px;
  background: linear-gradient(180deg, var(--accent-soft), transparent);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 620px;
}
.paycard__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.paycard__row:last-of-type { border-bottom: none; }
.paycard__label {
  color: var(--fg-muted);
  font-size: 0.85rem;
  min-width: 84px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.paycard__value {
  font-weight: 700;
  font-size: 1.05rem;
  flex: 1;
}
.paycard__note {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin: 8px 0 0;
}
.paycard__note a { color: var(--accent); }

/* ---------- IMÁGENES DE LA GUÍA ---------- */
.paycard__img {
  margin-top: 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}
.paycard__img img {
  width: 100%;
  height: auto;
  display: block;
}

.paybox__img {
  margin: 16px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}
.paybox__img img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- DATE ---------- */
.date__inner { max-width: 900px; }
.date__stamp {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--accent);
  margin-top: 32px;
  letter-spacing: 0.02em;
  line-height: 1;
}

/* ---------- DELIVERY ---------- */
.delivery__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--gap);
  align-items: center;
}
.delivery__art { display: flex; justify-content: center; }
.delivery__art svg {
  width: 100%;
  max-width: 340px;
  height: auto;
}

/* ---------- CTA FINAL ---------- */
.cta-final {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding-block: clamp(80px, 12vw, 160px);
}
.cta-final .lede { max-width: 56ch; }
.disclaimer {
  color: var(--fg-muted);
  font-size: 0.85rem;
  max-width: 60ch;
  margin: 8px 0 0;
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px var(--pad-x) 24px;
  max-width: var(--max);
  margin: 0 auto;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--gap);
  padding-bottom: 40px;
}
.footer__brand {
  display: block;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.footer__note {
  color: var(--fg-muted);
  font-size: 0.92rem;
  margin: 0;
  max-width: 40ch;
}
.footer__label {
  display: block;
  color: var(--fg-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
}
.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer__nav a,
.footer__nav button {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .2s;
}
.footer__nav a:hover,
.footer__nav button:hover { color: var(--accent); }

.tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 999px;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 0.82rem;
}

/* ---------- MODAL ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 32px);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8);
  animation: modal-in .25s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
.modal__header {
  position: relative;
  margin-bottom: 24px;
}
.modal__close {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  font-size: 1.4rem;
  line-height: 1;
  display: grid;
  place-items: center;
}
.modal__close:hover { background: rgba(255, 255, 255, 0.06); }

.mstep__title {
  font-size: 1.05rem;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  font-weight: 800;
}
.mstep p { color: var(--fg-muted); margin: 0 0 14px; }
.mstep p.small { font-size: 0.82rem; }
.mstep strong { color: var(--fg); }
.mstep__actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.mstep__actions .btn { flex: 1; min-width: 140px; }

/* ---------- PAYBOX (dentro del modal) ---------- */
.paybox {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  margin: 4px 0 12px;
}
.paybox__number {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------- FORM ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--fg);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color .2s, background .2s;
}
.field input[type="text"]:focus,
.field input[type="email"]:focus {
  outline: none;
  border-color: var(--btn-bg);
  background: var(--bg-elev);
}
.field input[type="file"] {
  width: 100%;
  font-size: 0.9rem;
  color: var(--fg-muted);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  background: var(--bg-deep);
  cursor: pointer;
}
.field input[type="file"]::file-selector-button {
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  margin-right: 12px;
  font-family: inherit;
}
.field__hint {
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin: 0;
}
.field__error {
  font-size: 0.85rem;
  color: var(--danger);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.field__error::before { content: "⚠"; }
.field.has-error input[type="text"],
.field.has-error input[type="email"],
.field.has-error input[type="file"] {
  border-color: var(--danger);
}

/* ---------- NOTICE ---------- */
.notice {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 122, 61, 0.08);
  border: 1px solid rgba(255, 122, 61, 0.35);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 16px;
}
.notice strong { color: #ff9b6b; }

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--fg);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 200;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { margin: 0 auto; max-width: 500px; }
  .delivery__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
  .hero__meta { gap: 20px; }
  .mstep__actions .btn { min-width: 0; }
  .paybox { justify-content: space-between; }
}

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