/* ==========================================================================
   The Lang Toun — stylesheet
   ========================================================================== */

:root {
  --paper: #f4efe5;
  --paper-deep: #e9e1d1;
  --ink: #15202d;
  --ink-soft: #46505c;
  --navy: #12274a;
  --navy-deep: #0c1b34;
  --cream: #f1e9d8;
  --red: #c43d27;
  --red-ink: #a8301d;
  --sea: #5b7480;
  --rule: rgba(21, 32, 45, 0.16);
  --rule-strong: rgba(21, 32, 45, 0.85);

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --measure: 36rem;

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--red);
}

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

p {
  margin: 0 0 1em;
}

em {
  font-style: italic;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
  font-family: var(--sans);
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

/* Small caps label used everywhere ------------------------------------------ */

.label {
  font-family: var(--sans);
  font-stretch: 75%;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.3;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 229, 0.94);
  border-bottom: 1px solid var(--rule);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
  backdrop-filter: saturate(140%) blur(6px);
}

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

.nav__brand {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  text-decoration: none;
  white-space: nowrap;
}

.nav__brand strong {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.nav__brand span {
  color: var(--ink-soft);
}

.nav__links {
  display: flex;
  gap: clamp(0.9rem, 2.5vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__links a {
  text-decoration: none;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
}

.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--red);
}

@media (max-width: 640px) {
  .nav__brand span {
    display: none;
  }
}

@media (max-width: 400px) {
  .nav__links .hide-xs {
    display: none;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-top: clamp(2.5rem, 7vw, 5.5rem);
}

.hero__kicker {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid var(--rule-strong);
  color: var(--ink-soft);
}

.hero__title {
  margin: clamp(0.5rem, 2vw, 1.25rem) 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(4.2rem, 21vw, 15rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  font-variation-settings: "opsz" 72;
  margin-left: -0.04em;
}

.hero__title em {
  font-weight: 400;
}

.hero__title .dot {
  color: var(--red);
}

.hero__row {
  display: grid;
  gap: 2rem;
  align-items: end;
  margin-top: clamp(1.5rem, 4vw, 2.75rem);
}

@media (min-width: 820px) {
  .hero__row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4rem;
  }
}

.hero__dek {
  max-width: 40rem;
  margin: 0;
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.7rem);
  line-height: 1.35;
  font-variation-settings: "opsz" 36;
}

.hero__dek strong {
  font-weight: 600;
  background: linear-gradient(transparent 62%, rgba(196, 61, 39, 0.22) 62%);
}

.hero__meta {
  margin-top: 1.1rem;
  color: var(--ink-soft);
}

/* The rosette */

.stamp {
  position: relative;
  display: grid;
  place-items: center;
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 50%;
  background: var(--red);
  color: var(--cream);
  text-align: center;
  transform: rotate(-9deg);
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--red);
  justify-self: start;
}

@media (min-width: 820px) {
  .stamp {
    justify-self: end;
    width: 11rem;
    height: 11rem;
    margin-bottom: 0.5rem;
  }
}

.stamp__inner {
  padding: 1rem;
}

.stamp__big {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-style: italic;
  font-size: 2.8rem;
  line-height: 0.9;
}

.stamp__big sup {
  font-size: 0.45em;
  vertical-align: 0.9em;
  margin-left: 0.05em;
}

.stamp .label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

/* Lead photograph */

.lead {
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
}

.lead__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 70%;
  background: var(--paper-deep);
}

@media (max-width: 640px) {
  .lead__img {
    aspect-ratio: 4 / 3;
  }
}

/* Captions */

.caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  margin-top: 0.6rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.45;
}

.caption a {
  color: var(--ink-soft);
}

.caption__credit {
  opacity: 0.85;
}

/* ==========================================================================
   Ticker
   ========================================================================== */

.ticker {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  background: var(--navy);
  color: var(--cream);
  overflow: hidden;
  border-block: 1px solid var(--navy-deep);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 60s linear infinite;
}

.ticker__track ul {
  display: flex;
  margin: 0;
  padding: 0.85rem 0;
  list-style: none;
}

.ticker__track li {
  padding-inline: 1.4rem;
  white-space: nowrap;
}

.ticker__track li::before {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin-right: 1.4rem;
  border-radius: 50%;
  background: var(--red);
  vertical-align: 0.15em;
}

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

@media (prefers-reduced-motion: reduce) {
  .ticker__track {
    animation: none;
  }
  .ticker {
    overflow-x: auto;
  }
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding-block: clamp(3.5rem, 9vw, 7rem);
}

.section__head {
  display: grid;
  gap: 0.75rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

@media (min-width: 900px) {
  .section__head {
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 2rem;
    align-items: baseline;
  }
}

.section__num {
  color: var(--red);
}

.section__title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(2.2rem, 1.5rem + 3.2vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 72;
  max-width: 18ch;
}

.section__intro {
  grid-column: 1 / -1;
  max-width: var(--measure);
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
}

@media (min-width: 900px) {
  .section__intro {
    grid-column: 2;
  }
}

/* ==========================================================================
   League table
   ========================================================================== */

.table-wrap {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .table-wrap {
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 2rem;
  }
}

.table-aside {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.table-aside p:last-child {
  margin-bottom: 0;
}

.league {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
}

.league caption {
  text-align: left;
  padding-bottom: 0.75rem;
  color: var(--ink-soft);
}

.league th,
.league td {
  padding: 0.62rem 0.5rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}

.league thead th {
  border-bottom: 2px solid var(--rule-strong);
  color: var(--ink-soft);
  font-weight: 600;
}

.league .num {
  width: 3.5rem;
  text-align: right;
  padding-right: 1.25rem;
}

.league .gb {
  text-align: right;
  width: 9rem;
}

.league tbody th {
  font-weight: 500;
  font-stretch: 100%;
}

.league .is-us {
  background: var(--navy);
  color: var(--cream);
}

.league .is-us th {
  font-weight: 700;
}

.league .is-us td,
.league .is-us th {
  border-bottom-color: var(--navy);
  padding-block: 0.9rem;
}

.league .is-us .num {
  box-shadow: inset 4px 0 0 var(--red);
}

.league .note {
  margin-left: 0.6rem;
  color: var(--ink-soft);
  font-weight: 400;
  font-size: 0.85em;
  font-style: normal;
}

.league .is-us .note {
  color: rgba(241, 233, 216, 0.75);
}

.league .is-big th {
  font-weight: 600;
}

.source {
  margin-top: 0.9rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.8rem;
}

/* ==========================================================================
   The case (numbered items)
   ========================================================================== */

.case {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--rule-strong);
}

.item {
  display: grid;
  gap: 1rem 2rem;
  padding-block: clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 900px) {
  .item {
    grid-template-columns: 14rem minmax(0, 1fr);
  }
  .item--media {
    grid-template-columns: 14rem minmax(0, 1fr) minmax(0, 0.9fr);
  }
}

.item__num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.6rem, 2rem + 2.4vw, 4rem);
  line-height: 0.9;
  color: var(--red);
  font-variation-settings: "opsz" 72;
}

.item__title {
  margin: 0 0 0.6rem;
  font-weight: 600;
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 36;
}

.item__body {
  max-width: var(--measure);
}

.item__body p:last-child {
  margin-bottom: 0;
}

.item__media {
  margin: 0;
}

.item__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--paper-deep);
}

.item__media--portrait img {
  aspect-ratio: 4 / 5;
}

@media (min-width: 900px) {
  .item__media--portrait {
    max-width: 22rem;
  }
}

/* Pull quote */

.pull {
  margin: 1.5rem 0 0;
  padding: 1.25rem 0 0 1.25rem;
  border-left: 3px solid var(--red);
}

.pull p {
  margin: 0;
  font-style: italic;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  line-height: 1.3;
  font-variation-settings: "opsz" 48;
}

.pull footer {
  margin-top: 0.75rem;
  color: var(--ink-soft);
}

/* Also-from-here roll call */

.rollcall {
  display: grid;
  gap: 1rem 2rem;
  padding-top: clamp(2rem, 5vw, 3rem);
}

@media (min-width: 900px) {
  .rollcall {
    grid-template-columns: 14rem minmax(0, 1fr);
  }
}

.rollcall ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.25rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rollcall li {
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  font-size: 0.98rem;
  line-height: 1.45;
}

.rollcall li strong {
  display: block;
  font-weight: 600;
  font-size: 1.1rem;
}

/* ==========================================================================
   Dispatches (dark section)
   ========================================================================== */

.dispatches {
  background: var(--navy);
  color: var(--cream);
}

.dispatches .section__num {
  color: #f0846f;
}

.dispatches .section__intro {
  color: rgba(241, 233, 216, 0.75);
}

.dispatches a:hover {
  color: #f0846f;
}

.story {
  border-top: 2px solid rgba(241, 233, 216, 0.85);
  padding-top: 1.5rem;
}

.story__kicker {
  color: #f0846f;
  margin-bottom: 0.9rem;
}

.story__title {
  margin: 0 0 0.75rem;
  font-weight: 500;
  font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 72;
}

.story__dek {
  margin: 0 0 1.5rem;
  font-style: italic;
  font-size: 1.15em;
  line-height: 1.4;
  color: rgba(241, 233, 216, 0.82);
}

.story__body p {
  max-width: var(--measure);
}

.story__body > p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.1em 0 0;
  font-weight: 600;
  font-size: 3.6em;
  line-height: 0.82;
  color: #f0846f;
}

.story__sign {
  margin-top: 1.25rem;
  color: rgba(241, 233, 216, 0.6);
}

/* The featured story */

.feature {
  display: grid;
  gap: 2rem 3.5rem;
}

@media (min-width: 960px) {
  .feature {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: start;
  }
  .feature__visual {
    position: sticky;
    top: 88px;
  }
}

/* A telly for the screenshot */

.crt {
  margin: 0;
}

.crt__screen {
  position: relative;
  padding: clamp(14px, 2.4vw, 26px);
  border-radius: 26px;
  background: linear-gradient(160deg, #2a2d33, #121418 70%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.08),
    0 30px 60px -30px rgba(0, 0, 0, 0.7);
}

.crt__screen img {
  width: 100%;
  border-radius: 14px / 18px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  aspect-ratio: 320 / 237;
}

.crt__screen::after {
  content: "";
  position: absolute;
  inset: clamp(14px, 2.4vw, 26px);
  border-radius: 14px / 18px;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.35));
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.45);
}

.crt figcaption,
.events figcaption {
  margin-top: 0.75rem;
  color: rgba(241, 233, 216, 0.6);
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.45;
}

.events {
  margin: 1.75rem 0 0;
}

.events h3 {
  margin: 0 0 0.75rem;
  color: rgba(241, 233, 216, 0.8);
}

.events ul {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.events li {
  position: relative;
}

.events img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  image-rendering: pixelated;
  box-shadow: 0 0 0 1px rgba(241, 233, 216, 0.18);
  transition: transform 0.15s ease;
}

.events li:hover img {
  transform: translateY(-3px) rotate(-2deg);
}

/* Two short stories side by side */

.pair {
  display: grid;
  gap: 3.5rem;
  margin-top: clamp(3.5rem, 8vw, 6rem);
}

@media (min-width: 900px) {
  .pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4rem;
  }
}

/* ==========================================================================
   Closing
   ========================================================================== */

.verdict {
  text-align: left;
}

.verdict__list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(1.6rem, 1rem + 3vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 72;
}

.verdict__list li {
  display: inline;
}

.verdict__list li + li::before {
  content: " / ";
  color: var(--red);
  font-style: italic;
}

.verdict__rest {
  margin-top: 2rem;
  font-style: italic;
  font-size: clamp(1.3rem, 1rem + 1.2vw, 1.8rem);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  border-top: 2px solid var(--rule-strong);
  padding-block: 2.5rem 3rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer__inner {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .footer__inner {
    grid-template-columns: 14rem minmax(0, 1fr) auto;
    gap: 2rem;
  }
}

.footer p {
  margin: 0;
  max-width: 42rem;
}

.footer__mark {
  color: var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.25rem;
}

/* ==========================================================================
   About page
   ========================================================================== */

.page {
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3rem, 8vw, 6rem);
}

.page__title {
  margin: 0.75rem 0 0;
  font-weight: 500;
  font-size: clamp(3rem, 2rem + 6vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 72;
}

.page__lede {
  max-width: 40rem;
  margin: 1.5rem 0 0;
  font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.55rem);
  line-height: 1.4;
}

.prose {
  display: grid;
  gap: 1rem 2rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.5rem;
  border-top: 2px solid var(--rule-strong);
}

@media (min-width: 900px) {
  .prose {
    grid-template-columns: 14rem minmax(0, 1fr);
  }
}

.prose h2 {
  margin: 0.2rem 0 0;
  color: var(--red);
}

.prose__body {
  max-width: 42rem;
}

.prose__body p:last-child,
.prose__body ul:last-child {
  margin-bottom: 0;
}

.refs {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.98rem;
  line-height: 1.5;
}

.refs li {
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--rule);
}

.refs li:first-child {
  padding-top: 0;
}

.refs small {
  display: block;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.8rem;
}

/* 404 */

.lost {
  min-height: calc(100vh - 56px);
  display: grid;
  align-content: center;
  padding-block: 4rem;
}

.lost .page__lede a {
  color: var(--red-ink);
}

.section--flush {
  padding-top: 0;
}

.prose__note {
  margin-top: 1.25rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
