/* ============================================================
   FirstGen — shared stylesheet
   The Software Developer designated as "stylesheet steward" owns this file.
   Everyone else: don't touch directly. Ask the steward.
   This is a STARTER. Replace tokens, palette, type with what your team decides.
   ============================================================ */

:root {
  /* Colour tokens — accessibility palette from accessibility-champion-1
     (Abid) governs the structural roles (paper, ink, headings, links,
     focus) for AA contrast. Software-developer-2 (Kayla)'s coral + lilac
     + accent tints stay as the warm decorative layer. */
  --colour-ink: #121212;        /* Near-black — primary body text (Abid) */
  --colour-paper: #FFFFFF;      /* White — clean background (Abid) */
  --colour-heading: #0B3C5D;    /* Dark navy — headings (Abid) */
  --colour-warm: #FF8FA3;       /* Coral Pop — primary CTAs (Kayla) */
  --colour-warm-hover: #E66B82; /* darker coral, derived */
  --colour-trust: #005FCC;      /* Strong blue — links / stat figures (Abid) */
  --colour-focus: #FFB000;      /* Amber — visible focus outline (Abid) */
  --colour-quiet: #CDB4DB;      /* Soft Lilac — alt band + soft borders (Kayla) */
  --colour-secondary: #4A4A4A;  /* Mid grey — body secondary, AA on white */
  --colour-muted: #595959;      /* Slightly darker grey — fine print, AA on white */

  /* Accent tokens from Kayla's palette — available for future sections */
  --colour-blush:  #FFC8DD;     /* warmth, approachability */
  --colour-sky:    #BDE0FE;     /* trust, openness */
  --colour-mint:   #A8E6CF;     /* growth, wellbeing */
  --colour-butter: #FFF3B0;     /* optimism, highlights */

  /* Type tokens — body font is Lexend, an a11y-conscious face chosen by
     accessibility-champion-1 (Abid) to reduce visual stress for dyslexic
     readers. Falls back gracefully if Google Fonts fails to load. */
  --font-display: "Georgia", "Times New Roman", serif;
  --font-body: "Lexend", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Spacing */
  --gap-s: 0.75rem;
  --gap-m: 1.5rem;
  --gap-l: 3rem;
  --gap-xl: 6rem;

  /* Layout */
  --max-width: 1100px;
  --radius: 12px;
}

/* On narrow viewports (mobile, and importantly the dashboard's
   live-preview iframe) compress the gap tokens so 96px-tall vertical
   padding doesn't swallow a full screen of whitespace per section. The
   wide-viewport rhythm is preserved on the actual deployed site. */
@media (max-width: 900px) {
  :root {
    --gap-l: 1.5rem;
    --gap-xl: 3rem;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--colour-ink);
  background: var(--colour-paper);
  /* Body rhythm tuned by accessibility-champion-1 (Abid): looser line,
     letter, and word spacing makes Lexend easier to track for dyslexic
     and low-vision readers without changing the visual hierarchy. */
  line-height: 1.6;
  letter-spacing: 0.01em;
  word-spacing: 0.04em;
}

/* Headings stay tight — Abid's spacing recipe is for body copy. */
h1, h2, h3 { letter-spacing: 0; word-spacing: 0; }
p, li, blockquote, figcaption {
  letter-spacing: 0.02em;
  word-spacing: 0.08em;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--gap-m);
  color: var(--colour-heading);
}

/* Visible focus outline for keyboard users — amber from Abid's palette,
   sits proud of any background (white paper, lilac alt, dark navy CTA). */
:focus-visible {
  outline: 3px solid var(--colour-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
p  { margin: 0 0 var(--gap-m); font-size: 1.0625rem; }

a { color: var(--colour-trust); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Wrap the brand and nav onto separate lines on narrow viewports
     (e.g. the dashboard's live-preview iframe). Without this, the 7
     nav links wrap inside the nav while the brand stays single-line,
     which leaves the "Join" pill floating mid-air next to the brand. */
  flex-wrap: wrap;
  gap: var(--gap-s);
  padding: var(--gap-m) var(--gap-l);
  max-width: var(--max-width);
  margin: 0 auto;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--colour-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.brand-mark {
  display: block;
  height: 36px;
  width: auto;
  border-radius: 8px;
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  /* Match the previous per-link `margin-left: var(--gap-m)` rhythm at
     wide widths, while wrapping cleanly without orphaned margins on
     the second line at narrow widths. */
  gap: var(--gap-m);
}
.site-header nav a { color: var(--colour-ink); }
.cta-link {
  background: var(--colour-ink);
  color: var(--colour-paper) !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-l);
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--gap-xl) var(--gap-l);
}
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; padding: var(--gap-l); }
}
.lede { font-size: 1.25rem; color: var(--colour-secondary); }
.hero-kicker {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--colour-warm-hover);
  margin: 0 0 var(--gap-s);
}
.hero-image img {
  width: 100%;
  border-radius: var(--radius);
  display: block;
}

/* CTA */
.cta {
  display: inline-block;
  background: var(--colour-warm);
  color: var(--colour-ink);
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1.0625rem;
}
.cta:hover { background: var(--colour-warm-hover); text-decoration: none; }

/* Microcopy under the hero CTA — soft reassurance line from
   @copywriter-2 (Charlie). Sits close to the button without competing
   with it visually. */
.cta-microcopy {
  margin: var(--gap-s) 0 0;
  font-size: 0.9375rem;
  color: var(--colour-secondary);
}
.cta-section .cta-microcopy { color: var(--colour-paper); opacity: 0.85; }

/* Content sections */
.content-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--gap-xl) var(--gap-l);
}
.content-section.alt {
  background: var(--colour-quiet);
  max-width: none;
  /* The calc lets the alt band extend full-bleed at wide widths while
     keeping inner content aligned to the same 1100px rail as the
     non-alt sections. max() clamps the padding to at least --gap-l on
     narrow viewports (e.g. the dashboard's live-preview iframe), where
     the calc would otherwise go negative and bleed cards to the edge. */
  padding: var(--gap-xl) max(var(--gap-l), calc((100vw - var(--max-width)) / 2 + var(--gap-l)));
}

.feature-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap-m);
}
.feature-list li {
  background: var(--colour-paper);
  border: 1px solid var(--colour-quiet);
  padding: var(--gap-m);
  border-radius: var(--radius);
}

/* Richer card variant for @copywriter-1 (Yousef)'s "things to think about"
   grid — each card carries a heading + a tight bullet list of his prompts. */
.feature-list--rich {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.feature-list--rich li { padding: var(--gap-l) var(--gap-m); }
.feature-list--rich h3 {
  font-size: 1.1875rem;
  margin: 0 0 var(--gap-s);
}
.feature-list--rich ul {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
}
.feature-list--rich ul li {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  font-size: 0.9875rem;
  line-height: 1.5;
}

/* CTA section */
.cta-section {
  text-align: center;
  padding: var(--gap-xl) var(--gap-l);
  background: var(--colour-ink);
  color: var(--colour-paper);
}
.cta-section h2 { color: var(--colour-paper); }
.cta-section a { color: var(--colour-paper); }

footer {
  text-align: center;
  padding: var(--gap-m);
  font-size: 0.875rem;
  color: var(--colour-muted);
}

/* ============================================================
   Section additions — placeholders for every role.
   Steward: tighten or replace as the team's design lands.
   ============================================================ */

.section-lede {
  color: var(--colour-secondary);
  font-size: 1rem;
  margin-bottom: var(--gap-l);
}

/* By the numbers (Researcher) */
.numbers-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--gap-xl) var(--gap-l);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap-m);
}
.stat-card {
  background: var(--colour-paper);
  border: 1px solid var(--colour-quiet);
  border-radius: var(--radius);
  padding: var(--gap-m);
}
.stat-figure {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--colour-trust);
  line-height: 1;
  margin-bottom: var(--gap-s);
}
.stat-label { font-size: 1rem; margin-bottom: var(--gap-s); }
.stat-source { font-size: 0.8125rem; color: var(--colour-muted); }

/* Voices */
.voices-section {
  background: var(--colour-quiet);
  /* Same clamp pattern as .content-section.alt — without max(), the
     calc evaluates to a negative number on narrow viewports and the
     voice cards bleed to the iframe's edges in the live preview. */
  padding: var(--gap-xl) max(var(--gap-l), calc((100vw - var(--max-width)) / 2 + var(--gap-l)));
}
.voice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap-m);
}
.voice-card {
  background: var(--colour-paper);
  border-radius: var(--radius);
  padding: var(--gap-m);
  margin: 0;
}
.voice-card img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: var(--gap-s);
}
.voice-card blockquote {
  margin: 0 0 var(--gap-s);
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1.4;
}
.voice-card figcaption { font-size: 0.875rem; color: var(--colour-secondary); }

/* Voices illustration from visual-designer-1 (Ameen) — sits beneath the
   quote as a warm campus scene. Constrained to the same rail as the
   voice card and given a soft rounded edge to match the card aesthetic. */
.voices-illustration {
  max-width: 460px;
  margin: var(--gap-l) auto 0;
}
.voices-illustration img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

/* When only one voice has landed, centre it and let the quote breathe
   instead of stretching to the full grid width. */
.voice-grid--solo {
  grid-template-columns: minmax(0, 640px);
  justify-content: center;
}
.voice-grid--solo .voice-card blockquote {
  font-size: 1.375rem;
  line-height: 1.35;
}

/* Meet a buddy */
.buddy-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--gap-xl) var(--gap-l);
}
.buddy-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--gap-l);
  align-items: center;
  background: var(--colour-paper);
  border: 1px solid var(--colour-quiet);
  border-radius: var(--radius);
  padding: var(--gap-l);
  margin: 0;
}
.buddy-card:has(> .buddy-quote:first-child) {
  grid-template-columns: 1fr;
  text-align: left;
}
@media (max-width: 600px) {
  .buddy-card { grid-template-columns: 1fr; }
}
.buddy-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
}
.buddy-bio h3 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.buddy-meta { color: var(--colour-secondary); margin-bottom: var(--gap-s); font-size: 0.9375rem; }
.buddy-quote {
  margin: 0 0 var(--gap-s);
  font-size: 1.0625rem;
  line-height: 1.6;
  border-left: 4px solid var(--colour-accent, var(--colour-secondary));
  padding-left: var(--gap-m);
  color: var(--colour-ink);
}
.buddy-quote p + p { margin-top: var(--gap-s); }
.buddy-card > .buddy-meta { margin-bottom: 0; }

/* Resources (Researcher) */
.resource-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--gap-s);
}
.resource-list li {
  background: var(--colour-paper);
  border: 1px solid var(--colour-quiet);
  border-radius: var(--radius);
  padding: var(--gap-m);
}

/* Built with care (A11y) */
.access-section {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--gap-xl) var(--gap-l);
  text-align: center;
}
/* 18px reading size requested by @accessibility-champion-1 (Abid). */
.access-section .access-statement {
  font-size: 18px;
  line-height: 1.6;
  color: var(--colour-ink);
}

/* Built by (Coordinator) */
.team-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--gap-xl) var(--gap-l);
  text-align: center;
}
.team-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap-s);
  text-align: left;
}
.team-list li {
  background: var(--colour-paper);
  border: 1px solid var(--colour-quiet);
  border-radius: var(--radius);
  padding: var(--gap-s) var(--gap-m);
  font-size: 0.9375rem;
}

/* "Who it's for" — illustration sits beside the copy from @visual-designer-1 (Ameen). */
.who-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--gap-l);
  align-items: center;
}
.who-illustration { margin: 0; }
.who-illustration img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}
@media (max-width: 768px) {
  .who-grid { grid-template-columns: 1fr; }
}

/* "How it helps" — Charlie's three lines paired with Isaac's illustration. */
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-l);
  align-items: center;
}
.help-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--gap-m);
}
.help-list li {
  background: var(--colour-paper);
  border-left: 4px solid var(--colour-warm);
  padding: var(--gap-m);
  border-radius: var(--radius);
  font-size: 1.0625rem;
  line-height: 1.55;
}
.help-illustration { margin: 0; }
.help-illustration img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}
@media (max-width: 768px) {
  .help-grid { grid-template-columns: 1fr; }
}

/* Closing CTA under "Things to think about" — Yousef's "See what's possible" button. */
.how-cta-wrap {
  margin-top: var(--gap-l);
  text-align: center;
}

/* Team mark above the "Built by" credits — illustration from @copywriter-2 (Charlie). */
.team-mark {
  margin: 0 auto var(--gap-m);
  max-width: 220px;
}
.team-mark img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}
