/* ============================================
   AVI — Academia Villaamil
   Design tokens
   ============================================ */

:root {
  /* Palette — luminous blue, family-friendly */
  --blue-50:  #F2F7FD;
  --blue-100: #E3EEFA;
  --blue-200: #C2DAF3;
  --blue-300: #94BFE8;
  --blue-400: #5E9DD9;
  --blue-500: #2F7BC5;
  --blue-600: #1E5FA8;
  --blue-700: #194B85;
  --blue-800: #143A66;
  --blue-900: #0E2347;

  /* Warm accent — for calidez familiar */
  --warm-50:  #FFF8EE;
  --warm-100: #FFEED4;
  --warm-300: #F4C879;
  --warm-500: #E2A23B;
  --warm-700: #A66E18;

  /* Neutrals */
  --ink-900: #0E1726;
  --ink-700: #344056;
  --ink-500: #647289;
  --ink-300: #9AA5B8;
  --ink-200: #C9D1DD;
  --ink-100: #E7ECF3;
  --ink-50:  #F4F6FA;
  --paper:   #FFFFFF;

  /* Semantic */
  --success: #16A179;
  --danger:  #D14B4B;

  /* Type */
  --font-display: 'Fraunces', 'Source Serif Pro', Georgia, serif;
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;

  /* Scale (fluid) */
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: clamp(1.75rem, 2.5vw, 2.5rem);
  --fs-4xl: clamp(2.25rem, 4vw, 3.5rem);
  --fs-5xl: clamp(3rem, 6vw, 5.25rem);

  /* Spacing */
  --pad-page: clamp(1.25rem, 4vw, 3rem);
  --max-w: 1240px;

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 28px;

  /* Shadows */
  --sh-sm: 0 1px 2px rgba(20, 58, 102, 0.06), 0 2px 6px rgba(20, 58, 102, 0.04);
  --sh-md: 0 4px 12px rgba(20, 58, 102, 0.08), 0 12px 28px rgba(20, 58, 102, 0.06);
  --sh-lg: 0 12px 32px rgba(20, 58, 102, 0.12), 0 24px 60px rgba(20, 58, 102, 0.10);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-size: var(--fs-base);
  line-height: 1.6;
  background: var(--paper);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--blue-900);
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-5xl); font-weight: 400; }
h2 { font-size: var(--fs-4xl); font-weight: 400; }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }

p { text-wrap: pretty; margin: 0 0 1em; color: var(--ink-700); }

a { color: var(--blue-600); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--blue-800); }

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

button { font-family: inherit; cursor: pointer; }

::selection { background: var(--blue-200); color: var(--blue-900); }

/* ============================================
   Layout helpers
   ============================================ */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad-page);
  padding-right: var(--pad-page);
}

.container--wide { max-width: 1400px; }

.section { padding: clamp(3rem, 8vw, 6rem) 0; }
.section--tight { padding: clamp(2rem, 5vw, 3.5rem) 0; }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-600);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--blue-400);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  transition: all .25s var(--ease);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--blue-700);
  color: white;
}
.btn--primary:hover {
  background: var(--blue-800);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(25, 75, 133, 0.25);
}

.btn--ghost {
  background: transparent;
  color: var(--blue-800);
  border-color: var(--blue-200);
}
.btn--ghost:hover {
  background: var(--blue-50);
  border-color: var(--blue-400);
  color: var(--blue-800);
}

.btn--warm {
  background: var(--warm-500);
  color: var(--blue-900);
}
.btn--warm:hover {
  background: var(--warm-300);
  transform: translateY(-1px);
}

.btn--lg { padding: 1em 1.8em; font-size: var(--fs-base); }

.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================
   Header / Nav
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--ink-100);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--blue-900);
  flex-shrink: 0;
  white-space: nowrap;
}

.nav__brand-mark {
  height: 60px;
  width: auto;
}

.nav__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.nav__brand-text strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--blue-900);
  letter-spacing: -0.01em;
}
.nav__brand-text span {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin-top: 2px;
}

.nav__menu {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__menu a {
  display: inline-block;
  padding: 0.55em 1em;
  font-size: var(--fs-sm);
  color: var(--ink-700);
  font-weight: 500;
  border-radius: 999px;
  transition: all .2s var(--ease);
}
.nav__menu a:hover {
  background: var(--blue-50);
  color: var(--blue-800);
}
.nav__menu a.is-active {
  color: var(--blue-800);
  background: var(--blue-50);
}

.nav__cta { margin-left: 0.75rem; }

.nav__toggle {
  display: none;
  background: none;
  border: none;
  width: 44px; height: 44px;
  padding: 0;
  border-radius: var(--r-sm);
}
.nav__toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--blue-900);
  margin: 5px auto;
  transition: all .25s var(--ease);
}

@media (max-width: 1080px) {
  .nav__menu, .nav__cta { display: none; }
  .nav__toggle { display: block; }
  .nav.is-open + .nav__mobile { display: block; }
}

.nav__mobile {
  display: none;
  background: white;
  border-top: 1px solid var(--ink-100);
  padding: 1rem var(--pad-page);
}
.nav__mobile a {
  display: block;
  padding: 0.85em 0;
  border-bottom: 1px solid var(--ink-100);
  color: var(--ink-700);
  font-weight: 500;
}
.nav__mobile a:last-child { border-bottom: none; }

/* ============================================
   Footer
   ============================================ */

.site-footer {
  background: var(--blue-900);
  color: var(--blue-100);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.site-footer h4 {
  color: white;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 1.25em;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.site-footer__brand img { height: 36px; }
.site-footer__brand strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  color: white;
}

.site-footer p { color: rgba(255,255,255,0.7); font-size: var(--fs-sm); margin: 0 0 0.4em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5em; }
.site-footer a {
  color: rgba(255,255,255,0.75);
  font-size: var(--fs-sm);
  transition: color .2s var(--ease);
}
.site-footer a:hover { color: white; }

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.5);
}

/* ============================================
   Reusable surfaces
   ============================================ */

.card {
  background: white;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  transition: all .3s var(--ease);
}
.card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}

.tag {
  display: inline-block;
  padding: 0.3em 0.75em;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--blue-50);
  color: var(--blue-700);
}
.tag--warm { background: var(--warm-100); color: var(--warm-700); }
.tag--solid { background: var(--blue-700); color: white; }

/* Icon stroke */
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Soft section bg */
.bg-soft { background: var(--blue-50); }
.bg-paper { background: var(--paper); }

/* Animations */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fade-up .8s var(--ease) both; }
.fade-up--delay-1 { animation-delay: .1s; }
.fade-up--delay-2 { animation-delay: .2s; }
.fade-up--delay-3 { animation-delay: .3s; }

/* Page hero (subpages) */
.page-hero {
  padding: 5rem 0 3rem;
  background:
    radial-gradient(ellipse at 80% 0%, var(--blue-100) 0%, transparent 60%),
    radial-gradient(ellipse at 0% 100%, var(--blue-50) 0%, transparent 50%),
    var(--paper);
  border-bottom: 1px solid var(--ink-100);
}
.page-hero h1 {
  font-size: var(--fs-4xl);
  margin-bottom: 0.4em;
}
.page-hero p {
  font-size: var(--fs-lg);
  max-width: 56ch;
  color: var(--ink-700);
}
