/* ============================================================
   GuateLife — editorial type, glass surfaces, motion
   ============================================================ */

:root {
  --blue: #8FB1D6;
  --green: #A6C56B;
  --blue-deep: #5E80AC;
  --green-deep: #7CA24E;
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }

/* Use small-viewport unit so the hero fills mobile correctly */
.hero { height: 100svh; }

/* ---------- Wordmark ---------- */
.wordmark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.wordmark .g-blue { color: var(--blue); }
.wordmark .g-green { color: var(--green); }
/* Wordmark in nav (over dark hero) gets a touch more luminance */
#navPill .wordmark .g-blue { color: #A9C4E2; }
#navPill .wordmark .g-green { color: #BBD485; }

/* ---------- Hero headline ---------- */
.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.12;
  letter-spacing: -0.021em;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
}
/* On mobile (no forced <br>) let the line balance naturally */
@media (max-width: 767px) {
  .hero-title { text-wrap: balance; }
}

/* ---------- Vignette ---------- */
.hero-vignette {
  background:
    radial-gradient(120% 90% at 50% 35%, transparent 45%, rgba(5, 8, 11, 0.55) 100%),
    linear-gradient(to bottom, rgba(5, 8, 11, 0.25), transparent 25%);
  pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn-primary,
.btn-glass,
.btn-liquid-glass,
.btn-light,
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  width: 100%;
  transition: transform 0.3s var(--ease-soft), background-color 0.3s ease,
    box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
@media (min-width: 640px) {
  .btn-primary, .btn-glass, .btn-liquid-glass, .btn-light, .btn-dark { width: auto; }
}

/* Primary — luminous brand gradient pill */
.btn-primary {
  color: #0B0F14;
  background: linear-gradient(120deg, var(--blue) 0%, var(--green) 100%);
  box-shadow: 0 10px 30px -8px rgba(143, 177, 214, 0.5);
}
.btn-primary:hover {
  box-shadow: 0 16px 40px -8px rgba(166, 197, 107, 0.55);
  transform: translateY(-2px);
}

/* Glass — frosted secondary on imagery */
.btn-glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

/* Liquid glass — refractive frosted pill on imagery */
.btn-liquid-glass {
  position: relative;
  isolation: isolate;
  color: #fff;
  background: transparent;
  transition: transform 0.4s var(--ease-soft);
}
.btn-liquid-glass:hover {
  transform: translateY(-2px) scale(1.04);
}
.btn-liquid-glass::before,
.btn-liquid-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.btn-liquid-glass::after {
  z-index: -2;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.btn-liquid-glass::before {
  z-index: -1;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.12),
    inset 3px 3px 0.5px -3.5px rgba(255, 255, 255, 0.1),
    inset -3px -3px 0.5px -3.5px rgba(255, 255, 255, 0.85),
    inset 1px 1px 1px -0.5px rgba(255, 255, 255, 0.6),
    inset -1px -1px 1px -0.5px rgba(255, 255, 255, 0.6),
    inset 0 0 6px 6px rgba(255, 255, 255, 0.1),
    inset 0 0 2px 2px rgba(255, 255, 255, 0.06),
    0 0 14px rgba(255, 255, 255, 0.15);
  transition: box-shadow 0.4s var(--ease-soft);
}
.btn-liquid-glass:hover::before {
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.16),
    inset 3px 3px 0.5px -3.5px rgba(255, 255, 255, 0.14),
    inset -3px -3px 0.5px -3.5px rgba(255, 255, 255, 0.95),
    inset 1px 1px 1px -0.5px rgba(255, 255, 255, 0.7),
    inset -1px -1px 1px -0.5px rgba(255, 255, 255, 0.7),
    inset 0 0 8px 8px rgba(255, 255, 255, 0.16),
    inset 0 0 2px 2px rgba(255, 255, 255, 0.08),
    0 0 22px rgba(255, 255, 255, 0.25);
}

/* Compact liquid glass for the nav pill */
.btn-liquid-glass.nav-pill {
  width: auto;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* Once the nav sits over light sections, flip to a light-surface variant
   (dark insets + dark text) so the pill stays legible on #navPill's light bg */
#nav.on-light .btn-liquid-glass {
  color: #0F172A;
}
#nav.on-light .btn-liquid-glass::after {
  background: rgba(255, 255, 255, 0.4);
}
#nav.on-light .btn-liquid-glass::before {
  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.08),
    inset 3px 3px 0.5px -3px rgba(15, 23, 42, 0.45),
    inset -3px -3px 0.5px -3px rgba(15, 23, 42, 0.4),
    inset 1px 1px 1px -0.5px rgba(15, 23, 42, 0.25),
    inset -1px -1px 1px -0.5px rgba(15, 23, 42, 0.25),
    inset 0 0 6px 6px rgba(15, 23, 42, 0.06),
    inset 0 0 2px 2px rgba(15, 23, 42, 0.04),
    0 0 12px rgba(255, 255, 255, 0.5);
}
#nav.on-light .btn-liquid-glass:hover::before {
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.12),
    inset 3px 3px 0.5px -3px rgba(15, 23, 42, 0.55),
    inset -3px -3px 0.5px -3px rgba(15, 23, 42, 0.5),
    inset 1px 1px 1px -0.5px rgba(15, 23, 42, 0.32),
    inset -1px -1px 1px -0.5px rgba(15, 23, 42, 0.32),
    inset 0 0 8px 8px rgba(15, 23, 42, 0.08),
    inset 0 0 2px 2px rgba(15, 23, 42, 0.05),
    0 0 16px rgba(255, 255, 255, 0.6);
}

/* Light pill on dark cards */
.btn-light { color: #0B0F14; background: #fff; }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(0,0,0,0.4); }

/* Dark pill on light cards */
.btn-dark { color: #fff; background: #0F172A; }
.btn-dark:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(15,23,42,0.5); }

/* ---------- Nav ---------- */
.nav-link { position: relative; transition: color 0.25s ease; }
.nav-link:hover { color: #fff; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  height: 1px; width: 0;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 0.3s var(--ease-soft);
}
.nav-link:hover::after { width: 100%; }

/* Solidify nav on scroll */
#nav.scrolled #navPill {
  background: rgba(11, 15, 20, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.5);
}
/* After leaving hero, nav links + wordmark adapt to light bg */
#nav.on-light #navPill { background: rgba(255,255,255,0.7); border-color: rgba(15,23,42,0.08); box-shadow: 0 10px 40px -16px rgba(15,23,42,0.25); }
#nav.on-light #navLinks { color: rgba(15,23,42,0.65); }
#nav.on-light .nav-link:hover { color: #0F172A; }
#nav.on-light #navPill .wordmark .g-blue { color: var(--blue-deep); }
#nav.on-light #navPill .wordmark .g-green { color: var(--green-deep); }
#nav.on-light #navToggle { color: #0F172A; border-color: rgba(15,23,42,0.12); }

/* Language toggle */
.lang-toggle {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.lang-toggle-code {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Mobile menu open state */
#mobileMenu.open { opacity: 1; transform: scaleY(1); pointer-events: auto; }

/* ---------- Trust strip ---------- */
.trust-logo {
  color: #0F172A;
  opacity: 0.4;
  filter: grayscale(1);
  transition: opacity 0.3s ease;
}
.trust-logo:hover { opacity: 0.85; }
.trust-strip .wordmark { filter: none; }

/* ---------- Misc bits ---------- */
.dot { height: 7px; width: 7px; border-radius: 9999px; display: inline-block; }
.social-ico {
  display: grid; place-items: center;
  height: 40px; width: 40px;
  border-radius: 9999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: #475569;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}
.social-ico:hover { color: #0F172A; border-color: rgba(15,23,42,0.25); background: rgba(15,23,42,0.03); }

/* Card hover lift — transform only, no layout shift */
.step-card, .stat-card, .float-card, .path-card, .mentor-card { transition: transform 0.4s var(--ease-soft), background-color 0.3s ease; }
.step-card:hover { transform: translateY(-4px); }
.path-card:hover { transform: translateY(-4px); }
.mentor-card:hover { transform: translateY(-4px); }
.mentor-card:hover .mentor-photo { box-shadow: 0 16px 40px -16px rgba(95, 130, 170, 0.5); }

/* ============================================================
   ONBOARDING WIZARD
   ============================================================ */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 90% at 50% 35%, rgba(94, 128, 172, 0.16) 0%, transparent 50%),
    #0B0F14;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.98);
  transition: opacity 0.35s var(--ease-soft), transform 0.35s var(--ease-soft),
    visibility 0.35s var(--ease-soft);
}
.onboarding-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
}

/* Progress bar */
.onboarding-progress-track {
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
}
.onboarding-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 0.4s var(--ease-soft);
}

/* Close button */
.onboarding-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: grid;
  place-items: center;
  height: 40px;
  width: 40px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.onboarding-close:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

/* Centered content */
.onboarding-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem;
}
.onboarding-content {
  width: 100%;
  max-width: 640px;
}
.onboarding-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 1.25rem;
}
.onboarding-question {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
  font-size: clamp(1.75rem, 5vw, 3rem);
  color: #fff;
}

/* Single-line underline input */
.onboarding-input {
  margin-top: 2.5rem;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0;
  padding: 0.5rem 0;
  font-family: inherit;
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: #fff;
  transition: border-color 0.25s ease;
}
.onboarding-input::placeholder { color: rgba(255, 255, 255, 0.35); }
.onboarding-input:focus {
  outline: none;
  border-bottom-color: var(--blue);
}

.onboarding-error {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--green);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.onboarding-error.visible { opacity: 1; }

/* Multi-select option chips */
.onboarding-options {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.onboarding-option {
  padding: 0.6rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.onboarding-option:hover { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.onboarding-option:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.onboarding-option.selected {
  background: linear-gradient(120deg, var(--blue) 0%, var(--green) 100%);
  border-color: transparent;
  color: #0B0F14;
}

/* Bottom navigation */
.onboarding-nav {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.onboarding-back {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s ease;
}
.onboarding-back:hover { color: #fff; }
.onboarding-back.hidden-step { visibility: hidden; pointer-events: none; }

/* Keep nav buttons inline regardless of viewport width */
.onboarding-nav .btn-primary { width: auto; }

/* Step transition */
.onboarding-step {
  animation: onboardingStepIn 0.4s var(--ease-soft);
}
@keyframes onboardingStepIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Done slide */
.onboarding-done-icon {
  display: grid;
  place-items: center;
  height: 56px;
  width: 56px;
  margin: 0 auto 1.5rem;
  border-radius: 9999px;
  background: linear-gradient(120deg, var(--blue) 0%, var(--green) 100%);
  color: #0B0F14;
}

.onboarding-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.5rem;
  border-radius: 9999px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--blue);
  animation: onboardingSpin 0.8s linear infinite;
}

@keyframes onboardingSpin {
  to { transform: rotate(360deg); }
}

.onboarding-error-icon {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
}

@media (max-width: 640px) {
  .onboarding-body { padding: 4.5rem 1.25rem; }
  .onboarding-nav { margin-top: 2rem; }
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(8px);
  transition: opacity 0.9s var(--ease-soft), transform 0.9s var(--ease-soft),
    filter 0.9s var(--ease-soft);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform, filter;
}
[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Staggered children */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(6px);
  transition: opacity 0.8s var(--ease-soft), transform 0.8s var(--ease-soft),
    filter 0.8s var(--ease-soft);
}
[data-stagger].in-view > * {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal],
  [data-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .hero-media { transform: none !important; }
  .btn-primary:hover, .btn-glass:hover, .btn-liquid-glass:hover, .btn-light:hover, .btn-dark:hover,
  .step-card:hover, .path-card:hover { transform: none; }
  .onboarding-overlay { transition: none; }
  .onboarding-step { animation: none; }
  .onboarding-spinner { animation: none; }
}
