*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:         #732F16;
  --cream:       #f7f3ed;
  --warm:        #e8ddd0;
  --gold:        #D9A23D;
  --saddle-light:#BF7D2C;
  --saddle:      #A65F21;
  --saddle-dark: #A6511F;
  --muted:       #8a7d72;
  --border:      rgba(115,47,22,0.12);
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
}

/* ─────────────────────────────────────────────────
   NAV — transparent until scroll, then cream
───────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 0.5px solid transparent;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.38s ease, border-color 0.38s ease, box-shadow 0.38s ease;
}
nav.scrolled {
  background: rgba(247,243,237,0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 28px rgba(115,47,22,0.07);
}

/* Transparent state: cream text over dark hero */
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 500;
  color: rgba(247,243,237,0.9);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.35s;
}
.nav-logo span { color: var(--gold); }
nav.scrolled .nav-logo { color: var(--ink); }

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-link {
  font-size: 13px;
  font-weight: 400;
  color: rgba(247,243,237,0.62);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-link:hover { color: rgba(247,243,237,0.95); background: rgba(247,243,237,0.09); }
.nav-link.active { color: rgba(247,243,237,0.95); font-weight: 500; }
nav.scrolled .nav-link { color: var(--muted); }
nav.scrolled .nav-link:hover { color: var(--ink); background: var(--warm); }
nav.scrolled .nav-link.active { color: var(--ink); }

.nav-cta {
  font-size: 13px;
  font-weight: 500;
  color: #f5e6d3;
  background: var(--saddle);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 6px;
  transition: background 0.15s;
  margin-left: 6px;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--saddle-dark); }

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: rgba(247,243,237,0.85);
  transition: color 0.3s;
}
nav.scrolled .nav-mobile-toggle { color: var(--ink); }

.nav-drawer {
  display: none;
  position: fixed;
  top: 56px; left: 0; right: 0;
  background: var(--cream);
  border-bottom: 0.5px solid var(--border);
  box-shadow: 0 8px 24px rgba(115,47,22,0.08);
  padding: 1rem 1.5rem;
  flex-direction: column;
  gap: 4px;
  z-index: 99;
}
.nav-drawer.open { display: flex; }
.nav-drawer .nav-link { font-size: 15px; padding: 10px 12px; color: var(--muted); }
.nav-drawer .nav-link:hover { color: var(--ink); background: var(--warm); }
.nav-drawer .nav-link.active { color: var(--ink); }
.nav-drawer .nav-cta { text-align: center; padding: 11px; margin: 8px 0 0; }

/* ─────────────────────────────────────────────────
   GRAIN TEXTURE — applied to dark hero sections
   via ::after on .curso-hero and .hero
───────────────────────────────────────────────── */
.curso-hero::after,
.hero-grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.038;
  mix-blend-mode: overlay;
}

/* ─────────────────────────────────────────────────
   PAGE-LOAD STAGGER ANIMATIONS
───────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-1 { animation: fadeUp 0.75s cubic-bezier(0.22,1,0.36,1) both; }
.anim-2 { animation: fadeUp 0.75s cubic-bezier(0.22,1,0.36,1) 0.12s both; }
.anim-3 { animation: fadeUp 0.75s cubic-bezier(0.22,1,0.36,1) 0.24s both; }
.anim-4 { animation: fadeUp 0.75s cubic-bezier(0.22,1,0.36,1) 0.36s both; }

/* ─────────────────────────────────────────────────
   SCROLL REVEAL
───────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* ─────────────────────────────────────────────────
   GHOST SECTION NUMBERS — editorial depth
───────────────────────────────────────────────── */
.section-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 110px;
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
  opacity: 0.07;
  position: absolute;
  top: -0.25em;
  left: -0.08em;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
}

/* ─────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────── */
footer {
  border-top: 0.5px solid var(--border);
  padding: 3rem 1.5rem 2.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand { font-family: 'Cormorant Garamond', serif; font-size: 19px; font-weight: 500; margin-bottom: 6px; }
.footer-brand span { color: var(--gold); }
.footer-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }
.footer-title { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 12px; }
.footer-links { display: flex; flex-direction: column; gap: 7px; }
.footer-links a { font-size: 13px; color: var(--ink); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--saddle); }
.footer-bottom {
  border-top: 0.5px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.footer-bottom a { color: var(--muted); text-decoration: none; }

/* ─────────────────────────────────────────────────
   SECTION UTILITIES
───────────────────────────────────────────────── */
.section-label {
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::after { content: ''; flex: 1; height: 0.5px; background: var(--border); }

.main-wrap { max-width: 720px; margin: 0 auto; padding: 3.5rem 1.5rem 5.5rem; }

/* ─────────────────────────────────────────────────
   CURSO HERO — shared across course pages
───────────────────────────────────────────────── */
.curso-hero {
  color: var(--cream);
  /* Extra top padding absorbs the nav overlap (margin-top: -56px) */
  padding: calc(5rem + 56px) 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: -56px; /* slides hero behind transparent nav */
}
/* Gradient overlay */
.curso-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(166,95,33,0.22) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}
/* Grain (::after defined above) */
/* Hero content must sit above grain/gradient */
.curso-hero > * { position: relative; z-index: 2; }

.curso-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 400;
  line-height: 1.0;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.curso-hero h1 em { font-style: italic; }

.curso-hero-sub {
  font-size: 15px;
  opacity: 0.62;
  max-width: 460px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.curso-meta-strip {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.curso-meta-item { text-align: center; }
.curso-meta-item .lbl {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.42;
  display: block;
  margin-bottom: 3px;
}
.curso-meta-item .val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 500;
}

/* ─────────────────────────────────────────────────
   MODULE ACCORDION
───────────────────────────────────────────────── */
.modulo-list { margin-bottom: 2rem; }

.modulo {
  border: 0.5px solid var(--border);
  border-left: 2px solid transparent;
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
  background: white;
  transition: border-left-color 0.2s;
}
/* Gold accent on open — modern CSS :has() */
.modulo:has(.modulo-items.open) {
  border-left-color: var(--gold);
}

.modulo-header {
  display: flex; align-items: center; gap: 10px;
  padding: 0.9rem 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}
.modulo-header:hover { background: var(--cream); }
.modulo-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.modulo-name { font-size: 14px; font-weight: 500; flex: 1; }
.modulo-horas { font-size: 12px; color: var(--muted); }
.modulo-arrow { font-size: 10px; color: var(--muted); transition: transform 0.18s; }
.modulo-arrow.open { transform: rotate(90deg); }

.modulo-items {
  display: none;
  padding: 0.25rem 1.25rem 1rem 2.5rem;
  border-top: 0.5px solid var(--border);
  background: var(--cream);
}
.modulo-items.open { display: block; }

.modulo-item {
  font-size: 13px;
  color: var(--muted);
  padding: 5px 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.5;
}
.modulo-item::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  position: relative;
  top: -1px;
}

/* ─────────────────────────────────────────────────
   PRICE BLOCK — editorial dark card
───────────────────────────────────────────────── */
.price-block {
  background: var(--ink);
  border-radius: 16px;
  padding: 2.25rem;
  color: var(--cream);
  margin-bottom: 2rem;
}
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 1rem; }
.price-opt {
  border: 1.5px solid rgba(247,243,237,0.12);
  border-radius: 10px;
  padding: 1.25rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.price-opt:hover { border-color: rgba(247,243,237,0.3); background: rgba(247,243,237,0.04); }
.price-opt.sel { border-color: var(--gold); }

.price-opt-badge {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.price-opt-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 5px;
  letter-spacing: -0.02em;
}
.price-opt-sub {
  font-size: 11px;
  opacity: 0.48;
  letter-spacing: 0.02em;
}

/* ─────────────────────────────────────────────────
   CTA BUTTON
───────────────────────────────────────────────── */
.cta-wpp {
  width: 100%;
  background: var(--saddle);
  color: #f5e6d3;
  border: none;
  border-radius: 8px;
  padding: 15px;
  font-size: 15px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 1.25rem;
  letter-spacing: 0.025em;
}
.cta-wpp:hover { background: var(--saddle-dark); }
.cta-wpp.loading { background: var(--muted); pointer-events: none; }

/* ─────────────────────────────────────────────────
   BONUS BLOCK
───────────────────────────────────────────────── */
.bonus-block {
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  background: white;
}
.bonus-list { display: flex; flex-direction: column; gap: 8px; margin-top: 0.75rem; }
.bonus-item {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--muted); line-height: 1.4;
}
.bonus-check {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--saddle);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.bonus-check svg { width: 9px; height: 9px; }

/* ─────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────── */
@media (max-width: 580px) {
  .nav-links, .nav-cta { display: none; }
  .nav-mobile-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .price-grid { grid-template-columns: 1fr; }
  .curso-meta-strip { gap: 1.5rem; }
  .price-opt-val { font-size: 30px; }
  .section-num { font-size: 72px; }
}
