/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:         #faf6ee;
  --bg-2:       #f0e6d2;
  --paper:      #ffffff;
  --ink:        #201e1b;
  --ink-soft:   #3a362f;
  --ink-mute:   #79705f;
  --gold:       #c9971c;
  --gold-bright:#ffd700;
  --gold-deep:  #9c7008;
  --gold-wash:  rgba(255, 215, 0, 0.14);
  --bronze:     #6b4a23;
  --line:       rgba(32, 30, 27, 0.12);
  --line-soft:  rgba(32, 30, 27, 0.07);
  --whatsapp:   #25d366;
  --whatsapp-dk:#128c7e;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h: 76px;
  --radius: 18px;
  --radius-sm: 10px;
  --container: 1240px;
}

@property --mesh-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink-soft);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; font-family: var(--serif); color: var(--ink); font-weight: 600; }
ul { list-style: none; padding: 0; }
::selection { background: var(--gold-bright); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--paper);
  z-index: 9999; border-radius: 8px; font-weight: 600;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 720px)  { .container { padding-inline: 2rem; } }
@media (min-width: 1280px) { .container { padding-inline: 2.5rem; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.eyebrow {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--gold-deep);
}

.section {
  position: relative;
  padding-block: clamp(3.5rem, 8vw, 7rem);
}
.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-title {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  margin-top: .6rem;
}
.section-title em { font-style: italic; color: var(--gold-deep); }
.section-sub {
  margin-top: 1rem;
  color: var(--ink-mute);
  font-size: 1.05rem;
  max-width: 42rem;
}

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   4. Buttons
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .95rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), background .3s var(--ease-out), color .3s var(--ease-out);
}
.btn svg { width: 1.05em; height: 1.05em; flex: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #241a02;
  box-shadow: 0 10px 30px -10px rgba(201, 151, 28, .55);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 36px -12px rgba(201, 151, 28, .65); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-3px); }

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
  box-shadow: 0 10px 26px -10px rgba(37, 211, 102, .6);
}
.btn-whatsapp:hover { background: var(--whatsapp-dk); transform: translateY(-3px); }

.btn-sm { padding: .65rem 1.2rem; font-size: .85rem; }

/* =============================================================
   5. Nav
   ============================================================= */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 500;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: transparent;
  transition: background .4s var(--ease-out), box-shadow .4s var(--ease-out), backdrop-filter .4s var(--ease-out);
}
.nav.is-solid {
  background: rgba(250, 246, 238, .88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; width: 100%; }
.nav-logo { display: flex; align-items: center; gap: .6rem; flex: none; }
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: none; align-items: center; gap: 2rem; }
.nav-links a {
  font-size: .92rem; font-weight: 500; color: var(--ink-soft);
  position: relative; padding-block: .3rem;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1.5px; background: var(--gold-deep);
  transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease-out);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-actions { display: flex; align-items: center; gap: .9rem; }
.nav-toggle {
  display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center;
  border-radius: 50%; border: 1.5px solid var(--line);
}
.nav-toggle svg { width: 18px; height: 18px; }

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}

.nav-mobile {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 490;
  background: var(--bg);
  padding: 2rem 1.25rem;
  display: flex; flex-direction: column; gap: .5rem;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.nav-mobile.is-open { opacity: 1; transform: none; pointer-events: auto; }
.nav-mobile a {
  font-family: var(--serif); font-size: 1.6rem; padding-block: .55rem;
  border-bottom: 1px solid var(--line-soft);
}

/* =============================================================
   6. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-top: var(--nav-h);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.02);
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(0deg, rgba(20,16,8,.86) 0%, rgba(20,16,8,.42) 46%, rgba(20,16,8,.28) 100%);
}
.hero-grain {
  position: absolute; inset: 0; z-index: 2; opacity: .1; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.hero-inner {
  position: relative; z-index: 3;
  width: 100%;
  padding-block: clamp(3rem, 10vw, 5.5rem);
  color: #f7f1e2;
}
.hero-meta {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 1.4rem;
}
.hero-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-bright); animation: pulseDot 2.4s ease-in-out infinite; }
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.hero-title {
  font-size: clamp(2.5rem, 6.4vw, 5.2rem);
  color: #fbf5e4;
  max-width: 16ch;
  text-wrap: balance;
}
.hero-title em {
  font-style: italic;
  background: linear-gradient(100deg, var(--gold-bright), #ffe98a 60%, var(--gold-bright));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-pillars {
  margin-top: 1.4rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.1rem;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: rgba(247, 241, 226, .82);
  max-width: 42rem;
}
.hero-pillars span:not(:last-child)::after { content: "·"; margin-left: 1.1rem; color: var(--gold-bright); }

.hero-actions { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-actions .btn-ghost { color: #f7f1e2; border-color: rgba(247,241,226,.35); }
.hero-actions .btn-ghost:hover { border-color: #f7f1e2; }

.hero-scroll {
  position: absolute; right: clamp(1.25rem, 4vw, 2.5rem); bottom: 2rem; z-index: 3;
  display: none;
  flex-direction: column; align-items: center; gap: .6rem;
  color: rgba(247,241,226,.7);
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
}
.hero-scroll .line { width: 1px; height: 34px; background: linear-gradient(rgba(247,241,226,.7), transparent); animation: scrollLine 2.2s var(--ease-soft) infinite; }
@keyframes scrollLine { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (min-width: 720px) { .hero-scroll { display: flex; } }

/* =============================================================
   7. Manifesto
   ============================================================= */
.manifesto { background: var(--bg); }
.manifesto-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
.manifesto-num {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(4rem, 12vw, 8rem);
  line-height: .8;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--gold-deep);
  opacity: .55;
}
.manifesto-text p { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-soft); }
.manifesto-text p + p { margin-top: 1.2rem; }
.manifesto-text .cite { margin-top: 1.6rem; font-family: var(--serif); font-style: italic; color: var(--gold-deep); font-size: 1.1rem; }

@media (min-width: 720px) {
  .manifesto-grid { grid-template-columns: .8fr 2fr; align-items: start; }
}

/* =============================================================
   8. Stats strip
   ============================================================= */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 1.5rem;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
@media (min-width: 720px) { .stats-row { grid-template-columns: repeat(4, 1fr); } }
.stat { text-align: center; }
.stat-value {
  font-family: var(--serif); font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  color: var(--gold-deep);
  font-style: italic;
}
.stat-label { margin-top: .4rem; font-size: .85rem; color: var(--ink-mute); letter-spacing: .02em; }

/* =============================================================
   9. Bento services
   ============================================================= */
.bento {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px)  { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .bento { grid-template-columns: repeat(4, 1fr); } }

.card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  padding: 1.8rem;
  min-height: 230px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--paper);
  border: 1px solid var(--line);
  isolation: isolate;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.card:hover {
  transform: translateY(-6px) rotate(-.3deg);
  box-shadow: 0 26px 50px -22px rgba(201, 151, 28, .38);
}
.card-icon {
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-wash);
  color: var(--gold-deep);
  margin-bottom: 1rem;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.18rem; margin-bottom: .5rem; }
.card p { font-size: .92rem; color: var(--ink-mute); }

.card-photo { background: var(--ink); color: #f7f1e2; }
.card-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  z-index: -2; transition: transform .7s var(--ease-out), filter .5s var(--ease-out);
  filter: saturate(1.05);
}
.card-photo:hover img { transform: scale(1.09); }
.card-photo::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(15,12,6,.92) 10%, rgba(15,12,6,.25) 60%, rgba(15,12,6,.1) 100%);
}
.card-photo .card-icon { background: rgba(255,215,0,.22); color: var(--gold-bright); }
.card-photo h3 { color: #fbf5e4; }
.card-photo p { color: rgba(247,241,226,.78); }

.bento .card:nth-child(4n+1) { grid-column: span 1; }
@media (min-width: 1024px) {
  .bento .card:first-child { grid-row: span 2; min-height: 100%; }
}

/* =============================================================
   10. Marquee
   ============================================================= */
.marquee-wrap {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  padding-block: 1.6rem;
  overflow: hidden;
}
.marquee-label {
  text-align: center; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 1.1rem;
}
.marquee-track {
  display: flex; width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee-track span {
  font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  color: var(--ink);
  padding-inline: 2.2rem;
  white-space: nowrap;
  opacity: .8;
}
.marquee-track span::after { content: "✦"; margin-left: 2.2rem; color: var(--gold); font-style: normal; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =============================================================
   11. Escuela section
   ============================================================= */
.school-grid {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px)  { .school-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .school-grid { grid-template-columns: repeat(3, 1fr); } }

.school-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.6rem;
  background: var(--paper);
  transition: border-color .4s var(--ease-out), transform .4s var(--ease-out);
}
.school-card:hover { border-color: var(--gold-deep); transform: translateY(-4px); }
.school-num {
  font-family: var(--serif); font-style: italic; color: var(--gold-deep);
  font-size: 1.6rem; display: block; margin-bottom: .6rem;
}
.school-card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.school-card p { font-size: .88rem; color: var(--ink-mute); }

/* =============================================================
   12. Final CTA
   ============================================================= */
.cta {
  position: relative;
  border-radius: clamp(20px, 3vw, 34px);
  overflow: hidden;
  background: linear-gradient(155deg, #241d10 0%, #17130a 60%, #100d07 100%);
  color: #f7f1e2;
  padding: clamp(2.6rem, 7vw, 5rem);
  isolation: isolate;
}
.cta-halo {
  position: absolute; inset: -60% -10% -30% -10%; z-index: -1;
  background: radial-gradient(45% 50% at 30% 20%, rgba(255,215,0,.28), transparent 70%),
              radial-gradient(35% 40% at 85% 80%, rgba(255,215,0,.16), transparent 70%);
  filter: blur(60px);
}
.cta-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 960px) { .cta-grid { grid-template-columns: 1.3fr .9fr; } }
.cta h2 { color: #fbf5e4; font-size: clamp(1.9rem, 4vw, 2.8rem); max-width: 16ch; }
.cta h2 em { font-style: italic; color: var(--gold-bright); }
.cta p { margin-top: .9rem; color: rgba(247,241,226,.75); max-width: 34rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.8rem; }
.cta-info {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(247,241,226,.16);
  padding: 1.5rem;
  background: rgba(247,241,226,.04);
}
.cta-info dt { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-bright); margin-top: 1rem; }
.cta-info dt:first-child { margin-top: 0; }
.cta-info dd { margin-top: .25rem; color: rgba(247,241,226,.85); font-size: .95rem; }
.cta-info a:hover { color: var(--gold-bright); }

/* =============================================================
   13. Footer
   ============================================================= */
.footer { padding-block: 3.5rem 2rem; }
.footer-grid {
  display: grid; gap: 2.4rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand img { height: 34px; margin-bottom: .9rem; }
.footer-brand p { color: var(--ink-mute); max-width: 26rem; font-size: .92rem; }
.footer h4 { font-family: var(--sans); font-weight: 600; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: 1rem; }
.footer ul li { margin-bottom: .6rem; font-size: .92rem; color: var(--ink-mute); }
.footer ul a:hover { color: var(--gold-deep); }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .82rem; color: var(--ink-mute);
}

/* =============================================================
   14. Floating WhatsApp button
   ============================================================= */
.wa-float {
  position: fixed; right: clamp(1rem, 4vw, 1.75rem); bottom: clamp(1rem, 4vw, 1.75rem);
  z-index: 600;
  display: inline-flex; align-items: center; gap: .7rem;
  background: var(--whatsapp);
  color: #fff;
  border-radius: 999px;
  padding: .95rem;
  box-shadow: 0 14px 34px -12px rgba(18, 140, 126, .55);
  transition: box-shadow .4s var(--ease-out), transform .4s var(--ease-out), padding-inline-end .4s var(--ease-out);
}
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, .55);
  animation: waPulse 2.6s var(--ease-soft) infinite;
  pointer-events: none;
}
@keyframes waPulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.wa-float svg { width: 26px; height: 26px; flex: none; }
.wa-float-label {
  max-width: 0; overflow: hidden; white-space: nowrap;
  font-weight: 600; font-size: .92rem;
  transition: max-width .45s var(--ease-out);
}
.wa-float:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -12px rgba(18, 140, 126, .65); }
.wa-float:hover .wa-float-label,
.wa-float:focus-visible .wa-float-label { max-width: 160px; margin-left: .1rem; }
@media (hover: none) {
  .wa-float-label { max-width: 0 !important; }
}

/* =============================================================
   15. Responsive breakpoints (reference — used inline above)
   ============================================================= */
@media (min-width: 540px)  { .hero-title { max-width: 20ch; } }

/* =============================================================
   16. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg img { transform: none; }
  .marquee-track { animation-duration: 70s; }
  .hero-meta .dot,
  .hero-scroll .line,
  .wa-float::before { animation: none; }
}
