/* Skoolie Club — site styles
   Design tokens live at the top; everything else uses them. */

:root {
  color-scheme: dark;

  /* Accents */
  --yellow: #f5b301;
  --yellow-deep: #ffc82e;
  --rust: #e8764c;

  /* Dark theme. Names kept from the light version: "ink" is now the text color and
     "cream"/"paper" are the backgrounds, so the rest of the stylesheet reads the same. */
  --ink: #f3eee2;            /* main text */
  --ink-soft: #cfc9bb;       /* secondary text */
  --ink-dark: #1f2421;       /* text on yellow / inside light elements */
  --cream: #141715;          /* page background */
  --cream-dark: #262b29;     /* chips, subtle fills */
  --paper: #1d2120;          /* cards, panels */
  --deep: #0c0e0d;           /* stats strip, CTA, auth card */
  --field: #0f1211;          /* form inputs */
  --muted: #9a9a8f;
  --line: rgba(243, 238, 226, 0.12);

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --radius: 14px;
  --radius-lg: 24px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }

p { margin: 0 0 1em; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.9rem;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 54ch;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-primary { background: var(--yellow); color: var(--ink-dark); }
.btn-primary:hover { background: var(--yellow-deep); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--ink-dark); }

.btn-light { background: var(--ink); color: var(--ink-dark); }
.btn-light:hover { background: #fff; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 23, 21, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand img { width: 36px; height: 36px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a:not(.btn) {
  text-decoration: none;
  font-weight: 600;
  color: var(--ink-soft);
}
.nav-links a:not(.btn):hover { color: var(--ink); }

.nav-cta { display: flex; gap: 0.6rem; margin-left: 0.5rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--ink);
  color: var(--ink);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  margin: 4px auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(245, 179, 1, 0.22), transparent 60%),
    var(--cream);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 .accent {
  color: var(--rust);
  position: relative;
  display: inline-block;
}
.hero h1 .accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 0.22em;
  background: var(--yellow);
  z-index: -1;
  border-radius: 4px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.8rem 0 1.2rem;
}

.hero-note {
  font-size: 0.95rem;
  color: var(--muted);
}

.hero-art {
  position: relative;
}
.hero-art img,
.hero-art svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5));
}

.road-stripe {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 8%;
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 40px, transparent 40px 70px);
  opacity: 0.2;
  z-index: -1;
}

/* ---------- Stats strip ---------- */

.stats {
  background: var(--deep);
  color: var(--ink);
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--yellow);
  line-height: 1;
}
.stat span { font-size: 0.9rem; opacity: 0.8; }

/* ---------- Sections ---------- */

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Feature cards */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--yellow);
  color: var(--ink-dark);
  display: grid;
  place-items: center;
  margin-bottom: 0.6rem;
}
.card-icon svg { width: 28px; height: 28px; }

.card p { color: var(--ink-soft); margin: 0; flex: 1; }

.card-link {
  margin-top: 0.8rem;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  color: var(--rust);
}
.card-link:hover { text-decoration: underline; }

/* Bus profile showcase */

.buses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.bus {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bus:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.bus-photo {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: hidden;
}
.bus-photo img, .bus-photo svg { width: 100%; height: auto; }
/* Different light for each "photo": dusk, dawn, overcast */
.bus-photo.y { background: radial-gradient(120% 90% at 50% 110%, #3a3418 0%, #171a18 60%, #0f1211 100%); }
.bus-photo.r { background: radial-gradient(120% 90% at 50% 110%, #4a2a1e 0%, #1a1816 60%, #0f1211 100%); }
.bus-photo.g { background: radial-gradient(120% 90% at 50% 110%, #1e3326 0%, #141a16 60%, #0f1211 100%); }

.bus-body { padding: 1.2rem 1.4rem 1.4rem; }
.bus-body h3 { margin-bottom: 0.2rem; }
.bus-meta { color: var(--muted); font-size: 0.92rem; margin: 0 0 0.8rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--cream-dark);
  color: var(--ink-soft);
}

/* Forum preview */

.forum-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.threads {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.threads li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.3rem;
  border-bottom: 1px solid var(--line);
}
.threads li:last-child { border-bottom: 0; }

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink-dark);
  background: var(--yellow);
}
.avatar.r { background: #e9a98f; }
.avatar.g { background: #b9d6bf; }

.thread-title { font-weight: 700; display: block; }
.thread-cat { font-size: 0.85rem; color: var(--muted); }
.thread-count {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 1.8rem;
}
.checklist li {
  padding-left: 2rem;
  position: relative;
  margin-bottom: 0.6rem;
  color: var(--ink-soft);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--yellow);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f2421' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: 65%;
  background-repeat: no-repeat;
  background-position: center;
}

/* Join CTA */

.cta {
  background: var(--deep);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 179, 1, 0.35), transparent 65%);
}
.cta h2 { color: #fff; }
.cta p { color: var(--ink-soft); max-width: 50ch; }

.signup {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.signup label { font-size: 0.85rem; font-weight: 600; opacity: 0.85; }
.signup input {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font: inherit;
}
.signup input::placeholder { color: rgba(255, 255, 255, 0.4); }
.signup input:focus { outline: 2px solid var(--yellow); outline-offset: 1px; }
.signup .btn { justify-content: center; margin-top: 0.4rem; }
.signup small { opacity: 0.6; font-size: 0.8rem; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 3rem 0 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-grid,
  .forum-grid,
  .cta { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 420px; margin-inline: auto; }
  .features,
  .buses { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.4rem 1rem; }
}

@media (max-width: 640px) {
  .features,
  .buses { grid-template-columns: 1fr; }

  .hero-actions .btn { width: 100%; justify-content: center; }
  .threads li { grid-template-columns: auto 1fr; }
  .thread-count { grid-column: 2; text-align: left; }
}

/* The members' nav has nine items; fold it into the menu button before it overflows. */
@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1rem;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links li a:not(.btn) { display: block; padding: 0.8rem 0; }
  .nav-cta { flex-direction: column; margin: 0.6rem 0 0; }
  .nav-cta .btn { justify-content: center; }

  .nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card, .bus { transition: none; }
}
