/* =========================================================
   enmodovideo — Talleres de Octubre
   Paleta tomada de edicion.enmodovideo.com
   ========================================================= */

:root {
  --bg: #FAF6F9;
  --bg-glow-1: rgba(224, 105, 10, 0.10);
  --bg-glow-2: rgba(216, 27, 104, 0.08);
  --surface: #FFFFFF;
  --surface-2: #F3ECF3;
  --surface-sel: #FDEFE0;
  --border: #E7DCE8;
  --border-strong: #D6C7D8;
  --text: #1C1421;
  --text-dim: #6B5E70;
  --text-faint: #9A8EA0;
  --accent: #DB5E0A;
  --accent-2: #D81B68;
  --accent-ink: #FFFFFF;
  --ok: #1E8E5A;
  --shadow: 0 1px 2px rgba(28, 20, 33, .06), 0 8px 24px rgba(28, 20, 33, .06);
  --shadow-sel: 0 2px 4px rgba(219, 94, 10, .18), 0 10px 28px rgba(219, 94, 10, .16);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1080px;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141019;
    --bg-glow-1: rgba(255, 154, 61, 0.16);
    --bg-glow-2: rgba(255, 77, 144, 0.12);
    --surface: #1E1826;
    --surface-2: #2A2233;
    --surface-sel: #322012;
    --border: #322A3D;
    --border-strong: #4A3F58;
    --text: #F5F0F7;
    --text-dim: #B5A9BF;
    --text-faint: #82768E;
    --accent: #FF9A3D;
    --accent-2: #FF4D90;
    --accent-ink: #1A1208;
    --ok: #4ADE9B;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-sel: 0 2px 6px rgba(255, 154, 61, .22), 0 12px 30px rgba(255, 154, 61, .14);
  }
}

:root[data-theme="dark"] {
  --bg: #141019;
  --bg-glow-1: rgba(255, 154, 61, 0.16);
  --bg-glow-2: rgba(255, 77, 144, 0.12);
  --surface: #1E1826;
  --surface-2: #2A2233;
  --surface-sel: #322012;
  --border: #322A3D;
  --border-strong: #4A3F58;
  --text: #F5F0F7;
  --text-dim: #B5A9BF;
  --text-faint: #82768E;
  --accent: #FF9A3D;
  --accent-2: #FF4D90;
  --accent-ink: #1A1208;
  --ok: #4ADE9B;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-sel: 0 2px 6px rgba(255, 154, 61, .22), 0 12px 30px rgba(255, 154, 61, .14);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 12% 0%, var(--bg-glow-1), transparent 70%),
    radial-gradient(55% 45% at 90% 12%, var(--bg-glow-2), transparent 70%),
    radial-gradient(70% 40% at 50% 100%, var(--bg-glow-1), transparent 75%);
}

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

h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: -.01em; }

/* ---------- Botón de tema ---------- */
.theme-toggle {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 60;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: color .2s, border-color .2s, transform .2s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--border-strong); transform: translateY(-1px); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ---------- Topbar ---------- */
.topbar {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  text-align: center;
  padding: 9px 44px;
  font-size: .85rem;
  font-weight: 600;
}
.topbar p { margin: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 20px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand__logo { width: 40px; height: 40px; border-radius: 50%; display: block; }
.brand__name { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.site-nav { display: flex; gap: 20px; margin-left: auto; }
.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
}
.site-nav a:hover { color: var(--accent); }
.header-cta { white-space: nowrap; }
@media (max-width: 760px) {
  .site-nav { display: none; }
  .site-header__inner { gap: 10px; }
  .header-cta { font-size: .8rem; padding: 9px 14px; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: .98rem;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  line-height: 1.1;
}
.btn--primary { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: var(--shadow-sel); }
.btn--primary:hover { transform: translateY(-2px); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn--outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--outline:hover { background: var(--surface-sel); }
.btn--sm { padding: 9px 16px; font-size: .85rem; }
.btn--lg { padding: 16px 26px; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Page / Hero ---------- */
.page { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.hero {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 0 48px;
}
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero__title {
  font-size: clamp(2.3rem, 6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
}
.hero__title .hl {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  margin: 20px auto 0;
  max-width: 58ch;
  color: var(--text-dim);
  font-size: 1.05rem;
}
.hero__badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 26px 0 0; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: .82rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.badge--accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--surface-sel); }
.hero__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

/* ---------- Secciones ---------- */
.section { padding: 56px 0; }
.section--surface { background: var(--surface-2); border-radius: 28px; margin: 0 8px 56px; padding: 48px 24px; }
.section__title {
  text-align: center;
  font-size: clamp(1.6rem, 3.6vw, 2.1rem);
  font-weight: 800;
}
.section__lead {
  text-align: center;
  color: var(--text-dim);
  max-width: 56ch;
  margin: 10px auto 0;
}

/* ---------- Carrusel de videos ---------- */
.section--tight { padding-top: 8px; }
.carousel { position: relative; margin-top: 28px; }
.carousel__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 4px 8px;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide {
  flex: 0 0 min(260px, 72%);
  scroll-snap-align: center;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  aspect-ratio: 9 / 16;
}
.carousel__slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
}
.carousel__btn:hover { color: var(--accent); border-color: var(--accent); }
.carousel__btn--prev { left: -8px; }
.carousel__btn--next { right: -8px; }
.carousel__btn:disabled { opacity: .35; cursor: default; }
.carousel__counter { text-align: center; color: var(--text-faint); font-size: .85rem; margin: 10px 0 0; font-weight: 600; }
@media (min-width: 900px) {
  .carousel__slide { flex-basis: 280px; }
}
@media (max-width: 480px) {
  .carousel__btn { width: 36px; height: 36px; font-size: 1.2rem; }
  .carousel__btn--prev { left: 0; }
  .carousel__btn--next { right: 0; }
}

/* ---------- Beneficios ---------- */
.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 36px;
}
.benefit {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  text-align: center;
}
.benefit__icon { font-size: 2rem; margin-bottom: 10px; }
.benefit h3 { font-size: 1.05rem; margin-bottom: 8px; }
.benefit p { margin: 0; color: var(--text-dim); font-size: .92rem; }
@media (max-width: 760px) { .benefits { grid-template-columns: 1fr; } }

/* ---------- Cursos ---------- */
.courses {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 36px;
}
.course {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.course:hover { transform: translateY(-3px); box-shadow: var(--shadow-sel); border-color: var(--border-strong); }
.course__head { display: flex; align-items: center; gap: 12px; }
.course__icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.course__title { font-size: 1.15rem; margin: 0 0 2px; }
.course__tag { margin: 0; color: var(--text-faint); font-size: .82rem; }
.course__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; color: var(--text-dim); font-size: .9rem; }
.course__price { display: flex; flex-direction: column; gap: 4px; }
.course__price .price__promo { font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--accent); }
.course__price .price__note { color: var(--text-dim); font-size: .84rem; }
.course__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.course__actions .btn { flex: 1; }
@media (max-width: 820px) { .courses { grid-template-columns: 1fr; } }

/* ---------- Inscripción ---------- */
.enroll { max-width: 680px; margin: 36px auto 0; display: flex; flex-direction: column; gap: 22px; }
.enroll__checks { display: flex; flex-direction: column; gap: 12px; }

.check {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.check:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
  transition: background .15s ease, border-color .15s ease;
}
.check__box::after {
  content: "✓";
  color: #fff;
  font-size: .8rem;
  font-weight: 900;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .12s ease, transform .12s ease;
}
.check input:checked + .check__box {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-color: transparent;
}
.check input:checked + .check__box::after { opacity: 1; transform: scale(1); }
.check:has(input:checked) { border-color: var(--accent); background: var(--surface-sel); }
.check input:focus-visible + .check__box { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.check__body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.check__title { font-family: var(--display); font-weight: 700; font-size: .98rem; }
.check__sub { color: var(--text-faint); font-size: .78rem; }
.check__price { font-family: var(--display); font-weight: 800; color: var(--accent); white-space: nowrap; font-size: .92rem; text-align: right; }

.enroll__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-weight: 700; font-size: .88rem; color: var(--text-dim); }
.field__input {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--body);
  font-size: .95rem;
  color: var(--text);
  box-shadow: var(--shadow);
}
.field__input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; border-color: var(--accent); }
@media (max-width: 600px) { .enroll__grid { grid-template-columns: 1fr; } }

.enroll__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.enroll__total-main { display: flex; flex-direction: column; gap: 2px; }
.enroll__total-label { font-weight: 700; color: var(--text-dim); }
.enroll__total-hint { font-size: .8rem; color: var(--text-faint); }
.enroll__total-amount { font-family: var(--display); font-weight: 800; font-size: 1.5rem; color: var(--accent); }

.enroll__error { color: var(--accent-2); font-weight: 700; font-size: .88rem; text-align: center; margin: 0; }
.enroll__note { text-align: center; color: var(--text-faint); font-size: .8rem; margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 40px 20px 60px;
  color: var(--text-faint);
  font-size: .85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.site-footer .brand__logo { margin-bottom: 4px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--text-dim); text-decoration: none; border-bottom: 1px solid var(--border-strong); }
.site-footer a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Modal de temario ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 16, 25, .55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 24px; }
}
.modal-overlay[hidden] { display: none; }

.modal {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-sel);
}
@media (min-width: 640px) { .modal { border-radius: 20px; } }

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
  cursor: pointer;
  font-size: .95rem;
  display: grid;
  place-items: center;
}
.modal__close:hover { color: var(--accent); border-color: var(--accent); }
.modal__title { font-size: 1.25rem; padding-right: 36px; margin-bottom: 18px; }
.modal__hours {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--body);
  font-size: .68rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface-sel);
  border-radius: 999px;
  padding: 3px 9px;
  vertical-align: middle;
}
.modal__body { display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px; }
.syl h4 { font-size: .95rem; color: var(--accent); margin-bottom: 6px; }
.syl ul { margin: 0; padding-left: 18px; color: var(--text-dim); font-size: .9rem; display: flex; flex-direction: column; gap: 3px; }
.syl--extra h4 { color: var(--accent-2); }

@media (max-width: 420px) {
  .site-header__inner .header-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
