:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e7e5e4;
  --orange: #f97316;
  --orange-d: #ea580c;
  --cyan: #00b4d8;
  --cyan-soft: #e6f7fb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .05);
  --max: 1160px;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: min(var(--max), 100% - 48px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); margin-bottom: 12px; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 620px; }
.section-head { max-width: 680px; margin-bottom: 48px; }

/* Botones */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: .95rem; border: 1px solid transparent; cursor: pointer; transition: background .2s, transform .2s, box-shadow .2s, border-color .2s; font-family: inherit; }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-d); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(249, 115, 22, .25); }
.btn--ghost { border-color: var(--line); background: var(--surface); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--sm { padding: 9px 16px; font-size: .88rem; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: rgba(250, 250, 249, .85); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.header.is-scrolled { border-color: var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Outfit', 'Inter', sans-serif; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; }
.brand span { color: var(--orange); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { font-size: .93rem; color: var(--muted); transition: color .2s; }
.nav a:not(.btn):hover, .nav a.active { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s; }

/* Hero */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 96px); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero__media { position: relative; }
.hero__media img { border-radius: 20px; aspect-ratio: 4/3.4; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.hero__badge { position: absolute; left: -24px; bottom: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; font-size: .88rem; }
.hero__badge b { display: block; font-size: 1.05rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); }
.trust { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 40px; color: var(--muted); font-size: .88rem; }
.trust b { color: var(--ink); font-size: 1.4rem; display: block; }

/* Tarjetas */
.grid { display: grid; gap: 20px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: border-color .25s, transform .25s, box-shadow .25s; }
.card:hover { border-color: rgba(0, 180, 216, .45); transform: translateY(-3px); box-shadow: var(--shadow); }
.card p { color: var(--muted); font-size: .94rem; margin: 0; }
.icon { width: 44px; height: 44px; border-radius: 10px; background: var(--cyan-soft); color: var(--cyan); display: grid; place-items: center; margin-bottom: 18px; }
.icon svg { width: 22px; height: 22px; }

/* Método */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step { position: relative; padding-top: 20px; border-top: 2px solid var(--line); }
.step::before { counter-increment: step; content: '0' counter(step); position: absolute; top: -14px; left: 0; background: var(--surface); padding-right: 10px; font-weight: 700; color: var(--orange); font-size: .95rem; }
.step p { color: var(--muted); font-size: .93rem; }

/* Desafíos (tabs) */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.tab { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: .9rem; color: var(--muted); cursor: pointer; transition: all .2s; }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.panel { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; animation: fade .35s ease; }
.panel[hidden] { display: none; }
.panel h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; }
.panel ul { margin: 0; padding-left: 18px; color: var(--muted); }
.panel li { margin-bottom: 6px; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Proyecto / Nosotros */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split img { border-radius: 18px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.checklist { list-style: none; padding: 0; margin: 20px 0 0; }
.checklist li { padding-left: 28px; position: relative; margin-bottom: 10px; color: var(--muted); }
.checklist li::before { content: ''; position: absolute; left: 0; top: 7px; width: 14px; height: 8px; border-left: 2px solid var(--orange); border-bottom: 2px solid var(--orange); transform: rotate(-45deg); }
.profile { display: flex; gap: 20px; align-items: center; margin-top: 28px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.profile img { width: 84px; height: 84px; min-width: 84px; max-width: 84px; border-radius: 50%; object-fit: cover; aspect-ratio: 1; border: 2px solid var(--line); flex-shrink: 0; }
.profile__info { flex: 1; min-width: 0; }
.profile b { font-size: 1.05rem; color: var(--ink); display: block; line-height: 1.3; }
.profile small { color: var(--muted); font-size: 0.86rem; display: block; margin-top: 2px; }
.profile__links { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.profile__link { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 500; color: var(--muted); padding: 5px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); transition: color .2s, border-color .2s, background .2s; text-decoration: none; line-height: 1; }
.profile__link:hover { color: var(--ink); border-color: var(--cyan); background: var(--cyan-soft); }
.profile__link svg { width: 15px; height: 15px; min-width: 15px; max-width: 15px; fill: currentColor; flex-shrink: 0; }

/* Cursos */
.course { display: flex; flex-direction: column; }
.course .meta { font-size: .82rem; color: var(--cyan); font-weight: 600; margin-bottom: 10px; }
.course p { flex: 1; margin-bottom: 20px; }
.course .btn { align-self: flex-start; }

/* Formularios */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; }
.contact__info a { color: var(--orange); font-weight: 600; }
.info-list { list-style: none; padding: 0; margin: 28px 0 0; }
.info-list li { display: flex; gap: 14px; margin-bottom: 18px; color: var(--muted); }
.info-list b { display: block; color: var(--ink); font-weight: 600; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: .95rem; background: var(--bg); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 180, 216, .15); background: #fff; }
.field textarea { resize: vertical; min-height: 110px; }
.hp { position: absolute; left: -9999px; }
.status { font-size: .9rem; min-height: 1.4em; margin: 0; }
.status.ok { color: #16a34a; }
.status.err { color: #dc2626; }

/* Modal */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(520px, 92vw); box-shadow: 0 30px 80px rgba(15, 23, 42, .25); }
dialog::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); }
dialog .form { border: 0; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; }
.dialog-head h3 { margin: 0; }
.close { background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); }

/* Footer */
.footer { padding: 48px 0 32px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.footer__inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer a:hover { color: var(--ink); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* Responsive */
@media (max-width: 980px) {
  .hero__grid, .split, .contact, .panel { grid-template-columns: 1fr; gap: 36px; }
  .grid--4, .steps { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: 1fr; }
  .hero__badge { left: 16px; }
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: 72px 0 auto; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 24px 20px; transform: translateY(-120%); transition: transform .3s ease; }
  .nav.open { transform: none; }
  .nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 14px; justify-content: center; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 600px) {
  .grid--4, .steps, .form .row { grid-template-columns: 1fr; }
  .panel, .form { padding: 24px; }
}
