/* ==========================================================================
   Comunidad360 — base del sitio
   Tokens, layout, navegación, secciones, planes, FAQ, footer, modal.
   Tema oscuro por defecto con alternancia a claro vía [data-theme].
   ========================================================================== */

:root {
  --bg: #080b12;
  --bg-soft: #0d121c;
  --surface: #111826;
  --surface-2: #161f30;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e9eef8;
  --text-dim: #a4b0c4;
  --text-faint: #6f7d95;
  --brand: #5b8cff;
  --brand-soft: rgba(91, 140, 255, 0.14);
  --mint: #2ad4a4;
  --mint-soft: rgba(42, 212, 164, 0.14);
  --warn: #f5a524;
  --warn-soft: rgba(245, 165, 36, 0.14);
  --danger: #f4626a;
  --danger-soft: rgba(244, 98, 106, 0.14);
  --shadow: 0 24px 60px rgba(2, 5, 12, 0.55);
  --shadow-sm: 0 8px 24px rgba(2, 5, 12, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme='light'] {
  --bg: #f4f7fc;
  --bg-soft: #eaf0f9;
  --surface: #ffffff;
  --surface-2: #f6f9ff;
  --line: rgba(11, 22, 44, 0.1);
  --line-strong: rgba(11, 22, 44, 0.18);
  --text: #0d1526;
  --text-dim: #4f5d75;
  --text-faint: #7c8aa3;
  --brand: #2f62f0;
  --brand-soft: rgba(47, 98, 240, 0.1);
  --mint: #0f9c78;
  --mint-soft: rgba(15, 156, 120, 0.12);
  --warn: #b9761a;
  --warn-soft: rgba(185, 118, 26, 0.12);
  --danger: #d63d46;
  --danger-soft: rgba(214, 61, 70, 0.12);
  --shadow: 0 24px 60px rgba(13, 26, 51, 0.14);
  --shadow-sm: 0 8px 22px rgba(13, 26, 51, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 650;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

/* --- utilidades ---------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
  position: relative;
}

.section--tight {
  padding: 72px 0;
}

.section--alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.section-head {
  max-width: 720px;
  margin-bottom: 44px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.section-head p {
  color: var(--text-dim);
  margin-top: 14px;
  font-size: 17px;
}

.ico {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ico--fill {
  fill: currentColor;
  stroke: none;
}

/* --- botones ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
    border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 28px rgba(91, 140, 255, 0.32);
}

.btn--primary:hover {
  box-shadow: 0 14px 34px rgba(91, 140, 255, 0.42);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--surface-2);
}

.btn--sm {
  padding: 9px 16px;
  font-size: 14px;
}

/* --- navegación ---------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav.is-stuck {
  border-bottom-color: var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.brand__mark {
  width: 30px;
  height: 30px;
}

.brand__sub {
  color: var(--text-faint);
  font-weight: 500;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__links a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--text-dim);
  transition: color 0.16s var(--ease), background 0.16s var(--ease);
}

.nav__links a:hover,
.nav__links a.is-active {
  color: var(--text);
  background: var(--surface-2);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

[data-theme='light'] .theme-toggle__moon,
.theme-toggle__sun {
  display: none;
}

[data-theme='light'] .theme-toggle__sun {
  display: block;
}

.theme-toggle__moon {
  display: block;
}

/* --- hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 72px 0 80px;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.hero::before {
  width: 620px;
  height: 620px;
  top: -280px;
  left: -140px;
  background: rgba(91, 140, 255, 0.22);
}

.hero::after {
  width: 480px;
  height: 480px;
  top: -160px;
  right: -160px;
  background: rgba(42, 212, 164, 0.14);
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(36px, 5.4vw, 60px);
  letter-spacing: -0.035em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--brand), var(--mint));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  color: var(--text-dim);
  font-size: 18.5px;
  margin-top: 20px;
  max-width: 54ch;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 22px;
}

.pill b {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.fact strong {
  display: block;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.fact span {
  font-size: 13.5px;
  color: var(--text-faint);
}

/* --- video --------------------------------------------------------------- */

.video-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.player {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease);
}

.player:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.player__art {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(91, 140, 255, 0.34), transparent 60%),
    radial-gradient(110% 100% at 92% 96%, rgba(42, 212, 164, 0.28), transparent 62%),
    linear-gradient(160deg, #0e1522, #131d2e);
  display: grid;
  place-items: center;
}

[data-theme='light'] .player__art {
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(47, 98, 240, 0.24), transparent 60%),
    radial-gradient(110% 100% at 92% 96%, rgba(15, 156, 120, 0.2), transparent 62%),
    linear-gradient(160deg, #e9effc, #f7faff);
}

.player__art::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.5;
}

.player__play {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

[data-theme='light'] .player__play {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(13, 21, 38, 0.14);
  color: var(--brand);
}

.player:hover .player__play {
  transform: scale(1.06);
}

.player__play .ico {
  width: 26px;
  height: 26px;
}

.player__badge {
  position: absolute;
  z-index: 1;
  left: 16px;
  top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(8, 11, 18, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

.player__time {
  position: absolute;
  z-index: 1;
  right: 16px;
  bottom: 16px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(8, 11, 18, 0.68);
  color: #fff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.player__meta {
  padding: 18px 20px 20px;
}

.player__meta h3 {
  font-size: 19px;
}

.player__meta p {
  color: var(--text-dim);
  font-size: 14.5px;
  margin-top: 6px;
}

.clip-list {
  display: grid;
  gap: 12px;
}

.clip {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease),
    transform 0.18s var(--ease);
}

.clip:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  transform: translateX(2px);
}

.clip__thumb {
  position: relative;
  width: 88px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(150deg, rgba(91, 140, 255, 0.5), rgba(42, 212, 164, 0.4));
}

.clip__thumb .ico {
  width: 18px;
  height: 18px;
}

.clip__body {
  min-width: 0;
}

.clip__body strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.clip__body span {
  display: block;
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clip__time {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong);
  color: var(--text-faint);
  font-size: 13.5px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* --- modal --------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  padding: 24px;
  place-items: center;
  background: rgba(4, 7, 13, 0.78);
  backdrop-filter: blur(8px);
}

.modal.is-open {
  display: grid;
}

.modal__box {
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
}

.modal__head h3 {
  font-size: 17px;
}

.modal__head p {
  font-size: 13px;
  color: var(--text-faint);
}

.modal__head .icon-btn {
  margin-left: auto;
}

.modal__body {
  padding: 18px;
}

.modal video {
  width: 100%;
  border-radius: var(--radius-sm);
  display: block;
  background: #000;
}

/* --- planes -------------------------------------------------------------- */

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}

.plan-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.plan-card.is-current {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), var(--shadow-sm);
}

.plan-card__tag {
  position: absolute;
  top: -11px;
  left: 24px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.plan-card h3 {
  font-size: 22px;
}

.plan-card__tagline {
  color: var(--text-dim);
  font-size: 14.5px;
}

.plan-card__price {
  font-size: 17px;
  font-weight: 600;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.plan-card__price small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-faint);
  margin-top: 4px;
}

.plan-card ul {
  display: grid;
  gap: 10px;
  font-size: 14.5px;
}

.plan-card li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-dim);
}

.plan-card li .ico {
  width: 17px;
  height: 17px;
  margin-top: 4px;
  color: var(--mint);
}

.plan-card .btn {
  margin-top: auto;
}

/* --- matriz de capacidades ---------------------------------------------- */

.matrix {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.matrix__group + .matrix__group {
  border-top: 1px solid var(--line);
}

.matrix__head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: 0;
  text-align: left;
  font-weight: 600;
}

.matrix__head:hover {
  background: var(--surface-2);
}

.matrix__head .ico {
  color: var(--brand);
}

.matrix__head .chev {
  margin-left: auto;
  transition: transform 0.2s var(--ease);
  color: var(--text-faint);
}

.matrix__group.is-open .chev {
  transform: rotate(90deg);
}

.matrix__body {
  display: none;
  overflow-x: auto;
}

.matrix__group.is-open .matrix__body {
  display: block;
}

table.grid {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14.5px;
}

table.grid th,
table.grid td {
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  text-align: left;
}

table.grid thead th {
  background: var(--surface-2);
  color: var(--text-faint);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

table.grid td:not(:first-child),
table.grid th:not(:first-child) {
  text-align: center;
  width: 132px;
}

table.grid td:first-child {
  color: var(--text-dim);
}

.mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
}

.mark--yes {
  background: var(--mint-soft);
  color: var(--mint);
}

.mark--no {
  color: var(--text-faint);
}

.mark .ico {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

/* --- FAQ ---------------------------------------------------------------- */

.faq {
  max-width: 820px;
  border-top: 1px solid var(--line);
}

.faq__item {
  border-bottom: 1px solid var(--line);
}

.faq__q {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px 4px;
  background: transparent;
  border: 0;
  text-align: left;
  font-size: 16.5px;
  font-weight: 600;
}

.faq__q .plus {
  margin-left: auto;
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--text-faint);
}

.faq__q .plus::before,
.faq__q .plus::after {
  content: '';
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1.6px;
  background: currentColor;
  transition: transform 0.2s var(--ease);
}

.faq__q .plus::after {
  transform: rotate(90deg);
}

.faq__item.is-open .plus::after {
  transform: rotate(0);
}

.faq__a {
  display: none;
  padding: 0 44px 22px 4px;
  color: var(--text-dim);
}

.faq__item.is-open .faq__a {
  display: block;
}

/* --- cierre / footer ---------------------------------------------------- */

.closer {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 56px 44px;
  border: 1px solid var(--line);
  background:
    radial-gradient(90% 130% at 8% 0%, rgba(91, 140, 255, 0.24), transparent 60%),
    radial-gradient(80% 120% at 96% 100%, rgba(42, 212, 164, 0.18), transparent 62%),
    var(--surface);
  text-align: center;
}

.closer h2 {
  font-size: clamp(26px, 3.6vw, 38px);
}

.closer p {
  color: var(--text-dim);
  margin: 14px auto 26px;
  max-width: 56ch;
}

.closer__cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  color: var(--text-faint);
  font-size: 14px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.footer a:hover {
  color: var(--text);
}

/* --- reveal ------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* --- responsive --------------------------------------------------------- */

@media (max-width: 1020px) {
  .hero__grid,
  .video-layout {
    grid-template-columns: 1fr;
  }

  .plans {
    grid-template-columns: 1fr;
  }

  .nav__links {
    display: none;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 68px 0;
  }

  .wrap {
    padding: 0 18px;
  }

  .closer {
    padding: 38px 22px;
  }

  .hero {
    padding: 44px 0 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
