/* =========================================================
   Neura Cloud — components.css
   Header, tarjetas, listas, sliders, acordeón, modal, mockup
   ========================================================= */

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(247, 250, 251, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(13, 42, 51, 0.25);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--brand);
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav > a {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.site-nav > a:hover {
  color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--ink);
}

@media (max-width: 990px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 24px 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }

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

  .site-nav > a {
    padding: 12px 4px;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
  }

  .nav-actions {
    margin: 16px 0 0;
    flex-direction: column;
    align-items: stretch;
  }
}

/* ---------- Tarjetas ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease,
    transform 0.25s ease;
}

.card:hover {
  border-color: #cfe0e6;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card--dark {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--on-dark);
}

.card--dark:hover {
  border-color: var(--dark);
}

.card--dark h3 {
  color: #fff;
}

.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--brand-tint);
  color: var(--brand-deep);
  margin-bottom: 20px;
}

.chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ---------- Listas con iconos ---------- */

.check-list li,
.cross-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-block: 14px;
}

.check-list li + li,
.cross-list li + li {
  border-top: 1px solid var(--line);
}

.card--dark .check-list li + li {
  border-top-color: var(--on-dark-line);
}

.check-list .li-icon,
.cross-list .li-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  margin-top: 2px;
}

.check-list .li-icon {
  background: var(--brand-tint);
  color: var(--brand-deep);
}

.card--dark .check-list .li-icon {
  background: rgba(127, 196, 212, 0.16);
  color: #7fc4d4;
}

.cross-list .li-icon {
  background: #eef2f4;
  color: var(--ink-faint);
}

.li-title {
  font-weight: 600;
  font-size: 0.97rem;
}

.li-text {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 2px;
}

.card--dark .li-text {
  color: var(--on-dark-muted);
}

/* ---------- Sliders (calculadora) ---------- */

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--brand);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(13, 42, 51, 0.3);
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(13, 42, 51, 0.3);
}

/* ---------- Acordeón FAQ ---------- */

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 4px;
  font-weight: 600;
  font-size: 1.02rem;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary svg {
  flex-shrink: 0;
  color: var(--ink-faint);
  transition: transform 0.25s ease;
}

.faq-item[open] summary svg {
  transform: rotate(45deg);
  color: var(--brand);
}

.faq-item p {
  padding: 0 4px 24px;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* ---------- Mockup de navegador ---------- */

.mockup {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  cursor: pointer;
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.mockup-bar > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.mockup-url {
  margin-left: 12px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.mockup-body {
  position: relative;
}

.mockup-body img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}

.mockup-play {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(14, 40, 48, 0.88);
  color: var(--on-dark);
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.mockup:hover .mockup-play {
  background: var(--brand);
  transform: translateY(-2px);
}

/* ---------- Modal de video ---------- */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.video-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 40, 48, 0.8);
  backdrop-filter: blur(4px);
}

.video-modal-box {
  position: relative;
  width: min(960px, 100%);
  background: var(--dark);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: var(--shadow-lg);
}

.video-modal-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}

.video-frame {
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius-md) - 8px);
  overflow: hidden;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Popup de salida ---------- */

.exit-popup {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.exit-popup.is-open {
  opacity: 1;
  pointer-events: auto;
}

.exit-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 40, 48, 0.6);
  backdrop-filter: blur(4px);
}

.exit-popup-box {
  position: relative;
  width: min(440px, 100%);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px 32px 28px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s ease;
}

.exit-popup.is-open .exit-popup-box {
  transform: none;
}

.exit-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--ink-faint);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.exit-popup-close:hover {
  color: var(--ink);
  background: var(--paper);
}

.exit-popup-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-deep);
}

.exit-popup-box h3 {
  font-size: 1.45rem;
  font-weight: 700;
}

.exit-popup-box p {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.exit-popup-box strong {
  color: var(--brand-deep);
  font-weight: 700;
}

.exit-popup-box .btn {
  width: 100%;
  margin-top: 22px;
}

.exit-popup-dismiss {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--ink-faint);
  transition: color 0.2s ease;
}

.exit-popup-dismiss:hover {
  color: var(--ink-soft);
  text-decoration: underline;
}
