/* ==========================================================================
   Unidesk — Base, layout, header, footer, hero
   ========================================================================== */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--brand-600); text-decoration: none; transition: color var(--dur-fast); }
a:hover { color: var(--brand-700); }
ul, ol { list-style: none; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 3px solid var(--brand-400); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4, h5 { font-family: var(--font-head); color: var(--ink); line-height: 1.14; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { max-width: 68ch; }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.container-narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--tint { background: var(--brand-050); }
.section--navy { background: var(--grad-hero); color: #dfe8f5; }
.section--navy h2, .section--navy h3 { color: #fff; }
.grid { display: grid; gap: var(--sp-5); }
.grid > * { min-width: 0; } /* prevent grid children from overflowing on narrow screens */
.stack > * + * { margin-top: var(--sp-4); }
.center { text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 600; font-size: var(--fs-xs);
  letter-spacing: .12em; text-transform: uppercase; color: var(--brand-600);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--brand-500); border-radius: 2px; }
.section--navy .eyebrow { color: var(--brand-400); }
.section--navy .eyebrow::before { background: var(--brand-400); }
.section-head { max-width: 720px; margin-bottom: var(--sp-7); }
.section-head.center { margin-inline: auto; }
.section-head h2 { margin-top: var(--sp-3); }
.section-head p { color: var(--ink-muted); font-size: var(--fs-lead); margin-top: var(--sp-3); }
.section--navy .section-head p { color: #b9c8de; }
.lead { font-size: var(--fs-lead); color: var(--ink-soft); }

/* ==========================================================================
   Header / navigation
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--dur), border-color var(--dur), background var(--dur);
}
.site-header.is-scrolled { box-shadow: var(--sh-sm); border-color: var(--line-soft); background: rgba(255,255,255,.94); }
.nav { display: flex; align-items: center; gap: var(--sp-5); height: var(--header-h); }
.nav__logo { display: flex; align-items: center; flex: 0 0 auto; }
.nav__logo img { height: 34px; width: auto; }
.nav__menu { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav__link {
  position: relative; display: inline-flex; align-items: center;
  padding: .55rem .7rem; border-radius: var(--r-sm);
  font-family: var(--font-head); font-weight: 500; font-size: .92rem;
  color: var(--ink); white-space: nowrap;
  transition: color var(--dur-fast), background var(--dur-fast);
}
.nav__link::after {
  content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .32rem; height: 2px;
  background: var(--brand-500); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.nav__link:hover { color: var(--brand-600); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--brand-700); }
.nav__actions { display: flex; align-items: center; gap: var(--sp-3); margin-left: var(--sp-3); }
.nav__toggle { display: none; width: 46px; height: 46px; border-radius: var(--r-sm); color: var(--navy-800); }
.nav__toggle svg { margin-inline: auto; }

/* Skip link */
.skip-link { position: absolute; left: -999px; top: 0; z-index: 200; background: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0; box-shadow: var(--sh-sm); }
.skip-link:focus { left: 0; }

/* Programs dropdown */
.nav__item.has-dropdown { position: relative; }
.nav__dropbtn { cursor: pointer; }
.nav__caret { width: 16px; height: 16px; margin-left: .1rem; transition: transform var(--dur-fast); }
.nav__item.is-open .nav__caret { transform: rotate(180deg); }
.nav__dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(6px);
  min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-lg); padding: .5rem; opacity: 0; visibility: hidden;
  transition: opacity var(--dur-fast), transform var(--dur-fast) var(--ease-out); z-index: var(--z-overlay);
}
.nav__item.has-dropdown:hover .nav__dropdown,
.nav__item.is-open .nav__dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav__dropitem { display: block; padding: .6rem .8rem; border-radius: var(--r-sm); font-family: var(--font-head); font-weight: 500; font-size: .9rem; color: var(--ink); white-space: nowrap; transition: background var(--dur-fast), color var(--dur-fast); }
.nav__dropitem:hover { background: var(--brand-050); color: var(--brand-700); }
.nav__dropitem.is-active { background: var(--brand-050); color: var(--brand-700); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  --btn-bg: var(--brand-500); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .82rem 1.5rem; border-radius: var(--r-pill);
  font-family: var(--font-head); font-weight: 600; font-size: .96rem; line-height: 1;
  background: var(--btn-bg); color: var(--btn-fg); white-space: nowrap;
  box-shadow: var(--sh-xs);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur), background var(--dur-fast), color var(--dur-fast);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); color: var(--btn-fg); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--grad-brand); box-shadow: var(--sh-brand); }
.btn--primary:hover { box-shadow: 0 18px 40px rgba(46,134,193,.42); }
.btn--cta { background: var(--grad-cta); color: #3a2500; box-shadow: var(--sh-cta); }
.btn--cta:hover { color: #3a2500; box-shadow: 0 16px 36px rgba(224,147,15,.44); }
.btn--ghost { background: transparent; color: var(--navy-800); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { color: var(--brand-700); box-shadow: inset 0 0 0 1.5px var(--brand-400); background: var(--brand-050); }
.btn--light { background: #fff; color: var(--navy-800); box-shadow: var(--sh-sm); }
.btn--light:hover { color: var(--brand-700); }
.btn--outline-light { background: rgba(255,255,255,.06); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }
.btn--outline-light:hover { color: #fff; box-shadow: inset 0 0 0 1.5px #fff; background: rgba(255,255,255,.12); }
.btn--sm { padding: .6rem 1.05rem; font-size: .875rem; }
.btn--lg { padding: 1rem 1.9rem; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn--pulse { position: relative; }
.btn--pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(246,166,35,.55); animation: ctaPulse 2.6s var(--ease-out) infinite;
}
@keyframes ctaPulse { 0% { box-shadow: 0 0 0 0 rgba(246,166,35,.5);} 70%{ box-shadow: 0 0 0 14px rgba(246,166,35,0);} 100%{ box-shadow: 0 0 0 0 rgba(246,166,35,0);} }

/* ==========================================================================
   Hero — light, colorful, image-led
   ========================================================================== */
.hero { position: relative; background: var(--surface); overflow: clip; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; z-index: -1; width: 760px; height: 760px; border-radius: 50%;
  right: -240px; top: -320px; background: radial-gradient(circle at 40% 40%, var(--brand-100), transparent 66%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; width: 560px; height: 560px; border-radius: 50%;
  left: -220px; bottom: -280px; background: radial-gradient(circle, var(--coral-100), transparent 64%); opacity: .9;
}
.hero__grid {
  display: grid; grid-template-columns: 1.04fr .96fr; align-items: center; gap: var(--sp-8);
  padding-block: clamp(3rem, 2rem + 6vw, 6rem);
}
.hero__pill {
  display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .95rem; border-radius: var(--r-pill);
  background: var(--brand-050); border: 1px solid var(--brand-100); color: var(--brand-700);
  font-family: var(--font-head); font-weight: 600; font-size: var(--fs-sm);
}
.hero__pill svg { width: 16px; height: 16px; }
.hero__title { font-size: var(--fs-hero); color: var(--navy-800); letter-spacing: -0.02em; margin-block: var(--sp-5) var(--sp-4); }
.hero__title .hl { color: var(--brand-500); }
.hero__lead { font-size: var(--fs-lead); color: var(--ink-muted); max-width: 44ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-top: var(--sp-6); }

/* Social proof: avatar stack + stars */
.hero__proof { display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-6); flex-wrap: wrap; }
.avatar-stack { display: flex; }
.avatar-stack span {
  width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid #fff; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: .82rem; color: #fff; background: var(--grad-brand);
}
.avatar-stack span + span { margin-left: -11px; }
.avatar-stack span:nth-child(2) { background: var(--grad-coral); }
.avatar-stack span:nth-child(3) { background: var(--grad-violet); }
.avatar-stack span:nth-child(4) { background: var(--grad-mint); }
.hero__proof-text { display: grid; gap: 2px; font-size: var(--fs-sm); color: var(--ink-muted); }
.hero__proof-text b { color: var(--navy-800); }
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 15px; height: 15px; color: var(--cta-500); fill: currentColor; }

/* Hero visual: photo + floating Raahi mini-card */
.hero__visual { position: relative; }
.hero__media { position: relative; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-lg); }
.hero__media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(20,35,63,.06); pointer-events: none; }
.hero__media img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.hero__mini {
  position: absolute; left: -26px; bottom: -18px; z-index: 2; width: min(272px, 82%);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); padding: 1.1rem;
}
.hero__mini-head { display: flex; align-items: center; gap: .65rem; margin-bottom: .6rem; }
.hero__mini-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad-brand); display: grid; place-items: center; color: #fff; flex: 0 0 auto; }
.hero__mini-avatar svg { width: 20px; height: 20px; }
.hero__mini-head b { display: block; font-family: var(--font-head); color: var(--ink); line-height: 1.15; }
.hero__mini-head span { display: block; font-size: var(--fs-xs); color: var(--ink-muted); }
.hero__mini p { font-size: var(--fs-sm); color: var(--ink-soft); margin-bottom: .8rem; }
.hero__chip-float {
  position: absolute; z-index: 2; background: #fff; box-shadow: var(--sh-md); border-radius: var(--r-pill);
  padding: .55rem .9rem; font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: var(--navy-800);
  display: flex; align-items: center; gap: .45rem;
}
.hero__chip-float svg { width: 16px; height: 16px; color: var(--brand-500); }
.hero__chip-float--1 { top: -16px; right: 10px; }
.hero__chip-float--2 { bottom: 26%; right: -16px; }
.hero__chip-float--2 svg { color: var(--mint-500); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--navy-900); color: #a9b8d4; padding-top: var(--sp-9); }
.footer__top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: var(--sp-6); padding-bottom: var(--sp-7); }
.footer__brand img { height: 30px; filter: brightness(0) invert(1); margin-bottom: var(--sp-4); }
.footer__brand p { font-size: var(--fs-sm); color: #8ba0c2; max-width: 34ch; }
.footer__social { display: flex; gap: .6rem; margin-top: var(--sp-4); }
.footer__social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.06); color: #cdd9ec; transition: background var(--dur-fast), transform var(--dur-fast); }
.footer__social a:hover { background: var(--brand-500); color: #fff; transform: translateY(-3px); }
.footer__col h4 { color: #fff; font-size: .92rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: var(--sp-4); }
.footer__col a { display: block; color: #9fb0cf; font-size: var(--fs-sm); padding: .28rem 0; }
.footer__col a:hover { color: #fff; padding-left: 4px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.08); padding-block: var(--sp-5); display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; justify-content: space-between; font-size: var(--fs-sm); color: #7d92b6; }
.footer__statement { max-width: 60ch; }

/* ==========================================================================
   Reveal-on-scroll (works even before/without JS; GSAP enhances)
   ========================================================================== */
[data-reveal] { opacity: 0; transform: translateY(26px); }
.no-js [data-reveal], .reveal-ready [data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal].is-in { opacity: 1; transform: none; transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }

/* Fallback: if JS fails, show everything after load */
.no-anim [data-reveal] { opacity: 1 !important; transform: none !important; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-8); }
  .hero__visual { max-width: 520px; margin-inline: auto; width: 100%; }
  .footer__top { grid-template-columns: 1fr 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .hero__mini { position: static; width: 100%; margin-top: var(--sp-4); }
  .hero__chip-float--2 { bottom: -14px; right: 6px; }
}
@media (max-width: 900px) {
  .nav { gap: .6rem; }
  .nav__logo img { height: 30px; }
  .nav__actions { gap: .5rem; margin-left: auto; }
  .nav__menu, .nav__actions .btn--ghost { display: none; }
  .nav__toggle { display: grid; place-items: center; }
  /* Mobile drawer */
  .nav__menu.is-open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: #fff; padding: var(--sp-4); box-shadow: var(--sh-lg);
    border-top: 1px solid var(--line); max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    animation: drawerIn var(--dur) var(--ease-out);
  }
  .nav__menu.is-open .nav__link { padding: .85rem 1rem; font-size: 1rem; border-radius: var(--r-sm); width: 100%; justify-content: space-between; }
  .nav__menu.is-open .nav__link::after { display: none; }
  .nav__menu.is-open .nav__link.is-active { background: var(--brand-050); }
  /* Dropdown becomes inline, always-visible on mobile */
  .nav__menu.is-open .nav__dropdown {
    position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none;
    border: 0; border-left: 2px solid var(--brand-100); border-radius: 0; margin: 0 0 .4rem .6rem; padding: 0 0 0 .4rem; min-width: 0;
  }
  .nav__menu.is-open .nav__dropitem { padding: .7rem .8rem; }
  .nav__menu.is-open .nav__caret { display: none; }
}
@keyframes drawerIn { from { opacity: 0; transform: translateY(-10px);} to { opacity:1; transform:none;} }
@media (max-width: 620px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
  .hero__actions .btn { flex: 1 1 auto; }
  .hero__chip-float { display: none; }
}
@media (max-width: 480px) {
  /* Long CTA labels wrap instead of forcing horizontal overflow */
  .btn { white-space: normal; text-align: center; }
}
@media (max-width: 540px) {
  .nav__logo img { height: 26px; }
  .nav__toggle { width: 42px; height: 42px; }
  /* Keep the highlighted CTA compact so the nav never overflows */
  .nav__actions .btn { padding: .55rem .95rem; font-size: .84rem; }
}
@media (max-width: 380px) {
  .nav__actions .btn { padding: .5rem .8rem; }
}
@media (max-width: 420px) {
  .footer__top { grid-template-columns: 1fr; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .btn--pulse::after { display: none; }
}
