/* =========================================
   Global Resets & Design System Variables
   Base resets, font settings, and color variables
   ========================================= */
:root {
  --font-main: 'Exo', system-ui, -apple-system, sans-serif;
  
  /* Page Theme Colors */
  --m-bg: #F6F6FF;
  --m-ink: #151786;
  --m-ink-soft: #1e134d;
  --m-purple: #6F5ACD;
  --m-purple-light: #A996FF;
  --m-purple-pale: #E2E2FF;
  --m-pink-title: #FF93DD;
  --m-navy: #151786;
  --m-header-bg: rgba(246, 246, 255, 0.95);
  
  /* Solid Card Colors */
  --card-purple: #6F5ACD;
  --card-grey-blue: #8686bf;
  --card-coral: #E87A7A;
  --card-yellow: #FAEE99;
  --card-gold: #FACC39;
  --card-navy: #34308F;
  --card-red: #D43133;
}

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

html { 
  scroll-behavior: smooth; 
}

body {
  font-family: var(--font-main);
  color: var(--m-ink);
  background: var(--m-bg);
  min-height: 100vh;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { 
  color: inherit; 
  text-decoration: none; 
}

button { 
  font: inherit; 
  cursor: pointer; 
}

h1, h2, h3 { 
  margin: 0 0 .5rem; 
  font-weight: 700; 
}

p { 
  margin: 0 0 1rem; 
  color: var(--m-ink-soft); 
}

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

.skip-link {
  position: absolute; 
  left: -999px; 
  top: 0.5rem; 
  background: var(--m-navy);
  color: #fff; 
  padding: 0.6rem 1rem; 
  border-radius: 8px; 
  z-index: 100;
  font-weight: 700; 
  font-size: 0.9rem;
}

.skip-link:focus { 
  left: 0.75rem; 
}

/* Dynamic Auth View State */
[data-logged-in-view] {
  display: none;
}

[data-logged-out-view] {
  display: inline-flex;
}

/* =========================================
   Header Navigation
   Common header container, logo, and nav links
   ========================================= */
.header-wrapper {
  position: sticky; 
  top: 0; 
  z-index: 1000; 
  background: var(--m-header-bg);
  border-bottom: 1px solid rgba(111, 90, 205, 0.08);
  transition: box-shadow 0.2s ease;
}

.header-wrapper.is-scrolled { 
  box-shadow: 0 4px 20px rgba(30, 27, 110, 0.1); 
}

.top-nav-fixed {
  max-width: 1120px; 
  margin: 0 auto; 
  padding: 0.65rem 1.5rem;
  display: flex; 
  align-items: center; 
  gap: 1.5rem; 
  justify-content: space-between;
}

.nav-logo {
  display: flex; 
  align-items: center; 
  background: none;
  border: none; 
  padding: 0; 
  flex-shrink: 0; 
  outline-offset: 4px;
  cursor: default;
}

.nav-logo-img {
  height: auto; 
  width: auto; 
  display: block; 
  object-fit: contain;
}

.top-nav-menu { 
  display: flex; 
  align-items: center; 
  gap: 0.5rem; 
  flex: 1; 
  justify-content: center; 
}

.nav-item { 
  position: relative; 
}

.nav-text { font-size: 28px; font-weight: 800; color: var(--m-purple); letter-spacing: 0.08em; }

.nav-link {
  background: transparent; 
  border: none; 
  font-size: 17px; 
  font-weight: 500;
  letter-spacing: 0.06em; 
  color: var(--m-purple); 
  padding: 0.5rem 0.8rem;
  border-radius: 8px; 
  text-transform: uppercase; 
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover, 
.nav-link:focus-visible {
  color: var(--m-pink-title); 
  outline: none;
}

.nav-link.is-active {
  color: var(--m-pink-title); 
  background: rgba(250, 206, 237, 0.16);
}

.nav-dropdown {
  display: none; 
  position: absolute; 
  top: calc(100% + 5px); 
  left: 0;
  min-width: 140px; 
  background: #fff; 
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(30, 27, 110, 0.15); 
  padding: 0.25rem; 
  z-index: 60;
}

.nav-dropdown.is-open,
.nav-dropdown:not([hidden]) { 
  display: block; 
}

.nav-dropdown a {
  display: block; 
  padding: 0.55rem 0.8rem; 
  border-radius: 6px; 
  font-weight: 500;
  font-size: 16px; 
  color: var(--m-purple);
  letter-spacing: 0.05em;
  background: var(--m-purple-pale);
  text-align: center; 
  text-transform: uppercase;
}

.nav-dropdown a:hover { 
  background: #d4cff5; 
}

/* =========================================
   Header Authentication Actions
   Login triggers, user profile menu, and popups
   ========================================= */
.nav-right-actions { 
  flex-shrink: 0; 
  display: flex; 
  align-items: center; 
}

.auth-trigger-wrapper { 
  position: relative; 
  display: inline-flex; 
  align-items: center; 
}

.auth-icon-btn {
  display: flex; 
  align-items: center; 
  justify-content: center; 
  background: none;
  border: none; 
  padding: 0.15rem; 
  border-radius: 50%;
  cursor: pointer;
}

.auth-icon-btn:hover { 
  background: var(--m-pink-title); 
  outline: none;
  transition: color 0.15s, background 0.15s;
}

.auth-icon-img, 
.user-avatar-img {
  width: auto; 
  height: auto; 
  object-fit: contain; 
}

.user-avatar-img { 
  border-radius: 50%;
}

.auth-popup-btn {
  display: none; 
  position: absolute; 
  top: calc(100% + 5px); 
  right: 0;
  z-index: 80; 
  white-space: nowrap; 
  font-size: 16px; 
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--m-purple); 
  background: var(--m-purple-pale); 
  border: 4px solid #fff;
  border-radius: 6px; 
  padding: 0.55rem 0.9rem; 
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(30, 27, 110, 0.15);
  cursor: pointer;
}

.auth-popup-btn.is-open,
.auth-popup-btn:not([hidden]) {
  display: inline-block;
}

.auth-popup-btn:hover { 
  background: #d4cff5; 
}

/* Profile Dropdown Container */
.profile-menu-wrapper { 
  position: relative; 
  display: inline-flex; 
  align-items: center; 
}

.profile-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.profile-trigger-btn strong, 
[data-current-user] { 
  font-size: 18px; 
  font-weight: 800; 
  color: var(--m-purple); 
}

.profile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 80;
}

.profile-dropdown.is-open,
.profile-dropdown:not([hidden]) {
  display: block;
}

.btn-logout {
  display: block;
  width: 100%;
  white-space: nowrap; 
  font-size: 16px; 
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--m-purple); 
  background: var(--m-purple-pale); 
  border: 4px solid #fff;
  border-radius: 6px; 
  padding: 0.55rem 0.9rem; 
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(30, 27, 110, 0.15);
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-logout:hover { 
  background: #d4cff5; 
}

/* =========================================
   Side Initiatives Panel
   Slide-out side menu for projects
   ========================================= */
.side-panel {
  position: fixed; 
  top: 0; 
  left: 0; 
  height: 100%; 
  width: 0; 
  overflow: hidden;
  background: #fff; 
  box-shadow: 8px 0 30px rgba(30, 27, 110, 0.12);
  z-index: 70; 
  transition: width 0.22s ease;
}

.side-panel.is-open { 
  width: 220px; 
}

.side-panel-inner { 
  width: 220px; 
  padding: 5rem 1.2rem 1.5rem; 
  position: relative; 
}

.side-panel-close {
  position: absolute; 
  top: 1rem; 
  right: 1rem; 
  background: none; 
  border: none;
  font-size: 1.2rem; 
  color: var(--m-ink-soft); 
  padding: 0.35rem 0.5rem; 
  border-radius: 6px;
}

.side-panel-close:hover { 
  background: var(--m-purple-pale); 
  color: var(--m-navy); 
}

.side-panel-label { 
  font-size: 0.72rem; 
  text-transform: uppercase; 
  font-weight: 700; 
  margin-bottom: 0.8rem; 
  color: var(--m-ink-soft); 
}

.side-panel-link {
  display: block; 
  background: var(--m-purple-pale); 
  color: var(--m-purple); 
  font-weight: 800;
  padding: 0.85rem 1rem; 
  border-radius: 10px; 
  text-align: center; 
  text-transform: uppercase;
}

.side-panel-link:hover { 
  background: #d4cff5; 
}

.side-panel-backdrop { 
  position: fixed; 
  inset: 0; 
  background: rgba(20, 16, 50, 0.35); 
  z-index: 65; 
}

.side-panel-backdrop[hidden] { 
  display: none !important; 
}

/* =========================================
   Hero Section
   Banner typography, action buttons, and hero illustration
   ========================================= */
.btn-img-action {
  display: inline-block; 
  background: none; 
  border: none; 
  padding: 0;
  line-height: 0; 
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-img-action:hover { 
  transform: translateY(-2px); 
  filter: brightness(1.03); 
}

.hero-section {
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  min-height: calc(100vh - 72px);
}

.hero-grid { 
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: grid; 
  grid-template-columns: 1.05fr 1fr; 
  gap: 3rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: 72px; 
  line-height: 1.08; 
  color: var(--m-navy);
  margin: 0 0 1.75rem; 
  letter-spacing: 0.04em; 
  font-weight: 400;
}

.hero-light-text { 
  font-weight: 400; 
}

.hero-strong-text { 
  font-weight: 800; 
}

.hero-copy .btn-img-action img { 
  height: auto; 
  width: 100%; 
  max-width: 100%; 
  display: block; 
}

.hero-illustration { 
  width: 100%; 
  max-width: 420px; 
  height: auto; 
  display: block; 
  margin: 0 auto; 
}

/* =========================================
   Content Section Commons & Story Arc Title
   Shared section wrapper and curved text header
   ========================================= */
.section-wrapper { 
  max-width: 1120px; 
  margin: 0 auto; 
  padding: 5.5rem 1.5rem;
}

.section-title {
  text-align: center; 
  font-size: clamp(2rem, 5vw, 3.25rem); 
  font-weight: 800;
  margin-bottom: 2.5rem; 
  letter-spacing: 0.02em; 
  color: var(--m-pink-title);
}

.story-title-wrapper {
  position: relative; 
  z-index: 3; 
  margin: 0 0 -1.5rem; 
  display: flex;
  justify-content: flex-start; 
  padding-left: clamp(0.4rem, 4vw, 2.5rem);
  top: -3rem; 
  left: -4.5rem; 
  overflow: visible; 
  pointer-events: none;
}

.arc-text {
  position: relative; 
  display: flex; 
  justify-content: center;
  width: 300px; 
  height: 160px; 
  transform: rotate(-26deg);
}

.arc-text span {
  position: absolute; 
  font-weight: 800; 
  font-size: 48px; 
  color: var(--m-pink-title);
  text-transform: uppercase; 
  transform-origin: 50% 170px;
  transform: rotate(calc(var(--i) * 12deg));
}

.arc-text span:nth-child(1) { --i: -4.5; }
.arc-text span:nth-child(2) { --i: -3.2; }
.arc-text span:nth-child(3) { --i: -1.8; }
.arc-text span:nth-child(4) { --i: -1; }
.arc-text span:nth-child(5) { --i: 0; }
.arc-text span:nth-child(6) { --i: 1.2; }
.arc-text span:nth-child(7) { --i: 2.4; }
.arc-text span:nth-child(8) { --i: 3.7; }
.arc-text span:nth-child(9) { --i: 4.9; }

/* =========================================
   Content Cards Grid & Solid Card Styles
   ========================================= */
.cards-grid { 
  display: grid; 
  gap: 1.5rem; 
  align-items: stretch; 
}

.cards-grid-3 { 
  grid-template-columns: repeat(3, 1fr); 
}

.content-card {
  position: relative; 
  border-radius: 20px; 
  padding: 4.5rem 1.5rem 1.85rem;
  overflow: visible; 
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  max-width: 360px;
  min-height: 380px;
}

.content-card:hover { 
  transform: translateY(-4px); 
  box-shadow: 0 14px 32px rgba(30, 27, 110, 0.16); 
}

.content-card h3 { 
  font-size: 21px; 
  font-weight: 800; 
  margin: 0 0 1.5rem; 
  text-align: center; 
  letter-spacing: 0.02em;
}

.content-card p { 
  font-size: 16px; 
  font-weight: 500; 
  line-height: 1.5;
  margin: 0; 
  text-align: center; 
  padding: 0 0.15rem; 
}

.card-subtitle { 
  display: block; 
  padding-top: 8px;
  font-size: 18px; 
  font-weight: 800; 
  margin-top: 0.15rem; 
}

/* Solid Card Palette */
.card-grey-blue { background: var(--card-grey-blue); }
.card-grey-blue h3 { color: var(--card-yellow); }
.card-grey-blue p { color: #E4A5A8; }

.card-coral { background: var(--card-coral); }
.card-coral h3 { color: var(--card-purple); }
.card-coral p { color: var(--card-yellow); }

.card-yellow { background: var(--card-yellow); }
.card-yellow h3 { color: var(--card-coral); }
.card-yellow p { color: var(--card-purple); }

.card-gold { background: var(--card-gold); }
.card-gold h3 { color: var(--card-red); }
.card-gold .card-subtitle { color: #fff; }
.card-gold p { color: var(--card-red); }

.card-navy { background: var(--card-navy); }
.card-navy h3 { color: var(--card-gold); }
.card-navy .card-subtitle { color: #fff; }
.card-navy p { color: var(--card-gold); }

.card-red { background: var(--card-red); }
.card-red h3 { color: var(--card-navy); }
.card-red .card-subtitle { color: #fff; }
.card-red p { color: var(--card-navy); }

.card-graphic-asset { 
  display: block; 
  height: auto; 
  object-fit: contain; 
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12)); 
}

.card-icon-wrapper { 
  position: absolute; 
  pointer-events: none; 
  z-index: 2; 
  display: flex; 
}

.story-icon-wrapper { 
  left: 50%; 
  top: 0; 
  transform: translate(-50%, -66%); 
  width: 100%; 
  justify-content: center; 
}

.card-graphic--bulb { height: 100%; max-width: 100%; }
.card-graphic--firework { height: 100%; max-width: 100%; }
.card-graphic--stars { height: 100%; max-width: 100%; }
.story-cards-grid { padding-top: 1.8rem; }

#about-us .content-card { padding-top: 40px; min-height: 410px;}
.about-cards-grid { padding-top: 1px; }
.icon-top-left { top: -0.01rem; left: -1rem; }
.card-graphic--laptop { height: 100%; max-width: 100%; }

.icon-top-right { top: -3em; right: -2rem; }
.card-graphic--puzzle { height: 100%; max-width: 100%; }

.icon-bottom-right { bottom: 0.7rem; left: 7rem; }
.card-graphic--star { height: 100%; max-width: 100%; }

.section-tagline {
  font-family: 'Dekko', cursive;
  text-align: center; 
  font-size: 25px;
  font-style: italic; 
  font-weight: 500; 
  color: var(--m-purple);
  margin-top: 2.2rem; 
  line-height: 1.4;
}

/* =========================================
   Join & Contact Split Layout
   ========================================= */
.split-section { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 3rem; 
  align-items: start;
  max-width: 990px;
  margin: 0 auto;
  width: 100%;
}

.split-heading { 
  font-size: 48px;
  line-height: 1.1;
  font-weight: 700; 
  color: var(--m-purple);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.split-left-panel .split-heading {
  margin-top: 0;
}

.split-heading-soft {
  color: var(--m-purple);
}

.split-left-panel p { 
  font-size: 17px; 
  color: var(--m-ink-soft); 
  max-width: 36ch; 
  margin-bottom: 1.2rem; 
  line-height: 1.55; 
}

.split-left-panel .btn-img-action img { 
  height: 100%; 
  width: auto; 
  display: block; 
}

.contact-info-list { 
  display: flex; 
  flex-direction: column; 
  gap: 1.1rem; 
  margin-top: 0;
  padding-top: 0;
}

.contact-info-list > div { 
  display: grid; 
  grid-template-columns: 120px 1fr;
  gap: 0.75rem 1.95rem; 
  align-items: start; 
}

.contact-info-list dt { 
  font-size: 17px; 
  font-weight: 600; 
  color: var(--m-pink-title); 
  padding-top: 0.1rem; 
  text-align: right;
}

.contact-info-list dd { 
  font-size: 17px; 
  color: var(--m-ink-soft); 
  margin: 0; 
  line-height: 1.5; 
}

.contact-info-list a { 
  color: var(--m-purple); 
  font-weight: 700; 
  text-decoration: underline; 
  text-underline-offset: 2px; 
}

.contact-info-list a:hover { 
  color: var(--m-pink-title); 
}

/* =========================================
   Site Footer & Scroll-To-Top Button
   ========================================= */
.site-footer { 
  font-family:'Arial', serif;
  text-align: center; 
  padding: 2rem 1.5rem 3rem; 
  font-size: 0.78rem; 
  color: var(--m-purple); 
}

#scrollTopBtn {
  position: fixed; 
  bottom: 24px; 
  right: 50px; 
  background: transparent; 
  border: none;
  padding: 0; 
  cursor: pointer; 
  z-index: 999; 
  opacity: 0; 
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#scrollTopBtn.is-visible { 
  opacity: 0.8; 
  visibility: visible; 
}

#scrollTopBtn img { 
  width: 50px; 
  height: 50px; 
  display: block; 
  pointer-events: none; 
}

/* =========================================
   Responsive Mobile Layouts (Max 900px)
   ========================================= */
@media (max-width: 900px) {
  .hero-section { 
    padding: 4rem 1.25rem 3rem;
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .hero-copy {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 360px;
    margin: 0 auto;
  }

  .hero-copy h1 {
    font-size: 52px;
  }

  .hero-art-wrapper { 
    order: -1;
  }

  .hero-illustration {
    max-width: 300px;
    margin: 0 auto;
  }

  .nav-logo { 
    cursor: pointer;
  }

  .nav-logo-img { 
    height: 50px;
  }

  .top-nav-fixed { 
    flex-wrap: nowrap;
    position: relative;
  }

  .top-nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(246, 246, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(111, 90, 205, 0.15);
    padding: 1rem;
    box-shadow: 0 12px 28px rgba(30, 27, 110, 0.12);
    z-index: 55;
  }

  .top-nav-menu.is-open { 
    display: flex;
  }

  .nav-link { 
    width: 100%;
    text-align: left;
    padding: 0.85rem;
    border-radius: 8px;
  }

  .nav-dropdown { 
    position: static;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0 1rem;
  }

  .nav-dropdown.is-open,
  .nav-dropdown:not([hidden]) { 
    display: block;
  }

  .section-wrapper { 
    padding: 4rem 1.25rem;
  }

  .cards-grid,
  .cards-grid-3, 
  .split-section { 
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4.5rem;
    width: 100%;
  }

  .split-left-panel,
  .split-right-panel {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
  }

  .split-left-panel p {
    max-width: 100%;
  }

  .content-card {
    width: 100%;
    margin: 0 auto;
  }

  .story-title-wrapper { 
    width: 100%;
    justify-content: center;
    left: -1;
    top: 0;
    padding-left: 0;
    margin-bottom: 1rem;
  }

  .arc-text { 
    transform: scale(1) rotate(-15deg);
    margin: 0 auto;
    transform: rotate(-26deg);
  }

  .story-cards-grid { 
    padding-top: 4.5rem;
    gap: 10rem;
  }

  #about-us .card-icon-wrapper {
    position: static;
    transform: none;
    display: flex;
    justify-content: center;
    margin: 0 auto 0.73rem;
    width: auto;
  }

  #about-us .content-card { 
    padding-top: 1.25rem;
  }

  .card-graphic--laptop, 
  .card-graphic--puzzle, 
  .card-graphic--star { 
    height: 100%;
  }

  #about-us .section-title {
    font-size: 3.25rem;
  }

  #about-us .content-card h3 {
    font-size: 21px;
  }

  #about-us .card-subtitle {
    font-size: 18px;
  }

  #about-us .content-card p {
    font-size: 16px;
  }
}