/* The Last Rite · landing page
   Look is lifted from the PDF itself: black and white, grain, double-rule
   frames, black label banners, oval portraits. The only colour is wisp green. */

:root {
  --ink: #050505;
  --paper: #efefec;
  --wisp: #9dff5a;
  --bg: var(--paper);
  --fg: var(--ink);

  --head: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 56px);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font: 400 clamp(16px, 1.1vw + 11px, 19px)/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; margin: 0; padding: 0; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-family: var(--head); font-stretch: 125%; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: 1.02; }
b { font-weight: 700; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--wisp); outline-offset: 3px; }

/* grain over everything */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .13;
  animation: grain 1s steps(1) infinite;
  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 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes grain { 0% { background-position: 0 0; } 12% { background-position: -40px 22px; } 25% { background-position: 31px -57px; } 37% { background-position: -66px -18px; } 50% { background-position: 52px 44px; } 62% { background-position: -23px 71px; } 75% { background-position: 74px -35px; } 87% { background-position: -58px -64px; } }

/* ── layout ───────────────────────────────────────────── */
.wrap { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }
.sec { position: relative; padding: clamp(72px, 11vw, 150px) 0; overflow: hidden; background: var(--bg); color: var(--fg); }
.sec--paper { --bg: var(--paper); --fg: var(--ink); }
.sec--ink { --bg: var(--ink); --fg: #f4f4f1; }

.eyebrow { font: 600 12px/1 var(--head); font-stretch: 125%; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 18px; opacity: .8; }
.big { font-size: clamp(34px, 6.4vw, 84px); max-width: 14ch; margin-bottom: .5em; }
.huge { font-size: clamp(36px, 7.6vw, 108px); max-width: 15ch; margin: 0 auto .35em; }
.sub { font-size: 1.15em; max-width: 36ch; margin: -.2em 0 2.4em; opacity: .8; }
.fine { margin-top: 28px; font-size: .85em; opacity: .7; }
.meta { font: 500 12px/1 var(--head); font-stretch: 112%; letter-spacing: .12em; text-transform: uppercase; opacity: .65; margin: 14px 0 0; }

/* ── the PDF's double-rule frame and black label banner ── */
.frame {
  border: 2px solid var(--fg);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--fg);
  margin: 6px;
}
.banner {
  background: var(--fg); color: var(--bg);
  font-size: clamp(13px, 1.1vw + 6px, 17px); font-weight: 600; letter-spacing: .1em; text-align: center;
  padding: 11px 12px; margin: 0 0 14px;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--fg);
}

/* ── buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none; cursor: pointer;
  font: 700 clamp(13px, .6vw + 10px, 16px)/1 var(--head); font-stretch: 112%; letter-spacing: .1em; text-transform: uppercase;
  padding: 20px 28px; border: 2px solid var(--fg); background: var(--fg); color: var(--bg);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--fg);
  margin: 6px;
  transition: transform .16s cubic-bezier(.3,1.6,.5,1), background .16s, color .16s;
}
.btn:active { transform: translateY(1px); }
@media (hover: hover) { .btn:hover { transform: translateY(-3px); } }
.btn--light { --bg: var(--ink); --fg: #f4f4f1; background: #f4f4f1; color: var(--ink); border-color: #f4f4f1; box-shadow: 0 0 0 4px var(--ink), 0 0 0 5px #f4f4f1; }
.btn--light:hover { background: var(--wisp); border-color: var(--wisp); }
.btn--ghost { --bg: var(--ink); background: transparent; color: #f4f4f1; border-color: transparent; box-shadow: 0 0 0 4px var(--ink), 0 0 0 5px #f4f4f1; }
.btn--ghost:hover { background: #f4f4f1; color: var(--ink); }
.btn--sm { padding: 14px 16px; min-height: 44px; font-size: 12px; box-shadow: none; margin: 0; background: #f4f4f1; color: var(--ink); border-color: #f4f4f1; }
.btn--sm:hover { background: var(--wisp); border-color: var(--wisp); }

/* ── sticky bar ───────────────────────────────────────── */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 80; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(10px + env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 10px max(var(--gutter), env(safe-area-inset-left)); background: rgba(5,5,5,.96); color: #f4f4f1;
  border-bottom: 1px solid #333; transform: translateY(-101%); transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.bar.on { transform: none; }
.bar__brand { display: flex; align-items: center; gap: 14px; font: 700 13px/1 var(--head); font-stretch: 125%; letter-spacing: .1em; text-transform: uppercase; }
.bar__brand img { border-radius: 50%; }
.bar__brand a { text-decoration: none; }

/* logo and name links */
.logo-link { display: inline-block; line-height: 0; transition: opacity .15s; }
.logo-link img { border-radius: 50%; }
@media (hover: hover) { .logo-link:hover { opacity: .72; } }
.mail { white-space: nowrap; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color .15s; }
.mail:hover, .mail:focus-visible { color: var(--wisp); }

/* ── hero ─────────────────────────────────────────────── */
.hero { position: relative; background: var(--ink); color: #f4f4f1; --bg: var(--ink); --fg: #f4f4f1; }
.hero__media { position: absolute; inset: 0 0 auto 0; height: min(84vh, 860px); height: min(84svh, 860px); overflow: hidden; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; filter: contrast(1.08); transform-origin: 50% 62%; will-change: transform; animation: breathe 24s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.075); } }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(5,5,5,.25), rgba(5,5,5,0) 30%, rgba(5,5,5,0) 52%, #050505 94%); }
.wisps { position: fixed; inset: 0; z-index: 60; width: 100%; height: 100%; pointer-events: none; }

.hero__top { position: relative; z-index: 2; padding: 28px var(--gutter); }
.hero__title {
  position: relative; z-index: 2; background: var(--ink); text-align: center;
  width: min(100% - var(--gutter) * 2 - 12px, 1000px); margin: min(28svh, 260px) auto 0;
  padding: clamp(22px, 4.5vw, 54px) 12px;
}
.hero__title h1 { font-size: clamp(26px, 6vw, 92px); letter-spacing: .03em; }
.hero__band {
  position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto; gap: 32px 48px; align-items: end;
  width: min(100% - var(--gutter) * 2, var(--max)); margin: clamp(40px, 7vw, 90px) auto 0; padding-bottom: clamp(56px, 8vw, 110px);
}
.hero__lede { font: 700 clamp(22px, 3.1vw, 44px)/1.12 var(--head); font-stretch: 112%; text-transform: uppercase; letter-spacing: .005em; max-width: 22ch; margin: 0; }
.hero__cta { text-align: left; }

/* ── what it is ───────────────────────────────────────── */
.what__sword { position: absolute; z-index: 0; right: max(2vw, calc(50% - 680px)); top: 4%; width: clamp(110px, 17vw, 250px); transform: rotate(8deg); opacity: .96; will-change: transform; }
.what .wrap { position: relative; z-index: 1; }
.what__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: clamp(28px, 4vw, 64px); align-items: start; margin-top: clamp(24px, 4vw, 48px); }
.infobox {
  background: var(--ink); color: #f4f4f1; padding: clamp(22px, 2.6vw, 36px); margin: 6px;
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--ink); border: 2px solid var(--ink);
}
.infobox h3 { font-size: clamp(18px, 1.6vw, 24px); margin-bottom: 18px; }
.infobox p:last-child { margin-bottom: 0; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.facts li { padding: clamp(16px, 2vw, 26px); display: flex; flex-direction: column; gap: 4px; background: var(--paper); }
.facts b { font: 800 clamp(40px, 5.4vw, 76px)/.95 var(--head); font-stretch: 125%; letter-spacing: -.01em; }
.facts span { font: 700 13px/1.2 var(--head); font-stretch: 118%; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.facts em { font-style: normal; font-size: .9em; opacity: .75; line-height: 1.35; }

/* ── the situation ────────────────────────────────────── */
.story__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.story__text p { max-width: 46ch; opacity: .92; }
.sec--paper .big { max-width: none; font-size: clamp(30px, 4.2vw, 58px); overflow-wrap: break-word; }
.story__text .big { max-width: 16ch; }
.story__art { margin: 0; display: grid; gap: 28px; padding-top: 12px; }
.shot { overflow: hidden; background: #000; }
.shot img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.shot--tall { aspect-ratio: 4 / 5; }
.shot--tall img { object-position: 50% 40%; }

/* ── heroes ───────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 40px); margin-top: 8px; }
.card { text-align: center; display: flex; flex-direction: column; align-items: center; }
.oval {
  width: 100%; aspect-ratio: 5 / 6; border-radius: 50%; background: #f4f4f1; border: 2px solid #f4f4f1; overflow: hidden; position: relative;
  box-shadow: 0 0 0 5px var(--ink), 0 0 0 7px #f4f4f1; margin: 8px 8px 0;
  transition: transform .5s cubic-bezier(.2,.9,.3,1.3);
}
.oval img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; filter: grayscale(1) contrast(1.05); }
@media (hover: hover) { .card:hover .oval { transform: translateY(-6px) rotate(-1.2deg); } }
.ribbon {
  position: relative; z-index: 2; margin-top: -22px; padding: 12px 34px; font-size: clamp(15px, 1.5vw, 22px); letter-spacing: .14em;
  background: #f4f4f1; color: var(--ink); clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 50%, 100% 100%, 0 100%, 14px 50%);
}
.role { font: 600 12px/1 var(--head); font-stretch: 125%; letter-spacing: .16em; text-transform: uppercase; margin: 16px 0 6px; opacity: .85; }
.moods { font: 500 13px/1.3 var(--body); margin: 0 0 14px; }
.blurb { font-size: .92em; opacity: .85; max-width: 26ch; margin: 0; }
.card--missing .oval img { filter: brightness(0) contrast(1); }
.card--missing .oval::after { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; font: 800 clamp(72px, 9vw, 140px)/1 var(--head); font-stretch: 125%; color: #f4f4f1; opacity: .9; }
.card--missing .oval { background: #8d8d89; }

/* swipe hint: touch only */
.swipe { display: none; font: 600 11px/1 var(--head); font-stretch: 125%; letter-spacing: .16em; text-transform: uppercase; margin: -8px 0 0; opacity: .7; }
.swipe span { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }

/* ── final ────────────────────────────────────────────── */
.final { text-align: center; padding-block: clamp(96px, 15vw, 200px); }
.final__inner { position: relative; z-index: 1; }
.final__key { height: clamp(70px, 9vw, 120px); width: auto; margin: 0 auto 32px; filter: invert(1); animation: sway 5s ease-in-out infinite; transform-origin: 50% 8%; }
@keyframes sway { 50% { transform: rotate(6deg); } 0%, 100% { transform: rotate(-6deg); } }
.final__text { font-size: clamp(18px, 1.8vw, 26px); max-width: 24ch; margin: 0 auto 40px; opacity: .88; }
.final__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 18px; }

/* ── footer ───────────────────────────────────────────── */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 36px; padding: 28px var(--gutter); background: var(--ink); color: #f4f4f1; font: 500 11px/1 var(--head); font-stretch: 118%; letter-spacing: .14em; text-transform: uppercase; }
.foot span:last-child { margin-left: auto; }

/* ── reveal on scroll ─────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal:nth-child(2) { transition-delay: .08s; } .js .reveal:nth-child(3) { transition-delay: .16s; } .js .reveal:nth-child(4) { transition-delay: .24s; }
.what__sword.reveal.in { transform: rotate(8deg) translateY(var(--py, 0)); transition: opacity .8s; }

/* ── responsive ───────────────────────────────────────── */
@media (max-width: 960px) {
  .what__grid, .story__grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .story__art { grid-template-columns: 1fr 1fr; align-items: start; }
  .js .what__sword.reveal.in, .what__sword { opacity: .18; width: clamp(90px, 22vw, 170px); top: 1%; }
}
@media (max-width: 620px) {
  .big { font-size: clamp(30px, 9.4vw, 44px); }
  .sec { padding: 64px 0; }
  .hero__band { grid-template-columns: 1fr; margin-top: 36px; padding-top: 36px; box-shadow: 0 0 0 100vmax var(--ink); clip-path: inset(0 -100vmax); background: var(--ink); }
  .hero__title { margin-top: 24vh; margin-top: 24svh; }
  .hero__top { padding-top: calc(24px + env(safe-area-inset-top)); }
  .facts { grid-template-columns: 1fr; gap: 24px; }
  .facts li { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
  .facts b { font-size: 44px; }
  .facts span { margin: 0; }
  .facts em { flex-basis: 100%; }
  .story__art { grid-template-columns: 1fr; }
  .bar__title { display: none; }
  .btn { padding: 18px 14px; min-height: 52px; justify-content: center; font-size: clamp(10px, 3.3vw, 13px); letter-spacing: .06em; white-space: nowrap; }
  .hero__cta .btn { width: calc(100% - 12px); }
  .final__actions .btn { width: calc(100% - 12px); justify-content: center; }
  .foot { flex-direction: column; align-items: flex-start; gap: 16px; padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
  .foot span:last-child { margin-left: 0; }

  /* heroes: swipeable row, one and a bit cards in view */
  .cards { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding: 12px var(--gutter) 24px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .cards::-webkit-scrollbar { display: none; }
  .card { flex: 0 0 74%; scroll-snap-align: center; }
  .js .card.reveal { opacity: 1; transform: none; }
  .blurb { font-size: .95em; max-width: 28ch; }
  .swipe { display: block; }
  .heroes .sub { margin-bottom: 1.2em; }

}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .final__key, .hero__img, .grain { animation: none !important; }
}
