/* Club Opciones — clean and serious (PRD: "fondo claro sobrio, un color de acento, nada de Lamborghinis").
   Warm off-white background, deep green ink, one green accent. Plus Jakarta Sans headlines, Inter body. Mobile first. */

:root {
  --bg: #F7F7F4;
  --surface: #FFFFFF;
  --soft: #EEF3EF;
  --line: #DDE3DE;
  --ink: #0F2A20;
  --text: #22302A;
  --muted: #56645D;
  --accent: #0B7A55;
  --accent-dark: #075C40;
  --accent-soft: #DCEFE5;
  --warn-bg: #FFF6E5;
  --warn-line: #F0D9A8;
  --error: #B42318;

  --display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1120px;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(15 42 32 / .06), 0 8px 24px rgb(15 42 32 / .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--display); line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4.2vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 1.2em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.eyebrow { color: var(--accent); font-weight: 700; font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.lede { font-size: clamp(1.1rem, 2.6vw, 1.3rem); color: var(--muted); margin-top: 16px; max-width: 40ch; }
.fine { color: var(--muted); font-size: .875rem; }
.stack > * + * { margin-top: 16px; }

/* Buttons: big touch targets (PRD: "botones grandes"). */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 14px 24px; border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1.2 var(--body); text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-small { min-height: 42px; padding: 8px 18px; font-size: .9375rem; }
.btn[disabled] { opacity: .6; cursor: wait; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; }

/* Header */
.nav { position: sticky; top: 0; z-index: 50; background: rgb(247 247 244 / .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 1.15rem/1 var(--display); letter-spacing: -.01em; }
.logo img { width: 34px; height: 34px; }
.menu-toggle { display: none; }
.menu { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; padding: 0 0 12px; margin: 0; width: 100%; }
.menu a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .9375rem; padding: 6px 0; display: inline-block; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--accent-dark); }
.menu a[aria-current="page"] { font-weight: 700; }
.menu .menu-cta { display: none; }
.nav-cta { display: none; }

/* With JS on phones the menu folds behind a button. */
.js .menu-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin-right: -8px;
  background: none; border: 0; color: var(--ink); cursor: pointer; border-radius: 10px;
}
.js .menu { display: none; }
.js .nav.open .menu { display: flex; flex-direction: column; gap: 0; padding: 4px 0 16px; }
.js .nav.open .menu a { padding: 12px 0; font-size: 1.0625rem; width: 100%; border-bottom: 1px solid var(--line); }
.js .nav.open .menu .menu-cta { display: block; margin-top: 16px; }
.js .nav.open .menu .menu-cta a { border: 0; color: #fff; justify-content: center; }

@media (min-width: 900px) {
  .nav-inner { flex-wrap: nowrap; }
  .js .menu-toggle { display: none; }
  .menu, .js .menu { display: flex; width: auto; padding: 0; gap: 26px; flex-direction: row; }
  .nav-cta { display: inline-flex; }
}

/* Sections */
section { padding: clamp(56px, 9vw, 96px) 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { color: var(--muted); margin-top: 12px; }
.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.page-hero { padding-bottom: clamp(32px, 5vw, 56px); }

/* Hero */
.hero { padding-top: clamp(40px, 7vw, 80px); }
.hero-inner { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.1fr .9fr; gap: 56px; } }
.hero h1 { max-width: 16ch; }
.hero-visual { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); }
.hero-visual figcaption { color: var(--muted); font-size: .875rem; margin-top: 12px; }
.payoff { width: 100%; height: auto; }

/* Cards and grids */
.grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 20px; } .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.alt .card { background: var(--bg); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); }
.card .link-arrow { display: inline-block; margin-top: 14px; }
.card-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; margin-bottom: 16px; }
.card-icon svg { width: 22px; height: 22px; }
a.card { display: block; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { a.card:hover { transform: none; } }

.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 32px; }
.checks li + li { margin-top: 12px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23075C40' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.crosses li::before {
  background: #F6E3E1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6.5 6.5l7 7m0-7l-7 7' fill='none' stroke='%23B42318' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/16px no-repeat;
}

/* About teaser */
.about { display: grid; gap: 28px; align-items: center; }
@media (min-width: 720px) { .about { grid-template-columns: 220px 1fr; gap: 40px; } }
.portrait { width: 100%; max-width: 220px; aspect-ratio: 1; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent-dark); overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait svg { width: 45%; height: 45%; }

/* YouTube: thumbnail first, the player only after a tap (RF6, and no YouTube cookies until then). */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--ink); }
.video button, .video a.video-fallback { all: unset; position: absolute; inset: 0; cursor: pointer; display: grid; place-items: center; }
.video a.video-fallback { color: #fff; font-weight: 600; text-align: center; padding: 16px; text-decoration: underline; text-underline-offset: 4px; }
.video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video .play { position: relative; width: 68px; height: 48px; border-radius: 14px; background: rgb(0 0 0 / .72); display: grid; place-items: center; transition: background-color .15s; }
.video button:hover .play, .video button:focus-visible .play { background: #CC0000; }
.video button:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-title { margin-top: 12px; font-weight: 600; color: var(--ink); font-size: 1rem; }

/* Social proof */
.stat { font: 800 clamp(2.4rem, 7vw, 3.5rem)/1 var(--display); color: var(--accent-dark); }
blockquote { margin: 0; }
.quote p { color: var(--text); font-size: 1.0625rem; }
.quote footer { margin-top: 14px; color: var(--muted); font-size: .9rem; }

/* Email forms (RF1) */
.signup { background: var(--ink); color: #E6EEE9; border-radius: 22px; padding: clamp(28px, 5vw, 56px); }
.signup h2, .signup h3 { color: #fff; }
.signup p { color: #BFD0C7; }
.signup .fine { color: #A9BCB2; }
.signup a { color: #fff; }
.form { display: grid; gap: 14px; margin-top: 24px; max-width: 520px; }
.field label { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: 6px; }
.field .opt { font-weight: 400; opacity: .75; }
.form input[type="text"], .form input[type="email"], .form textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: 400 1rem/1.4 var(--body);
}
.form textarea { min-height: 140px; resize: vertical; }
.signup .form input[type="text"], .signup .form input[type="email"] { border-color: transparent; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .875rem; line-height: 1.5; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.signup .btn-primary { background: #3FBF8A; color: var(--ink); }
.signup .btn-primary:hover { background: #63D4A4; }
.form-msg { min-height: 1.5em; font-weight: 600; }
.form-msg.error { color: #FFB4AB; }
.form-msg.ok { color: #9BE7C4; }
.light-form .form-msg.error { color: var(--error); }
.light-form .form-msg.ok { color: var(--accent-dark); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .signup-grid { grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; } .signup-grid .form { margin-top: 0; } }

/* Course and community state switch (RF8). config.js sets data-curso / data-comunidad on <html>. */
[data-curso="espera"] .curso-abierto, [data-curso="abierto"] .curso-espera,
[data-comunidad="espera"] .comunidad-abierta, [data-comunidad="abierta"] .comunidad-espera { display: none !important; }

/* Course syllabus */
.modules { counter-reset: mod; list-style: none; padding: 0; display: grid; gap: 12px; }
.modules li { counter-increment: mod; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 18px 68px; position: relative; }
.modules li::before { content: counter(mod, decimal-leading-zero); position: absolute; left: 20px; top: 18px; font: 800 1.1rem/1.4 var(--display); color: var(--accent); }
.modules strong { color: var(--ink); display: block; }
.modules span { color: var(--muted); font-size: .9375rem; }
.badge { display: inline-block; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; font-size: .8125rem; padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }

/* Rules / notices */
.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 18px 20px; color: var(--text); }
.notice strong { color: var(--ink); }

/* Glossary */
.glossary { display: grid; gap: 0; margin: 0; }
@media (min-width: 720px) { .glossary { grid-template-columns: 220px 1fr; } }
.glossary dt { font-weight: 700; color: var(--ink); padding: 14px 0 0; }
.glossary dd { margin: 0; padding: 4px 0 14px; color: var(--muted); border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .glossary dt { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); } .glossary dd { padding: 16px 0; } }
.glossary dt span { display: block; font-weight: 400; color: var(--muted); font-size: .875rem; }

/* Learning path */
.path { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 12px; }
.path li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.path li::before { content: counter(step); width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; font-weight: 800; }
.path .level { font-size: .8125rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.path a { font-weight: 600; color: var(--ink); }

/* Prose pages (legal, about) */
.prose { max-width: 720px; }
.prose h2 { font-size: 1.4rem; margin: 40px 0 12px; }
.prose h3 { margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol { margin-top: 14px; }
.prose li + li { margin-top: 6px; }
.todo { background: #FFF1B8; padding: 0 4px; border-radius: 4px; }

/* Footer */
.footer { background: var(--ink); color: #BFD0C7; padding: 56px 0 32px; font-size: .9375rem; }
.footer a { color: #E6EEE9; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer .logo { color: #fff; }
.footer .logo img { border-radius: 9px; box-shadow: 0 0 0 1px rgb(255 255 255 / .25); }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer h2 { color: #fff; font: 700 .8125rem/1.4 var(--body); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.footer ul { list-style: none; padding: 0; }
.footer li + li { margin-top: 8px; }
.footer-about { margin-top: 14px; max-width: 34ch; }
.disclaimer { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgb(255 255 255 / .12); font-size: .8125rem; line-height: 1.6; color: #A9BCB2; }
.disclaimer strong { color: #E6EEE9; }
.copy { margin-top: 16px; font-size: .8125rem; color: #8FA399; }
.link-btn { all: unset; cursor: pointer; color: #E6EEE9; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 3px solid #3FBF8A; outline-offset: 3px; }

/* Cookie banner: only shown when an analytics tool that sets cookies (GA4) is switched on in config.js. */
.cookies {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 80; max-width: 560px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 12px 40px rgb(15 42 32 / .2);
  font-size: .9375rem;
}
.cookies[hidden] { display: none; }
.cookies .actions { margin-top: 16px; }
.cookies .btn { flex: 1 1 140px; min-height: 46px; padding: 10px 18px; }

/* Simple centred pages (gracias, 404) */
.center-page { min-height: 60vh; display: grid; align-items: center; text-align: center; }
.center-page .lede { margin-left: auto; margin-right: auto; }
.center-page .actions { justify-content: center; }

/* Spacing helpers */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.signup .eyebrow { color: #7FD8B0; }
.signup h2 + p { margin-top: 14px; }
.signup .link-arrow { color: #fff; }
