/* ============================================================
   Hackgrove — Code. Build. Explore.
   Paleta: Forest Green #1F5B3A · Deep Navy #102033
           Camp Sand #F2E6C9 · Signal Lime #A7E957
   ============================================================ */

:root {
  --forest: #1F5B3A;
  --forest-dark: #17452C;
  --navy: #102033;
  --navy-soft: #1A3049;
  --sand: #F2E6C9;
  --sand-soft: #F9F3E3;
  --lime: #A7E957;
  --lime-dark: #7FBF35;
  --white: #FFFFFF;
  --ink: #22303C;
  --ink-soft: #52606D;

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px rgba(16, 32, 51, .10);
  --shadow-soft: 0 6px 18px rgba(16, 32, 51, .07);
  --container: 1140px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--navy);
}

a { color: var(--forest); }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.container-narrow { max-width: 820px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn:active { transform: translateY(0); }

.btn-lime { background: var(--lime); color: var(--navy); }
.btn-lime:hover { background: #B8F06E; }

.btn-forest { background: var(--forest); color: var(--white); }
.btn-forest:hover { background: var(--forest-dark); }

.btn-ghost { border-color: rgba(242, 230, 201, .5); color: var(--sand); }
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }

.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

.link-arrow {
  font-weight: 700;
  text-decoration: none;
  color: var(--forest);
}
.link-arrow::after { content: " →"; transition: margin-left .15s ease; }
.link-arrow:hover::after { margin-left: 4px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid rgba(167, 233, 87, .18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-logo {
  background: var(--sand);
  border-radius: 12px;
  padding: 5px;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--sand);
  letter-spacing: -.02em;
}
.brand-name span { color: var(--lime); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.main-nav > a:not(.btn) {
  color: var(--sand);
  text-decoration: none;
  font-weight: 600;
  font-size: .98rem;
  opacity: .9;
  transition: color .15s ease, opacity .15s ease;
}
.main-nav > a:not(.btn):hover { color: var(--lime); opacity: 1; }
.btn-nav { padding: 10px 22px; font-size: .95rem; }

/* Selector de idioma (enlaces: funciona sin JavaScript) */
.lang-switch {
  display: flex;
  gap: 2px;
  background: rgba(242, 230, 201, .12);
  border: 1px solid rgba(242, 230, 201, .25);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--sand);
  text-decoration: none;
  border-radius: 999px;
  padding: 5px 12px;
  transition: background .15s ease, color .15s ease;
}
.lang-switch a:hover { color: var(--lime); }
.lang-switch a.active {
  background: var(--lime);
  color: var(--navy);
}

/* Menú móvil sin JavaScript: checkbox oculto + label como botón */
.nav-check { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 26px; height: 3px;
  background: var(--sand);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-check:checked ~ .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-check:checked ~ .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-check:checked ~ .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(167, 233, 87, .14), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(31, 91, 58, .5), transparent 60%),
    var(--navy);
  color: var(--sand);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 48px;
  padding-block: 96px 140px;
}

.hero-kicker {
  display: inline-block;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--lime);
  background: rgba(167, 233, 87, .1);
  border: 1px solid rgba(167, 233, 87, .35);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  color: var(--white);
  letter-spacing: -.03em;
  margin-bottom: 20px;
}
.hero h1 em { font-style: normal; color: var(--lime); }

.hero-sub {
  font-size: 1.15rem;
  max-width: 34rem;
  opacity: .92;
  margin-bottom: 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }

.hero-stats {
  display: flex;
  gap: 40px;
  list-style: none;
}
.hero-stats li { display: grid; }
.hero-stats strong {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--lime);
}
.hero-stats span { font-size: .88rem; opacity: .8; }

/* Tarjeta de código */
.hero-visual { position: relative; }

.code-card {
  background: #0B1826;
  border: 1px solid rgba(167, 233, 87, .25);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  overflow: hidden;
  transform: rotate(1.5deg);
}
.code-card-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(242, 230, 201, .06);
  border-bottom: 1px solid rgba(242, 230, 201, .08);
}
.code-card-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(242, 230, 201, .25); }
.code-card-bar .dot:first-child { background: var(--lime); }
.code-card-title {
  margin-left: 10px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .8rem;
  color: rgba(242, 230, 201, .6);
}
.code-card-body {
  padding: 22px 24px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .92rem;
  line-height: 1.8;
  color: var(--sand);
  overflow-x: auto;
}
.c-kw { color: var(--lime); font-weight: 600; }
.c-fn { color: #7FD4FF; }
.c-str { color: #FFD37F; }
.c-cm { color: rgba(242, 230, 201, .45); }

.float-chip {
  position: absolute;
  background: var(--sand);
  color: var(--navy);
  font-weight: 700;
  font-size: .85rem;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  white-space: nowrap;
  animation: float 5s ease-in-out infinite;
}
.chip-1 { top: -22px; right: 8px; animation-delay: 0s; }
.chip-2 { bottom: -18px; left: -12px; animation-delay: 1.2s; }
.chip-3 { top: 46%; right: -20px; animation-delay: 2.4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-wave {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  line-height: 0;
}
.hero-wave svg { width: 100%; height: 60px; }

/* ============================================================
   SECCIONES
   ============================================================ */
.section { padding-block: 96px; }
.section-sand { background: var(--sand); }
.section-navy {
  background:
    radial-gradient(800px 400px at 110% 0%, rgba(167, 233, 87, .1), transparent 55%),
    var(--navy);
  color: var(--sand);
}
.section-navy h2, .section-navy h3 { color: var(--white); }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -.02em; margin-bottom: 16px; }
.section-lead { font-size: 1.1rem; color: var(--ink-soft); }
.section-navy .section-lead { color: rgba(242, 230, 201, .85); }

.eyebrow {
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 12px;
}
.eyebrow-lime { color: var(--lime); }

/* ---------- Valores ---------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.value-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.value-icon { font-size: 2rem; margin-bottom: 14px; }
.value-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.value-card p { font-size: .95rem; color: var(--ink-soft); }

/* ---------- Programas ---------- */
.program-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.program-card {
  background: var(--sand-soft);
  border: 1px solid rgba(31, 91, 58, .12);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.program-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--forest); }
.program-card.featured {
  grid-row: span 2;
  background: var(--forest);
  color: var(--sand);
  border-color: var(--forest);
  justify-content: flex-start;
}
.program-card.featured h3 { color: var(--white); }
.program-card h3 { font-size: 1.3rem; }
.program-card h3 em { font-style: normal; color: var(--forest); }
.program-card.featured h3 em { color: var(--lime); }
.program-card p { font-size: .97rem; color: var(--ink-soft); flex-grow: 1; }
.program-card.featured p { color: rgba(242, 230, 201, .9); }

.program-tag {
  align-self: flex-start;
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .04em;
  background: rgba(31, 91, 58, .1);
  color: var(--forest);
  padding: 5px 14px;
  border-radius: 999px;
}
.program-card.featured .program-tag { background: rgba(167, 233, 87, .18); color: var(--lime); }

.program-card.featured ul {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-block: 6px 10px;
  font-size: .95rem;
}
.program-card.featured ul li::before { content: "✓ "; color: var(--lime); font-weight: 800; }
.program-card.featured .btn { align-self: flex-start; }

/* ---------- Skills ---------- */
.skills-grid {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.skills-grid li {
  background: rgba(242, 230, 201, .08);
  border: 1px solid rgba(167, 233, 87, .3);
  color: var(--sand);
  font-weight: 700;
  font-size: .98rem;
  padding: 13px 22px;
  border-radius: 999px;
  transition: background .15s ease, transform .15s ease;
}
.skills-grid li:hover {
  background: rgba(167, 233, 87, .16);
  transform: translateY(-2px);
}

/* ---------- Metodología ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  counter-reset: pasos;
}
.step {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.step-num {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  color: var(--navy);
  background: var(--lime);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step p { font-size: .9rem; color: var(--ink-soft); }

/* ---------- Split (familias / contacto) ---------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 60px;
  align-items: center;
}
.split-copy h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-bottom: 18px; letter-spacing: -.02em; }
.split-copy > p { color: var(--ink-soft); margin-bottom: 22px; }
.section-navy .split-copy > p { color: rgba(242, 230, 201, .88); }

.check-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-bottom: 30px;
}
.check-list li { padding-left: 32px; position: relative; }
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 1px;
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: var(--navy);
  font-weight: 800;
  font-size: .8rem;
  border-radius: 50%;
}

.split-visual { display: grid; gap: 24px; justify-items: center; }
.badge-emblem { width: min(300px, 70%); filter: drop-shadow(0 16px 32px rgba(16, 32, 51, .18)); }

.quote-card {
  background: var(--sand);
  border-left: 5px solid var(--lime);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  font-style: italic;
  color: var(--ink);
  max-width: 420px;
}
.quote-card span { display: block; margin-top: 8px; font-style: normal; font-weight: 700; font-size: .88rem; color: var(--forest); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 14px; }
.faq-list details {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.faq-list summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy);
  padding: 20px 56px 20px 24px;
  position: relative;
  user-select: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 22px; top: 50%;
  translate: 0 -50%;
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  background: var(--sand);
  color: var(--forest);
  font-weight: 800;
  border-radius: 50%;
  transition: rotate .2s ease, background .2s ease;
}
.faq-list details[open] summary::after { content: "–"; background: var(--lime); color: var(--navy); }
.faq-list details p { padding: 0 24px 22px; color: var(--ink-soft); }

/* ---------- Contacto / Formulario ---------- */
.contact-points {
  list-style: none;
  display: grid;
  gap: 12px;
  font-weight: 600;
}
.contact-points a { color: var(--lime); }

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 34px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  display: grid;
  gap: 18px;
}
.form-title { font-size: 1.4rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-field { display: grid; gap: 7px; }
.form-field label {
  font-weight: 700;
  font-size: .9rem;
  color: var(--navy);
}
.optional { font-weight: 500; color: var(--ink-soft); }

.form-field input,
.form-field select,
.form-field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--sand-soft);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color .15s ease, background .15s ease;
  width: 100%;
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--forest);
  background: var(--white);
}
.form-field input.invalid,
.form-field select.invalid,
.form-field textarea.invalid { border-color: #C0392B; }

/* Honeypot: fuera de pantalla, nunca display:none (algunos bots lo detectan) */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.captcha-field small { color: var(--ink-soft); }
.captcha-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.captcha-box img {
  border-radius: var(--radius-sm);
  border: 2px solid var(--sand);
}
.captcha-box input { max-width: 150px; text-transform: uppercase; letter-spacing: .2em; font-weight: 700; }
.captcha-reload {
  width: 42px; height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--sand);
  color: var(--forest);
  font-size: 1.3rem;
  cursor: pointer;
  transition: background .15s ease, rotate .3s ease;
}
.captcha-reload:hover { background: var(--lime); rotate: 180deg; }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .9rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.consent input { margin-top: 4px; accent-color: var(--forest); }

.form-status { font-weight: 700; min-height: 1.4em; }
.form-status.ok { color: var(--forest); }
.form-status.error { color: #C0392B; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy);
  color: rgba(242, 230, 201, .85);
  padding-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}
.footer-brand p { margin-top: 18px; font-size: .95rem; max-width: 36rem; }
.footer-tagline {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--lime) !important;
}
.footer-nav, .footer-contact { display: grid; gap: 10px; align-content: start; }
.site-footer h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 4px;
}
.site-footer h4.mt { margin-top: 18px; }
.footer-nav a, .footer-contact a {
  color: rgba(242, 230, 201, .85);
  text-decoration: none;
  transition: color .15s ease;
}
.footer-nav a:hover, .footer-contact a:hover { color: var(--lime); }
.legal-note { font-size: .85rem; opacity: .75; }

.footer-bottom {
  border-top: 1px solid rgba(242, 230, 201, .15);
  padding-block: 22px;
  font-size: .88rem;
  opacity: .75;
}

/* ============================================================
   ANIMACIONES DE ENTRADA
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-chip { animation: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .program-grid { grid-template-columns: repeat(2, 1fr); }
  .program-card.featured { grid-row: auto; grid-column: span 2; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .hero-inner { grid-template-columns: 1fr; padding-block: 72px 120px; }
  .hero-visual { max-width: 540px; }
  .split { grid-template-columns: 1fr; gap: 44px; }
}

@media (max-width: 720px) {
  .section { padding-block: 68px; }

  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy);
    border-bottom: 1px solid rgba(167, 233, 87, .18);
    padding: 10px 24px 24px;
    display: none;
  }
  .nav-check:checked ~ .main-nav { display: flex; }
  .main-nav > a:not(.btn) { padding: 14px 0; border-bottom: 1px solid rgba(242, 230, 201, .08); }
  .btn-nav { margin-top: 16px; text-align: center; }
  .lang-switch { align-self: flex-start; margin-top: 16px; }

  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .float-chip { display: none; }
  .code-card { transform: none; }

  .value-grid, .program-grid { grid-template-columns: 1fr; }
  .program-card.featured { grid-column: auto; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 28px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
