/* ============================================================
   FormaMás — rediseño
   Sistema: Plus Jakarta Sans · corporativo cálido
   3 paletas intercambiables vía [data-palette] en <html>
   ============================================================ */

:root {
  /* type */
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;

  /* spacing rhythm */
  --pad-x: clamp(20px, 5vw, 96px);
  --section-y: clamp(72px, 9vw, 140px);
  --radius: 18px;
  --radius-lg: 28px;
  --maxw: 1240px;

  /* default palette = Confianza (azul + coral) */
  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --ink: #15233a;
  --ink-soft: #3a4a63;
  --muted: #6a7a90;
  --line: #e7e3db;
  --brand: #143c63;
  --brand-2: #0e2a47;
  --on-brand: #ffffff;
  --accent: oklch(0.68 0.16 42);      /* coral */
  --accent-ink: oklch(0.45 0.13 42);
  --accent-soft: oklch(0.95 0.04 42);
  --hero-tint: 12, 33, 56;
}

html[data-palette="sur"] {
  --bg: #f7f7f2;
  --surface: #ffffff;
  --surface-2: #eef0e9;
  --ink: #15302a;
  --ink-soft: #354b44;
  --muted: #5f7268;
  --line: #e2e3d8;
  --brand: #1b5d52;
  --brand-2: #103f37;
  --on-brand: #ffffff;
  --accent: oklch(0.7 0.13 70);       /* sand/amber */
  --accent-ink: oklch(0.5 0.11 70);
  --accent-soft: oklch(0.95 0.035 80);
  --hero-tint: 16, 56, 48;
}

html[data-palette="sobrio"] {
  --bg: #f6f5f3;
  --surface: #ffffff;
  --surface-2: #ecebe7;
  --ink: #1d242e;
  --ink-soft: #3d4654;
  --muted: #6c7480;
  --line: #e5e3de;
  --brand: #2c3a4c;
  --brand-2: #1d2733;
  --on-brand: #ffffff;
  --accent: oklch(0.68 0.13 58);      /* warm amber */
  --accent-ink: oklch(0.48 0.11 58);
  --accent-soft: oklch(0.95 0.035 65);
  --hero-tint: 24, 33, 44;
}

/* ----------------------------------------------------------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

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

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head h2 {
  font-size: clamp(30px, 4vw, 46px);
  margin-top: 16px;
  color: var(--ink);
}
.section-head p { margin-top: 18px; color: var(--muted); font-size: 18px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(4px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px -12px var(--accent);
}
.btn-primary:hover { transform: translateY(-2px); filter: saturate(1.05); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--surface); }

.btn-on-dark {
  background: #fff;
  color: var(--brand-2);
}
.btn-on-dark:hover { transform: translateY(-2px); }

/* =================== HEADER =================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-header.scrolled { border-color: var(--line); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
}
.brand .mark {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  color: #fff;
  display: grid; place-items: center;
  font-size: 19px; font-weight: 800;
  box-shadow: 0 6px 16px -8px var(--brand);
}
.brand .mark span { transform: translateY(-1px); }
.brand b { color: var(--accent-ink); font-weight: 800; }
.brand-logo { height: 66px; width: auto; display: block; }
.logo-chip {
  display: inline-flex;
  background: #fff;
  padding: 12px 16px;
  border-radius: 14px;
}
.logo-chip img { height: 44px; width: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { background: var(--surface-2); color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

/* =================== HERO =================== */
.hero {
  position: relative;
  padding-top: clamp(56px, 8vw, 110px);
  padding-bottom: var(--section-y);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  box-shadow: 0 4px 14px -10px rgba(0,0,0,.4);
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.hero h1 {
  font-size: clamp(40px, 6vw, 70px);
  margin-top: 24px;
  color: var(--ink);
}
.hero h1 .hl { color: var(--brand); position: relative; white-space: nowrap; }
.hero p.lead {
  margin-top: 24px;
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--ink-soft);
  max-width: 33ch;
}
.hero-actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  margin-top: 48px;
  display: flex;
  gap: clamp(20px, 4vw, 48px);
  flex-wrap: wrap;
}
.hero-stats .stat .num {
  font-size: 34px; font-weight: 800; color: var(--brand);
  letter-spacing: -0.03em;
}
.hero-stats .stat .lbl { font-size: 14px; color: var(--muted); margin-top: 2px; }

.hero-visual { position: relative; }
.hero-photo {
  position: relative;
  aspect-ratio: 4 / 4.4;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  box-shadow: 0 40px 80px -40px rgba(12,33,56,.55);
}
.hero-photo::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, transparent 40%, rgba(var(--hero-tint), .35));
}
.hero-float {
  position: absolute;
  left: -26px; bottom: 40px;
  background: var(--surface);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 24px 50px -22px rgba(12,33,56,.45);
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line);
  max-width: 250px;
}
.hero-float .ico {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent-ink);
  display: grid; place-items: center; flex: none;
}
.hero-float .t { font-weight: 700; font-size: 14.5px; }
.hero-float .s { font-size: 12.5px; color: var(--muted); }

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  z-index: -1;
}

/* =================== SOMOS =================== */
.somos { padding-block: var(--section-y); }
.somos-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.somos-visual { position: relative; }
.somos-photo {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  box-shadow: 0 30px 70px -38px rgba(12,33,56,.5);
}
.somos-tag {
  position: absolute;
  right: -20px; top: 36px;
  background: var(--brand);
  color: #fff;
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 20px 44px -20px var(--brand);
}
.somos-tag .big { font-size: 15px; font-weight: 800; letter-spacing: .04em; }
.somos-tag .sm { font-size: 12.5px; opacity: .82; margin-top: 2px; }
.somos-body h2 {
  font-size: clamp(30px, 4vw, 46px);
  margin-top: 16px;
}
.somos-body p { margin-top: 20px; color: var(--ink-soft); font-size: 18px; }
.somos-values {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.value {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.value .ico { color: var(--accent-ink); margin-bottom: 10px; }
.value .t { font-weight: 700; font-size: 15.5px; }
.value .s { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.45; }

/* =================== CURSOS (3 grandes) =================== */
.cursos { padding-block: var(--section-y); background: var(--surface-2); }
.cursos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.course-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.course-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -34px rgba(12,33,56,.4); }
.course-card .ph {
  aspect-ratio: 3 / 2.5;
  background-size: cover;
  background-position: center;
  position: relative;
}
.course-card .ph .chip {
  position: absolute; left: 16px; top: 16px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(4px);
  color: var(--ink);
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 6px 13px; border-radius: 999px;
}
.course-card .body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.course-card h3 { font-size: 23px; }
.course-card p { margin-top: 12px; color: var(--ink-soft); font-size: 15.5px; flex: 1; }
.course-card .more {
  margin-top: 20px;
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px; color: var(--accent-ink);
}
.course-card .more .arr { transition: transform .2s ease; }
.course-card:hover .more .arr { transform: translateX(4px); }

/* =================== HABILIDADES BLANDAS =================== */
.skills { padding-block: var(--section-y); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.skill-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 3.7;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  color: #fff;
  isolation: isolate;
}
.skill-card::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(var(--hero-tint),0) 28%, rgba(var(--hero-tint),.9));
}
.skill-card .inner { padding: 22px; width: 100%; }
.skill-card .num { font-size: 13px; font-weight: 700; opacity: .8; letter-spacing: .08em; }
.skill-card h3 { font-size: 20px; margin-top: 6px; line-height: 1.12; }
.skill-card .pdf {
  margin-top: 14px;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.32);
  backdrop-filter: blur(4px);
  padding: 8px 14px; border-radius: 999px;
  transition: background .18s ease;
}
.skill-card .pdf:hover { background: rgba(255,255,255,.3); }

/* =================== INGLÉS =================== */
.ingles { padding-block: var(--section-y); background: var(--brand-2); color: #fff; position: relative; overflow: hidden; }
.ingles .section-head h2 { color: #fff; }
.ingles .section-head p { color: rgba(255,255,255,.72); }
.ingles .eyebrow { color: #fff; }
.ingles .eyebrow::before { background: var(--accent); }
.ingles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.eng-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s ease, background .25s ease;
}
.eng-card:hover { transform: translateY(-6px); background: rgba(255,255,255,.1); }
.eng-card .ph { aspect-ratio: 16/9; background-size: cover; background-position: center; }
.eng-card .body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.eng-card .level {
  align-self: flex-start;
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  padding: 5px 11px; border-radius: 999px;
  margin-bottom: 14px;
}
.eng-card h3 { font-size: 20px; }
.eng-card p { margin-top: 12px; font-size: 14.5px; color: rgba(255,255,255,.74); flex: 1; line-height: 1.55; }
.eng-card .pdf {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: #fff;
}
.eng-card .pdf .arr { transition: transform .2s ease; }
.eng-card:hover .pdf .arr { transform: translateX(4px); }

/* =================== CONTACTO =================== */
.contacto { padding-block: var(--section-y); }
.contacto-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.contacto-info h2 { font-size: clamp(30px, 4vw, 46px); margin-top: 16px; }
.contacto-info p { margin-top: 18px; color: var(--muted); font-size: 18px; max-width: 40ch; }
.contact-detail {
  margin-top: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.contact-detail a, .contact-detail span {
  display: flex; align-items: center; gap: 14px;
  font-size: 16px; font-weight: 600; color: var(--ink-soft);
}
.contact-detail .ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface-2); color: var(--brand);
  display: grid; place-items: center; flex: none;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 3.5vw, 44px);
  box-shadow: 0 30px 70px -45px rgba(12,33,56,.4);
}
.field { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label {
  display: block; font-size: 13.5px; font-weight: 700;
  color: var(--ink-soft); margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  font: inherit; font-size: 15.5px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
}
.contact-extra {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-card .btn-primary { width: 100%; justify-content: center; margin-top: 4px; }
.form-card .btn-primary:disabled {
  cursor: wait;
  opacity: .72;
  transform: none;
}
.form-status {
  display: none;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  font-weight: 700; font-size: 15px;
  text-align: center;
}
.form-status-success {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.form-status-error {
  background: #fde8e8;
  color: #9b1c1c;
}
.form-status.show { display: block; }

/* =================== FOOTER =================== */
.site-footer {
  background: var(--brand-2);
  color: rgba(255,255,255,.7);
  padding-block: 56px 32px;
}
.footer-top {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 40px; flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 800; font-size: 22px; }
.footer-brand .mark { background: rgba(255,255,255,.14); box-shadow: none; }
.footer-links { display: flex; gap: 36px; flex-wrap: wrap; }
.footer-col h4 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55); font-weight: 700; margin-bottom: 14px; }
.footer-col a { display: block; color: rgba(255,255,255,.78); font-size: 15px; padding: 4px 0; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 26px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px;
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* =================== RESPONSIVE =================== */
@media (max-width: 940px) {
  .hero-grid, .somos-grid, .contacto-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 560px; }
  .hero-photo { aspect-ratio: 16 / 11; }
  .somos-visual { max-width: 460px; }
  .cursos-grid, .ingles-grid { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .cursos-grid, .ingles-grid, .skills-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .somos-values { grid-template-columns: 1fr; }
  .hero-float { left: 0; }
  .hero-photo { aspect-ratio: 4 / 3.4; }
  .footer-links { gap: 24px; }
}

/* tweak panel host hides chrome when inactive — handled by component */
