/* The Prayers: shared styles for every page.
   Single dark look on purpose: the key footage is gold on black, so the page
   shares its ground. --ground is re-sampled from the video's first frame. */
:root {
  color-scheme: dark;
  --ground: #070707;
  --ivory: #ECE6D8;
  --muted: #8C8577;
  --rule: #25221D;
  --gold: #C9A24B;
  --gold-hi: #E6C675;
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 60px;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ivory);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 4px; }
.wrap { padding-inline: var(--gutter); max-width: 1120px; margin-inline: auto; }

.label {
  font-size: 11px; font-weight: 500; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--muted);
}

/* ---------- Top bar ---------- */
header.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--ground) 84%, transparent);
  backdrop-filter: blur(10px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--nav-h); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.nav-key { width: 36px; height: 36px; display: block; opacity: 0; transition: opacity .4s ease; }
.nav-key.on { opacity: 1; }
.nav-links { display: flex; gap: clamp(16px, 3vw, 36px); list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--gold-hi); }
.menu-btn {
  display: none; align-items: center; gap: 8px;
  background: transparent; color: var(--ivory); border: 1px solid var(--rule);
  padding: 10px 14px; cursor: pointer;
  font: 500 11px/1 var(--body); letter-spacing: 0.24em; text-transform: uppercase;
}
.menu-btn:hover { border-color: var(--gold); color: var(--gold-hi); }
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    padding: 4px var(--gutter) 16px;
    background: var(--ground); border-bottom: 1px solid var(--rule);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 14px 0; font-size: 12px; }
  .nav-key { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: transparent; color: var(--gold-hi);
  border: 1px solid var(--gold); border-radius: 0;
  padding: 14px 26px;
  font: 500 11px/1 var(--body); letter-spacing: 0.24em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.btn:hover { background: var(--gold); color: var(--ground); }
.btn svg { width: 12px; height: 12px; flex: none; }

/* ---------- Footer + mini player (stays on screen across pages) ---------- */
footer { border-top: 1px solid var(--rule); padding-block: 32px 48px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; }
.foot ul { display: flex; flex-wrap: wrap; gap: 24px; list-style: none; margin: 0; padding: 0; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--gold-hi); }
.mini { display: flex; align-items: center; gap: 12px; }
.play {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  display: grid; place-items: center; padding: 0;
  background: transparent; border: 1px solid var(--gold); color: var(--gold-hi);
  cursor: pointer; transition: background .2s ease, color .2s ease;
}
.play:hover { background: var(--gold); color: var(--ground); }
.play svg { width: 12px; height: 12px; display: block; }
.play .i-pause { display: none; }
.play[aria-pressed="true"] .i-play { display: none; }
.play[aria-pressed="true"] .i-pause { display: block; }
.mini .track { color: var(--ivory); }
.mini .seek { width: 120px; margin: 0; accent-color: var(--gold); cursor: pointer; }
.mini .times { font-size: 11px; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }

/* ---------- Home: the scroll-turned key ---------- */
.spin { position: relative; height: 300vh; }
.spin-sticky {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + var(--nav-h));
  height: calc(100vh - var(--nav-h) - env(safe-area-inset-top, 0px));
  min-height: 480px;
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* keeps the key within the screen width on phones */
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  padding-block: 0 clamp(24px, 5vh, 56px);
  text-align: center;
}
.key-stage { position: relative; height: 100%; aspect-ratio: 1; max-width: 100%; max-height: 100%; }
.key-stage img, .key-stage canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  /* feathers the footage's edges into the page */
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
.key-stage canvas { opacity: 0; transition: opacity .3s ease; }
.key-stage.ready canvas { opacity: 1; }
.key-stage.ready img { visibility: hidden; }
.spin-text { display: grid; justify-items: center; gap: 14px; margin-top: -2vh; position: relative; }
.spin-text h1 {
  margin: 0;
  font-family: var(--display); font-weight: 300;
  font-size: clamp(36px, 6.4vw, 72px); line-height: 1;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding-left: 0.14em; /* balances the trailing letter-spacing */
}

/* ---------- Home: newsletter ---------- */
section.block { padding-block: clamp(88px, 12vw, 160px); border-top: 1px solid var(--rule); }
/* jumping to a section (e.g. Newsletter) leaves room for the top bar */
section[id] { scroll-margin-top: var(--nav-h); }
.signup { display: grid; justify-items: center; text-align: center; gap: 22px; }
.signup h2 {
  margin: 0; font-family: var(--display); font-weight: 300;
  font-size: clamp(40px, 6.5vw, 72px); line-height: 1.02; text-wrap: balance;
}
.signup h2 em { color: var(--gold-hi); }
.signup .lede { margin: 0; max-width: 46ch; color: var(--muted); font-size: 17px; }
#formWrap { width: min(520px, 100%); margin-top: 16px; }
form.news { display: grid; gap: 16px; text-align: left; }
.field { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.field input {
  flex: 1 1 240px; min-width: 0;
  background: transparent; color: var(--ivory);
  border: 0; border-bottom: 1px solid var(--muted);
  font: 400 18px/1.3 var(--body); padding: 12px 2px;
}
.field input::placeholder { color: #5E594F; }
.field input:focus { outline: none; border-bottom-color: var(--gold); }
.form-msg { margin: 0; min-height: 1.5em; font-size: 14px; color: #E08A6A; }
.form-note { margin: 0; font-size: 13px; color: var(--muted); }
.thanks { display: grid; gap: 10px; justify-items: center; text-align: center; }
.thanks p { margin: 0; }
.thanks .big { font-family: var(--display); font-style: italic; font-weight: 300; font-size: 32px; color: var(--gold-hi); }

/* ---------- News: page heading ---------- */
.page-head { display: grid; gap: 14px; padding-block: clamp(48px, 9vw, 104px) clamp(32px, 5vw, 56px); }
.page-head h1 {
  margin: 0; font-family: var(--display); font-weight: 300;
  font-size: clamp(34px, 6.3vw, 73px); /* 30% smaller than before */ line-height: 0.95;
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* ---------- News: posts, newest first ---------- */
.posts { list-style: none; margin-block: 0; padding-block: 0; }
.posts > .post:first-child { border-top: 1px solid var(--rule); }
.post {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 56px;
  padding-block: clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--rule);
}
.post.has-media { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; }
.post-body { display: grid; gap: 16px; justify-items: start; max-width: 60ch; }
.post h2 {
  margin: 0; font-family: var(--display); font-weight: 300;
  font-size: clamp(30px, 4.4vw, 48px); line-height: 1.05; text-wrap: balance;
}
.post p { margin: 0; font-size: 17px; color: #B9B2A3; text-wrap: pretty; }
.post p em { color: var(--ivory); font-style: italic; }
.post .btn { margin-top: 8px; padding: 13px 22px; }
.media { margin: 0; }
.media img { display: block; width: 100%; height: auto; }
@media (max-width: 760px) {
  .post.has-media { grid-template-columns: minmax(0, 1fr); }
}

