/* ============================================================
   EDUCATIC · Sistema visual
   Biomimética digital — fondo nocturno, miel, panal
   ============================================================ */

:root {
  /* Tinta nocturna */
  --ink-950: #04061a;
  --ink-900: #070a23;
  --ink-800: #0b1230;
  --ink-700: #121a3d;
  --ink-600: #1c2756;
  --ink-500: #2b3776;

  /* Miel · acentos cálidos */
  --honey-300: #ffd789;
  --honey-400: #ffc857;
  --honey-500: #f5b942;
  --honey-600: #e8a317;
  --honey-700: #b87d0d;

  /* Cian del logo · polinización */
  --cyan-300: #8ed1ff;
  --cyan-400: #4cb1f7;
  --cyan-500: #2a8fd6;

  /* Crema · texto */
  --cream:      #f5f1e8;
  --cream-90:   rgba(245, 241, 232, 0.92);
  --cream-70:   rgba(245, 241, 232, 0.72);
  --cream-55:   rgba(245, 241, 232, 0.55);
  --cream-35:   rgba(245, 241, 232, 0.32);

  /* Líneas */
  --line-strong: rgba(245, 241, 232, 0.14);
  --line:        rgba(245, 241, 232, 0.08);
  --line-soft:   rgba(245, 241, 232, 0.04);

  /* Curvas y radios */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* Tipografía */
  --f-display: "Instrument Serif", "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --f-sans:    "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  /* Anchos */
  --w: min(1280px, 92vw);
  --w-narrow: min(960px, 92vw);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink-900);
  color: var(--cream);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(ellipse 1200px 600px at 20% -10%, rgba(255, 200, 87, 0.08), transparent 60%),
    radial-gradient(ellipse 1000px 700px at 110% 30%, rgba(76, 177, 247, 0.06), transparent 60%),
    radial-gradient(ellipse 900px 600px at -10% 80%, rgba(232, 163, 23, 0.05), transparent 65%),
    var(--ink-900);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

::selection { background: var(--honey-500); color: var(--ink-900); }

/* ----------------- Tipografía ----------------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--honey-400);
  font-weight: 500;
}

.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--honey-400);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
  box-shadow: 0 0 10px var(--honey-400);
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
  color: var(--cream);
}

h1 { font-size: clamp(44px, 6.4vw, 92px); line-height: 1.02; letter-spacing: -0.02em; }
h2 { font-size: clamp(36px, 4.4vw, 64px); line-height: 1.05; }
h3 { font-size: clamp(26px, 2.4vw, 36px); }

.serif-italic { font-style: italic; color: var(--honey-300); }

p { color: var(--cream-70); margin: 0; }
p.lead { font-size: 19px; line-height: 1.55; color: var(--cream-90); max-width: 60ch; }

/* ----------------- Nav ----------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: rgba(7, 10, 35, 0.55);
  border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
  width: var(--w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo img { height: 32px; width: auto; }

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 14.5px;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--cream-70);
  transition: color .2s ease, background .2s ease;
  font-weight: 500;
}
.nav-links a:hover { color: var(--cream); background: rgba(245,241,232,0.05); }
.nav-links a.active { color: var(--ink-900); background: var(--honey-400); }

.nav-cta {
  font-size: 14px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-900);
  transition: transform .2s ease, box-shadow .2s ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -10px rgba(245,241,232,0.4); }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  width: 20px; height: 2px;
  margin: 0 auto;
  background: var(--cream);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav.menu-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
.nav.menu-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0 8px;
}
.nav-mobile a {
  padding: 14px 8px;
  font-size: 17px;
  font-weight: 500;
  color: var(--cream-90);
  border-bottom: 1px solid var(--line-soft);
}
.nav-mobile a.active { color: var(--honey-400); }
.nav-mobile-cta {
  margin-top: 14px;
  text-align: center;
  background: var(--honey-400);
  color: var(--ink-900) !important;
  border-radius: 999px;
  font-weight: 600;
  border-bottom: none !important;
}

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav.menu-open .nav-mobile { display: flex; }
  .nav.menu-open { background: rgba(7, 10, 35, 0.96); }
}

/* ----------------- Botones ----------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  font-family: var(--f-sans);
  cursor: pointer;
  border: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(180deg, var(--honey-400), var(--honey-600));
  color: var(--ink-900);
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset,
              0 -1px 0 rgba(0,0,0,0.2) inset,
              0 18px 40px -12px rgba(245, 185, 66, 0.55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset,
              0 -1px 0 rgba(0,0,0,0.2) inset,
              0 24px 50px -14px rgba(245, 185, 66, 0.7);
}
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover {
  background: rgba(245,241,232,0.05);
  border-color: var(--cream-55);
}

.btn .arrow {
  display: inline-block;
  transition: transform .2s ease;
}
.btn:hover .arrow { transform: translateX(4px); }

/* ----------------- Wrappers ----------------- */
.wrap   { width: var(--w);        margin: 0 auto; }
.wrap-n { width: var(--w-narrow); margin: 0 auto; }

section { position: relative; padding: 120px 0; }
@media (max-width: 720px) { section { padding: 80px 0; } }

/* ----------------- Hex pattern background ----------------- */
.hex-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(60deg, var(--line-soft) 1px, transparent 1px),
    linear-gradient(-60deg, var(--line-soft) 1px, transparent 1px),
    linear-gradient(0deg, var(--line-soft) 1px, transparent 1px);
  background-size: 44px 76px, 44px 76px, 44px 76px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 80%);
}

/* ----------------- Card primitives ----------------- */
.card {
  background: linear-gradient(180deg, rgba(28,39,86,0.32), rgba(11,18,48,0.32));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: border-color .25s ease, transform .25s ease;
}
.card:hover {
  border-color: var(--line-strong);
}

.card .glow {
  position: absolute;
  inset: -1px;
  border-radius: var(--r-lg);
  pointer-events: none;
  background: radial-gradient(400px 200px at var(--mx, 50%) var(--my, 0%), rgba(255,200,87,0.10), transparent 60%);
  opacity: 0;
  transition: opacity .3s ease;
}
.card:hover .glow { opacity: 1; }

/* ----------------- Hex SVG icon container ----------------- */
.hex-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  position: relative;
  flex-shrink: 0;
}
.hex-icon::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(255,200,87,0.12), rgba(245,185,66,0.04));
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  border: 1px solid var(--honey-500);
}
.hex-icon::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--honey-400);
  opacity: 0;
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  transition: opacity .2s;
}
.hex-icon > svg, .hex-icon > span {
  position: relative;
  z-index: 1;
  color: var(--honey-300);
  font-size: 18px;
  font-family: var(--f-mono);
  font-weight: 600;
}

/* ----------------- Particles canvas ----------------- */
.particles-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ----------------- Footer ----------------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 72px 0 32px;
  margin-top: 80px;
  background: linear-gradient(180deg, transparent, rgba(4,6,26,0.6));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.footer-brand p {
  margin-top: 16px;
  font-family: var(--f-display);
  font-style: italic;
  color: var(--cream-90);
  font-size: 20px;
  line-height: 1.4;
  max-width: 28ch;
}
.footer h5 {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--honey-400);
  margin: 0 0 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--cream-70); font-size: 14.5px; transition: color .2s; }
.footer ul a:hover { color: var(--cream); }
.footer-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px;
  color: var(--cream-55);
  font-family: var(--f-mono);
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ----------------- Utility ----------------- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  margin: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(255,200,87,0.08);
  color: var(--honey-300);
  border: 1px solid rgba(255,200,87,0.2);
}

/* honey gradient text */
.honey-text {
  background: linear-gradient(135deg, var(--honey-300), var(--honey-500) 60%, var(--honey-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* fade-in observer */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE — mobile refinements
   ============================================================ */
@media (max-width: 600px) {
  html, body { font-size: 16px; }

  .nav { padding: 14px 0; }
  .nav-logo img { height: 28px; }

  section { padding: 64px 0; }

  .card { padding: 24px; border-radius: 18px; }

  /* CTAs stack full-width and stay tappable */
  .btn {
    padding: 15px 22px;
    font-size: 15px;
  }
  .hero-ctas .btn,
  .ctas .btn { flex: 1 1 100%; justify-content: center; }

  /* Footer collapses to a single column */
  .footer { padding: 56px 0 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 11px;
  }
}

/* Tablet / small laptop */
@media (max-width: 880px) {
  :root { --w: 90vw; --w-narrow: 90vw; }
}
