/* ============================================================
   XAU/USD Masterclass — Stylesheet Principal
   Dark mode institucional — Acentos dorados #d4af37
   Tipografia: Cormorant Garamond (display) + DM Sans (body)
   ============================================================ */

/* ---- RESET & BASE ---------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Gold palette */
  --gold:           #d4af37;
  --gold-light:     #e8cc6a;
  --gold-dim:       #9b7c25;
  --gold-faint:     rgba(212, 175, 55, 0.08);
  --gold-border:    rgba(212, 175, 55, 0.22);
  --gold-border-hv: rgba(212, 175, 55, 0.55);

  /* Dark surfaces */
  --bg-base:        #0a0a0c;
  --bg-1:           #0f0f12;
  --bg-2:           #141418;
  --bg-3:           #1a1a1f;
  --bg-4:           #222228;
  --bg-hover:       #2a2a32;

  /* Text */
  --text-1:         #f0ede5;
  --text-2:         #b8b4aa;
  --text-3:         #7a776f;
  --text-4:         #4e4c47;

  /* Borders */
  --border:         rgba(255, 255, 255, 0.06);
  --border-md:      rgba(255, 255, 255, 0.1);

  /* Level accents */
  --base-color:     #4a9eca;
  --base-bg:        rgba(74, 158, 202, 0.1);
  --inter-color:    #d4af37;
  --inter-bg:       rgba(212, 175, 55, 0.1);
  --adv-color:      #c05d45;
  --adv-bg:         rgba(192, 93, 69, 0.1);
  --inst-color:     #8b7dd8;
  --inst-bg:        rgba(139, 125, 216, 0.1);

  /* Typography */
  --font-display:   'Cormorant Garamond', Georgia, serif;
  --font-body:      'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --container-max:  1200px;
  --section-pad:    7rem;

  /* Transitions */
  --ease:           cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out:       cubic-bezier(0.0, 0, 0.2, 1);
  --dur-fast:       180ms;
  --dur-mid:        320ms;
  --dur-slow:       500ms;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-base);
  color: var(--text-1);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

/* ---- UTILITIES ------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: var(--section-pad) 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 4.5rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-border);
  background: var(--gold-faint);
  padding: 0.3rem 0.85rem;
  border-radius: 2px;
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.18;
  color: var(--text-1);
  margin-bottom: 1.1rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 0.975rem;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto;
}

/* ---- BUTTONS --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  padding: 0.8rem 1.75rem;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
  white-space: nowrap;
}

.btn--primary {
  background: var(--gold);
  color: #0a0a0c;
  border-color: var(--gold);
}

.btn--primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
}

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

.btn--ghost:hover {
  border-color: var(--gold-border-hv);
  color: var(--gold);
  background: var(--gold-faint);
}

/* ---- REVEAL ANIMATIONS ----------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease),
              transform var(--dur-slow) var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- NAVIGATION ------------------------------------------ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 64px;
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-mid) var(--ease),
              border-color var(--dur-mid) var(--ease);
}

.nav.nav--scrolled {
  background: rgba(10, 10, 12, 0.96);
  border-bottom-color: var(--gold-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.nav__logo-symbol {
  width: 34px;
  height: 34px;
  background: var(--gold-faint);
  border: 1px solid var(--gold-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.nav__logo-text {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-2);
  letter-spacing: 0.04em;
}

.nav__logo-text span {
  color: var(--gold);
  font-weight: 500;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav__links a {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-2);
  letter-spacing: 0.04em;
  transition: color var(--dur-fast) var(--ease);
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--dur-mid) var(--ease);
}

.nav__links a:hover {
  color: var(--gold);
}

.nav__links a:hover::after {
  width: 100%;
}

.nav__cta {
  font-size: 0.8rem !important;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--gold-border) !important;
  border-radius: 2px;
  color: var(--gold) !important;
  background: var(--gold-faint);
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease) !important;
}

.nav__cta:hover {
  background: rgba(212, 175, 55, 0.18) !important;
  border-color: var(--gold) !important;
}

.nav__cta::after {
  display: none !important;
}

.nav__hamburger {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-2);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.4rem;
}

/* ---- HERO ------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 7rem 2rem 5rem;
}

.hero__grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero__noise {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%,
    rgba(212, 175, 55, 0.06) 0%,
    transparent 70%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
}

.hero__pretitle {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 2.25rem;
  animation: fadeUp 0.8s var(--ease) 0.1s both;
}

.hero__pretitle-line {
  display: block;
  height: 1px;
  width: 40px;
  background: var(--gold-border);
  flex-shrink: 0;
}

.hero__title {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
  animation: fadeUp 0.8s var(--ease) 0.2s both;
}

.hero__title-sub {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-2);
  letter-spacing: 0.02em;
  margin-bottom: 0.3rem;
}

.hero__title-main {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7.5rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--text-1);
}

.hero__title-ticker {
  font-family: var(--font-body);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-top: 0.6rem;
}

.hero__title-sep {
  color: var(--text-3);
  margin: 0 0.05em;
}

.hero__description {
  max-width: 560px;
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 2.75rem;
  animation: fadeUp 0.8s var(--ease) 0.3s both;
}

.hero__stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2.75rem;
  animation: fadeUp 0.8s var(--ease) 0.4s both;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  padding: 0 1.75rem;
  border-right: 1px solid var(--border-md);
}

.hero__stat:first-child {
  padding-left: 0;
}

.hero__stat-num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.01em;
}

.hero__stat-label {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 0.3rem;
}

.hero__stat-divider {
  display: none;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: fadeUp 0.8s var(--ease) 0.5s both;
  flex-wrap: wrap;
}

.hero__chart-decor {
  position: absolute;
  bottom: 0;
  right: -2%;
  width: 55%;
  max-width: 700px;
  opacity: 0.5;
  pointer-events: none;
  animation: fadeIn 1.5s var(--ease) 0.6s both;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-4);
  animation: fadeIn 1s var(--ease) 1s both;
}

.hero__scroll-hint i {
  animation: bounceDown 2s ease-in-out infinite;
}

/* ---- PROPUESTA DE VALOR ---------------------------------- */
.pv {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pv__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.pv__card {
  background: var(--bg-2);
  padding: 2.25rem 2rem;
  transition: background var(--dur-mid) var(--ease);
  position: relative;
}

.pv__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background var(--dur-mid) var(--ease);
}

.pv__card:hover {
  background: var(--bg-3);
}

.pv__card:hover::before {
  background: var(--gold);
}

.pv__card-icon {
  width: 44px;
  height: 44px;
  background: var(--gold-faint);
  border: 1px solid var(--gold-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: border-color var(--dur-mid) var(--ease),
              background var(--dur-mid) var(--ease);
}

.pv__card:hover .pv__card-icon {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.15);
}

.pv__card-icon i {
  font-size: 1.1rem;
  color: var(--gold);
}

.pv__card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.pv__card-text {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.8;
}

/* ---- LEVELS ---------------------------------------------- */
.levels {
  background: var(--bg-base);
}

.levels__track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 760px;
  margin: 0 auto;
}

.levels__line {
  position: absolute;
  left: 27px;
  top: 28px;
  bottom: 28px;
  width: 1px;
  background: linear-gradient(to bottom, var(--gold-border), transparent);
}

.levels__item {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.levels__item:last-child {
  border-bottom: none;
}

.levels__node {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.levels__node--base   { background: var(--base-bg); border: 1px solid rgba(74, 158, 202, 0.35); color: var(--base-color); }
.levels__node--inter  { background: var(--inter-bg); border: 1px solid var(--gold-border); color: var(--inter-color); }
.levels__node--adv    { background: var(--adv-bg); border: 1px solid rgba(192, 93, 69, 0.35); color: var(--adv-color); }
.levels__node--inst   { background: var(--inst-bg); border: 1px solid rgba(139, 125, 216, 0.35); color: var(--inst-color); }

.levels__content {
  padding-top: 0.6rem;
}

.levels__range {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-4);
  margin-bottom: 0.4rem;
}

.levels__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.levels__text {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 540px;
}

/* ---- CURRICULUM ------------------------------------------ */
.curriculum {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
}

.curriculum__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.mod-card {
  background: var(--bg-2);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: background var(--dur-mid) var(--ease);
  position: relative;
  overflow: hidden;
}

.mod-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background var(--dur-mid) var(--ease);
}

.mod-card:hover {
  background: var(--bg-3);
}

.mod-card:hover::after {
  background: var(--gold);
}

.mod-card--featured {
  grid-column: 1 / -1;
}

.mod-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.mod-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mod-card__id {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-4);
  text-transform: uppercase;
}

.mod-card__badge {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
}

.mod-card__badge--base  { background: var(--base-bg);  color: var(--base-color); }
.mod-card__badge--inter { background: var(--inter-bg); color: var(--inter-color); }
.mod-card__badge--adv   { background: var(--adv-bg);   color: var(--adv-color); }
.mod-card__badge--inst  { background: var(--inst-bg);  color: var(--inst-color); }
.mod-card__badge--final {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
  border: 1px solid var(--gold-border);
}

.mod-card__lessons-count {
  font-size: 0.72rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.mod-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.mod-card__desc {
  font-size: 0.825rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 1.25rem;
  flex: 1;
}

.mod-card__topics {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.mod-card__topics--wide {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem 2rem;
}

.mod-card__topics li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-3);
  line-height: 1.5;
}

.mod-card__topics li i {
  font-size: 0.35rem;
  color: var(--gold-dim);
  flex-shrink: 0;
  position: relative;
  top: -1px;
}

.mod-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: auto;
  transition: color var(--dur-fast) var(--ease), gap var(--dur-fast) var(--ease);
}

.mod-card:hover .mod-card__cta {
  color: var(--gold);
  gap: 0.75rem;
}

.mod-card__cta i {
  font-size: 0.75rem;
  transition: transform var(--dur-fast) var(--ease);
}

.mod-card:hover .mod-card__cta i {
  transform: translateX(3px);
}

/* ---- DISCLAIMER ------------------------------------------ */
.disclaimer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.disclaimer__inner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
}

.disclaimer__icon {
  color: var(--text-4);
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.disclaimer__text {
  font-size: 0.78rem;
  color: var(--text-4);
  line-height: 1.75;
}

.disclaimer__text strong {
  color: var(--text-3);
  font-weight: 500;
}

/* ---- FOOTER ---------------------------------------------- */
.footer {
  background: var(--bg-base);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer__brand-text {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-4);
  letter-spacing: 0.05em;
}

.footer__copy {
  font-size: 0.72rem;
  color: var(--text-4);
}

/* ---- KEYFRAMES ------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

/* ---- RESPONSIVE ------------------------------------------ */
@media (max-width: 1024px) {
  .pv__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .curriculum__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero__chart-decor {
    opacity: 0.2;
    width: 70%;
  }
}

@media (max-width: 768px) {
  :root {
    --section-pad: 4.5rem;
  }

  .nav__links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 12, 0.98);
    border-bottom: 1px solid var(--gold-border);
    padding: 1.75rem 2rem;
  }

  .nav__links.nav__links--open {
    display: flex;
  }

  .nav__hamburger {
    display: block;
  }

  .hero__stats {
    gap: 0;
    flex-wrap: wrap;
  }

  .hero__stat {
    padding: 0 1.25rem;
  }

  .pv__grid {
    grid-template-columns: 1fr;
  }

  .curriculum__grid {
    grid-template-columns: 1fr;
  }

  .mod-card__topics--wide {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .levels__line {
    display: none;
  }

  .hero__chart-decor {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero__stat {
    padding: 0 0.9rem;
  }

  .hero__stat-num {
    font-size: 1.8rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    justify-content: center;
  }
}