/* Nevermore (kinkyraven.com/nevermore/): benchmark page in the Nevermore promo style. */
@font-face {
  font-family: "Literata";
  src: url("../nevermore/assets/literata-latin.woff2") format("woff2-variations"),
       url("../nevermore/assets/literata-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --field: #131824;          /* SKY top stop (19,24,36) */
  --fg:    #FAF8F4;          /* promo title colour */
  --dim:   #AEB4C2;
  --faint: #8A92A3;
  --faint-deco: #5D6577;
  --ink:   #131824;
  --pop-tint: rgba(19,24,36,.86);

  --sun:     #E46E2E;        /* SKY (236,118,52), stepped to pass the dark chart checks */
  --sun-hi:  #FFB060;        /* SKY horizon (255,176,96) */
  --sky:     #5983AA;        /* SKY (89,131,170) */
  --sky-deep:#285075;        /* SKY (40,80,117) */
  --ref:     #7C8494;

  --serif: "Literata", Georgia, "Times New Roman", serif;
}

.nm {
  --accent: var(--sun);
  --accent-soft: rgba(228,110,46,.08);
  --accent-line: rgba(228,110,46,.42);
  --accent-glow: rgba(228,110,46,.14);
  --accent-wash: rgba(228,110,46,.05);
}

/* Static film grain behind the content, as in the promo stills. */
.nm { position: relative; }
.nm::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: var(--grain); opacity: .05;
}

.serif-t {
  font-family: var(--serif); font-weight: 560;
  font-variation-settings: "opsz" 72; letter-spacing: -.015em;
}

/* Hero. The blue wash starts under the nav, like the top of the promo sky. */
.nm main {
  background: radial-gradient(120% 900px at 50% 0%, rgba(40,80,117,.32), transparent 72%) no-repeat;
}
.nm-hero {
  position: relative;
  padding-block: clamp(36px, 7vh, 80px) clamp(48px, 8vh, 88px);
}
.nm-title {
  font-family: var(--serif); font-weight: 560;
  font-variation-settings: "opsz" 72; letter-spacing: -.015em;
  line-height: .98; font-size: clamp(54px, 9.6vw, 138px); color: var(--fg);
}
.nm-intro {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--s6) var(--s10); margin-top: clamp(20px, 3vh, 32px);
}
.nm-intro .lede {
  font-family: var(--serif); font-weight: 470; font-variation-settings: "opsz" 18;
  color: var(--dim); max-width: 34ch; line-height: 1.5;
}
.nm-get { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); }
.nm-get .meta {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--faint);
}
.nm .btn-pri { background: var(--fg); color: var(--ink); }
.nm .btn-pri:hover {
  background: #fff; color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 1px rgba(255,176,96,.5), 0 0 30px rgba(228,110,46,.35);
}
.nm .btn-pri svg { width: 15px; height: 15px; flex: none; }

/* Launch film. The orange glow under the frame is the horizon rim from the stills. */
.film-wrap { position: relative; margin-top: clamp(36px, 6vh, 64px); }
.film-wrap::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  left: 6%; right: 6%; bottom: -46px; height: 120px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(228,110,46,.34), rgba(89,131,170,.10) 60%, transparent 75%);
}
.film {
  position: relative; z-index: 1; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--r-4);
  background: #000 url("assets/nevermore-parody-poster.jpg") center / cover no-repeat;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 60px -24px rgba(0,0,0,.8);
}
.film video { width: 100%; height: 100%; object-fit: cover; }
.film-ctl {
  position: absolute; right: clamp(10px, 1.6vw, 18px); bottom: clamp(10px, 1.6vw, 18px);
  z-index: 2; display: flex; gap: var(--s2);
}
.film-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-pill);
  color: var(--fg); background: rgba(19,24,36,.72);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.film-btn:hover { background: rgba(19,24,36,.92); color: #fff; }
.film-btn svg { width: 17px; height: 17px; }
.film-big {
  position: absolute; z-index: 2; left: 50%; top: 50%;
  width: clamp(56px, 7vw, 76px); height: clamp(56px, 7vw, 76px); margin: 0;
  transform: translate(-50%, -50%);
  display: none; place-items: center; border-radius: var(--r-pill);
  color: var(--ink); background: var(--fg);
  box-shadow: 0 10px 30px -8px rgba(0,0,0,.7);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.film-big svg { width: 38%; height: 38%; margin-left: 6%; }
.film-big:hover { transform: translate(-50%, -50%) scale(1.04); box-shadow: 0 0 0 1px rgba(255,176,96,.5), 0 0 34px rgba(228,110,46,.4); }
.film.is-paused .film-big { display: grid; }

/* Sunrise hairline between the hero and the benchmark. */
.horizon {
  position: relative; z-index: 1; height: 1px; border: 0; margin: 0;
  background: linear-gradient(90deg, transparent, rgba(89,131,170,.55) 22%, var(--sun) 50%, rgba(89,131,170,.55) 78%, transparent);
  box-shadow: 0 0 22px 1px rgba(228,110,46,.28);
}

.nm-sec { padding-bottom: clamp(40px, 7vh, 72px); }
.nm-chart { padding-top: clamp(48px, 9vh, 96px); }
.nm .display-3 {
  font-family: var(--serif); font-weight: 560; font-variation-settings: "opsz" 72;
  letter-spacing: -.015em; font-size: clamp(26px, 3vw, 38px); line-height: 1.1;
}

/* Chart */
.chart-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: var(--s3) var(--s6); margin-bottom: var(--s5);
}
.legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: 13px; color: var(--dim); }
.legend span { display: inline-flex; align-items: center; gap: var(--s2); white-space: nowrap; }
.legend svg { flex: none; }
.chart-wrap { position: relative; }
.chart-wrap svg text { font-family: var(--sans); }
.chart-wrap svg .tick { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.chart-wrap .pt { cursor: default; outline: none; }
.chart-wrap .pt:focus-visible .ring { stroke: var(--fg); }
.chart-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s3) var(--s6); margin-top: var(--s3);
}
.chart-foot .meta { font-family: var(--mono); font-size: 10px; letter-spacing: .05em; color: var(--faint); }
.tip {
  position: absolute; pointer-events: none; z-index: 3; display: none;
  padding: 6px 9px; border-radius: var(--r-1); white-space: nowrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: .03em; line-height: 1.5; color: var(--fg);
  background: var(--pop-tint); box-shadow: inset 0 0 0 1px var(--stroke-2), var(--shadow-pop);
}
.tip b { font-family: var(--sans); font-weight: 600; letter-spacing: 0; }

details.data summary {
  cursor: pointer; list-style: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: var(--dim);
}
details.data summary::-webkit-details-marker { display: none; }
details.data summary::after { content: " +"; color: var(--faint-deco); }
details.data[open] summary::after { content: " -"; }
details.data summary:hover { color: var(--fg); }
details.data .tbl-wrap { margin-top: var(--s4); }

/* Tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td {
  padding: 13px var(--s3); text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--hairline);
}
.tbl thead th {
  padding-top: 0; font-weight: 400;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--faint);
}
.tbl tbody th {
  font-family: var(--serif); font-weight: 560; font-size: 15.5px; letter-spacing: -.005em; color: var(--fg);
}
.tbl td { color: var(--dim); }
.tbl .n { text-align: right; font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tbl thead th.n { font-size: 10px; }
.tbl .shapes { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.tbl .shapes b { color: var(--dim); font-weight: 400; }
.tbl tr.ref th { font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--dim); }
.tbl .gap { padding-left: var(--s8); }
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }

.classes { margin-top: var(--s10); }

@media (max-width: 560px) {
  .nm-hero .btns > .btn { flex: 0 1 auto; }
  .nm-title { font-size: min(13vw, 64px); white-space: nowrap; }
  .film { border-radius: var(--r-3); }
  .film-btn { width: 34px; height: 34px; }
  .film-btn svg { width: 15px; height: 15px; }
}

@media (forced-colors: active) {
  .film-btn, .film-big { border: 1px solid ButtonBorder; }
  .horizon { background: CanvasText; }
}

/* Prose */
.nm-copy { max-width: 62ch; color: var(--dim); font-size: 17px; line-height: 1.6; }
.nm-copy a { color: var(--fg); text-decoration: underline; text-decoration-color: rgba(228, 110, 46, .6); text-underline-offset: 3px; }
.nm-copy a:hover { text-decoration-color: #E46E2E; }
.nm-intro .nm-copy { margin-top: var(--s4); }
.nm-chart .nm-copy { margin: var(--s3) 0 var(--s6); }
.nm-end .nm-copy + .nm-copy { margin-top: var(--s4); }
.nm-poe { margin-top: clamp(28px, 4vw, 44px); }
.film video { cursor: pointer; }
