/* University of Toronto Effective Altruism — styles */

:root {
  /* Official Effective Altruism brand palette */
  --teal: #0e879c;        /* EA teal */
  --teal-bright: #2ba3b8; /* lighter teal accent */
  --teal-deep: #1b5266;   /* EA deep teal */
  --ink: #16323a;         /* deep teal-charcoal text */
  --muted: #5e6e74;       /* soft muted text */
  --paper: #f3f6f7;       /* faint cool tint for bands */
  --line: #e0e6e8;        /* hairline rules */
  --white: #ffffff;

  --grad: linear-gradient(120deg, #0e879c 0%, #1b5266 100%);

  --max: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-deep); }

h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.015em; line-height: 1.15; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }

.brand__mark { height: 30px; width: auto; flex: none; display: block; }

.brand__text { font-size: 1rem; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }

/* Collapse the wordmark to "UTEA" once the page is scrolled */
.brand__short { display: none; }
.nav.is-scrolled .brand__full { display: none; }
.nav.is-scrolled .brand__short { display: inline; letter-spacing: 0.02em; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  color: var(--ink);
  font-weight: 400;
  font-size: 0.94rem;
}
.nav__links a:hover { color: var(--teal); }

/* ---------- Buttons (squared "slots") ---------- */
.btn {
  display: inline-block;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  padding: 11px 22px;
  border-radius: 0;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}
.btn--primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }

/* Nav CTA — force white text (beats .nav__links a) for readability */
.nav .btn--primary,
.nav .btn--primary:hover {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.nav .btn--primary:hover { background: #143f4c; border-color: #143f4c; }

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

.btn--lg { padding: 14px 28px; font-size: 0.96rem; }

/* a quiet text link with arrow */
.textlink {
  font-weight: 500;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.textlink:hover { color: var(--teal-deep); }
.textlink .arrow { transition: transform 0.16s ease; }
.textlink:hover .arrow { transform: translateX(3px); }

/* ---------- Hero (big left-aligned text) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 132px 0 120px;
  background: radial-gradient(720px 520px at 18% 30%, rgba(14, 135, 156, 0.08), transparent 70%);
}

.hero .wrap { position: relative; z-index: 2; }
.hero__copy { max-width: 760px; }

/* King's College Circle watercolor, inset from the right edge */
.hero__art {
  position: absolute;
  z-index: 1;
  right: clamp(40px, 7vw, 120px);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(330px, 40vw, 540px);
  pointer-events: none;
  user-select: none;
}
.hero__art img { display: block; width: 100%; height: auto; }

.hero h1 {
  font-size: clamp(2.4rem, 4.8vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink);
}
.hero h1 .uoft { color: var(--teal-deep); }
.hero h1 .accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  margin-top: 28px;
  max-width: 540px;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 400;
  color: var(--muted);
}

.hero__actions {
  margin-top: 38px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- Sections ---------- */
.section { padding: 92px 0; }
.section--alt { background: var(--paper); }

.section__head { max-width: 640px; margin-bottom: 56px; }
.section__head .label { display: block; margin-bottom: 16px; }
.section__head h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 400;
  color: var(--ink);
}
.section__head p { margin-top: 14px; color: var(--muted); font-size: 1.12rem; }

/* ---------- Principles (no boxes) ---------- */
.cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
}

.col { border-top: 1px solid var(--line); padding-top: 22px; }
.col h3 { font-size: 1.22rem; color: var(--ink); margin-bottom: 8px; }
.col p { color: var(--muted); font-size: 0.98rem; }

/* ---------- Focus list (hairline rows) ---------- */
.list { border-top: 1px solid var(--line); }
.list__row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.list__row h3 {
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink);
}
.list__row .idx { color: var(--teal-bright); margin-right: 12px; font-variant-numeric: tabular-nums; }
.list__row p { color: var(--muted); font-size: 1rem; }

/* ---------- CTA band (full bleed, no rounded box) ---------- */
.cta-band {
  background: linear-gradient(135deg, #0e879c 0%, #1b5266 100%);
  color: #fff;
  padding: 104px 0;
}
.cta-band .label { color: var(--teal-bright); display: block; margin-bottom: 18px; }
.cta-band h2 {
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  max-width: 660px;
}
.cta-band p {
  margin: 18px 0 34px;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.12rem;
}
.cta-band .btn--primary { background: #fff; color: var(--teal-deep); }
.cta-band .btn--primary:hover { background: var(--paper); color: var(--teal-deep); }

/* ---------- Resources page ---------- */
.page-hero {
  padding: 104px 0 64px;
  border-bottom: 1px solid var(--line);
}
.page-hero .label { display: block; margin-bottom: 18px; }
.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.page-hero p { margin-top: 18px; max-width: 600px; color: var(--muted); font-size: 1.15rem; }

.res-group { padding: 56px 0; border-bottom: 1px solid var(--line); }
.res-group__title {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}

.res-item {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 32px;
  align-items: baseline;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  transition: padding-left 0.16s ease;
}
.res-item:hover { padding-left: 8px; }
.res-item h4 {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.res-item:hover h4 { color: var(--teal); }
.res-item h4 .arrow { color: var(--teal-bright); transition: transform 0.16s ease; }
.res-item:hover h4 .arrow { transform: translate(3px, -3px); }
.res-item p { color: var(--muted); font-size: 0.98rem; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__links { display: flex; gap: 24px; list-style: none; }
.footer__links a { color: var(--muted); }
.footer__links a:hover { color: var(--teal); }

.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__brand img { height: 26px; width: auto; flex: none; }
.footer__brand span { font-weight: 500; color: var(--ink); }

/* ---------- Focus & motion ---------- */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .res-item:hover { padding-left: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero__inner { grid-template-columns: 1fr; gap: 0; }
  .hero__art { display: none; }
  .hero__copy { max-width: 600px; }
  .cols { grid-template-columns: 1fr; gap: 0; }
  .col { padding: 24px 0; }
  .col:not(:last-child) { border-bottom: none; }
  .list__row,
  .res-item { grid-template-columns: 1fr; gap: 8px; }
  .nav__links { gap: 20px; }
  .nav__links .nav-hide { display: none; }
}
@media (max-width: 560px) {
  .brand__text small { display: none; }
  .hero { padding: 84px 0 72px; }
  .section, .cta-band { padding: 64px 0; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
