/* LIGHT TRONIC — componentes: nav, botones, cards, form, facade, sticky CTA */

/* ---------- Navbar ---------- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  transition: background var(--dur), box-shadow var(--dur);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: 0.9rem;
}

.nav.is-scrolled {
  background: var(--surface-3);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line), 0 12px 30px -18px rgba(0, 0, 0, 0.7);
}

.nav-logo img {
  height: 34px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: clamp(0.9rem, 2vw, 1.8rem);
}

.nav-links a {
  font-size: var(--text-sm);
  color: var(--text-dim);
  padding: 0.35rem 0.15rem;
  position: relative;
  transition: color var(--dur-fast), text-shadow var(--dur-fast);
}

.nav-links a:hover,
.nav-links a[aria-current] {
  color: var(--text);
  text-shadow: 0 0 12px var(--glow-brand);
}

.nav-cta {
  flex-shrink: 0;
}

/* Menú mobile */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  color: var(--text);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    flex-direction: column;
    gap: 0;
    background: var(--void);
    border-block: 1px solid var(--line);
    padding: var(--space-3) var(--gutter);
    display: none;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
    font-size: var(--text-base);
  }

  .nav-cta {
    display: none;
  }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    box-shadow var(--dur),
    background var(--dur),
    color var(--dur),
    border-color var(--dur);
}

.btn-primary {
  background: var(--brand);
  color: var(--ink);
  box-shadow: var(--glow-soft);
}

.btn-primary:hover {
  background: var(--brand-bright);
  color: var(--ink);
  box-shadow: var(--glow-full);
}

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

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--brand);
  box-shadow: inset 0 0 18px -8px var(--glow-brand), var(--glow-soft);
}

.btn-lg {
  padding: 1.05rem 2.2rem;
  font-size: var(--text-base);
}

/* ---------- Card genérica ---------- */
.card {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  position: relative;
  overflow: hidden;
}

/* ---------- Badge de certificación ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
}

.badge svg {
  width: 14px;
  height: 14px;
  color: var(--brand-bright);
}

/* ---------- Display de datos (contadores estilo luxómetro) ---------- */
.lumen-display {
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: 500;
  color: var(--cool);
  text-shadow: 0 0 18px var(--glow-cool), 0 0 40px var(--glow-brand);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.lumen-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  margin-top: 0.6rem;
}

/* ---------- Dimmer (firma del hero) ---------- */
.dimmer-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: var(--space-5);
}

.dimmer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
  max-width: 21rem;
}

.dimmer-track {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    var(--brand) calc(var(--dim, 0.85) * 100%),
    var(--line-strong) calc(var(--dim, 0.85) * 100%)
  );
  cursor: pointer;
}

.dimmer-track::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cool);
  border: 2px solid var(--brand);
  box-shadow: var(--glow-full);
  cursor: grab;
}

.dimmer-track::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cool);
  border: 2px solid var(--brand);
  box-shadow: var(--glow-full);
  cursor: grab;
}

.dimmer-readout {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-dim);
  letter-spacing: 0.12em;
  min-width: 5.5ch;
  text-align: right;
}

/* ---------- Formulario ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-dim);
}

.field input,
.field textarea {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  color: var(--text);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), var(--glow-soft);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  font-size: var(--text-xs);
  color: var(--error);
  min-height: 1.1em;
  margin: 0;
}

.form-status {
  font-size: var(--text-sm);
  margin-top: var(--space-3);
}

.form-status.is-ok {
  color: var(--ok);
}

.form-status.is-error {
  color: var(--error);
}

/* ---------- Facade de YouTube ---------- */
.video-facade {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
  padding: 0;
  width: 100%;
  display: block;
}

.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: opacity var(--dur), transform var(--dur-slow) var(--ease-out);
}

.video-facade:hover img {
  opacity: 0.75;
  transform: scale(1.02);
}

.video-facade .play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(5, 8, 13, 0.55);
  border: 1px solid var(--brand);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  box-shadow: var(--glow-full);
  transition: transform var(--dur), box-shadow var(--dur);
}

.video-facade:hover .play {
  transform: scale(1.08);
}

.video-facade .play svg {
  width: 26px;
  height: 26px;
  fill: var(--cool);
  margin-left: 4px;
  filter: drop-shadow(0 0 8px var(--glow-cool));
}

.video-facade iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Sticky CTA ---------- */
.sticky-cta {
  position: fixed;
  z-index: 90;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  transform: translateY(140%);
  opacity: 0;
  transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur-slow);
  pointer-events: none;
}

.sticky-cta.is-visible {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-6) var(--space-5);
  background: linear-gradient(180deg, transparent, rgba(0, 168, 224, 0.03));
  font-size: var(--text-sm);
  color: var(--text-dim);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-logo {
  height: 30px;
  width: auto;
  margin-bottom: var(--space-3);
}

.footer h4 {
  font-size: var(--text-sm);
  color: var(--text);
  margin-bottom: var(--space-3);
}

.footer li {
  margin-bottom: 0.55rem;
}

.footer a {
  color: var(--text-dim);
}

.footer a:hover {
  color: var(--brand-bright);
}

.footer-legal {
  border-top: 1px solid var(--line);
  padding-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-faint);
}
