*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { background-color: #ffffff; color-scheme: light; }

:root {
  --purple: #BD53FD;
  --teal: #28CDCF;
  --navy: #222151;
  --iris: #5D60C3;
  --lavender: #8E5DC3;
  --light-teal: #C5E7F4;
  --light-lav: #D3D2FB;
  --off-white: #f8f9fc;
  --text: #3a3960;
  --text-light: #6b6b8d;
  --white: #fff;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}

/* ========================================
   NAV
======================================== */
.h2-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s ease;
}
.h2-nav.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(34,33,81,0.06);
  padding: 14px 0;
}
.h2-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.h2-nav-logo img {
  height: 32px;
  transition: all 0.3s ease;
}
.h2-nav.scrolled .h2-nav-logo .logo-light { display: none; }
.h2-nav.scrolled .h2-nav-logo .logo-dark { display: block; }
.h2-nav-logo .logo-dark { display: none; }
.h2-nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.h2-nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.2s;
}
.h2-nav.scrolled .h2-nav-links a {
  color: var(--text);
}
.h2-nav-links a:hover {
  color: var(--teal);
}
.h2-nav-links a.active {
  color: var(--teal);
}
.h2-nav.scrolled .h2-nav-links a.active {
  color: var(--teal);
}
.h2-nav-cta {
  padding: 10px 24px !important;
  border-radius: 8px !important;
  background: var(--teal) !important;
  color: var(--navy) !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}
.h2-nav-cta:hover {
  background: #22b5b6 !important;
}
.h2-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  position: relative;
}
.h2-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}
.h2-nav.scrolled .h2-menu-btn span { background: var(--navy); }
.h2-menu-btn span:nth-child(1) { top: 0; }
.h2-menu-btn span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.h2-menu-btn span:nth-child(3) { bottom: 0; }
.h2-menu-btn.open span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.h2-menu-btn.open span:nth-child(2) { opacity: 0; }
.h2-menu-btn.open span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* Mobile menu — card style with margins so the viewport edges stay light
   (keeps iOS Safari from tinting the browser chrome to match the menu panel) */
.h2-mobile-menu {
  position: fixed;
  top: 16px;
  right: 16px;
  width: calc(100% - 32px);
  max-width: 360px;
  max-height: calc(100vh - 32px);
  background: var(--navy);
  border-radius: 20px;
  z-index: 999;
  padding: 72px 28px 24px;
  transform: translateX(calc(100% + 24px));
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.h2-mobile-menu.open { transform: translateX(0); }
.h2-mobile-menu a {
  display: block;
  padding: 16px 0;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
/* Invisible click-catcher. No background, no blur. Giving Safari any kind of
   full-viewport fixed element with a backdrop-filter or opaque bg makes it
   treat the menu as a modal and un-hide the URL bar chrome — which is what
   was causing the viewport edges to change color when the menu opens. */
.h2-mobile-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 998;
  pointer-events: none;
}
.h2-mobile-overlay.open { pointer-events: all; }

/* While the mobile menu is open, flip the nav bar itself to the menu's navy
   so the nav + card read as one continuous navy sheet (no visible seam at the
   nav/card boundary regardless of scroll position). Uses the light logo and
   white hamburger bars to match. */
body:has(.h2-mobile-menu.open) .h2-nav {
  background: var(--navy) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}
body:has(.h2-mobile-menu.open) .h2-nav .h2-nav-logo .logo-light { display: block !important; }
body:has(.h2-mobile-menu.open) .h2-nav .h2-nav-logo .logo-dark { display: none !important; }
body:has(.h2-mobile-menu.open) .h2-nav .h2-menu-btn span { background: #fff !important; }

/* Mobile nav toggle */
@media (max-width: 991px) {
  .h2-nav-links { display: none; }
  .h2-menu-btn { display: block; }
}
