/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efede6;
  --surface-glass: rgba(255, 255, 255, 0.6);
  --text: #161511;
  --text-2: #46443c;
  --muted: #6c695f;
  --line: rgba(22, 21, 17, 0.09);
  --line-strong: rgba(22, 21, 17, 0.17);
  --hover: rgba(22, 21, 17, 0.05);
  --chip: rgba(22, 21, 17, 0.055);
  --accent: #ff5a1f;
  --accent-text: #c2330b;
  --accent-soft: rgba(255, 90, 31, 0.14);
  --glow-2: rgba(109, 93, 252, 0.1);
  --shadow: 0 1px 2px rgba(22, 21, 17, 0.04), 0 12px 32px -20px rgba(22, 21, 17, 0.18);
  --shadow-hover: 0 2px 4px rgba(22, 21, 17, 0.04), 0 32px 64px -32px rgba(22, 21, 17, 0.35);


  --font-display: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
  --radius-lg: 26px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f0d;
    --surface: #171715;
    --surface-2: #1f1f1c;
    --surface-glass: rgba(23, 23, 21, 0.6);
    --text: #f2f0ea;
    --text-2: #c9c6bb;
    --muted: #8e8b80;
    --line: rgba(242, 240, 234, 0.09);
    --line-strong: rgba(242, 240, 234, 0.18);
    --hover: rgba(242, 240, 234, 0.06);
    --chip: rgba(242, 240, 234, 0.07);
    --accent: #ff6a3d;
    --accent-text: #ff8a62;
    --accent-soft: rgba(255, 106, 61, 0.16);
    --glow-2: rgba(109, 93, 252, 0.14);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px -20px rgba(0, 0, 0, 0.8);
    --shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 32px 64px -28px rgba(0, 0, 0, 0.9);


    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f0f0d;
  --surface: #171715;
  --surface-2: #1f1f1c;
  --surface-glass: rgba(23, 23, 21, 0.6);
  --text: #f2f0ea;
  --text-2: #c9c6bb;
  --muted: #8e8b80;
  --line: rgba(242, 240, 234, 0.09);
  --line-strong: rgba(242, 240, 234, 0.18);
  --hover: rgba(242, 240, 234, 0.06);
  --chip: rgba(242, 240, 234, 0.07);
  --accent: #ff6a3d;
  --accent-text: #ff8a62;
  --accent-soft: rgba(255, 106, 61, 0.16);
  --glow-2: rgba(109, 93, 252, 0.14);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px -20px rgba(0, 0, 0, 0.8);
  --shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 32px 64px -28px rgba(0, 0, 0, 0.9);


  color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s, color 0.3s;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ==========================================================================
   Shared bits
   ========================================================================== */

.dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 7px transparent;
  }
}

.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-glass);
  backdrop-filter: blur(6px);
}

.kicker {
  color: var(--accent-text);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font: 500 0.74rem/1.2 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta .sep {
  opacity: 0.45;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text-2);
  font: 500 0.72rem/1.2 var(--font-mono);
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--hover);
  border-color: var(--text);
}

.btn-arrow {
  display: inline-grid;
  transition: transform 0.3s var(--ease);
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.icon-btn:hover {
  background: var(--hover);
  color: var(--text);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.section {
  padding-block: clamp(36px, 6vw, 72px);
}

.section-title {
  margin: 0;
  font: 400 clamp(2.1rem, 1.5rem + 2vw, 3.1rem) / 1 var(--font-display);
  letter-spacing: -0.015em;
}

.count {
  margin-left: 4px;
  font: 500 0.85rem var(--font-mono);
  color: var(--muted);
  vertical-align: super;
}

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}

.site-nav.is-scrolled {
  border-bottom-color: var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--text);
  color: var(--bg);
  font: italic 400 1.35rem/1 var(--font-display);
  transition: transform 0.4s var(--ease), background-color 0.3s;
}

.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.05);
  background: var(--accent);
  color: #fff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.nav-link:hover {
  background: var(--hover);
  color: var(--text);
}

.theme-toggle .i-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .i-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .i-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-toggle .i-moon {
    display: none;
  }
}

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

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

.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(56px, 10vw, 128px) clamp(44px, 7vw, 88px);
}

.hero-bg {
  position: absolute;
  inset: -64px 0 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(640px 360px at 88% 8%, var(--accent-soft), transparent 70%),
    radial-gradient(560px 320px at 6% 92%, var(--glow-2), transparent 70%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 65% 35%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 65% 35%, #000 10%, transparent 75%);
}

.hero-title {
  max-width: 15ch;
  margin: 28px 0 0;
  font: 400 clamp(2.9rem, 1.2rem + 6.6vw, 6.4rem) / 0.98 var(--font-display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero-title em {
  color: var(--accent-text);
}

.hero-lede {
  max-width: 56ch;
  margin: 26px 0 0;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem);
  color: var(--text-2);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

/* ==========================================================================
   Topic marquee
   ========================================================================== */

.marquee {
  overflow: hidden;
  padding-block: 18px;
  border-block: 1px solid var(--line);
  user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

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

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

.marquee-group {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  font: italic 400 clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem) / 1 var(--font-display);
  color: var(--text-2);
  white-space: nowrap;
}

.marquee-group .star {
  font-style: normal;
  font-size: 0.6em;
  color: var(--accent);
}

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

/* ==========================================================================
   Story media (image, or a generated cover when there isn't one)
   ========================================================================== */

.media {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(90% 120% at 100% 0%, var(--c3) 0%, transparent 55%),
    radial-gradient(80% 100% at 0% 100%, var(--c2) 0%, transparent 65%),
    var(--c1);
}

.media::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.media-glyph {
  position: absolute;
  right: 6%;
  bottom: -0.18em;
  font: italic 400 clamp(7rem, 12vw, 11rem) / 1 var(--font-display);
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface-2);
  transition: transform 0.9s var(--ease);
}

/* ==========================================================================
   Featured story
   ========================================================================== */

.feature-section {
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: 0;
}

.feature-link {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.3s;
}

.feature-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--line-strong);
}

.feature-link:hover .media img {
  transform: scale(1.035);
}

.feature-media {
  min-height: 400px;
}

.feature-media .media-glyph {
  font-size: clamp(9rem, 18vw, 16rem);
}

.feature-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: clamp(24px, 4vw, 52px);
}

.feature-title {
  margin: 0;
  font: 400 clamp(2rem, 1.3rem + 2.3vw, 3.2rem) / 1.04 var(--font-display);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.feature-desc {
  margin: 0;
  font-size: 1.075rem;
  color: var(--text-2);
  text-wrap: pretty;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-weight: 500;
}

.cta svg {
  width: 16px;
  height: 16px;
}

.feature-link:hover .btn-arrow {
  transform: translateX(4px);
}

@media (max-width: 860px) {
  .feature-link {
    grid-template-columns: 1fr;
  }

  .feature-media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

/* ==========================================================================
   Writing grid
   ========================================================================== */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: clamp(24px, 3vw, 36px);
}

.filters {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  min-width: 0;
}

.search {
  position: relative;
  display: block;
  width: 340px;
  max-width: 100%;
}

.search svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 42px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search input::placeholder {
  color: var(--muted);
}

.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.search input:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.search kbd {
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font: 500 0.75rem var(--font-mono);
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.search input:focus ~ kbd {
  opacity: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.chip {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.chip:hover {
  border-color: var(--text);
  color: var(--text);
}

.chip[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Publication switch: one pill with a button per publication. */
.pubs {
  display: inline-flex;
  gap: 2px;
  height: 46px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
}

.pubs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.pubs button:hover {
  color: var(--text);
}

.pubs button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}

.pubs-count {
  font: 500 0.72rem var(--font-mono);
  opacity: 0.6;
}

.meta .pub {
  color: var(--text-2);
}

@media (max-width: 720px) {
  .filters {
    width: 100%;
    align-items: stretch;
  }

  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }

  .pubs button {
    flex: 1;
    justify-content: center;
  }

  .search {
    width: 100%;
  }

  .chips {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scrollbar-width: none;
  }

  .chips::-webkit-scrollbar {
    display: none;
  }
}

.writing.is-filtering {
  min-height: calc(100vh - 64px);
  min-height: calc(100svh - 64px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: clamp(16px, 2.2vw, 28px);
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
}

.card-link:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--line-strong);
}

.card-link:hover .media img {
  transform: scale(1.05);
}

.card-media {
  aspect-ratio: 16 / 9;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 20px 22px 22px;
}

.card-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font: 400 1.62rem/1.1 var(--font-display);
  letter-spacing: -0.01em;
  text-wrap: balance;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  transition: color 0.2s;
}

.card-link:hover .card-title {
  color: var(--accent-text);
}

.card-desc {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 0.95rem;
  color: var(--text-2);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
}

.arrow {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-left: auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text);
  transition: transform 0.4s var(--ease), background-color 0.25s, border-color 0.25s, color 0.25s;
}

.arrow svg {
  width: 16px;
  height: 16px;
}

.card-link:hover .arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: rotate(-45deg);
}

.more {
  display: flex;
  justify-content: center;
  margin-top: clamp(32px, 6vw, 64px);
  padding-top: clamp(32px, 4vw, 48px);
}

.empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 72px 0 24px;
  text-align: center;
  color: var(--muted);
}

.empty p {
  margin: 0;
}

.empty-title {
  font: 400 2rem/1.1 var(--font-display);
  color: var(--text);
}

.empty .btn {
  margin-top: 16px;
}

/* Scroll-in animation (classes are added by app.js, so no-JS visitors see everything). */
.reveal {
  opacity: 0;
}

.reveal.is-in {
  animation: rise 0.7s var(--ease) var(--reveal-delay, 0ms) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  padding-top: clamp(40px, 6vw, 64px);
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.footer-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.footer-cta h2 {
  margin: 0;
  font: 400 clamp(2.3rem, 1.5rem + 3vw, 4rem) / 1 var(--font-display);
  letter-spacing: -0.02em;
}

.footer-cta em {
  color: var(--accent-text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}

.pill svg {
  width: 16px;
  height: 16px;
}

.pill:hover {
  background: var(--hover);
  border-color: var(--text);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-bottom a {
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--text);
}

.wordmark {
  margin-bottom: -0.2em;
  font: 400 clamp(4.5rem, 19vw, 17rem) / 0.9 var(--font-display);
  letter-spacing: -0.04em;
  text-align: center;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  user-select: none;
}

/* ==========================================================================
   404
   ========================================================================== */

.notfound {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  padding-block: clamp(72px, 14vw, 160px);
}

.notfound-title {
  margin: 0;
  font: 400 clamp(3.5rem, 2rem + 7vw, 8rem) / 0.95 var(--font-display);
  letter-spacing: -0.03em;
}

.notfound-title em {
  color: var(--accent-text);
}

.notfound-text {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text-2);
}

/* ==========================================================================
   Motion preferences
   ========================================================================== */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .marquee-track {
    animation: none;
  }
}
