/* The Dark Detail — thedarkdetail.com */

@font-face { font-family: "Source Serif"; src: url("../fonts/SourceSerifPro-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url("../fonts/SourceSerifPro-It.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url("../fonts/SourceSerifPro-Semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans"; src: url("../fonts/SourceSansPro-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans"; src: url("../fonts/SourceSansPro-Semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --ground: #0e0c0a;      /* the dark of the banner */
  --raised: #1a1612;      /* inside the medallion */
  --line: #2e2721;        /* quiet dividers */
  --ivory: #f2ebdd;       /* text */
  --soft: #b9b1a3;        /* secondary text */
  --red: #d62820;         /* the ring */
  --serif: "Source Serif", Georgia, "Times New Roman", serif;
  --sans: "Source Sans", "Helvetica Neue", Arial, sans-serif;
  --page: min(1120px, 100% - 3rem);
  --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 2px; }
.wrap { width: var(--page); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ivory); color: var(--ground); padding: 0.5rem 1rem; font-family: var(--sans); }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.25rem; font-family: var(--sans); font-size: 1rem; }
.top .mark { display: flex; align-items: center; }
.top .mark img { width: 44px; height: 44px; }
.top nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; justify-content: flex-end; }
.top nav a { text-decoration: none; color: var(--soft); padding-block: 0.25rem; }
.top nav a:hover { color: var(--ivory); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3.5rem, 8vw, 7rem); }
.hero::before, .hero::after {           /* the faint rings from the banner */
  content: ""; position: absolute; border: 2px solid rgba(214, 40, 32, 0.13); border-radius: 50%;
  width: 62rem; height: 62rem; right: -24rem; top: -16rem; pointer-events: none;
}
.hero::after { width: 100rem; height: 100rem; right: -43rem; top: -35rem; border-color: rgba(214, 40, 32, 0.07); }
.hero .wrap { position: relative; z-index: 1; }

.wordmark { position: relative; display: block; margin: 0; max-width: 1040px; cursor: crosshair; touch-action: pan-y; }
.wordmark picture, .wordmark img { display: block; width: 100%; }
.lens {
  position: absolute; left: 0; top: 0; width: clamp(120px, 17vw, 210px); aspect-ratio: 1; border-radius: 50%;
  border: 6px solid var(--red); background-color: var(--raised); background-repeat: no-repeat;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4), inset 0 0 26px rgba(0,0,0,0.65);
  transform: translate(-50%, -50%) scale(0.6); opacity: 0; pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.wordmark.is-looking .lens { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.hero-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem 4rem; align-items: start; margin-top: clamp(1.75rem, 4vw, 3rem); }
.rule { width: 130px; height: 5px; background: var(--red); margin: 0 0 1.5rem; border: 0; }
.tagline { font-style: italic; font-size: clamp(2.25rem, 5.2vw, 3.75rem); line-height: 1.1; margin: 0 0 1.25rem; }
.lede { max-width: 34rem; margin: 0 0 2rem; color: var(--ivory); }
.hint { font-family: var(--sans); font-size: 0.9375rem; color: var(--soft); margin: 1.75rem 0 0; }
.hint .by-touch { display: none; }
@media (hover: none) { .hint .by-mouse { display: none; } .hint .by-touch { display: inline; } }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; font-family: var(--sans); font-size: 1.0625rem; }
.button { display: inline-block; background: var(--red); color: #fff; font-weight: 600; text-decoration: none; padding: 0.8rem 1.4rem; border-radius: 999px; }
.button:hover { background: #e8372f; color: #fff; }
.medallion { width: clamp(180px, 24vw, 300px); }

/* ---------- sections ---------- */
main > section { padding-block: clamp(3rem, 7vw, 5.5rem); border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 600; line-height: 1.15; margin: 0 0 1.25rem; letter-spacing: -0.005em; }
h3 { font-size: 1.375rem; font-weight: 600; line-height: 1.25; margin: 0 0 0.4rem; }
p { margin: 0 0 1.1rem; }
.intro { max-width: var(--measure); color: var(--soft); margin-bottom: 2.5rem; }

/* how we work */
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 4rem; max-width: 60rem; }
.rules p { color: var(--soft); margin: 0; }

/* videos */
.videos { list-style: none; margin: 0; padding: 0; }
.videos li { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 1.25rem 2.25rem; align-items: center; padding-block: 1.5rem; border-top: 1px solid var(--line); }
.videos li:first-child { border-top: 0; padding-top: 0; }
.thumb { display: block; aspect-ratio: 16 / 9; background: var(--raised); border-radius: 6px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.videos .by { font-family: var(--sans); font-size: 1rem; color: var(--soft); margin: 0 0 0.6rem; }
.videos .what { margin: 0 0 0.75rem; max-width: 36rem; }
.videos .watch { font-family: var(--sans); font-size: 1rem; }

/* corrections */
.ledger { width: 100%; border-collapse: collapse; font-size: 1.0625rem; line-height: 1.5; }
.ledger caption { text-align: left; font-family: var(--sans); color: var(--soft); font-size: 1rem; padding-bottom: 0.75rem; }
.ledger th { text-align: left; font-family: var(--sans); font-weight: 600; font-size: 0.9375rem; color: var(--soft); padding: 0.6rem 1rem 0.6rem 0; border-bottom: 1px solid var(--line); }
.ledger td { vertical-align: top; padding: 0.9rem 1.5rem 0.9rem 0; border-bottom: 1px solid var(--line); }
.ledger td:last-child, .ledger th:last-child { padding-right: 0; }
.ledger .vid { width: 17%; font-weight: 600; }
.ledger .at { width: 7%; font-family: var(--sans); font-variant-numeric: tabular-nums; color: var(--soft); white-space: nowrap; }
.ledger .said { width: 34%; color: var(--soft); }
.ledger .said::before { content: "\201C"; }
.ledger .said::after { content: "\201D"; }
.ledger .said.plain::before, .ledger .said.plain::after { content: none; }

/* team */
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 3rem; margin: 0; }
.team div { border-top: 5px solid var(--red); padding-top: 1rem; }
.team dt { font-size: 1.75rem; font-weight: 600; line-height: 1.2; }
.team dd { margin: 0.4rem 0 0; color: var(--soft); }

/* contact */
.mail { font-size: clamp(1.5rem, 4.4vw, 2.5rem); font-weight: 600; overflow-wrap: anywhere; }

/* footer */
footer { border-top: 1px solid var(--line); padding-block: 2rem 3rem; font-family: var(--sans); font-size: 0.9375rem; color: var(--soft); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; }
footer p { margin: 0; }

/* 404 */
.lost { min-height: 70vh; display: grid; align-content: center; justify-items: start; gap: 0.5rem; padding-block: 4rem; }
.lost img { width: 150px; margin-bottom: 1.5rem; }
.lost h1 { font-size: clamp(2.25rem, 6vw, 3.75rem); font-style: italic; font-weight: 400; margin: 0; line-height: 1.1; }

/* ---------- smaller screens ---------- */
@media (max-width: 860px) {
  body { font-size: 1.125rem; }
  .hero-body { grid-template-columns: 1fr; }
  .medallion { order: -1; width: 150px; }
  .rules { grid-template-columns: 1fr; gap: 1.75rem; }
  .videos li { grid-template-columns: 1fr; }
  .team { grid-template-columns: 1fr; gap: 1.5rem; }

  .ledger, .ledger caption, .ledger tbody, .ledger tr, .ledger td { display: block; width: auto; }
  .ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ledger tr { padding-block: 1.1rem; border-bottom: 1px solid var(--line); }
  .ledger td { border: 0; padding: 0 0 0.35rem; }
  .ledger .vid, .ledger .at, .ledger .said { width: auto; }
  .ledger .at { display: inline; margin-left: 0.5rem; }
  .ledger .vid { display: inline; }
  .ledger .said { margin-top: 0.4rem; }
  .ledger .right::before { content: "Correct: "; font-family: var(--sans); font-weight: 600; color: var(--soft); font-size: 0.9375rem; }
}
@media (max-width: 560px) {
  .top nav .optional { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lens { transition: none; }
}
