*, *::before, *::after { box-sizing: border-box; }
:root {
  /* Light palette — OKLCH, perceptually uniform monochrome with light-blue accents */
  --paper: oklch(98.5% 0.003 250);
  --paper-soft: oklch(96.5% 0.006 250);
  --surface: oklch(100% 0 0);
  --surface-2: oklch(96% 0.005 250);
  --glass: rgba(255, 255, 255, .55);
  --glass-strong: rgba(255, 255, 255, .86);
  --ink: oklch(14% 0.012 250);
  --ink-2: oklch(26% 0.01 250);
  --muted: oklch(56% 0.012 250);
  --line: oklch(90% 0.006 250);
  --line-strong: oklch(82% 0.01 250);
  --blue: oklch(84% 0.055 230);
  --blue-2: oklch(90% 0.04 230);
  --blue-3: oklch(74% 0.07 230);
  --accent: oklch(58% 0.07 230);
  --green: oklch(74% 0.1 150);
  --hero-fade: rgba(255, 255, 255, .85);
  --hero-fade-2: rgba(255, 255, 255, .4);
  --hero-stripe: rgba(170, 215, 240, .22);
  --hero-base: oklch(100% 0 0);
  --radius: 28px;
  --radius-sm: 16px;
  --shadow: 0 24px 80px rgba(10, 10, 15, .08);
  --shadow-soft: 0 12px 40px rgba(10, 10, 15, .06);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
}

/* Dark mode — navy + gold, modeled on the classic SSA site (OKLCH) */
[data-theme="dark"] {
  --paper: oklch(22% 0.06 264);
  --paper-soft: oklch(26% 0.066 264);
  --surface: oklch(28% 0.07 264);
  --surface-2: oklch(24% 0.062 264);
  --glass: rgba(14, 22, 46, .55);
  --glass-strong: rgba(11, 18, 40, .9);
  --ink: oklch(95% 0.015 90);
  --ink-2: oklch(85% 0.022 90);
  --muted: oklch(72% 0.03 88);
  --line: oklch(36% 0.05 264);
  --line-strong: oklch(50% 0.06 264);
  --blue: oklch(62% 0.13 255);
  --blue-2: oklch(34% 0.075 264);
  --blue-3: oklch(80% 0.13 86);
  --accent: oklch(80% 0.13 86);
  --green: oklch(80% 0.14 150);
  --hero-fade: rgba(13, 21, 44, .86);
  --hero-fade-2: rgba(13, 21, 44, .42);
  --hero-stripe: rgba(201, 164, 76, .12);
  --hero-base: oklch(28% 0.07 264);
  --shadow: 0 24px 80px rgba(0, 0, 0, .6);
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, .45);
}
/* Gold primary actions in dark mode, like the old site's gold buttons */
[data-theme="dark"] .button-dark,
[data-theme="dark"] .nav-action.connect {
  background: var(--accent);
  color: oklch(22% 0.06 264);
  border-color: var(--accent);
}
[data-theme="dark"] .button-dark:hover,
[data-theme="dark"] .nav-action.connect:hover { box-shadow: 0 14px 44px rgba(0, 0, 0, .55); }
[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a.active { background: var(--accent); color: oklch(22% 0.06 264); }
[data-theme="dark"] .nav-links a:hover::before,
[data-theme="dark"] .nav-links a.active::before { background: var(--accent); }
[data-theme="dark"] .side-nav a.active .dot { background: var(--accent); }
[data-theme="dark"] .micro-button.done,
[data-theme="dark"] .checklist-steps button.done { background: var(--accent); color: oklch(22% 0.06 264); }
[data-theme="dark"] .president-links a:hover,
[data-theme="dark"] .social-row a:hover { background: var(--accent); color: oklch(22% 0.06 264); border-color: var(--accent); }
[data-theme="dark"] .tile.selected { background: var(--accent); color: oklch(22% 0.06 264); }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  transition: background .4s ease, color .4s ease;
}
a { color: inherit; }
button, input, textarea { font: inherit; }

/* ---------- Top navigation (page-level) ---------- */
.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(20px, 5vw, 72px);
  color: var(--ink);
}
.brand, .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
}
.brand img, .footer-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  transition: transform .4s cubic-bezier(.2,.9,.3,1.3);
}
.brand:hover img { transform: rotate(-8deg) scale(1.08); }
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(14px);
}
.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
  transition: color .25s ease;
}
.nav-links a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--ink);
  transform: scale(.6);
  opacity: 0;
  transition: transform .25s cubic-bezier(.2,.9,.3,1.2), opacity .25s ease;
  z-index: -1;
}
.nav-links a:hover { color: var(--paper); }
.nav-links a:hover::before { transform: scale(1); opacity: 1; }
.nav-links a.active { color: var(--paper); }
.nav-links a.active::before { transform: scale(1); opacity: 1; }

.nav-tools {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--glass);
  backdrop-filter: blur(12px);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.3), background .25s ease, border-color .25s ease;
}
.theme-toggle:hover { transform: rotate(20deg) scale(1.06); border-color: var(--ink); }
.theme-toggle .theme-icon {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform .35s ease, box-shadow .35s ease;
  box-shadow: 0 0 0 2px transparent;
}
[data-theme="dark"] .theme-toggle .theme-icon {
  background: transparent;
  box-shadow: inset -5px -3px 0 0 var(--ink);
  transform: rotate(-20deg);
}
.nav-action {
  border: 0;
  background: transparent;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink);
}
.signup-menu {
  position: relative;
}
.nav-action.connect {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  transition: transform .25s ease, box-shadow .25s ease;
}
.nav-action.connect span { transition: transform .3s ease; display: inline-block; }
.nav-action.connect:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.nav-action.connect:hover span { transform: translateX(3px); }
.signup-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  padding: 8px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.signup-menu.open .signup-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.signup-dropdown a {
  display: block;
  padding: 12px 13px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 750;
  transition: background .2s ease, padding-left .2s ease;
}
.signup-dropdown a:hover { background: var(--blue-2); padding-left: 18px; }

/* ---------- Sticky side navigation (within page) ---------- */
.side-nav {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%) translateX(-8px);
  z-index: 35;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 10px 16px 12px;
  border: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s cubic-bezier(.2,.9,.3,1.2);
}
.side-nav.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}
.side-nav a {
  position: relative;
  display: grid;
  place-items: center;
  width: 18px;
  height: 14px;
  text-decoration: none;
}
.side-nav .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: width .3s cubic-bezier(.2,.9,.3,1.5), height .3s cubic-bezier(.2,.9,.3,1.5), background .3s ease;
}
.side-nav a:hover .dot { background: var(--accent); width: 10px; height: 10px; }
.side-nav a.active .dot { background: var(--ink); width: 5px; height: 22px; }
[data-theme="dark"] .side-nav a.active .dot { background: var(--accent); }
/* Progressive disclosure: name only appears as a floating tooltip on hover or after a click */
.side-nav .side-label {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  white-space: nowrap;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-8px) scale(.9);
  transition: opacity .2s ease, transform .25s cubic-bezier(.2,.9,.3,1.4);
}
.side-nav a:hover .side-label,
.side-nav a.revealed .side-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 118px 24px 56px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--hero-base), var(--paper-soft));
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("assets/brand/ssa-pattern.png") center top / 300px repeat;
  opacity: .34;
  animation: patternDrift 60s linear infinite;
}
[data-theme="dark"] .hero::before {
  filter: invert(1) hue-rotate(185deg) brightness(.82) saturate(1.05);
  opacity: .22;
}
/* White center fade that also sits behind the logo, keeping everything readable */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 62% 60% at 50% 42%, var(--hero-fade) 0%, var(--hero-fade) 30%, var(--hero-fade-2) 55%, transparent 78%);
}
@keyframes patternDrift {
  from { background-position: 50% 0; }
  to { background-position: 50% 300px; }
}
.hero-center {
  width: min(760px, 100%);
  text-align: center;
  position: relative;
  z-index: 2;
}
.hero-logo-wrap {
  position: relative;
  width: clamp(140px, 24vw, 250px);
  margin: 0 auto 18px;
}
/* Clean neutral glow behind the logo so the pattern's red stars don't tint it */
.hero-logo-wrap::before {
  content: "";
  position: absolute;
  inset: -45%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, var(--hero-fade) 0%, var(--hero-fade) 46%, transparent 72%);
}
.hero-logo {
  width: 100%;
  display: block;
  filter: drop-shadow(0 14px 26px rgba(0,0,0,.22));
  animation: heroFloat 7s ease-in-out infinite;
}
/* New animation 1: hand-drawn circle that sketches itself around the logo */
.logo-circle {
  position: absolute;
  inset: -14% -10%;
  width: 120%;
  height: 128%;
  overflow: visible;
}
.logo-circle path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: drawLine 1.7s cubic-bezier(.65,0,.35,1) forwards .35s;
}
/* New animation 2: hand-drawn arrow that draws in, then nudges toward Connect */
.hero-arrow {
  position: absolute;
  right: -68px;
  bottom: 2px;
  width: 60px;
  height: 44px;
  color: var(--accent);
  overflow: visible;
}
.hero-arrow path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: drawLine 1.1s ease forwards 1.1s;
}
.hero-arrow { animation: arrowNudge 2.4s ease-in-out 2.3s infinite; }
@keyframes arrowNudge {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  50% { transform: translateX(-7px) rotate(-4deg); }
}
@media (max-width: 760px) { .hero-arrow { display: none; } }
.blue-word { color: oklch(58% 0.17 255); }
[data-theme="dark"] .blue-word { color: oklch(70% 0.15 250); }
.hero h1 .word, .hero h1 .blue-word, .hero h1 .scribble { margin: 0 0.12em; }
.hero h1 .word:first-child { margin-left: 0; }
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 104px);
  letter-spacing: -.07em;
  line-height: .94;
  font-weight: 800;
}
.hero p {
  max-width: 570px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.65;
}
.hero-actions {
  position: relative;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  font-weight: 750;
  color: var(--ink);
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}
.button span { display: inline-block; transition: transform .3s ease; }
.button:hover span { transform: translateX(3px); }
.button:hover, .micro-button:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.button-dark { background: var(--ink); color: var(--paper); }
.button-line { background: var(--glass); color: var(--ink); backdrop-filter: blur(8px); }
.trust-row {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 28px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  z-index: 2;
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(70px, 10vw, 128px) clamp(20px, 5vw, 72px);
}
.section-head {
  max-width: 720px;
  margin-bottom: 34px;
}
.eyebrow {
  display: block;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}
h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 72px);
  letter-spacing: -.055em;
  line-height: 1;
}
.section-head p, .copy-stack > p {
  color: var(--muted);
  line-height: 1.75;
  font-size: 17px;
}
.stats { background: var(--surface); }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat-card, .event-card, .program-card, .form-card, .president-card, .mission-list article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.stat-card:hover, .event-card:hover, .program-card:hover, .form-card:hover, .president-card:hover, .mission-list article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}
.stat-card {
  position: relative;
  padding: 28px;
  min-height: 170px;
}
.stat-card strong {
  display: block;
  font-size: clamp(42px, 5vw, 66px);
  letter-spacing: -.06em;
}
.stat-card span { color: var(--muted); font-weight: 700; }
.info-button {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  cursor: help;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.info-button:hover { background: var(--ink); color: var(--paper); transform: scale(1.08); }
.stat-card.tip-open .info-button { background: var(--ink); color: var(--paper); }
.stat-card::after {
  content: attr(data-tip);
  position: absolute;
  right: 16px;
  top: 48px;
  width: min(250px, 82vw);
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 4;
}
.stat-card.tip-open::after { opacity: 1; transform: translateY(0); }

.split {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(28px, 8vw, 90px);
  align-items: start;
}
.copy-stack { display: grid; gap: 22px; }
.mission-list, .event-grid, .program-grid, .form-grid {
  display: grid;
  gap: 16px;
}
.mission-list { grid-template-columns: repeat(3, 1fr); }
.event-grid { grid-template-columns: repeat(3, 1fr); }
.program-grid { grid-template-columns: repeat(4, 1fr); }
.form-grid { grid-template-columns: .85fr 1.15fr; }
.mission-list article, .event-card, .program-card, .form-card { padding: 24px; }
.line-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  transform: rotate(8deg);
  background: var(--blue-2);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.4), background .3s ease;
}
.mission-list article:hover .line-icon,
.program-card:hover .line-icon { transform: rotate(-8deg) scale(1.12); background: var(--blue); }
h3 { margin: 14px 0 8px; font-size: 20px; letter-spacing: -.025em; }
p { color: var(--muted); }
.event-date { color: var(--accent); font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.micro-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--blue-2);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, color .22s ease;
}
.micro-button:hover { background: var(--accent); color: var(--paper); }
.micro-button.done { background: var(--ink); color: var(--paper); }
.micro-button.going { background: var(--ink); color: var(--paper); }
[data-theme="dark"] .micro-button.going { background: var(--accent); color: oklch(22% 0.06 264); }

/* ---------- Carousel ---------- */
.carousel-section {
  background: linear-gradient(180deg, var(--paper), var(--surface));
}
.carousel {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}
.carousel-track {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.carousel-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  padding: clamp(28px, 6vw, 72px);
  opacity: 0;
  transform: translateX(26px) scale(.985);
  transition: opacity .45s ease, transform .45s ease;
}
.carousel-slide.active {
  opacity: 1;
  transform: translateX(0) scale(1);
}
.carousel-slide h3 {
  font-size: clamp(34px, 5vw, 70px);
  line-height: .98;
  letter-spacing: -.055em;
  margin: 0 0 14px;
}
.carousel-slide p {
  max-width: 620px;
  font-size: 18px;
  line-height: 1.65;
}
.carousel-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  transition: transform .22s ease, background .22s ease, color .22s ease;
}
.carousel-arrow:hover { background: var(--ink); color: var(--paper); transform: scale(1.08); }
.carousel-dots {
  grid-column: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.carousel-dot {
  width: 52px;
  height: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(10, 14, 22, .22);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
}
[data-theme="dark"] .carousel-dot { background: rgba(255, 255, 255, .14); }
.carousel-dot span {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
}
[data-theme="dark"] .carousel-dot span { background: var(--accent); }
.carousel-dot.active span {
  animation: dotFill 5s linear forwards;
}
@keyframes dotFill { to { width: 100%; } }

/* ---------- Programs ---------- */
.program-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
}
.program-card > div {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 24px;
  background: var(--blue-2);
  color: var(--ink);
  transform: translateY(100%);
  transition: transform .28s ease;
  border-top: 1px solid var(--line);
  line-height: 1.6;
}
.program-card:hover > div { transform: translateY(0); }

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.focus-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: clamp(24px, 3vw, 36px);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.focus-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.focus-card h3 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.03em; margin: 6px 0 10px; }
.focus-card > p { color: var(--muted); line-height: 1.7; }
.focus-card ul {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.focus-card li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-2);
  font-weight: 650;
  line-height: 1.5;
}
.focus-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--blue-2);
  border: 1.5px solid var(--accent);
  transform: rotate(8deg);
  transition: transform .25s cubic-bezier(.2,.9,.3,1.5);
}
.focus-card li:hover::before { transform: rotate(-12deg) scale(1.15); }
@media (max-width: 900px) { .focus-grid { grid-template-columns: 1fr; } }

/* ---------- President ---------- */
.president-card {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: clamp(24px, 5vw, 56px);
  padding: clamp(22px, 4vw, 44px);
  align-items: center;
}
.president-card img {
  width: 100%;
  border-radius: 24px;
  background: var(--surface-2);
}
.president-card h3 {
  font-size: clamp(34px, 5vw, 66px);
  letter-spacing: -.06em;
  margin: 0 0 14px;
}
.board-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.board-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.board-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.board-card img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  margin-bottom: 14px;
}
.board-card h3 { font-size: 24px; letter-spacing: -.03em; margin: 4px 0 8px; }
.president-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.board-card .president-links { margin-top: 16px; }
.board-vp-head { margin-top: 56px; }
.vp-stack { display: grid; gap: 16px; }
.vp-reverse { direction: rtl; }
.vp-reverse > * { direction: ltr; }
@media (max-width: 880px) {
  .vp-reverse { direction: ltr; }
}
.president-links a, .social-row a {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 750;
  transition: background .22s ease, color .22s ease, border-color .22s ease;
}
.president-links a:hover, .social-row a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Contact / forms ---------- */
.contact { background: var(--paper-soft); }
.contact-single { max-width: 560px; margin: 0 auto; }
.form-card {
  display: grid;
  gap: 12px;
}
.form-card input, .form-card textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 14px 15px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-card input:focus, .form-card textarea:focus, .rsvp-modal input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--blue-2);
}
.form-card textarea { min-height: 130px; resize: vertical; }
output { min-height: 20px; color: var(--green); font-weight: 750; }

/* ---------- Donate ---------- */
.donate-section { background: var(--surface); }
.donation-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.donation-grid a {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-2);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
}
.donation-grid a strong {
  font-size: 34px;
  font-weight: 850;
  letter-spacing: -.05em;
}
.donation-grid a small {
  color: var(--muted);
  font-weight: 750;
  transition: color .22s ease;
}
.donation-grid a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.donation-grid a:hover small { color: var(--paper); }
.donate-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.donate-cta span { color: var(--muted); font-size: 13px; font-weight: 700; }

/* Primary Ko-fi CTA — the main, attention-grabbing button */
.donate-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin-bottom: 18px;
}
.donate-main {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 850;
  letter-spacing: -.02em;
  padding: clamp(18px, 2.4vw, 26px) clamp(34px, 6vw, 64px);
  border-radius: 999px;
  box-shadow: var(--shadow);
  position: relative;
  animation: donatePulse 2.6s ease-in-out infinite;
}
.donate-main:hover { transform: translateY(-3px) scale(1.02); }
.donate-main .kofi-heart {
  font-size: 1.1em;
  animation: heartBeat 1.4s ease-in-out infinite;
}
@keyframes donatePulse {
  0%, 100% { box-shadow: 0 14px 40px rgba(0,0,0,.22); }
  50% { box-shadow: 0 18px 60px rgba(0,0,0,.34); }
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.25); }
  40% { transform: scale(1); }
}
.donate-sub { color: var(--muted); font-size: 14px; font-weight: 700; max-width: 460px; }
.donate-or {
  text-align: center;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  margin: 26px 0 16px;
}
/* Make the amount cards visibly secondary to the main CTA */
.donation-grid-mini a { min-height: 92px; border-radius: 18px; box-shadow: none; }
.donation-grid-mini a strong { font-size: 26px; }
.donation-grid-mini a small { font-size: 12px; }
.kofi-modal {
  position: relative;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.kofi-modal iframe {
  display: block;
  width: 100%;
  height: min(680px, 78vh);
  border: 0;
  background: var(--surface);
}
.kofi-modal .modal-close { z-index: 2; }

/* ---------- Footer ---------- */
.footer {
  padding: clamp(70px, 10vw, 120px) clamp(24px, 6vw, 90px);
  background: var(--surface-2);
}
.footer-card {
  width: 100%;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: grid;
  justify-items: center;
  gap: 24px;
  text-align: center;
}
.footer-brand img { width: 56px; height: 56px; }
.footer nav, .social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
}
.footer a { text-decoration: none; }
.footer nav a { transition: color .2s ease; }
.footer nav a:hover { color: var(--accent); }
.footer small { color: var(--muted); }

/* ---------- Modals ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12,15,18,.34);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.newsletter-takeover { background: rgba(10,13,18,.45); backdrop-filter: blur(16px); }
.newsletter-sheet {
  position: relative;
  width: min(560px, 100%);
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 235px 24px 255px 24px / 24px 235px 24px 255px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 52px);
  text-align: center;
  transform: scale(.94);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.4);
}
.newsletter-takeover.open .newsletter-sheet { transform: scale(1); }
.newsletter-sheet h2 { font-size: clamp(34px, 6vw, 56px); margin: 4px 0 10px; }
.newsletter-sheet p { color: var(--muted); max-width: 380px; margin: 0 auto 20px; line-height: 1.6; }
.newsletter-sheet form { display: grid; gap: 12px; max-width: 360px; margin: 0 auto; }
.newsletter-sheet input {
  width: 100%;
  border: 2px solid var(--line-strong);
  border-radius: 16px;
  padding: 15px 16px;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  font-weight: 700;
}
.newsletter-sheet input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--blue-2); }
.newsletter-sheet output { color: var(--green); font-weight: 800; }
.nl-skip {
  margin-top: 16px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
}
.nl-doodle-1 { top: 14px; left: 18px; width: 42px; opacity: .5; }
.nl-doodle-2 { bottom: 16px; right: 18px; width: 40px; opacity: .5; }
.rsvp-modal {
  width: min(440px, 100%);
  position: relative;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 26px;
}
.rsvp-modal h2 { font-size: 34px; }
.rsvp-modal form { display: grid; gap: 10px; margin-top: 16px; }
.rsvp-modal input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 13px 14px;
  background: var(--surface);
  color: var(--ink);
}
.rsvp-result { margin-top: 16px; }
.rsvp-count { font-size: 24px; font-weight: 900; color: var(--ink); margin: 0; letter-spacing: -.02em; }
.rsvp-note { color: var(--muted); margin: 4px 0 14px; font-size: 13px; }
.rsvp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.rsvp-list li {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 750;
}
.rsvp-attendee {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color .2s ease, transform .15s ease, background .2s ease;
}
.rsvp-attendee:hover { border-color: var(--line-strong); transform: translateX(3px); }
.rsvp-attendee .rsvp-name::after {
  content: " \2192 tap for email";
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  opacity: .7;
}
.rsvp-attendee.show-email .rsvp-name::after { content: ""; }
.rsvp-attendee .rsvp-email {
  display: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
}
.rsvp-attendee.show-email .rsvp-email { display: block; animation: fadeUp .25s ease both; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.modal-close:hover { background: var(--ink); color: var(--paper); transform: rotate(90deg); }

/* ---------- Checklist ---------- */
.checklist-trigger {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--glass-strong);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
  padding: 8px 14px 8px 8px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 850;
}
.ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: conic-gradient(var(--blue-3) var(--progress, 0%), var(--line) 0);
  display: grid;
  place-items: center;
  transition: transform .3s ease;
}
.ring span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 850;
  color: var(--accent);
}
@keyframes ringPulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.22); }
  100% { transform: scale(1); }
}
.ring.pulse { animation: ringPulse .55s cubic-bezier(.2,.9,.3,1.4); }
.checklist-panel {
  position: fixed;
  right: 22px;
  bottom: 78px;
  z-index: 50;
  width: min(380px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--glass-strong);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  padding: 22px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.checklist-panel.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.checklist-panel header { display: flex; justify-content: space-between; gap: 16px; }
.checklist-panel h2 { font-size: 30px; }
#checklistClose {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 26px;
  cursor: pointer;
}
.checklist-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin: 16px 0;
}
.checklist-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--blue-3);
  transition: width .25s ease;
}
.checklist-pop {
  min-height: 42px;
  border-radius: 16px;
  padding: 11px 13px;
  background: var(--blue-2);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 12px;
}
.checklist-steps { counter-reset: step; display: grid; gap: 8px; }
.checklist-steps button {
  display: flex;
  align-items: center;
  gap: 12px;
  counter-increment: step;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  font-weight: 800;
  transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}
.checklist-steps button::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  transition: background .25s ease, color .25s ease, transform .35s cubic-bezier(.2,.9,.3,1.6), border-color .25s ease;
}
.checklist-steps button:hover { transform: translateX(4px); border-color: var(--line-strong); }
.checklist-steps button.done { border-color: var(--green); }
.checklist-steps button.done::before {
  content: "✓";
  background: var(--green);
  color: var(--paper);
  border-color: var(--green);
  transform: scale(1.12);
}
.checklist-complete {
  display: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: var(--blue-2);
  color: var(--ink);
  text-align: center;
}
.checklist-complete .spark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--green);
  color: var(--paper);
  font-size: 24px;
  font-weight: 900;
}
.checklist-panel.complete .checklist-steps { display: none; }
.checklist-panel.complete .checklist-complete { display: block; animation: popIn .45s cubic-bezier(.2,.9,.3,1.5); }
@keyframes popIn {
  from { opacity: 0; transform: scale(.92); }
  to { opacity: 1; transform: scale(1); }
}
.reset {
  margin-top: 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
}

.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: var(--stagger, 0ms); }
.fade-up.visible { opacity: 1; transform: translateY(0); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
}

/* ---- Extra site-wide micro-animations ---- */
/* Animated leading line on every eyebrow label */
.eyebrow { position: relative; }
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 2px;
  margin-right: 0;
  vertical-align: middle;
  background: var(--accent);
  border-radius: 2px;
  transition: width .5s cubic-bezier(.2,.7,.2,1) .15s, margin-right .5s cubic-bezier(.2,.7,.2,1) .15s;
}
.fade-up.visible .eyebrow::before,
.section.visible .eyebrow::before { width: 26px; margin-right: 10px; }

/* Buttons get a tactile press */
.button-dark:active, .button-light:active, .nav-action:active,
.micro-button:active, .handdrawn:active { transform: scale(.96); }

/* Event-card cover images zoom subtly on hover */
.event-card { overflow: hidden; }
.event-card img { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.event-card:hover img { transform: scale(1.05); }

/* Donation card lift + tier pop */
.donation-card { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.donation-card:hover { transform: translateY(-5px) rotate(-.6deg); box-shadow: var(--shadow); }

/* Board cards float in with a gentle tilt */
.board-card img { transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.board-card:hover img { transform: scale(1.04) rotate(-1deg); }

/* Underline-grow on inline president/board links */
.president-links a { position: relative; }
.president-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: currentColor;
  transition: width .25s ease;
}
.president-links a:hover::after { width: 100%; }

/* Floating logo bob in the hero */
@keyframes softBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

@media (max-width: 1100px) {
  .side-nav { display: none; }
}
@media (max-width: 900px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .nav-tools { justify-self: end; }
  .stat-grid, .mission-list, .event-grid, .program-grid, .form-grid, .split, .president-card, .donation-grid, .board-grid { grid-template-columns: 1fr; }
  .trust-row { position: static; transform: none; margin-top: 34px; flex-wrap: wrap; justify-content: center; }
  .carousel { grid-template-columns: 1fr; }
  .carousel-arrow { display: none; }
  .carousel-dots { grid-column: 1; }
}

/* ---------- Timeline page ---------- */
.timeline-page {
  background: var(--paper);
  position: relative;
}
.timeline-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("assets/brand/ssa-pattern.png") center top / 320px repeat;
  opacity: .32;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000, rgba(0,0,0,.5));
          mask-image: linear-gradient(180deg, #000, rgba(0,0,0,.5));
}
[data-theme="dark"] .timeline-page::before {
  filter: invert(1) hue-rotate(185deg) brightness(.85) saturate(1.1);
  opacity: .26;
}
.timeline-page main, .timeline-page .nav, .timeline-page .footer { position: relative; z-index: 1; }
.timeline-hero {
  min-height: 62svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 120px 24px 50px;
}
.timeline-hero img {
  width: min(180px, 38vw);
  margin-bottom: 18px;
  filter: drop-shadow(0 20px 34px rgba(0,0,0,.12));
  animation: heroFloat 7s ease-in-out infinite;
}
.timeline-hero h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 104px);
  letter-spacing: -.07em;
  line-height: .92;
}
.timeline-hero p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.65;
}
.timeline-section {
  position: relative;
  width: min(940px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 110px;
}
.timeline-line {
  position: absolute;
  left: 118px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line-strong);
}
.timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 28px;
  margin-bottom: 26px;
}
.timeline-card time {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 850;
}
.timeline-content {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 28px;
  transition: transform .22s ease, box-shadow .22s ease;
}
.timeline-content:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pill {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--blue-2);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}
.timeline-content h2 {
  margin-top: 18px;
  font-size: clamp(28px, 4vw, 54px);
}
.held-at {
  color: var(--ink-2);
  font-weight: 750;
}
.timeline-content .button {
  margin-top: 12px;
}

@media (max-width: 700px) {
  .timeline-line { left: 16px; }
  .timeline-card {
    grid-template-columns: 1fr;
    padding-left: 36px;
  }
  .timeline-card time {
    justify-self: start;
  }
}

/* ============================================================
   Hand-drawn aesthetic + micro-interactions
   ============================================================ */
.doodle {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  color: var(--ink);
  opacity: .72;
}
[data-theme="dark"] .doodle { color: var(--accent); opacity: .8; }
.doodle path, .doodle line, .doodle circle, .doodle polyline, .doodle polygon {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: doodleDraw 1.6s ease forwards;
}
@keyframes doodleDraw { to { stroke-dashoffset: 0; } }
.doodle-1 { top: 16%; left: 8%; width: 64px; animation: floaty 6s ease-in-out infinite; }
.doodle-2 { top: 22%; right: 9%; width: 76px; animation: floaty 7.5s ease-in-out infinite .4s; }
.doodle-3 { bottom: 24%; left: 12%; width: 70px; animation: wiggle 8s ease-in-out infinite; }
.doodle-4 { bottom: 20%; right: 11%; width: 58px; animation: floaty 6.8s ease-in-out infinite .8s; }
.doodle-5 { top: 40%; left: 4%; width: 44px; animation: wiggle 9s ease-in-out infinite .6s; }
.doodle-6 { top: 46%; right: 5%; width: 50px; animation: floaty 7s ease-in-out infinite .2s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-16px) rotate(3deg); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(8deg); }
}
@media (max-width: 760px) { .doodle { display: none; } }

/* Hand-drawn underline that draws itself in */
.scribble { position: relative; white-space: nowrap; display: inline-block; }
.scribble .underline {
  position: absolute;
  left: -3%;
  bottom: -.22em;
  width: 106%;
  height: .42em;
  overflow: visible;
}
.scribble .underline path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 640;
  stroke-dashoffset: 640;
  animation: drawLine 1.5s cubic-bezier(.65,0,.35,1) forwards .55s;
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }

/* Hand-drawn buttons in the hero */
.button.handdrawn {
  border-width: 2px;
  border-radius: 255px 18px 235px 20px / 18px 235px 22px 255px;
}
.button.handdrawn:nth-of-type(2) {
  border-radius: 20px 235px 18px 255px / 235px 20px 255px 18px;
}

/* Shimmer stroke */
.shimmer { position: relative; overflow: hidden; }
.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 32%, rgba(255,255,255,.45) 50%, transparent 68%);
  transform: translateX(-130%);
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shimmer {
  0% { transform: translateX(-130%); }
  55%, 100% { transform: translateX(130%); }
}

/* Delayed tooltips */
.has-tip { position: relative; }
.has-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%) translateY(6px);
  white-space: nowrap;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--shadow-soft);
  transition: opacity .2s ease .5s, transform .2s ease .5s;
  z-index: 6;
}
.has-tip:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Hero meter — animated progress bars */
.hero-meter {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  width: min(360px, 86vw);
  margin: 30px auto 0;
  padding: 16px 18px;
  border: 2px solid var(--ink);
  border-radius: 235px 18px 255px 20px / 18px 235px 22px 255px;
  background: var(--glass-strong);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
  text-align: left;
}
.hero-meter .meter-row { display: grid; gap: 6px; }
.hero-meter .meter-row span {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-2);
}
.hero-meter em { font-style: normal; color: var(--accent); font-weight: 900; }
.year-montage {
  text-align: center;
  gap: 6px;
  width: min(340px, 86vw);
  place-items: center;
  perspective: 600px;
}
.ym-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.ym-year {
  font-size: clamp(46px, 8vw, 64px);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transform-origin: center;
}
.ym-year.flip { animation: yearFlip .16s ease; }
@keyframes yearFlip {
  0% { transform: rotateX(0deg); opacity: 1; }
  50% { transform: rotateX(-82deg) translateY(-4px); opacity: .2; }
  100% { transform: rotateX(0deg); opacity: 1; }
}
.ym-caption {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  min-height: 18px;
}
.ym-year.done { animation: yearPop .5s cubic-bezier(.2,.9,.3,1.6); }
@keyframes yearPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.14); }
  100% { transform: scale(1); }
}
.hero-meter .bar {
  height: 9px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.hero-meter .bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-3), var(--accent));
  transition: width 1.4s cubic-bezier(.2,.9,.3,1);
}

/* Progress bars inside stat cards (animate on reveal) */
.stat-bar {
  margin-top: 16px;
  height: 7px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.stat-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-3), var(--accent));
  transition: width 1.3s cubic-bezier(.2,.9,.3,1);
}
.stat-card.bar-in .stat-bar i { width: var(--bar, 70%); }

/* Carousel grab cursor for swipe */
.carousel-track { cursor: grab; }
.carousel-track.dragging { cursor: grabbing; }

/* ============================================================
   Connections game
   ============================================================ */
.game-page { background: var(--paper); position: relative; }
.game-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("assets/brand/ssa-pattern.png") center top / 300px repeat;
  opacity: .26;
  pointer-events: none;
}
[data-theme="dark"] .game-page::before {
  filter: invert(1) hue-rotate(185deg) brightness(.82) saturate(1.05);
  opacity: .22;
}
.game-page main, .game-page .nav, .game-page .footer { position: relative; z-index: 1; }
.game-wrap {
  width: min(640px, calc(100% - 36px));
  margin: 0 auto;
  padding: 120px 0 90px;
  text-align: center;
}
.game-wrap h1 {
  font-size: clamp(40px, 7vw, 78px);
  letter-spacing: -.06em;
  margin: 8px 0 6px;
}
.game-wrap > p { color: var(--muted); margin: 0 auto 22px; max-width: 460px; line-height: 1.6; }
.game-status {
  min-height: 24px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
}
.solved-row {
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 10px;
  color: var(--paper);
  animation: popIn .4s cubic-bezier(.2,.9,.3,1.5);
}
.solved-row strong { display: block; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.solved-row span { font-weight: 750; opacity: .92; }
.group-0 { background: oklch(72% 0.13 95); }
.group-1 { background: oklch(66% 0.12 200); }
.group-2 { background: oklch(58% 0.11 270); }
.group-3 { background: oklch(64% 0.13 25); }
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.tile {
  position: relative;
  min-height: 76px;
  display: grid;
  place-items: center;
  padding: 6px;
  border: 2px solid var(--ink);
  border-radius: 235px 16px 255px 18px / 16px 235px 20px 255px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 850;
  font-size: clamp(12px, 2.4vw, 15px);
  cursor: pointer;
  user-select: none;
  transition: transform .14s ease, background .18s ease, color .18s ease;
}
.tile:nth-child(2n) { border-radius: 18px 235px 16px 255px / 235px 18px 255px 16px; }
.tile:hover { transform: translateY(-2px); }
.tile.selected { background: var(--ink); color: var(--paper); transform: scale(.96); }
.tile.shake { animation: tileShake .42s ease; }
@keyframes tileShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}
.game-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}
.mistakes {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 18px;
  color: var(--muted);
  font-weight: 800;
}
.mistakes .pip {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  transition: opacity .2s ease, transform .2s ease;
}
.mistakes .pip.used { opacity: .18; transform: scale(.8); }
.leaderboard {
  margin-top: 40px;
  border: 2px solid var(--ink);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 22px;
  text-align: left;
}
.leaderboard h2 { font-size: 28px; margin: 0 0 14px; }
.leaderboard ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.leaderboard li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  font-weight: 750;
}
.leaderboard li .rank { font-weight: 900; color: var(--accent); }
.leaderboard li .who { color: var(--ink); }
.leaderboard li .score { color: var(--muted); font-size: 13px; }
.leaderboard .empty { color: var(--muted); }
@media (max-width: 520px) {
  .tile { min-height: 64px; }
  .game-grid { gap: 6px; }
}

/* ============ Gallery (picture-book) page ============ */
.gallery-page {
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0);
  background-size: 26px 26px;
}
.gallery-hero {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(70px, 12vw, 130px) 24px 24px;
  text-align: center;
}
.gallery-hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(40px, 7vw, 84px);
  letter-spacing: -.055em;
  line-height: .98;
}
.gallery-hero p { color: var(--muted); font-size: 17px; line-height: 1.7; }
.gallery-arrow {
  width: 40px;
  height: 50px;
  margin-top: 18px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: softBob 1.8s ease-in-out infinite;
}
.gallery-book {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 24px 120px;
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 8vw, 96px);
}
.polaroid {
  position: relative;
  width: min(420px, 84%);
  background: #fdfdfb;
  padding: 16px 16px 56px;
  border-radius: 4px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, .26), 0 2px 6px rgba(0, 0, 0, .12);
  opacity: 0;
  transform: translateY(60px) rotate(0deg) scale(.96);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
  will-change: transform, opacity;
}
.polaroid.left { align-self: flex-start; }
.polaroid.right { align-self: flex-end; }
.polaroid.in { opacity: 1; transform: translateY(0) rotate(var(--rot, 0deg)) scale(1); }
.polaroid:hover { transform: translateY(-6px) rotate(0deg) scale(1.02); z-index: 2; transition: transform .3s ease; }
.polaroid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  background: #eee;
}
/* a little piece of tape at the top */
.polaroid::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 92px;
  height: 26px;
  background: rgba(214, 201, 162, .55);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
  border-radius: 2px;
}
.polaroid figcaption {
  font-family: 'Caveat', cursive;
  font-size: 26px;
  line-height: 1.1;
  color: #2a2a2a;
  text-align: center;
  margin-top: 14px;
}
.gallery-end {
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  margin-top: 12px;
}
.gallery-end code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 13px;
}
@media (max-width: 560px) {
  .polaroid { width: 100%; }
  .polaroid figcaption { font-size: 22px; }
}
