/* ==========================================================================
   BlackInSTEMM — MAIN STYLESHEET
   ==========================================================================
   This is the ONLY CSS file for the whole site. It's organized into
   labeled sections — use Cmd+F (or Ctrl+F) to jump to a section name,
   e.g. search for "NAVIGATION" or "HERO SECTION".

   HOW TO RESKIN THE WHOLE SITE:
   Everything in the ":root" block below is a "CSS custom property"
   (a variable). Change a value there ONCE and it updates everywhere
   that variable is used across every page. You should almost never
   need to touch colors/fonts/spacing outside of this one block.

   This is a WARM, LIGHT theme: an ivory page canvas, a deep forest-green
   anchor color (nav, footer, headings), and gold + red as accents.
   ========================================================================== */


/* ==========================================================================
   1. THEME VARIABLES (edit these to reskin the site)
   ========================================================================== */
:root {

  /* --- BRAND COLORS -----------------------------------------------------
     This is the site's real color palette. Every element on the site
     pulls its color from one of these variables, so changing a value
     here changes it everywhere it's used. */

  --color-bg:      #FAF5EC; /* main page background — warm ivory */
  --color-bg-alt:  #F3ECDC; /* subtly deeper cream — used for alternating sections */
  --color-surface: #FFFFFF; /* card backgrounds — pops gently against the ivory canvas */

  --color-primary: #1F3B30; /* deep forest green — nav bar, footer, headings, anchors the brand */

  --color-text:        #3A362E; /* main body text — warm charcoal, softer than pure black */
  --color-text-muted:  #6B6355; /* lighter text — captions, subtext */

  --color-accent-gold: #D9A441; /* gold — primary buttons, active nav underline, highlights */
  --color-accent-red:  #A3272A; /* deep red — secondary links, small tags, hover accents */

  /* text colors to use ON TOP OF a solid color background, chosen for
     contrast against that specific color */
  --color-on-primary: #F4EDDC; /* warm cream text, used on the green nav/footer */
  --color-on-gold:    var(--color-primary); /* green text, used on gold buttons */

  /* --- SUPPORTING COLORS --------------------------------------------------
     These aren't part of your 3 brand accent colors above — they're small
     helper values derived from the palette, only used for subtle borders/
     shadows so cards read as "lifted" against the ivory background. */

  --color-border: #E5DAC3; /* warm tan line — card borders, dividers */
  --shadow-card:  0 6px 20px rgba(31, 59, 48, 0.08); /* soft, green-tinted shadow — not harsh black */

  /* --- FONTS ------------------------------------------------------------
     Two fonts are loaded from Google Fonts in the <head> of every page:
     "Fraunces" (an expressive serif) for headings, and "Inter" (a clean
     sans-serif) for body text and UI elements like buttons/nav. If you'd
     rather not load fonts from Google (e.g. for privacy or speed), delete
     the <link> tags in each HTML file's <head> and these variables will
     fall back to your computer's default fonts automatically. */

  --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', 'Segoe UI', Arial, sans-serif;

  --font-size-base: 16px; /* base text size that everything else scales from */

  /* --- SPACING SCALE ------------------------------------------------------
     Use these instead of one-off pixel values so spacing stays consistent
     across the whole site. "sm" = small, "md" = medium, "lg" = large, etc. */

  --space-xs:  0.5rem;   /*  8px */
  --space-sm:  1rem;     /* 16px */
  --space-md:  1.5rem;   /* 24px */
  --space-lg:  2.5rem;   /* 40px */
  --space-xl:  4rem;     /* 64px */
  --space-xxl: 6rem;     /* 96px */

  /* --- LAYOUT -------------------------------------------------------- */

  --container-max-width: 1100px; /* content stops getting wider than this, and centers */
  --border-radius: 6px;          /* roundness of cards, buttons, images */

  /* --- EFFECTS --------------------------------------------------------- */

  --transition-speed: 0.2s;
}


/* ==========================================================================
   2. RESET / BASE STYLES
   ========================================================================== */

/* Makes width/height math predictable for every element (standard practice). */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.65;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-red);
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}


/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-optical-sizing: auto; /* lets Fraunces auto-adjust its shape for the size it's used at */
  color: var(--color-primary);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-top: 0;
}

h1 { font-size: 3rem; font-weight: 600; }
h2 { font-size: 2.1rem; font-weight: 600; margin-bottom: var(--space-md); }
h3 { font-size: 1.4rem; font-weight: 600; }

p {
  margin-top: 0;
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 700px;
}


/* ==========================================================================
   4. LAYOUT / CONTAINER
   ========================================================================== */

/* Wraps content on every page so it doesn't stretch edge-to-edge on wide
   screens. Add class="container" to any <section> or <div> that should
   line up with the rest of the page content. */
.container {
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

/* Generous vertical spacing for page sections — part of the "sophisticated,
   not cramped" feel is simply more breathing room than a typical template. */
section {
  padding-top: var(--space-xxl);
  padding-bottom: var(--space-xxl);
}

.section-alt {
  background-color: var(--color-bg-alt);
}

/* This is a single page with a sticky nav bar — without this, clicking a
   nav link like "Mission" would scroll the section title right under the
   nav bar, partly hidden behind it. This nudges the scroll position down
   so the heading lands just below the nav instead. Applies to any element
   with an id (not just <section>), since some nav links (like "Member
   Organizations") jump to a heading inside a section rather than the
   section itself. */
[id] {
  scroll-margin-top: var(--space-lg);
}


/* ==========================================================================
   5. NAVIGATION (header bar, shared across every page)
   ========================================================================== */

.site-header {
  background-color: var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-card);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}

/* Logo + org name, top-left of the nav bar */
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-on-primary);
}

.nav-brand span {
  font-family: var(--font-heading);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 1.25rem;
}

.nav-brand img {
  height: 40px;
  width: 40px;
  object-fit: contain;
}

.nav-brand:hover {
  color: var(--color-on-primary);
  opacity: 0.85;
}

/* The links list, e.g. Home / About / Organizations / Events / Contact */
.nav-links {
  display: flex;
  gap: var(--space-md);
}

.nav-links a {
  color: var(--color-on-primary);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition-speed) ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-on-primary);
  border-bottom-color: var(--color-accent-gold);
}

/* Hamburger button — hidden on desktop, shown on mobile (see media query below) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--color-on-primary);
  border-radius: 2px;
}


/* ==========================================================================
   6. BUTTONS
   ========================================================================== */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--border-radius);
  transition: background-color var(--transition-speed) ease,
              color var(--transition-speed) ease,
              border-color var(--transition-speed) ease,
              transform var(--transition-speed) ease;
  border: 2px solid transparent;
}

.btn:hover {
  transform: translateY(-2px);
}

/* Solid, high-attention button (main call-to-action). */
.btn-primary {
  background-color: var(--color-accent-gold);
  color: var(--color-on-gold);
}

.btn-primary:hover {
  background-color: var(--color-primary);
  color: var(--color-on-primary);
}

/* Understated secondary action — styled as an underlined text link rather
   than a boxed button, which reads as more editorial/refined than a second
   competing button next to the primary one. */
.btn-outline {
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--color-accent-gold);
  border-radius: 0;
  color: var(--color-primary);
  padding: var(--space-xs) 0;
}

.btn-outline:hover {
  border-bottom-color: var(--color-accent-red);
  color: var(--color-primary);
  transform: none;
}


/* ==========================================================================
   7. HERO SECTION (top banner on the Home page)
   ========================================================================== */
/* Sits on the same ivory canvas as the rest of the page (no separate
   colored band) — the large serif headline and generous spacing do the
   work of making this section feel like an opening statement. */

.hero {
  padding-top: var(--space-xxl);
  padding-bottom: var(--space-lg);
}

/* Headline+subheading text column, and logo, side by side. On mobile (see
   media query below) this stacks into a column instead. */
.hero-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

/* Keeps the subheading directly under the headline regardless of how tall
   the logo next to them is. */
.hero-heading-text {
  flex: 1;
  min-width: 0;
}

.hero h1 {
  margin-bottom: var(--space-sm);
  max-width: 680px;
}

.hero-logo {
  width: 260px;
  height: 260px;
  object-fit: contain;
  flex-shrink: 0;
}

.hero p {
  font-size: 1.2rem;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 0;
  color: var(--color-text-muted);
}


/* ==========================================================================
   8. MISSION / INTRO SECTION
   ========================================================================== */

.mission .container {
  max-width: 800px;
}


/* ==========================================================================
   9. CARD GRIDS (used by the Member Organizations grid)
   ========================================================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}


/* ==========================================================================
   10. FOOTER
   ========================================================================== */

.site-footer {
  background-color: var(--color-primary);
  color: var(--color-on-primary);
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
  margin-top: var(--space-xl);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.footer-column h4 {
  color: var(--color-on-primary);
  margin-bottom: var(--space-sm);
}

.footer-column a {
  color: var(--color-on-primary);
  opacity: 0.8;
}

.footer-column a:hover {
  opacity: 1;
  color: var(--color-accent-gold);
}

.footer-links li {
  margin-bottom: var(--space-xs);
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
}

.footer-bottom {
  text-align: center;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(244, 237, 220, 0.2);
  font-size: 0.9rem;
  opacity: 0.75;
}


/* ==========================================================================
   11. VALUES SECTION
   ========================================================================== */

/* "auto-fit" lets this adjust cleanly whether you have 3 values or 6,
   without needing to change the CSS — unlike .card-grid, which is fixed
   at 3 columns. */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.value-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent-gold); /* default, cycled below */
  border-radius: var(--border-radius);
  padding: var(--space-md);
}

/* Cycles through the 3 accent colors (gold, red, green) for the bar above
   each value's title, repeating if there are more than 3 values. Purely
   decorative — delete the border-top rules below if you'd rather they
   all match one color. */
.values-grid .value-card:nth-child(3n+2) { border-top-color: var(--color-accent-red); }
.values-grid .value-card:nth-child(3n+3) { border-top-color: var(--color-primary); }

.value-card h3 {
  margin-bottom: var(--space-xs);
}

.value-card p {
  color: var(--color-text-muted);
  margin-bottom: 0;
}


/* ==========================================================================
   12. MEMBER ORGANIZATIONS GRID (Home page, under the hero)
   ========================================================================== */

/* Each card is built by js/main.js from the "memberOrganizations" data
   list at the top of that file — see the comments there for how to add a
   new one. .card-grid (Section 9) arranges them into a 3-column grid that
   collapses to 1 column on mobile. */

.org-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent-gold); /* default, cycled below */
  border-radius: var(--border-radius);
  padding: var(--space-md);
  text-align: center;
  box-shadow: var(--shadow-card);
}

.card-grid .org-card:nth-child(3n+2) { border-top-color: var(--color-accent-red); }
.card-grid .org-card:nth-child(3n+3) { border-top-color: var(--color-primary); }

.org-logo {
  height: 140px;
  width: 140px;
  object-fit: contain;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-sm);
}

.org-card h3 {
  font-size: 1.15rem;
}

/* The organization's own website, on its own line below their name. */
.org-website-row {
  margin-top: var(--space-xs);
}

.org-website-link {
  font-weight: 600;
}

/* The row of social platform icon badges below the website line. */
.org-social-icons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.org-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-primary);
  transition: color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.org-social-icon:hover {
  color: var(--color-accent-red);
  border-color: var(--color-accent-red);
}

.org-social-icon svg {
  width: 18px;
  height: 18px;
}


/* ==========================================================================
   13. EVENTS SECTION
   ========================================================================== */

/* Roadmap image + ABRCMS session cards side by side (see #events in
   index.html). Stacks to a single column on mobile — see the media query
   below. */
.events-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--space-xl);
  align-items: start;
  margin-top: var(--space-lg);
}

.events-image {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  position: sticky;
  top: calc(var(--space-xl) + 70px); /* clears the sticky nav bar */
}

.abrcms-events-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.abrcms-event-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent-gold); /* default, cycled below */
  border-radius: var(--border-radius);
  padding: var(--space-md);
  box-shadow: var(--shadow-card);
}

.abrcms-events-list .abrcms-event-card:nth-child(3n+2) { border-left-color: var(--color-accent-red); }
.abrcms-events-list .abrcms-event-card:nth-child(3n+3) { border-left-color: var(--color-primary); }

.abrcms-event-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.abrcms-event-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.abrcms-event-header h3 {
  font-size: 1.15rem;
  margin-bottom: 2px;
}

.abrcms-event-host {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 0;
}

.abrcms-event-card p {
  color: var(--color-text);
}

.event-bullets {
  margin: var(--space-xs) 0 0;
  padding-left: 1.2rem;
}

.event-bullets li {
  list-style: disc;
  margin-bottom: var(--space-xs);
}


/* ==========================================================================
   14. PLACEHOLDER MARKERS
   ========================================================================== */
/* Anything with this class is content you still need to replace. It gets a
   dashed outline and a tinted background so it's easy to spot while editing.
   It has NO effect other than a visual reminder — remove the class once
   you've swapped in real content (or leave it, it won't break anything). */

.placeholder {
  outline: 2px dashed var(--color-accent-red);
  outline-offset: 4px;
  background-color: rgba(163, 39, 42, 0.06);
}


/* ==========================================================================
   15. RESPONSIVE / MOBILE STYLES
   ========================================================================== */
/* NOTE: CSS variables can't be used inside "@media (max-width: ...)"
   conditions, so the breakpoint numbers below are plain pixel values.
   768px is a common "tablet and below" cutoff. */

@media (max-width: 768px) {

  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.7rem; }

  /* Stack the hero headline and logo instead of side by side */
  .hero-heading-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .hero-logo {
    width: 150px;
    height: 150px;
  }

  /* Stack the organization cards into a single column */
  .card-grid {
    grid-template-columns: 1fr;
  }

  /* Stack the Events roadmap image above the session cards */
  .events-layout {
    grid-template-columns: 1fr;
  }

  .events-image {
    position: static;
  }

  /* Collapse the footer columns into a single stacked column */
  .footer-content {
    flex-direction: column;
    gap: var(--space-md);
  }

  /* --- Mobile nav menu --- */
  .nav-toggle {
    display: flex; /* show the hamburger button */
  }

  .nav-links {
    display: none; /* hidden until toggled open by js/main.js */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-primary);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: var(--space-sm) 0;
  }

  /* main.js adds this class to .nav-links when the hamburger is tapped */
  .nav-links.nav-links-open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: var(--space-sm);
  }
}
