@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 600 700; font-display: swap; src: url(fonts/fraunces-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 600; font-display: swap; src: url(fonts/fraunces-italic.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/inter-normal.woff2) format('woff2'); }

:root {
  --bg: #fbf8f2;
  --surface: #ffffff;
  --ink: #1d2b27;
  --muted: #5d6b66;
  --brand: #0f5c4d;
  --brand-dark: #0a4036;
  --accent: #e9805a;
  --accent-dark: #c85d37;
  --soft: #e6f0ec;
  --sand: #f3ece0;
  --line: #e3ddd0;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(15, 60, 50, .08);
  --space: clamp(72px, 10vw, 128px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.65; -webkit-font-smoothing: antialiased;
}
svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; line-height: 1.15; font-weight: 600; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

.container { width: min(1080px, 100% - 40px); margin-inline: auto; }
main > section { padding: var(--space) 0; }
main > section.alt { background: var(--surface); }
main > section.alt .feature { background: var(--bg); }
.section-head { max-width: 620px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.7rem); margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* Botones: el acento se reserva para la acción principal */
.btn {
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 1rem; font-family: inherit;
  padding: 14px 28px; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border-color: var(--brand); color: var(--brand); }
.btn-ghost:hover { background: var(--brand); color: #fff; }

/* Cabecera */
body > header {
  position: sticky; top: 0; z-index: 50; background: rgba(251,248,242,.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 700; color: var(--brand); }
.logo svg { width: 40px; height: 40px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-weight: 500; font-size: .95rem; }
.nav-links a:not(.btn):hover { color: var(--brand); }
.nav-links .nav-login { font-weight: 600; color: var(--brand); }
.nav-links .btn { padding: 10px 22px; font-size: .92rem; }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; }

/* Hero */
.hero { background: radial-gradient(circle at 85% 30%, var(--soft), transparent 55%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.2vw, 4rem); margin-bottom: 24px; }
.hero h1 em { color: var(--accent); font-style: italic; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 500px; margin-bottom: 36px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-art {
  aspect-ratio: 1; border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
  background: linear-gradient(145deg, var(--brand), #1b8470); display: grid; place-items: center; box-shadow: var(--shadow);
}
.hero-art .paw { width: 54%; color: rgba(255,255,255,.95); }

/* Etiqueta, puntos e insignias del hero */
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); background: var(--soft); padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hero-cta { margin-bottom: 32px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .92rem; color: var(--muted); }
.hero-points li::before { content: "✓"; color: var(--brand); font-weight: 700; margin-right: 8px; }
.hero-art { position: relative; }
.badge {
  position: absolute; background: var(--surface); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow);
  font-size: .85rem; font-weight: 600; display: flex; gap: 10px; align-items: center;
}
.badge small { display: block; font-weight: 400; color: var(--muted); font-size: .75rem; }
.badge.b1 { top: 8%; left: -6%; }
.badge.b2 { bottom: 10%; right: -4%; max-width: 230px; }
.badge .dot { width: 34px; height: 34px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 1.1rem; flex: none; }

/* Franja de datos */
main > section.stats { padding: 0; margin-top: -48px; position: relative; z-index: 2; }
.stats-box {
  background: var(--brand-dark); color: #fff; border-radius: var(--radius); padding: 34px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; box-shadow: var(--shadow);
}
.stats-box strong { display: block; font-family: 'Fraunces', serif; font-size: 2.3rem; color: #ffd9c8; line-height: 1.2; }
.stats-box span { font-size: .9rem; opacity: .85; }

/* Para quién: tarjetas suaves */
.audience { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.audience li { background: var(--soft); border-radius: var(--radius); padding: 28px 24px; transition: transform .2s, box-shadow .2s; }
.audience li:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.audience .ico { font-size: 2rem; display: block; margin-bottom: 12px; }
.audience h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--brand-dark); }
.audience p { font-size: .94rem; color: var(--muted); }

/* Por qué: tarjetas con icono */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.feature .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 18px; }
.feature h3 { font-size: 1.25rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: .96rem; }

/* Cursos */
.courses { background: var(--sand); }
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: stretch; }
.course {
  background: var(--surface); border: 2px solid transparent; box-shadow: var(--shadow); border-radius: var(--radius); padding: 36px 30px;
  display: flex; flex-direction: column; position: relative;
}
.course.featured { border-color: var(--accent); }
.course .tag {
  position: absolute; top: -14px; left: 30px; background: var(--accent); color: #fff;
  font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px;
}
.course .emoji { font-size: 2.4rem; margin-bottom: 12px; }
.course h3 { font-size: 1.55rem; margin-bottom: 10px; }
.course .sub { color: var(--muted); margin-bottom: 22px; }
.checks { margin-bottom: 22px; flex: 1; }
.checks li { padding: 6px 0 6px 28px; position: relative; font-size: .95rem; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 10px; height: 6px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
.course details { border-top: 1px solid var(--line); margin-bottom: 24px; }
.course summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: .92rem; color: var(--brand); list-style: none; display: flex; justify-content: space-between; }
.course summary::-webkit-details-marker { display: none; }
.course summary::after { content: "+"; font-size: 1.3rem; line-height: 1; }
.course details[open] summary::after { content: "–"; }
.course ol { counter-reset: m; padding-bottom: 8px; }
.course ol li { counter-increment: m; display: flex; gap: 12px; padding: 7px 0; font-size: .9rem; color: var(--muted); }
.course ol li::before { content: counter(m); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--soft); color: var(--brand); font-weight: 600; font-size: .75rem; display: grid; place-items: center; }

/* Pasos */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--soft); border-radius: var(--radius); padding: 26px; }
.steps li::before { content: "0" counter(s); font-family: 'Fraunces', serif; font-size: 2.4rem; color: var(--accent); display: block; margin-bottom: 8px; }
.steps h3 { font-size: 1.2rem; margin-bottom: 6px; }
.steps p { font-size: .95rem; color: var(--muted); }

/* FAQ */
.faq { max-width: 760px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; padding: 2px 22px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 20px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 20px; }

/* Contacto */
.contact { background: var(--brand-dark); color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.contact h2 { font-size: clamp(2rem, 4vw, 2.7rem); margin-bottom: 16px; }
.contact-grid > div > p { opacity: .85; font-size: 1.08rem; }
form { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 32px; display: grid; gap: 16px; }
label { font-size: .85rem; font-weight: 600; display: grid; gap: 6px; }
input, select, textarea { font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: transparent; }
.form-note { font-size: .78rem; color: var(--muted); }
#form-ok { display: none; color: var(--brand); font-weight: 600; }

footer { background: #082e27; color: rgba(255,255,255,.7); padding: 36px 0; font-size: .9rem; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; align-items: center; }
footer .logo { color: #fff; font-size: 1.25rem; }

@media (max-width: 900px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-art { max-width: 320px; margin: 0 auto; order: -1; }
  .features, .course-grid { grid-template-columns: 1fr; gap: 24px; }
  .audience, .steps, .stats-box { grid-template-columns: 1fr 1fr; }
  .badge.b1 { left: 0; }
  .badge.b2 { right: 0; }
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0; background: var(--bg); flex-direction: column;
    padding: 24px; gap: 18px; border-bottom: 1px solid var(--line); display: none;
  }
  .nav-links.open { display: flex; }
}
@media (max-width: 520px) {
  .audience, .steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Cuenta y acceso */
.auth-wrap { min-height: calc(100vh - 72px - 100px); display: grid; place-items: center; padding: 56px 0; background: radial-gradient(circle at 85% 20%, var(--soft), transparent 55%); }
.auth-card { width: min(440px, 100% - 40px); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; }
.auth-card h1 { font-size: 1.9rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 24px; }
.auth-card form { padding: 0; box-shadow: none; background: none; }
.tabs { display: flex; gap: 6px; background: var(--bg); border-radius: 999px; padding: 4px; margin-bottom: 24px; }
.tabs button { flex: 1; border: 0; background: none; padding: 10px; border-radius: 999px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--brand); box-shadow: 0 2px 8px rgba(15,60,50,.1); }
.link-btn { background: none; border: 0; color: var(--brand); font: inherit; font-size: .9rem; cursor: pointer; text-decoration: underline; padding: 0; }
.msg { font-size: .92rem; border-radius: 10px; padding: 10px 14px; display: none; }
.msg.show { display: block; }
.msg.err { background: #fdecea; color: #a12a1b; }
.msg.ok { background: var(--soft); color: var(--brand-dark); }
.dash { padding: 56px 0 var(--space); }
.dash h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 8px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.panel h2 { font-size: 1.3rem; margin-bottom: 14px; }
.panel form { padding: 0; box-shadow: none; background: none; }
.panel.wide { grid-column: 1 / -1; }
.banner { background: #fff4e5; border: 1px solid #f2d3a1; color: #7a4b00; border-radius: 12px; padding: 14px 18px; margin: 20px 0 0; display: none; }
.banner.show { display: block; }
.empty { color: var(--muted); }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
