@import url("https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap");

:root {
  color-scheme: light;

  --bg-canvas: #faf8f5;
  --text-main: #1c1d1f;
  --text-muted: #6e737a;
  --border-color: #e3dfd7;
  --accent: #8b4a3e;
  --accent-strong: #71382f;
  --on-accent: #faf8f5;

  --surface-raised: #fdfbf8;
  --surface-muted: #f2eee8;
  --surface-strong: #ece7df;

  --font-serif: "Lora", Georgia, serif;
  --max-content-width: 720px;

  --paper: var(--bg-canvas);
  --paper-raised: var(--surface-raised);
  --mushroom: var(--surface-strong);
  --mushroom-soft: var(--surface-muted);
  --graphite: var(--text-main);
  --graphite-soft: var(--text-muted);
  --terracotta: var(--accent);
  --terracotta-dark: var(--accent-strong);
  --rule: var(--border-color);
  --focus: var(--accent);
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg-canvas: #17191c;
  --text-main: #e6e8ea;
  --text-muted: #8a919a;
  --border-color: #2a2e33;
  --accent: #e2a083;
  --accent-strong: #f0b79e;
  --on-accent: #17191c;

  --surface-raised: #1c1f23;
  --surface-muted: #202328;
  --surface-strong: #24282d;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg-canvas: #17191c;
    --text-main: #e6e8ea;
    --text-muted: #8a919a;
    --border-color: #2a2e33;
    --accent: #e2a083;
    --accent-strong: #f0b79e;
    --on-accent: #17191c;

    --surface-raised: #1c1f23;
    --surface-muted: #202328;
    --surface-strong: #24282d;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  transition:
    background-color 300ms ease,
    color 300ms ease;
}

a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.25em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  background: var(--graphite);
  color: var(--paper-raised);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin: 0 clamp(24px, 5vw, 80px);
  border-bottom: 1px solid var(--rule);
  transition: border-color 300ms ease;
}

.wordmark {
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  font-size: 0.86rem;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 36px);
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:not(.nav-focus):hover {
  text-decoration: underline;
}

.nav-focus {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 4px 18px;
  border: 1px solid var(--terracotta);
  color: var(--terracotta-dark);
}

.nav-focus:hover {
  background: var(--terracotta);
  color: var(--on-accent);
}

.theme-toggle-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  font: 600 0.78rem/1 var(--font-serif);
  white-space: nowrap;
  transition:
    border-color 200ms ease,
    color 200ms ease,
    background-color 200ms ease;
}

.theme-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

main {
  margin: 0 clamp(24px, 5vw, 80px);
}

.hero {
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: clamp(56px, 9vw, 144px);
  padding: clamp(72px, 10vw, 136px) 0;
}

.eyebrow,
.section-label {
  margin: 0 0 32px;
  color: var(--graphite-soft);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-block;
  margin-right: 14px;
  padding: 7px 10px 6px;
  background: var(--mushroom);
  color: var(--graphite);
  letter-spacing: 0.08em;
}

h1,
h2 {
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 830px;
  font-size: clamp(3.65rem, 6.8vw, 6.6rem);
  line-height: 0.99;
}

.hero-intro {
  max-width: 400px;
  padding-left: clamp(24px, 3vw, 48px);
  border-left: 4px solid var(--terracotta);
}

.hero-intro p {
  margin: 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  color: var(--terracotta-dark);
  font-weight: 700;
}

.latest {
  display: grid;
  grid-template-columns: 88px minmax(150px, 0.65fr) minmax(320px, 2.1fr) auto;
  align-items: center;
  gap: clamp(24px, 3vw, 52px);
  padding: clamp(40px, 5vw, 68px);
  background: var(--mushroom-soft);
  border-top: 1px solid var(--rule);
}

.issue-index {
  align-self: stretch;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 4px;
  border-right: 1px solid var(--rule);
  color: var(--terracotta);
  font-size: 2rem;
}

.issue-meta p {
  margin: 0;
  color: var(--graphite-soft);
  font-size: 0.88rem;
}

.issue-meta .section-label {
  margin-bottom: 8px;
  color: var(--graphite);
}

.issue-copy h2 {
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  line-height: 1.02;
}

.issue-copy p {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--graphite-soft);
}

.issue-action {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: var(--terracotta);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.issue-action:hover {
  background: var(--terracotta-dark);
}

.latest,
.principle-grid,
.principle-grid article,
.essay-row,
.about,
.eyebrow span,
.nav-focus,
.issue-action,
.soon-button {
  transition:
    background-color 300ms ease,
    border-color 300ms ease,
    color 300ms ease;
}

.premise,
.essays,
.about {
  padding: clamp(96px, 12vw, 176px) 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(56px, 0.35fr) minmax(0, 2.65fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: start;
  max-width: 1080px;
}

.section-heading.compact {
  max-width: none;
}

.section-number {
  margin: 0;
  padding-top: 6px;
  border-top: 4px solid var(--terracotta);
  color: var(--terracotta-dark);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.2;
}

.section-heading .section-label,
.about .section-label,
.subscribe .section-label {
  margin-bottom: 20px;
}

.section-heading h2,
.about h2,
.subscribe h2 {
  font-size: clamp(2.8rem, 5.8vw, 5.75rem);
  line-height: 1.05;
}

.premise .section-heading h2 {
  font-size: clamp(2rem, 3.25vw, 3.25rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(72px, 9vw, 128px);
  background: var(--rule);
  border: 1px solid var(--rule);
}

.principle-grid article {
  min-height: 360px;
  padding: clamp(32px, 4vw, 56px);
  background: var(--paper-raised);
}

.principle-grid h3,
.essay-row h3 {
  margin: 0;
  font-size: clamp(1.8rem, 2.4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.principle-grid article > p:last-child {
  max-width: 34ch;
  margin: 24px 0 0;
  color: var(--graphite-soft);
}

.essays {
  border-top: 1px solid var(--rule);
}

.essay-list {
  margin-top: clamp(64px, 8vw, 112px);
  border-top: 1px solid var(--rule);
}

.essay-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) minmax(260px, 0.65fr);
  gap: clamp(40px, 8vw, 128px);
  align-items: center;
  padding: clamp(36px, 5vw, 64px) clamp(20px, 3vw, 48px);
  border-bottom: 1px solid var(--rule);
}

.essay-row.featured {
  background: var(--mushroom-soft);
  border-left: 6px solid var(--terracotta);
}

.essay-status {
  margin: 0 0 14px;
  color: var(--terracotta-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.essay-row > p,
.essay-row > div > p {
  max-width: 42ch;
  margin: 0;
  color: var(--graphite-soft);
}

.essay-row .issue-action {
  margin-top: 28px;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: clamp(64px, 12vw, 180px);
  align-items: end;
  background: var(--mushroom);
  box-shadow: 0 0 0 100vmax var(--mushroom);
  clip-path: inset(0 -100vmax);
}

.about-copy {
  max-width: 520px;
  padding-left: 32px;
  border-left: 1px solid var(--graphite-soft);
}

.about-copy p {
  margin: 0;
}

.about-copy p + p {
  margin-top: 24px;
}

.subscribe {
  max-width: 890px;
  margin: 0 auto;
  padding: clamp(112px, 14vw, 196px) 0;
  text-align: center;
}

.subscribe > p:not(.section-label) {
  max-width: 590px;
  margin: 32px auto 0;
  color: var(--graphite-soft);
}

.soon-button {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  margin-top: 40px;
  padding: 10px 24px;
  background: var(--terracotta);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
}

.soon-button:hover {
  background: var(--terracotta-dark);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 0 clamp(24px, 5vw, 80px);
  padding: 32px 0 48px;
  border-top: 1px solid var(--rule);
  color: var(--graphite-soft);
  font-size: 0.78rem;
}

footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 28px 0;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .header-actions {
    width: 100%;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .hero-intro {
    max-width: 620px;
  }

  .latest {
    grid-template-columns: 64px 1fr;
  }

  .issue-index {
    grid-row: 1 / span 3;
  }

  .issue-action {
    justify-self: start;
  }

  .principle-grid {
    grid-template-columns: 1fr;
  }

  .principle-grid article {
    min-height: auto;
  }

  .about {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .about-copy {
    max-width: 660px;
  }

}

@media (max-width: 600px) {
  .site-header {
    min-height: auto;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .theme-toggle-btn {
    justify-self: start;
  }

  .nav-focus {
    justify-content: center;
  }

  .hero {
    padding: 64px 0;
  }

  h1 {
    font-size: clamp(3.25rem, 15vw, 5rem);
  }

  .hero-intro {
    padding-left: 22px;
  }

  .latest {
    grid-template-columns: 1fr;
    padding: 36px 24px;
  }

  .issue-index {
    grid-row: auto;
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 18px;
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .section-number {
    max-width: 64px;
  }

  .section-heading h2,
  .about h2,
  .subscribe h2 {
    font-size: clamp(2.7rem, 13vw, 4.5rem);
  }

  .essay-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-copy {
    padding-left: 22px;
  }

  footer {
    flex-direction: column;
  }
}

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

  body,
  .site-header,
  .latest,
  .principle-grid,
  .principle-grid article,
  .essay-row,
  .about,
  .eyebrow span,
  .nav-focus,
  .theme-toggle-btn,
  .issue-action,
  .soon-button {
    transition: none;
  }
}
