/* BRAAND SCHOOL - MAIN STYLES */

:root {
  --green: #a7fe2b;
  --black: #080808;
  --white: #f5f5f0;
  --gray: #1a1a1a;
  --gray2: #2e2e2e;
  --font-display: 'Inter', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-hand: 'Caveat', cursive;
  --mouse-glow: radial-gradient(circle 350px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(167, 254, 43, 0.15) 0%, transparent 80%);

  /* Typography Scale */
  --text-h1: clamp(2.5rem, 5.5vw, 4.2rem);   /* Page Hero Headings */
  --text-h2: clamp(2rem, 4vw, 2.8rem);       /* Main Section Headings */
  --text-h3: clamp(1.4rem, 2.5vw, 1.8rem);   /* Sub-headings/Cards */
  --text-body: clamp(0.95rem, 1.5vw, 1.05rem); /* Standard Body Paragraphs */
  --text-small: 0.875rem;                    /* Captions & Labels */

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
}

/* Universal Typography Mappings */
h1, .hero-title {
  font-size: var(--text-h1) !important;
  line-height: var(--leading-tight) !important;
}

h2, .section-title {
  font-size: var(--text-h2) !important;
  line-height: var(--leading-tight) !important;
}

h3, .card-title {
  font-size: var(--text-h3) !important;
  line-height: var(--leading-tight) !important;
}

p, .body-text {
  font-size: var(--text-body) !important;
  line-height: var(--leading-relaxed) !important;
}

small, .caption-text {
  font-size: var(--text-small) !important;
}


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

html,
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-display);
  overflow-x: hidden;
}

/* ─── NAV ─────────────────────────────────────────── */
nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1600px;
  border-radius: 100px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 75px;
  background: rgba(15, 15, 15, 0.4);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  transition: background 0.3s, border-color 0.3s;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
  z-index: 101;
}

.brand-logo-icon {
  position: relative;
  width: 300px;
  height: 75px;
  flex-shrink: 0;
  background: url('../../images/logo/logo.png') center/contain no-repeat;
  background-position: left center;
}



/* Handle nested icon structure if logo.png is missing or for fallback */
.brand-logo-icon .logo-box {
    display: none;
}

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--green);
  transform: scaleX(0);
  transition: transform 0.25s ease;
  transform-origin: left;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

/* Clickable Course Link Icon */
.course-click-icon {
  width: 14px;
  height: 14px;
  margin-left: 6px;
  transform: scaleX(-1);
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-links a:hover .course-click-icon,
.topbar-nav a:hover .course-click-icon {
  transform: scaleX(-1) translate(-2px, -2px);
}


.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-icon {
  width: 34px;
  height: 34px;
  border: 1px solid var(--gray2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.nav-icon:hover {
  border-color: var(--green);
  background: rgba(167, 254, 43, 0.08);
}

.nav-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--white);
  fill: none;
  stroke-width: 1.5;
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(167, 254, 43, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 24px;
  border: 1px solid rgba(167, 254, 43, 0.3);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-cta:hover {
  background: rgba(167, 254, 43, 0.15);
  border-color: var(--green);
  transform: translateY(-1px);
}

/* ─── HAMBURGER ───────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--white);
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 150;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 80px 32px 60px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
  pointer-events: all;
}

.mobile-nav-item {
  font-size: clamp(36px, 10vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: rgba(245, 245, 240, 0.15);
  text-decoration: none;
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid #1a1a1a;
  width: 100%;
  transition: color 0.2s;
  line-height: 1.1;
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
  color: var(--white);
}

.mobile-nav-item.accent {
  color: var(--green);
}

/* Mobile Dropdown styles */
.mobile-nav-dropdown-group {
  width: 100%;
}
.mobile-nav-item-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1a1a1a;
}
.mobile-nav-item-wrap .mobile-nav-item {
  border-bottom: none;
  width: auto;
  flex-grow: 1;
}
.mobile-nav-toggle {
  background: none;
  border: none;
  color: rgba(245, 245, 240, 0.3);
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, color 0.2s;
}
.mobile-nav-toggle.open {
  transform: rotate(180deg);
  color: var(--green);
}
.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mobile-submenu.open {
  max-height: 300px;
  margin-top: 10px;
  margin-bottom: 15px;
}
.mobile-sub-item {
  font-size: 20px;
  font-weight: 500;
  color: rgba(245, 245, 240, 0.6);
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.2s;
}
.mobile-sub-item:hover {
  color: var(--green);
}
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 32px;
  position: absolute;
  top: 0;
  left: 0;
}
.mobile-menu-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-top: 40px;
}
.mobile-menu-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(167, 254, 43, 0.08);
  padding: 14px 28px;
  border: 1px solid rgba(167, 254, 43, 0.3);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: fit-content;
  align-self: flex-start;
}
.mobile-menu-cta:hover {
  background: rgba(167, 254, 43, 0.15);
  border-color: var(--green);
  transform: translateY(-2px);
}

/* ─── BACKGROUND SYSTEM ───────────────────────────── */
.bg-system {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-glow {
  position: absolute;
  top: -20%;
  left: -15%;
  width: 130%;
  height: 140%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(120px);
  opacity: 0.3;
  transform: scale(1.05);
  animation: floatGlow 22s ease-in-out infinite alternate;
  will-change: transform;
}

.bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(10px) brightness(0.8);
  opacity: 0.08;
  mix-blend-mode: screen;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(8, 8, 8, 0) 20%, #080808 85%);
}

@keyframes floatGlow {
  0% { transform: translate(0, 0) rotate(0deg) scale(1.02); }
  50% { transform: translate(-3%, 3%) rotate(2deg) scale(1.08); }
  100% { transform: translate(2%, -3%) rotate(-1.5deg) scale(1.04); }
}

/* ─── ENROLLMENT POPUP ───────────────────────────── */
.join-popup {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.join-popup.active {
  display: flex;
}

.popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 4, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.join-popup.active .popup-backdrop {
  opacity: 1;
}

.join-popup .popup-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: linear-gradient(135deg, rgba(18, 18, 18, 0.92), rgba(10, 10, 10, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 44px;
  margin: 20px;
  box-shadow: 
    0 40px 100px rgba(0, 0, 0, 0.85), 
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 50px rgba(167, 254, 43, 0.02);
  z-index: 2;
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.join-popup .popup-content::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(167, 254, 43, 0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.join-popup.active .popup-content {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.close-popup {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.close-popup:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--green);
  transform: rotate(90deg);
  border-color: rgba(167, 254, 43, 0.3);
}

.join-popup .form-chat-icon {
  width: 48px;
  height: 48px;
  background: rgba(167, 254, 43, 0.08);
  border: 1px solid rgba(167, 254, 43, 0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.join-popup .form-chat-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.join-popup h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.join-popup p {
  font-size: 14px;
  color: rgba(245, 245, 240, 0.55);
  margin-bottom: 28px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.enrollment-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(245, 245, 240, 0.4);
  text-transform: uppercase;
  font-weight: 700;
  transition: color 0.3s ease;
}

.form-group:focus-within label {
  color: var(--green);
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.form-group textarea {
  resize: none;
  height: 90px;
}

.form-group input:focus,
.form-group textarea:focus {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(167, 254, 43, 0.6);
  box-shadow: 0 0 24px rgba(167, 254, 43, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(245, 245, 240, 0.22);
}

.popup-cta {
  width: 100%;
  background: var(--green);
  color: var(--black);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 20px rgba(167, 254, 43, 0.15);
}

.popup-cta:hover {
  background: #bfff4f;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(167, 254, 43, 0.3);
}

.popup-cta:active {
  transform: translateY(-0.5px);
  box-shadow: 0 6px 15px rgba(167, 254, 43, 0.2);
}

.form-disclaimer {
  font-size: 11px;
  color: rgba(245, 245, 240, 0.3);
  text-align: center;
  margin-top: 6px;
}

@media (max-height: 720px), (max-width: 480px) {
  .join-popup .popup-content {
    padding: 30px 24px 24px;
    margin: 12px;
    max-height: 95vh;
    border-radius: 20px;
  }
  .close-popup {
    top: 16px;
    right: 16px;
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
  .join-popup .form-chat-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
  }
  .join-popup h3 {
    font-size: 24px;
    margin-bottom: 6px;
  }
  .join-popup p {
    margin-bottom: 20px;
    font-size: 13px;
  }
  .enrollment-form {
    gap: 14px;
  }
  .form-group {
    gap: 6px;
  }
  .form-group input,
  .form-group textarea {
    padding: 10px 12px;
    font-size: 13px;
  }
  .form-group textarea {
    height: 70px;
  }
  .popup-cta {
    padding: 12px;
    margin-top: 6px;
  }
}

/* ─── UTILS ────────────────────────────────────────── */
.green-text {
  color: var(--green);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
}

/* Mobile navbar CTA — hidden on desktop */
.nav-mobile-cta {
  display: none;
}

@media (max-width: 1024px) {
  .brand-logo-icon { width: 180px; height: 60px; }
  .nav-links, .nav-right { display: none !important; }
  .hamburger { display: flex !important; }

  .nav-mobile-cta {
    display: flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green);
    background: rgba(167, 254, 43, 0.08);
    padding: 7px 16px;
    border: 1px solid rgba(167, 254, 43, 0.35);
    border-radius: 100px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
    margin-right: 8px;
  }

  .nav-mobile-cta:hover {
    background: rgba(167, 254, 43, 0.15);
    border-color: var(--green);
  }
}

@media (max-width: 600px) {
  nav {
    height: 56px;
    padding: 0 16px;
    top: 16px;
    width: calc(100% - 32px);
  }
  .brand-logo-icon {
    width: 140px;
    height: 48px;
  }
}


/* ─── SERIF ITALIC EMPHASIS ─── */
.it {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--green);
  font-weight: 500;
}


/* GRID CANVAS SHINE THROUGH */
.hero-bg-container, .matrix-bg-pattern, .manifesto-bg-pattern, .how-bg-pattern, .fg-bg-pattern, .bg-system {
  background-color: transparent !important;
}



/* HIDE ALL GRAIN/NOISE OVERLAYS */
.hero-bg-container::before, .matrix-bg-pattern::before, .manifesto-bg-pattern::before, .how-bg-pattern::before, .fg-bg-pattern::before, .bg-system::before, .timeline-bg-container::before, .lp-noise {
  display: none !important;
  opacity: 0 !important;
}

/* Eliminate margin gap between scrolling CTA and footer on mobile to hide the background bleed */
@media (max-width: 768px) {
  .unified-footer-wrapper {
    margin-top: 0 !important;
  }
}

/* ─── GLOBAL TYPOGRAPHY SCALE UNIFICATION ─── */
body, p {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
}

.snapshot-inner p,
.scrolling-desc {
  font-size: var(--text-lg) !important;
  line-height: var(--leading-relaxed) !important;
}

.data-strip .data-cell div:first-child {
  font-size: var(--text-xs) !important;
}

.data-strip .data-cell div:last-child {
  font-size: var(--text-sm) !important;
  line-height: var(--leading-normal) !important;
}

.scroll-btn {
  font-size: var(--text-base) !important;
}

.mod-cat {
  font-size: var(--text-xs) !important;
}

.mod-meta {
  font-size: var(--text-sm) !important;
  line-height: var(--leading-normal) !important;
}

.mod-points li {
  font-size: var(--text-sm) !important;
}

/* Universal Mobile Typography Scale (15px/1.6 for body and section texts except headings) */
@media (max-width: 768px) {
  body, p, li, 
  .snapshot-inner p,
  .scrolling-desc,
  .data-strip .data-cell div:last-child,
  .mod-meta,
  .mod-points li,
  .row-text,
  .row-sub,
  .team-desc {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }
}



/* Custom Select Dropdown override */
.custom-select-wrapper {
  position: relative;
  z-index: 99;
  width: 100%;
  user-select: none;
}
.custom-select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid #333;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  min-height: 48px;
}
.form-group .custom-select-trigger, .mf-field-wide .custom-select-trigger {
  background: transparent;
}
.custom-select-wrapper.open .custom-select-trigger {
  border-color: var(--green, #bcff00);
}
.custom-select-arrow {
  width: 8px;
  height: 8px;
  border-right: 2px solid #888;
  border-bottom: 2px solid #888;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  margin-bottom: 4px;
}
.custom-select-wrapper.open .custom-select-arrow {
  transform: rotate(-135deg);
  margin-bottom: -4px;
}
.custom-select-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  margin-top: 4px;
  padding: 8px 0; /* Added padding to fix cutoff */
  z-index: 9999;
  display: none;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
.custom-select-options.open {
  display: block;
}
.custom-select-option {
  padding: 12px 16px;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
}
.custom-select-option:hover,
.custom-select-option:active,
.custom-select-option.touch-hover {
  background: var(--green, #bcff00);
  color: #000;
}
.custom-select-option.selected {
  background: var(--green, #bcff00);
  color: #000;
}


/* Add styling for native selects so they match the inputs if custom JS fails or loads late */
.form-group select {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.form-group select:focus {
  border-color: var(--green, #bcff00);
  background: rgba(188, 255, 0, 0.05);
}


/* Fix span styling inside custom select being overridden by label spans */
.custom-select-trigger span {
  font-size: 14px !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-weight: normal !important;
  opacity: 1 !important;
  color: #fff !important;
}

.mf-field-wide .custom-select-trigger span,
.mf-enquiry .custom-select-trigger span {
  color: #000 !important;
}
