/* ======================================================
   Stirling Entrepreneurs — FULL GLOBAL STYLESHEET
   ====================================================== */

:root {
  --bg-dark: #0b0b12;
  --purple: #2a0a3d;
  --purple2: #622692;
  --teal: #1fa3b0;
  --blue: #5b7cff;
  --white: #ffffff;
  --muted: #b8b8c5;

  --glass: rgba(10, 10, 20, 0.72);
  --glass-border: rgba(255, 255, 255, 0.10);
  --card: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.10);

  --bg-x1: 25%;
  --bg-y1: 20%;
  --bg-x2: 75%;
  --bg-y2: 70%;
  --bg-hue: 0deg;

  --nav-height: 68px;
}

/* ---------------- RESET ---------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body { height: 100%; }

body {
  background: linear-gradient(180deg, var(--bg-dark), #050508);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

[id] { scroll-margin-top: calc(var(--nav-height) + 24px); }

/* ====================================================
   SCROLL-REACTIVE BACKGROUND
   ==================================================== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1100px at var(--bg-x1) var(--bg-y1), rgba(77, 17, 125, 0.42), transparent 66%),
    radial-gradient(1000px at var(--bg-x2) var(--bg-y2), rgba(31, 163, 176, 0.22), transparent 64%),
    radial-gradient(900px at 60% 15%, rgba(90, 120, 255, 0.20), transparent 62%),
    linear-gradient(180deg, rgba(11, 11, 18, 1), rgba(5, 5, 8, 1));
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  filter: hue-rotate(var(--bg-hue)) saturate(1.05);
  transform: translateZ(0);
}

/* Grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  background-repeat: repeat;
  opacity: 0.10;
  mix-blend-mode: overlay;
}

/* Global image safety */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ====================================================
   NAVIGATION
   ==================================================== */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 0.5px solid var(--glass-border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  flex-shrink: 0;
}

.brand span {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.brand img {
  height: 32px;
  width: 32px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  padding: 3px;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 14.5px;
  padding: 7px 11px;
  border-radius: 8px;
  opacity: 0.9;
  transition: opacity 0.2s, background 0.2s;
  white-space: nowrap;
}

nav a:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
}

/* Active underline */
nav a.active {
  position: relative;
  font-weight: 600;
  opacity: 1;
}

nav a.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--purple2), var(--teal));
  box-shadow: 0 0 8px rgba(77, 17, 125, 0.5);
}

/* Join button — pill style, compact */
.nav-join {
  background: linear-gradient(135deg, var(--purple2), var(--teal));
  color: var(--white) !important;
  font-weight: 700 !important;
  padding: 7px 16px !important;
  border-radius: 999px !important;
  opacity: 1 !important;
  font-size: 13.5px !important;
}

.nav-join:hover {
  opacity: 0.92 !important;
  background: linear-gradient(135deg, #7a2fb5, #22b9c8);
}

.nav-join.active::after { display: none; }

/* Hamburger button — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none !important;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Hamburger open state */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ====================================================
   LAYOUT
   ==================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 60px) 24px 110px;
}

.section { margin-bottom: 110px; }

/* ====================================================
   HERO
   ==================================================== */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 52px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero > div:first-child p {
  font-size: 18px;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.7;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ====================================================
   BUTTONS
   ==================================================== */
.btn {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: opacity 0.2s, transform 0.15s;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--purple2), var(--teal));
  color: var(--white);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--white);
}

/* ====================================================
   LOGO CARD (hero image)
   ==================================================== */
.logo-card {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 420px;

  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 24px;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.logo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  position: relative;
  z-index: 1;
  filter: saturate(1.05) contrast(1.05);
}

.logo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.04) 40%, rgba(255,255,255,0.01));
  opacity: 0.55;
}

.logo-card::after {
  content: "";
  position: absolute;
  inset: -50%;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 42%, rgba(255,255,255,0.35) 50%, transparent 58%);
  transform: rotate(12deg);
  opacity: 0.40;
}

/* ====================================================
   TYPOGRAPHY
   ==================================================== */
h2 {
  font-size: clamp(24px, 3vw, 32px);
  margin-bottom: 14px;
}

p {
  color: var(--muted);
  max-width: 820px;
  line-height: 1.7;
}

.kicker {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 11.5px;
  margin-bottom: 12px;
  color: var(--muted);
}

.small { font-size: 13px; opacity: 0.85; }

/* ====================================================
   CARDS
   ==================================================== */
.cards {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 24px;
}

.card h3 { margin-bottom: 10px; font-size: 17px; }

.card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

/* ====================================================
   LISTS
   ==================================================== */
.list {
  margin-top: 22px;
  display: grid;
  gap: 12px;
  max-width: 900px;
}

.list-item {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
}

/* ====================================================
   FORMS
   ==================================================== */
.form {
  margin-top: 24px;
  max-width: 680px;
  display: grid;
  gap: 14px;
}

.input, textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.22);
  color: var(--white);
  font-size: 15px;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

/* ====================================================
   SCROLL REVEAL
   ==================================================== */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ====================================================
   FOOTER
   ==================================================== */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ====================================================
   LOGO GRID (Partnerships)
   ==================================================== */
.logo-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.logo-tile {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 20px;
  text-align: left;
}

.logo-tile span {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--white);
}

.logo-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ====================================================
   ABOUT PAGE — HERO IMAGE
   ==================================================== */
.about-image {
  margin: 40px auto 0;
  max-width: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.about-image img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ====================================================
   COMMITTEE CARDS
   ==================================================== */
.committee-grid { margin-top: 26px; }

.committee-card { padding-top: 20px; }

.committee-photo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  position: relative;
  flex-shrink: 0;
}

.committee-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.committee-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(98, 38, 146, 0.30), rgba(31, 163, 176, 0.18));
  opacity: 0.25;
}

/* ====================================================
   TABLET — 900px
   ==================================================== */
@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .logo-card {
    aspect-ratio: 3 / 4;
    max-height: 400px;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 18px;
  }
}

/* ====================================================
   MOBILE — 680px  (hamburger kicks in)
   ==================================================== */
@media (max-width: 680px) {

  /* Show hamburger, hide desktop links */
  .nav-toggle { display: flex !important; visibility: visible; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 22, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 16px 16px;
  }

  .nav-links.open { display: flex; }

  nav a {
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 10px;
    opacity: 1;
    margin: 0;
  }

  nav a:hover { background: rgba(255,255,255,0.07); }

  /* Join button full-width pill in mobile menu */
  .nav-join {
    text-align: center;
    margin-top: 4px;
    padding: 12px 16px !important;
    border-radius: 12px !important;
  }

  /* active underline offset */
  nav a.active::after {
    bottom: 4px;
    left: 10px;
    right: 10px;
  }

  /* Layout */
  .container {
    padding: calc(var(--nav-height) + 36px) 16px 80px;
  }

  .section { margin-bottom: 72px; }

  /* Hero */
  .hero { gap: 22px; }

  .hero h1 { font-size: clamp(30px, 8vw, 40px); }

  .hero > div:first-child p { font-size: 16px; }

  .hero-actions { gap: 10px; }

  /* Buttons full-width on small screens */
  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  /* Logo card */
  .logo-card {
    aspect-ratio: 3 / 4;
    max-height: 400px;
    max-width: 100%;
  }

  /* About image shorter */
  .about-image img {
    height: 200px;
  }

  /* Cards single column */
  .cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Forms full-width */
  .form { max-width: 100%; }

  h2 { font-size: 22px; }
}

/* ====================================================
   VERY SMALL — 380px
   ==================================================== */
@media (max-width: 380px) {
  .brand span {
    font-size: 13px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .container {
    padding-left: 14px;
    padding-right: 14px;
  }
}
