/* ============================================================================
   STIPENDSMART — STYLESHEET (css/style.css)
   ============================================================================
   WHAT THIS FILE IS
   This file controls all colors, fonts, spacing, and layout for the site.
   index.html holds the words and structure; this file holds the "look."

   HOW TO CHANGE THE COLOR SCHEME
   Scroll down to the ":root" block right below this comment. Those are
   called "CSS variables" — think of them as named paint cans. Every
   other rule in this file just says "use the navy paint can" instead of
   spelling out a color code every time. So to re-theme the whole site,
   you only need to change the handful of colors in that one block —
   you do NOT need to hunt through the rest of the file.

   HOW THIS FILE IS ORGANIZED (top to bottom)
     1. Design tokens (colors, fonts, spacing — the "paint cans")
     2. Reset & base styles (page-wide defaults)
     3. Reusable pieces (buttons, containers)
     4. One section at a time, in the same order they appear in index.html
     5. Mobile-specific adjustments, at the very bottom

   A NOTE ON FONTS
   We're using your device's built-in system font (the same font your
   phone or computer already uses everywhere else) instead of downloading
   a custom font from Google Fonts or similar. This is a deliberate
   simplicity choice: it means the page never has to fetch anything from
   an outside font service to render text, so there's one less thing
   that can ever slow down or break the site.
   ============================================================================ */

:root {
  /* --- Brand colors --- */
  --color-navy: #102A43;       /* primary dark color — header, footer, headings */
  --color-navy-soft: #24405f;  /* lighter navy — used for secondary text on dark backgrounds */
  --color-green: #16A34A;      /* accent color — buttons, links, "cash back" highlights */
  --color-green-dark: #15803D; /* darker green — used when hovering over green buttons */

  /* --- Neutral colors --- */
  --color-bg: #FFFFFF;         /* main page background */
  --color-bg-soft: #F7FAFC;    /* slightly grey background, used to alternate sections */
  --color-text: #1A202C;       /* main body text color */
  --color-text-muted: #4A5568; /* lighter text, for subheadings/descriptions */
  --color-border: #E2E8F0;     /* light grey lines/borders */

  /* --- Layout --- */
  --max-width: 1100px;         /* how wide the page content gets on large screens */
  --radius: 10px;              /* corner roundness used on cards/buttons/boxes */

  /* --- Font --- */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ============================================================================
   RESET & BASE STYLES
   Browsers apply their own default spacing/sizing to things like <h1> or
   <ul>. This section clears those defaults so the page looks consistent
   across every browser, then sets the page-wide font/color/line-height.
   ============================================================================ */

* {
  box-sizing: border-box; /* makes width/height math include padding+border, which is far less confusing */
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth; /* makes the nav links (e.g. "How It Works") scroll smoothly instead of jumping — no JavaScript needed */
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--color-navy);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin-bottom: 1.25rem; } /* clamp() = "never smaller than 2rem, never bigger than 2.75rem, scale in between" — responsive text sizing without a media query */
h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 0.75rem; text-align: center; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p { color: var(--color-text-muted); }

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

/* Visually hides text while keeping it readable by screen readers —
   used on the email input's label so blind/low-vision visitors still
   hear "Email address" even though sighted visitors just see the box. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ============================================================================
   REUSABLE PIECES — container width, buttons
   ============================================================================ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem; /* keeps content from touching the screen edge on phones */
}

.section {
  padding: 4rem 0;
}

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

.section-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem auto;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--color-green);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--color-green-dark);
}
.btn-primary:disabled {
  background: #9CA3AF;
  cursor: not-allowed;
}

.btn-outline {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-border);
}

.btn-coming-soon {
  width: 100%;
  color: var(--color-text-muted);
  cursor: default;
  pointer-events: none; /* makes the "coming soon" links non-clickable until real affiliate URLs are added */
}

/* ============================================================================
   HEADER
   ============================================================================ */

.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky; /* keeps the header visible while scrolling, so "Join the Waitlist" is always reachable */
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-navy);
}
.logo:hover { text-decoration: none; }
.logo-accent { color: var(--color-green); }

.main-nav {
  display: flex;
  gap: 1.5rem;
}
.main-nav a {
  color: var(--color-text);
  font-weight: 500;
}
.main-nav a:hover { color: var(--color-green); }

/* ============================================================================
   HERO
   ============================================================================ */

.hero {
  background: var(--color-navy);
  color: #FFFFFF;
  padding: 4.5rem 0;
}

.hero-inner {
  max-width: 720px;
}

.hero h1 {
  color: #FFFFFF;
}

.hero-subhead {
  color: #CBD5E1;
  font-size: 1.15rem;
  margin-bottom: 2rem;
}

.math-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.math-box-title {
  color: #FFFFFF;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.math-steps {
  color: #E2E8F0;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}
.math-steps li { margin-bottom: 0.4rem; }
.math-steps strong { color: var(--color-green); }

.math-box-footer {
  color: #FFFFFF;
  font-weight: 600;
}

/* --- Signup form ---
   Note: the form itself (inputs, button, its own responsive layout) is
   generated by Kit and styled by the <style> block Kit's embed code
   brings with it in index.html, scoped to Kit's own "formkit-form" class
   — we don't style it here. This card is just the white box around it. */

.signup-box {
  background: #FFFFFF;
  border-radius: var(--radius);
  padding: 1.5rem;
}

.signup-privacy {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ============================================================================
   HOW IT WORKS
   ============================================================================ */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--color-green);
  color: #FFFFFF;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* ============================================================================
   FEATURED PLATFORMS
   ============================================================================ */

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.platform-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}

.platform-badge {
  display: inline-block;
  background: var(--color-navy);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px; /* a very large radius turns a box into a "pill" shape */
  margin-bottom: 1rem;
  align-self: flex-start;
}

.platform-desc {
  flex-grow: 1; /* pushes the "coming soon" button to the bottom of every card, even if descriptions are different lengths */
  margin-bottom: 1.25rem;
}

/* ============================================================================
   FAQ
   ============================================================================ */

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.faq-item h3 {
  color: var(--color-navy);
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.site-footer {
  background: var(--color-navy);
  color: #CBD5E1;
  padding: 2.5rem 0;
}

.disclosure {
  color: #CBD5E1;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  max-width: 760px;
}
.disclosure strong { color: #FFFFFF; }

.footer-meta {
  font-size: 0.85rem;
  color: #94A3B8;
}
.footer-meta a { color: #CBD5E1; }

/* ============================================================================
   MOBILE ADJUSTMENTS
   Everything above already flexes/wraps reasonably on its own thanks to
   flexbox and CSS grid — this section only overrides the handful of
   things that genuinely need a different layout on small screens.
   ============================================================================ */

@media (max-width: 640px) {
  /* Hide the middle nav links on phones and keep just the logo + button.
     Rationale: on a single-page site, a phone visitor will naturally
     scroll through everything anyway, so the jump-links matter less —
     and this avoids needing a hamburger-menu button plus the JavaScript
     to open/close it. One less moving part to maintain. */
  .main-nav {
    display: none;
  }

  .header-inner {
    justify-content: space-between;
  }

  .hero {
    padding: 3rem 0;
  }

  .section {
    padding: 2.75rem 0;
  }
}
