/*
 * Weaver Failed the Test
 * Main stylesheet
 *
 * The page opens like a tabloid front page, then reads like a graded exam:
 * a pop quiz and a transcript of her record. Colors and fonts live in
 * the variables below so the whole look can be changed in one place.
 *
 * Contents
 *   1. Variables and dark mode
 *   2. Base
 *   3. Top bar
 *   4. Hero (tabloid front page)
 *   5. Section headers
 *   6. Pop quiz
 *   7. Her party's grades
 *   8. Her record (timeline)
 *   9. New teacher (Weaver vs. Wright)
 *  10. Pass the note, dates, footer
 */

/* ==========================================================================
   1. Variables and dark mode
   ========================================================================== */
:root {
  --paper: #F3F5EF;
  --sheet: #FFFFFF;
  --ink: #12191F;
  --muted: #56606A;
  --rule: #D2D8CE;
  --line: #DCE6F2;
  --red: #C21F17;
  --red-soft: #FBE8E6;
  --navy: #1C3350;
  --navy-soft: #E6EDF6;
  --band: #12191F;
  --band-ink: #F3F5EF;
  --display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
}

/* Dark mode follows the visitor's device setting. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10151A;
    --sheet: #171E25;
    --ink: #E8EBE4;
    --muted: #9CA6AF;
    --rule: #29323B;
    --line: #1F2B38;
    --red: #FF6557;
    --red-soft: #3A1D1A;
    --navy: #9EBCE8;
    --navy-soft: #1A2636;
    --band: #E8EBE4;
    --band-ink: #10151A;
    color-scheme: dark;
  }
}

/* ==========================================================================
   2. Base
   ========================================================================== */

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

a {
  color: inherit;
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding-inline: 20px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  text-wrap: balance;
  margin: 0;
  line-height: 1.05;
}

.tag {
  font-family: var(--display);
  font-weight: 800;
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0;
}

.src {
  font-family: var(--display);
  font-size: .74rem;
  color: var(--muted);
  margin: 8px 0 0;
}

.src a {
  color: var(--muted);
  text-underline-offset: 2px;
}

.src a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  font-size: .9rem;
  text-decoration: none;
  background: var(--red);
  color: #fff;
  padding: 12px 18px;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}

.btn.line {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}

/* ==========================================================================
   3. Top bar
   ========================================================================== */
.bar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.bar .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-block: 10px;
}

.bar .name {
  font-family: var(--display);
  font-weight: 900;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar .name i {
  font-family: var(--hand);
  font-style: normal;
  color: var(--red);
  font-size: 1.8rem;
  line-height: 1;
  transform: rotate(-10deg);
}

.bar nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  font-family: var(--display);
  font-weight: 600;
  font-size: .84rem;
}

.bar nav a {
  text-decoration: none;
  color: var(--muted);
}

.bar nav a:hover {
  color: var(--ink);
}

.bar .btn {
  padding: 9px 14px;
  font-size: .8rem;
}

@media (max-width:760px) {
  .bar nav {
    display: none;
  }

  .bar .btn {
    margin-left: auto;
  }
}

/* ==========================================================================
   4. Hero (tabloid front page)
   Always dark, whatever the visitor's theme, so the photo and the red pop.
   ========================================================================== */

.splash {
  --splash-bg: #0D1115;
  --splash-ink: #F4F2EC;
  --splash-dim: #A9B0B6;
  --hot: #FF3B2F;
  background: var(--splash-bg);
  color: var(--splash-ink);
  position: relative;
  overflow: hidden;
}

/* faint halftone dots across the whole hero */
.splash::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.5px);
  background-size: 6px 6px;
  pointer-events: none;
}

.splash-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr);
  gap: 48px;
  align-items: center;
  padding-block: 56px 72px;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 22px;
  font-family: var(--display);
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--splash-dim);
}

.kicker-tag {
  background: var(--hot);
  color: #fff;
  padding: 6px 10px 5px;
  transform: rotate(-2deg);
  letter-spacing: .18em;
}

.splash h1 {
  font-size: clamp(3rem, 7.4vw, 6.2rem);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.035em;
  text-transform: uppercase;
  margin: 0;
}

.splash h1 .quote-open {
  color: var(--hot);
  margin-right: .02em;
}

.splash h1 .hot {
  display: block;
  color: var(--hot);
  position: relative;
  width: fit-content;
}

/* hand-drawn red underline under "trust problem" */
.splash h1 .hot::after {
  content: "";
  position: absolute;
  left: 0;
  right: 4%;
  bottom: -.08em;
  height: .07em;
  background: var(--hot);
  border-radius: 40px;
  transform: rotate(-1.5deg);
}

.attrib {
  margin: 30px 0 0;
  font-size: 1rem;
  color: var(--splash-dim);
  max-width: 46ch;
}

.attrib strong {
  color: var(--splash-ink);
}

.attrib a {
  color: var(--splash-dim);
  font-family: var(--display);
  font-size: .78rem;
  margin-left: 4px;
}

.lede {
  margin: 18px 0 0;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.45;
  max-width: 34ch;
}

.lede em {
  font-style: normal;
  color: var(--hot);
  font-weight: 600;
}

.splash-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.btn.big {
  background: var(--hot);
  font-size: 1rem;
  padding: 15px 22px;
}

.btn.outline {
  background: transparent;
  color: var(--splash-ink);
  box-shadow: inset 0 0 0 2px var(--splash-ink);
  font-size: 1rem;
  padding: 15px 22px;
}

/* the photo, pinned like a mugshot */
.mug {
  position: relative;
  max-width: 360px;
  justify-self: end;
  width: 100%;
}

.mug::before {
  /* red block offset behind the photo */
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  background: var(--hot);
  transform: rotate(3deg);
}

.mug figure {
  position: relative;
  margin: 0;
  background: #F4F2EC;
  padding: 10px 10px 12px;
  transform: rotate(-2deg);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8);
}

.mug img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 18%;
  filter: grayscale(1) contrast(1.25) brightness(.95);
}

.mug .ph {
  display: none;
  aspect-ratio: 4 / 5;
  place-items: center;
  background: #ddd;
  color: #555;
  font-family: var(--display);
  font-size: .85rem;
}

.mug.noimg img {
  display: none;
}

.mug.noimg .ph {
  display: grid;
}

.mug figcaption {
  font-family: var(--display);
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #3A4148;
  margin-top: 8px;
}

/* rubber stamp across the photo */
.stamp {
  position: absolute;
  top: 58%;
  left: -8%;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hot);
  border: 5px solid var(--hot);
  padding: 2px 16px 0;
  transform: rotate(-16deg);
  background: rgba(13, 17, 21, .55);
}

.bigF {
  position: absolute;
  right: -22px;
  bottom: -30px;
  width: clamp(104px, 11vw, 136px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-family: var(--hand);
  font-size: clamp(5rem, 9vw, 7rem);
  line-height: 1;
  color: #fff;
  background: var(--hot);
  border-radius: 50%;
  transform: rotate(-10deg);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, .7);
}

/* ticker */
.ticker {
  position: relative;
  background: var(--hot);
  color: #0D1115;
  overflow: hidden;
  border-top: 3px solid #0D1115;
}

.ticker-track {
  display: flex;
  width: max-content;
}

.ticker ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ticker li {
  font-family: var(--display);
  font-weight: 600;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
  padding: 13px 28px 13px 0;
}

.ticker li::after {
  content: "\25CF";
  margin-left: 28px;
  font-size: .6em;
  vertical-align: 2px;
}

.ticker li b {
  font-weight: 900;
}

@media (prefers-reduced-motion: no-preference) {
  .ticker-track {
    animation: ticker 48s linear infinite;
  }

  .ticker:hover .ticker-track {
    animation-play-state: paused;
  }

  .stamp {
    animation: slam .5s cubic-bezier(.2, .9, .3, 1.4) .35s both;
  }

  .bigF {
    animation: slam .45s cubic-bezier(.2, .9, .3, 1.4) .6s both;
  }
}

/* no motion: let the ticker wrap into a static list instead */
@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    width: auto;
    flex-wrap: wrap;
  }

  .ticker ul[aria-hidden] {
    display: none;
  }

  .ticker ul {
    flex-wrap: wrap;
    padding-inline: 20px;
  }
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@keyframes slam {
  from {
    opacity: 0;
    scale: 2.2;
  }

  to {
    opacity: 1;
    scale: 1;
  }
}

@media (max-width: 1100px) {
  .mug {
    margin-right: 28px;
  }
}

@media (max-width: 860px) {
  .splash-grid {
    grid-template-columns: 1fr;
    gap: 56px;
    padding-block: 40px 64px;
  }

  .mug {
    justify-self: center;
    max-width: 320px;
    margin-right: 18px;
  }
}

/* ==========================================================================
   5. Section headers
   ========================================================================== */
.sec {
  padding-block: 80px 0;
}

.sec-head {
  max-width: 720px;
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}

.sec-head h2 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 900;
  letter-spacing: -.02em;
}

.sec-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

/* ==========================================================================
   6. Pop quiz
   ========================================================================== */
.quiz {
  display: grid;
  gap: 18px;
  counter-reset: q;
}

.q {
  background: var(--sheet);
  border: 1px solid var(--rule);
  padding: 22px 24px;
  counter-increment: q;
  min-width: 0;
}

.q h3 {
  font-size: 1.15rem;
  font-weight: 800;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  line-height: 1.3;
}

.q h3::before {
  content: counter(q) ".";
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.opt {
  font-family: var(--body);
  font-size: 1rem;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--rule);
  padding: 9px 14px;
  border-radius: 2px;
  cursor: pointer;
  text-align: left;
}

.opt:hover {
  border-color: var(--ink);
}

.opt[disabled] {
  cursor: default;
}

.opt.right {
  border-color: var(--red);
  background: var(--red-soft);
  font-weight: 600;
}

.opt.picked:not(.right) {
  text-decoration: line-through;
  color: var(--muted);
}

.reveal {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
}

.reveal .mk {
  font-family: var(--hand);
  color: var(--red);
  font-size: 2rem;
  line-height: 1;
}

.reveal p {
  margin: 0;
}

.score {
  margin-top: 22px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--display);
  font-weight: 800;
}

.score output {
  font-family: var(--hand);
  color: var(--red);
  font-size: 2.2rem;
  line-height: 1;
}

.score .muted {
  font-weight: 400;
  color: var(--muted);
  font-family: var(--body);
}

/* ==========================================================================
   7. Her party's grades (dark band)
   ========================================================================== */
.band {
  background: var(--band);
  color: var(--band-ink);
  margin-top: 88px;
  padding-block: 72px;
}

.band .tag {
  color: var(--red);
}

.band .sec-head p {
  color: var(--band-ink);
  opacity: .75;
}

.grades {
  display: grid;
  gap: 0;
}

.gr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px;
  padding-block: 28px;
  border-top: 1px solid color-mix(in srgb, var(--band-ink) 22%, transparent);
}

.gr blockquote {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  letter-spacing: -.02em;
  line-height: 1.08;
}

.gr blockquote mark {
  background: none;
  color: var(--red);
}

.gr .who {
  font-family: var(--display);
  font-size: .9rem;
}

.gr .who b {
  display: block;
  font-size: 1rem;
}

.gr .who p {
  margin: 8px 0 0;
  opacity: .75;
  font-family: var(--body);
  font-size: .95rem;
  line-height: 1.45;
}

.gr .src a,
.gr .src {
  color: var(--band-ink);
  opacity: .7;
}

@media (max-width:760px) {
  .gr {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ==========================================================================
   8. Her record (timeline)
   ========================================================================== */
.transcript {
  border-top: 2px solid var(--ink);
}

.yr {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 24px;
  border-bottom: 1px solid var(--rule);
  padding-block: 20px;
}

.yr>h3 {
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.entries {
  display: grid;
  gap: 18px;
}

.en {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
}

.en time {
  font-family: var(--display);
  font-weight: 800;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--red);
  padding-top: 3px;
}

.en h4 {
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 800;
  margin: 0 0 4px;
  line-height: 1.25;
}

.en .punch {
  font-family: var(--display);
  font-weight: 800;
  color: var(--red);
  margin-top: 8px;
}

.en p {
  margin: 0;
  font-size: .98rem;
}

@media (max-width:700px) {
  .yr {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .en {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ==========================================================================
   9. New teacher (Weaver vs. Wright)
   ========================================================================== */
.swap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid var(--ink);
}

.swap>div {
  padding: 28px 26px;
  min-width: 0;
}

.swap .old {
  background: var(--sheet);
}

.swap .new {
  background: var(--navy-soft);
  border-left: 2px solid var(--ink);
}

.swap h3 {
  font-size: 1.6rem;
  font-weight: 900;
}

.swap .role {
  font-family: var(--display);
  font-size: .8rem;
  color: var(--muted);
  display: block;
  margin: 4px 0 18px;
}

.swap .new h3 {
  color: var(--navy);
}

.swap dl {
  margin: 0;
  display: grid;
  gap: 14px;
}

.swap dt {
  font-family: var(--display);
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.swap dd {
  margin: 2px 0 0;
  font-size: 1rem;
  line-height: 1.45;
}

.swap .old dd {
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
}

.swap .old dd span {
  text-decoration: none;
}

.degrees {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.degrees li {
  font-size: .95rem;
  line-height: 1.4;
}

.degrees b {
  font-family: var(--display);
  font-weight: 800;
  font-size: .9rem;
  display: block;
}

.degrees .now {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--navy);
  color: var(--sheet);
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: 2px;
}

@media (max-width:760px) {
  .swap {
    grid-template-columns: 1fr;
  }

  .swap .new {
    border-left: 0;
    border-top: 2px solid var(--ink);
  }
}

/* ==========================================================================
   10. Pass the note, dates, footer
   ========================================================================== */
.note {
  margin-top: 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.folded {
  background: var(--sheet);
  border: 1px solid var(--rule);
  padding: 24px 26px;
  transform: rotate(-1.2deg);
  box-shadow: 0 14px 30px -22px rgba(0, 0, 0, .5);
  font-family: var(--hand);
  font-size: 1.55rem;
  line-height: 1.3;
  min-width: 0;
}

.folded small {
  display: block;
  font-family: var(--display);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.note h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  font-weight: 900;
}

.note p {
  color: var(--muted);
  margin: 10px 0 18px;
}

.note .btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.status {
  font-family: var(--display);
  font-size: .8rem;
  color: var(--muted);
  min-height: 1.2em;
  margin: 12px 0 0;
}

@media (max-width:760px) {
  .note {
    grid-template-columns: 1fr;
  }
}

.dates {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 56px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.dates div {
  padding: 16px 16px 16px 0;
  min-width: 0;
}

.dates div+div {
  padding-left: 16px;
  border-left: 1px solid var(--rule);
}

.dates b {
  display: block;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.4rem;
}

.dates span {
  font-size: .9rem;
  color: var(--muted);
}

@media (max-width:760px) {
  .dates {
    grid-template-columns: 1fr 1fr;
  }

  .dates div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .dates div:nth-child(-n+2) {
    border-bottom: 1px solid var(--rule);
  }
}

footer {
  margin-top: 64px;
  padding-block: 24px 48px;
  border-top: 1px solid var(--rule);
  font-family: var(--display);
  font-size: .8rem;
  color: var(--muted);
}

footer .disc {
  display: inline-block;
  border: 2px solid var(--ink);
  color: var(--ink);
  padding: 8px 14px;
  font-weight: 800;
  margin-bottom: 10px;
}
