/* ═══════════════════════════════════════════════════════════════
   Effective Altruism KTH — eakth.se
   One stylesheet for the whole site. No frameworks, no build step.
   Palette: navy ink #17293E · blue #1954A6 (primary) · amber #F0A93C
   (accent only) · cool paper #F6F8FB.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --paper: #F6F8FB;
  --card: #FFFFFF;
  --ink: #17293E;
  --ink-soft: #4B5B6E;
  --blue: #1954A6;
  --blue-deep: #123F7E;
  --blue-tint: #E8EFF8;
  --navy: #122238;
  --amber: #F0A93C;
  --line: rgba(23, 41, 62, 0.15);
  --line-soft: rgba(23, 41, 62, 0.09);
  --shadow: 0 1px 2px rgba(23, 41, 62, 0.05), 0 6px 18px -10px rgba(23, 41, 62, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --measure: 66ch;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-gap: clamp(3.5rem, 8vw, 6rem);
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection { background: var(--blue-tint); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: .6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0; text-decoration: none;
}
.skip-link:focus { left: 0; color: #fff; }

/* ── Type ──────────────────────────────────────────────────────── */
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 750; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.8vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
h3 { font-size: 1.14rem; letter-spacing: -0.008em; }
p  { max-width: var(--measure); }
.lede {
  font-size: clamp(1.08rem, 1.7vw, 1.22rem);
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 60ch;
}
.accent-bar {
  width: 3rem; height: 4px; border-radius: 2px;
  background: var(--amber); border: 0;
  margin: 1.1rem 0 1.2rem;
}

/* ── Layout ────────────────────────────────────────────────────── */
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: calc(var(--section-gap) / 2); }
.section-head { margin-bottom: 2rem; max-width: 46rem; }
.section-head p { margin-top: .7rem; color: var(--ink-soft); }

/* ── Announcement strip ────────────────────────────────────────── */
.announce {
  background: #E3EDF9; color: var(--ink);
  font-size: .93rem; text-align: center; padding: .6rem var(--gutter);
  border-bottom: 1px solid var(--line-soft);
}
.announce a { color: var(--blue); font-weight: 700; }

/* ── Header / nav ──────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; gap: 1rem; min-height: 4.15rem; }
.brand {
  display: flex; align-items: center; gap: .65rem;
  font-weight: 750; letter-spacing: -0.015em; font-size: 1.05rem;
  color: var(--ink); text-decoration: none; margin-right: auto;
  white-space: nowrap;
}
.brand img { height: 2.05rem; width: auto; }
.brand .brand-long { display: inline; }
.brand .brand-short { display: none; }

.nav-links { display: flex; align-items: center; gap: .2rem; list-style: none; padding: 0; }
.nav-links a {
  display: block; padding: .45rem .75rem; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 600; color: var(--ink);
  text-decoration: none; white-space: nowrap;
}
.nav-links a:hover { background: var(--blue-tint); color: var(--ink); }
.nav-links a[aria-current="page"] { background: var(--blue); color: #fff; }
.nav-cta { margin-left: .5rem; }

.nav-toggle-box {
  position: absolute; opacity: 0; pointer-events: none;
  width: 1px; height: 1px;
}
.nav-toggle-box:focus-visible ~ .nav-toggle {
  outline: 3px solid var(--amber); outline-offset: 2px;
}
.nav-toggle {
  display: none; width: 2.7rem; height: 2.7rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle span {
  display: block; width: 1.1rem; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.4rem; border-radius: var(--radius-sm);
  font-weight: 700; font-size: .99rem; line-height: 1.2;
  text-decoration: none; border: 1.5px solid transparent;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
  cursor: pointer;
}
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-deep); color: #fff; }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: var(--blue-tint); color: var(--navy); }
.btn-outline { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-outline:hover { background: rgba(23, 41, 62, 0.06); color: var(--ink); }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.65); color: #fff; background: transparent; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn-sm { padding: .5rem 1rem; font-size: .92rem; }
.btn-lg { padding: .85rem 1.7rem; font-size: 1.04rem; }

/* ── Dark hero (photo background) ──────────────────────────────── */
.hero-dark {
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(14, 26, 44, 0.45), rgba(14, 26, 44, 0.62)),
    url("/assets/hero-bg.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
  padding-block: clamp(4.5rem, 10vw, 7.5rem);
}
.hero-dark.hero-sub { padding-block: clamp(3rem, 7vw, 4.75rem); }
.hero-dark h1 { color: #fff; max-width: 21ch; }
.hero-dark .lede { color: rgba(255, 255, 255, 0.87); }
.hero-dark a:not(.btn) { color: #fff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.9rem; align-items: center; }
.hero-note { margin-top: 1rem; font-size: .93rem; color: rgba(255, 255, 255, 0.75); }
.facts { margin-top: 1.1rem; font-size: .97rem; font-weight: 600; color: rgba(255, 255, 255, 0.85); }

/* ── Cards ─────────────────────────────────────────────────────── */
.grid { display: grid; gap: 1.15rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: .55rem;
}
.card p { font-size: .97rem; color: var(--ink-soft); }
.icon-chip {
  width: 2.75rem; height: 2.75rem; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--blue-tint); color: var(--blue);
  margin-bottom: .3rem;
}
.icon-chip svg { width: 22px; height: 22px; }

a.card-link { text-decoration: none; color: inherit; transition: border-color .14s ease, box-shadow .14s ease; }
a.card-link:hover { border-color: var(--blue); box-shadow: 0 2px 4px rgba(23,41,62,.06), 0 12px 28px -14px rgba(23,41,62,.25); color: inherit; }
.card .go { margin-top: auto; padding-top: .45rem; font-weight: 700; font-size: .94rem; color: var(--blue); }

/* ── Dark band ─────────────────────────────────────────────────── */
.band-navy { background: var(--navy); color: #fff; padding-block: clamp(3rem, 6vw, 4.25rem); }
.band-navy h2 { color: #fff; }
.band-navy p { color: rgba(255, 255, 255, 0.85); }
.band-navy a:not(.btn) { color: #fff; }
.band-navy .note { color: rgba(255, 255, 255, 0.68); }
.band-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; align-items: center; }

/* ── Prose ─────────────────────────────────────────────────────── */
.prose { max-width: var(--measure); display: grid; gap: 1.05rem; }
.prose strong { color: var(--ink); }

/* Numbered reasons */
.reasons { list-style: none; padding: 0; display: grid; gap: 1.1rem; counter-reset: reason; }
.reasons li {
  counter-increment: reason;
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 1.4rem 1.5rem 1.4rem 4.1rem;
  position: relative; box-shadow: var(--shadow); max-width: 52rem;
}
.reasons li::before {
  content: counter(reason, decimal-leading-zero);
  position: absolute; left: 1.35rem; top: 1.5rem;
  font-weight: 750; font-size: 1rem; color: var(--blue);
  letter-spacing: .02em;
}
.reasons h3 { margin-bottom: .3rem; }
.reasons p { color: var(--ink-soft); font-size: .98rem; }

/* ── Simple checklist ──────────────────────────────────────────── */
.biglist { list-style: none; padding: 0; display: grid; gap: 1.05rem; max-width: 46rem; }
.biglist li { position: relative; padding-left: 2rem; }
.biglist li::before {
  content: ""; position: absolute; left: 0; top: .5rem;
  width: .8rem; height: .8rem; border-radius: 3px;
  background: var(--blue);
}
.biglist strong { display: block; }
.biglist span { color: var(--ink-soft); font-size: .97rem; }

/* ── Course week list ──────────────────────────────────────────── */
.timeline { list-style: none; padding: 0; display: grid; gap: 1.35rem; max-width: 46rem; }
.timeline li { display: grid; grid-template-columns: 2.3rem 1fr; gap: 1rem; align-items: start; }
.week-dot {
  width: 2.15rem; height: 2.15rem; border-radius: var(--radius-sm);
  background: var(--blue-tint); color: var(--blue);
  display: grid; place-items: center;
  font-weight: 750; font-size: .95rem; margin-top: .1rem;
}
.timeline h3 { margin-bottom: .2rem; }
.timeline p { font-size: .97rem; color: var(--ink-soft); }

/* ── FAQ ───────────────────────────────────────────────────────── */
.faq { max-width: 46rem; display: grid; gap: .75rem; }
.faq details {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer; padding: 1rem 3rem 1rem 1.25rem;
  font-weight: 700; list-style: none; position: relative;
  border-radius: var(--radius-sm);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1.15rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.35rem; font-weight: 500; color: var(--blue);
  transition: transform .18s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 1.25rem 1.1rem; color: var(--ink-soft); font-size: .97rem; }

/* ── Resource list ─────────────────────────────────────────────── */
.resource-list { list-style: none; padding: 0; max-width: 52rem; border-top: 1px solid var(--line-soft); }
.resource-list li { border-bottom: 1px solid var(--line-soft); }
.resource-list a {
  display: grid; grid-template-columns: 1fr auto; column-gap: 1rem;
  padding: 1rem .2rem; text-decoration: none; color: inherit; align-items: center;
}
.resource-list .r-name { grid-column: 1; grid-row: 1; font-weight: 700; }
.resource-list .r-desc { grid-column: 1; grid-row: 2; color: var(--ink-soft); font-size: .95rem; max-width: 60ch; }
.resource-list .r-arrow { grid-column: 2; grid-row: 1 / span 2; color: var(--blue); font-weight: 700; }
.resource-list a:hover .r-name { color: var(--blue); }

/* ── Luma embeds ───────────────────────────────────────────────── */
.calendar-frame {
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--card); box-shadow: var(--shadow);
}
.calendar-frame iframe { display: block; width: 100%; height: 620px; border: 0; }
.calendar-fallback { font-size: .92rem; color: var(--ink-soft); margin-top: .75rem; }

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, 0.8); margin-top: var(--section-gap); }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 2.5rem; padding-block: 3.25rem 2.25rem;
}
.site-footer h4 {
  color: #fff; font-size: .8rem; letter-spacing: .11em;
  text-transform: uppercase; margin-bottom: .85rem;
}
.site-footer ul { list-style: none; padding: 0; display: grid; gap: .45rem; }
.site-footer a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.site-footer a:hover { color: var(--amber); }
.footer-brand img { height: 3.1rem; margin-bottom: 1rem; }
.footer-brand p { font-size: .94rem; max-width: 32ch; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-block: 1.3rem; font-size: .88rem;
  color: rgba(255, 255, 255, 0.6);
  display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; justify-content: space-between;
}
.footer-bottom a { color: rgba(255, 255, 255, 0.75); }

/* ── Helpers ───────────────────────────────────────────────────── */
.note { font-size: .9rem; color: var(--ink-soft); }
.center { text-align: center; }
.center p, .center .lede { margin-inline: auto; }
.center .band-actions, .center .hero-actions { justify-content: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .3rem;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: .9rem var(--gutter) 1.2rem;
    display: none;
  }
  .nav-links a { padding: .7rem 1rem; }
  .nav-toggle-box:checked ~ .nav-links { display: flex; }
  .nav-toggle-box:checked ~ .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-box:checked ~ .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-toggle-box:checked ~ .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .calendar-frame iframe { height: 540px; }
  .reasons li { padding: 1.3rem 1.3rem 1.3rem 3.4rem; }
  .reasons li::before { left: 1.15rem; }
}
@media (max-width: 460px) {
  .grid-4 { grid-template-columns: 1fr; }
  .brand .brand-long { display: none; }
  .brand .brand-short { display: inline; }
  .hero-actions .btn, .band-actions .btn { width: 100%; }
}
