/* TalkMask: site styles */

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-matched fallbacks keep the layout still while the web fonts load. */
@font-face {
  font-family: "Instrument Serif Fallback";
  src: local("Georgia");
  size-adjust: 76.92%;
  ascent-override: 128.71%;
  descent-override: 40.3%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 107.48%;
  ascent-override: 90.14%;
  descent-override: 22.44%;
  line-gap-override: 0%;
}

:root {
  --bg: #060606;
  --bg-raise: #0d0d0c;
  --ink: #f3efe6;
  --ink-soft: #bdb8ab;
  --ink-faint: #8d897e;
  --line: rgba(243, 239, 230, 0.13);
  --line-strong: rgba(243, 239, 230, 0.28);
  --accent: #f0b35a;
  --serif: "Instrument Serif", "Instrument Serif Fallback", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 72rem;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Fine grain over the whole page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

body > * {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

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

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #111;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.875rem;
}

.skip-link:focus {
  top: 0.75rem;
}

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

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 1.3125rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.025em;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark__name span {
  font-weight: 400;
}

.wordmark__mark {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
}

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

.site-nav ul {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
}

.site-nav a {
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: 0.5rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  box-shadow: 0 1px 0 var(--accent);
}

.section-nav ul {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  padding-block: 0.9rem;
  overflow-x: auto;
  scrollbar-width: none;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-nav ul::-webkit-scrollbar {
  display: none;
}

.section-nav a {
  color: var(--ink-faint);
  text-decoration: none;
  white-space: nowrap;
}

.section-nav a:hover,
.section-nav a[aria-current="page"] {
  color: var(--ink);
}

.section-nav a[aria-current="page"] {
  box-shadow: 0 1px 0 var(--accent);
  padding-bottom: 0.3rem;
}

/* Hero */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: clamp(1.5rem, 4svh, 3.5rem) clamp(3rem, 7svh, 5rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: min(90svh, 52rem);
  /* closest-side: the glow reaches full transparency before every edge of its box, so no edge shows */
  background: radial-gradient(
    ellipse closest-side at 50% 44%,
    rgba(240, 179, 90, 0.1) 0%,
    rgba(240, 179, 90, 0.072) 22%,
    rgba(240, 179, 90, 0.042) 45%,
    rgba(240, 179, 90, 0.018) 68%,
    rgba(240, 179, 90, 0.005) 86%,
    rgba(240, 179, 90, 0) 100%
  );
  pointer-events: none;
}

.emblem {
  position: relative;
  width: min(44svh, 80vw, 30rem);
  aspect-ratio: 1;
  perspective: 1000px;
  color: var(--ink);
}

.emblem__stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: currentColor;
  transform: translateZ(var(--z, 0px)) scale(var(--s, 1));
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Each layer is scaled back by its depth so the emblem is exact when it faces the viewer. */
.layer--swoosh { --z: -24px; --s: 1.024; }
.layer--face   { --z: 0px;   --s: 1; }
.layer--arcs   { --z: 18px;  --s: 0.982; }
.layer--bars   { --z: 38px;  --s: 0.962; }
.layer--glow   { --z: 54px;  --s: 0.946; }
.layer--mask   { --z: 58px;  --s: 0.942; }
.layer--bloom  { --z: 62px;  --s: 0.938; }

.layer--glow,
.layer--bloom {
  fill: var(--accent);
  opacity: 0;
}

.layer--bloom {
  filter: blur(12px);
}

.gleam {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.reveal {
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.mask-body {
  transform-origin: 835px 600px;
}

.bar,
.arc {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal--face {
    animation: draw-forward 1.9s cubic-bezier(0.6, 0, 0.2, 1) 0.15s backwards;
  }

  .reveal--swoosh {
    animation: draw-reverse 1s cubic-bezier(0.5, 0, 0.2, 1) 1.55s backwards;
  }

  .layer--mask {
    animation: mask-in 1.15s cubic-bezier(0.2, 0.8, 0.2, 1) 1.5s backwards;
  }

  .bar {
    animation: bar-in 0.75s cubic-bezier(0.2, 1.4, 0.35, 1) backwards;
  }

  .bar:nth-child(5) { animation-delay: 2.1s; }
  .bar:nth-child(4),
  .bar:nth-child(6) { animation-delay: 2.17s; }
  .bar:nth-child(3),
  .bar:nth-child(7) { animation-delay: 2.24s; }
  .bar:nth-child(2),
  .bar:nth-child(8) { animation-delay: 2.31s; }
  .bar:nth-child(1),
  .bar:nth-child(9) { animation-delay: 2.38s; }

  .arc {
    animation: arc-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  }

  .arc:nth-child(1) { animation-delay: 2.75s; }
  .arc:nth-child(2) { animation-delay: 2.9s; }
  .arc:nth-child(3) { animation-delay: 3.05s; }

  .status__dot {
    animation: dot-pulse 2.8s ease-in-out infinite;
  }
}

@keyframes draw-forward {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}

@keyframes draw-reverse {
  from { stroke-dashoffset: -1; }
  to   { stroke-dashoffset: 0; }
}

@keyframes mask-in {
  from {
    opacity: 0;
    transform: translateZ(58px) scale(0.942) translateX(30%) rotateY(-78deg) translateX(-24.5%);
  }
  60% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: translateZ(58px) scale(0.942) translateX(24.5%) rotateY(0deg) translateX(-24.5%);
  }
}

@keyframes bar-in {
  from { transform: scaleY(0); opacity: 0; }
  30%  { opacity: 1; }
  to   { transform: scaleY(1); opacity: 1; }
}

@keyframes arc-in {
  from { transform: translateX(22px) scale(0.86); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 179, 90, 0.5); }
  50%      { box-shadow: 0 0 0 7px rgba(240, 179, 90, 0); }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: clamp(0.5rem, 2svh, 1.25rem);
  padding: 0.4rem 0.95rem 0.4rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.status__dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
}

.hero__title {
  margin-top: clamp(1rem, 2.6svh, 1.75rem);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 1.35rem + 4.6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.hero__title em {
  display: block;
  font-style: italic;
  color: var(--accent);
}

.hero__lede {
  max-width: 34rem;
  margin-top: clamp(1rem, 2.4svh, 1.5rem);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem);
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: balance;
}

.sections-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0;
  margin-top: clamp(1.5rem, 3.6svh, 2.5rem);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.sections-row li + li::before {
  content: "\00b7";
  margin-inline: 0.85em;
  color: var(--line-strong);
}

.sections-row li:first-child {
  color: var(--ink);
}

.sections-row a,
.coverage__name a {
  text-decoration: none;
}

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

.prose a:hover {
  color: var(--accent);
}

/* Content bands */

.band {
  padding-block: clamp(3.5rem, 9vw, 7rem);
  border-top: 1px solid var(--line);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.band__title {
  margin-top: 0.9rem;
  max-width: 22ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.band__intro {
  max-width: 38rem;
  margin-top: 1.25rem;
  font-size: 1.0625rem;
  color: var(--ink-soft);
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.principle {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-strong);
}

.principle__num {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.principle__title {
  margin-top: 0.9rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.12;
}

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

.coverage {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line-strong);
}

.coverage__row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1rem 2rem;
  align-items: baseline;
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--line);
}

.coverage__name {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.125rem);
  line-height: 1.1;
}

.coverage__row--lead .coverage__name {
  font-size: clamp(2.5rem, 1.8rem + 3vw, 4.25rem);
  line-height: 1;
}

.coverage__row--lead {
  padding-block: 1.75rem;
}

.tag {
  font-family: var(--sans);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.coverage__row p {
  color: var(--ink-soft);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2rem clamp(2rem, 6vw, 5rem);
}

.checks {
  border-top: 1px solid var(--line-strong);
}

.checks li {
  position: relative;
  padding: 1rem 0 1rem 2rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 1.62rem;
  width: 0.85rem;
  height: 1px;
  background: var(--accent);
}

.more {
  display: inline-block;
  margin-top: 1.75rem;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.more::after {
  content: "\2192";
  display: inline-block;
  margin-left: 0.5em;
  transition: transform 0.2s ease;
}

.more:hover::after {
  transform: translateX(4px);
}

.closing {
  text-align: center;
}

.closing__line {
  font-family: var(--serif);
  font-size: clamp(2rem, 1.2rem + 3.4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.closing__line em {
  color: var(--accent);
}

.closing p + p {
  margin-top: 1.5rem;
  color: var(--ink-soft);
}

/* Article pages */

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

.page__inner {
  max-width: 44rem;
}

.breadcrumb {
  display: flex;
  gap: 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.6rem;
  color: var(--line-strong);
}

.page__title {
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 1.8rem + 4vw, 4.75rem);
  line-height: 1;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.page__lede {
  margin-top: 1.5rem;
  font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink);
}

.prose h2 {
  margin-top: 3.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  line-height: 1.1;
}

.prose h2 .tag {
  margin-left: 0.75rem;
  vertical-align: middle;
}

.prose p,
.prose ul {
  margin-top: 1rem;
  color: var(--ink-soft);
}

.prose ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.prose li {
  margin-top: 0.35rem;
}

.prose li::marker {
  color: var(--accent);
}

.prose strong {
  font-weight: 500;
  color: var(--ink);
}

.page__next {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-strong);
}

.page__next .more {
  margin-top: 0;
}

.notfound {
  min-height: 60svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 3rem;
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}

.site-footer .wordmark {
  align-self: center;
  font-size: 1.125rem;
  color: var(--ink);
}

.site-footer .wordmark__mark {
  width: 1.875rem;
  height: 1.875rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

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

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

/* Small screens */

@media (max-width: 52rem) {
  .principles {
    grid-template-columns: minmax(0, 1fr);
  }

  .coverage__row,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .coverage__row {
    gap: 0.5rem;
  }
}

@media (max-width: 30rem) {
  .wordmark {
    gap: 0.45rem;
    font-size: 1.125rem;
  }

  .wordmark__mark {
    width: 1.875rem;
    height: 1.875rem;
  }

  .site-nav ul {
    gap: 0.95rem;
  }

  .site-nav a {
    font-size: 0.75rem;
    letter-spacing: 0.02em;
  }

  .sections-row {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 0.85rem 1.5rem;
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
  }

  .sections-row li + li::before {
    content: none;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  body::before,
  .hero::before,
  .site-nav {
    display: none;
  }
}
