/* ============================================================
   The Ritual Studio
   Ivory ground, hairline rules, paintings set as plates.
   Motion: one slow fade on the hero. Nothing moves on scroll.
   ============================================================ */

@font-face { font-family: 'HV Muse'; src: url('fonts/HVMuse-Regular.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'HV Muse'; src: url('fonts/HVMuse-Italic.otf') format('opentype'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --paper: #f6f3ee;
  --ink:   #17140f;
  --soft:  rgba(23, 20, 15, 0.66);
  --rule:  rgba(23, 20, 15, 0.16);
  --pad:   clamp(22px, 4.4vw, 72px);
  --serif: 'HV Muse', Georgia, 'Palatino Linotype', serif;
  --sans:  "Manrope", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid var(--ink); outline-offset: 5px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; } }

/* ---------- type ---------- */
.label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--soft);
  margin-bottom: 2.2rem;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -0.01em; }
h1 em, h2 em, .hero__title em { font-weight: 400; font-style: italic; }
h1 { font-size: clamp(3.4rem, 8.2vw, 8rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 3.4rem); line-height: 1.14; }
h3 { font-size: clamp(1.45rem, 2vw, 1.9rem); line-height: 1.2; }
p + p { margin-top: 1.25em; }
.lead { font-family: var(--serif); font-size: clamp(1.4rem, 2.1vw, 1.95rem); line-height: 1.4; font-weight: 400; color: var(--ink); }
.lead em { font-style: italic; }
.link { border-bottom: 1px solid var(--rule); transition: border-color 0.3s; }
.link:hover { border-color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; gap: 0.9em;
  margin-top: 2.4rem;
  padding: 1.05em 1.9em;
  border: 1px solid var(--ink);
  font-size: 0.7rem; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase;
  transition: background 0.4s, color 0.4s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: transparent; color: var(--ink); }

/* ---------- nav ---------- */
.nav {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.7rem var(--pad);
}
.nav__brand { display: flex; align-items: center; gap: 0.8rem; font-size: 0.7rem; font-weight: 400; letter-spacing: 0.3em; text-transform: uppercase; }
.dingir { width: 20px; height: 20px; }
.nav__links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 40px); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; }
.nav__links a { padding: 4px 0; border-bottom: 1px solid transparent; transition: border-color 0.3s; white-space: nowrap; }
.nav__links a:hover { border-color: var(--ink); }
.nav__links .nav__cta { padding: 0.7em 1.3em; border: 1px solid var(--ink); }
.nav__links .nav__cta:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 760px) {
  .nav { padding: 1.2rem var(--pad); }
  .nav__brand span { display: none; }
  .nav__links a:not(.nav__cta) { display: none; }
}

/* ---------- plates ---------- */
.plate { background: #111; overflow: hidden; }
.plate img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- offerings ---------- */
.offerings { border-top: 1px solid var(--rule); padding: clamp(5rem, 10vw, 9rem) var(--pad) clamp(4rem, 8vw, 7rem); }
.section-head { margin-bottom: clamp(2rem, 5vw, 4rem); }
.section-head .label { margin-bottom: 0; }
.rows { list-style: none; border-top: 1px solid var(--ink); }
.rows li {
  display: grid; grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 1.5rem clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2rem, 3.4vw, 3.2rem) 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.num { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--soft); }
.rows p { color: var(--soft); max-width: 40em; }
@media (max-width: 820px) {
  .rows li { grid-template-columns: 2.4rem 1fr; }
  .rows p { grid-column: 2; }
}

/* ---------- groups ---------- */
.groups {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 8rem);
  padding: clamp(5rem, 10vw, 9rem) var(--pad);
  border-top: 1px solid var(--rule);
}
.groups__head h2 { max-width: 14em; }
.groups__body { max-width: 36em; color: var(--soft); }

/* ---------- writing / cards ---------- */
.writing { padding: clamp(5rem, 10vw, 9rem) var(--pad); border-top: 1px solid var(--rule); }
.writing .section-head h2 { margin-top: 1.4rem; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 5rem); }
.card { display: block; }
.card figure { aspect-ratio: 4 / 3; overflow: hidden; background: #ddd8cf; }
.card img { width: 100%; height: 100%; object-fit: cover; }
.card__meta { padding-top: 1.5rem; border-top: 0; }
.card__date { font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--soft); margin-bottom: 0.9rem; }
.card h3 { margin-bottom: 0.7rem; }
.card__sub { font-family: var(--serif); font-style: italic; font-size: 1.15rem; line-height: 1.4; color: var(--soft); }
.card__ex { margin-top: 1rem !important; color: var(--soft); font-size: 0.95rem; }
.card__more { margin-top: 1.4rem !important; font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; border-bottom: 1px solid var(--rule); display: inline-block; padding-bottom: 4px; transition: border-color 0.3s; }
.card:hover .card__more { border-color: var(--ink); }
.writing__more { margin-top: 3rem; font-size: 0.85rem; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }

/* ---------- about ---------- */
.laura {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 8rem);
  padding: clamp(5rem, 10vw, 9rem) var(--pad);
  border-top: 1px solid var(--rule);
}
.laura__body { max-width: 38em; color: var(--soft); }
.laura__body .lead { color: var(--ink); margin-bottom: 2rem; }

/* ---------- footer ---------- */
.foot { position: relative; text-align: center; padding: 3.2rem var(--pad) 2.8rem; border-top: 1px solid var(--rule); color: var(--soft); }
.foot__mark { color: var(--ink); opacity: 0.55; margin-bottom: 1.6rem; }
.foot__mark .dingir { width: 26px; height: 26px; margin: 0 auto; }
.foot__meta { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); }
.foot__legal { margin-top: 0.9rem; font-size: 0.66rem; letter-spacing: 0.08em; }
.foot__legal a { border-bottom: 1px solid var(--rule); padding-bottom: 1px; transition: border-color 0.25s, color 0.25s; }
.foot__legal a:hover { color: var(--ink); border-color: var(--ink); }
.foot .sep { margin: 0 0.5em; }

/* ---------- legal ---------- */
.legal h2 { font-size: 1.35rem; margin: 2.2rem 0 0.6rem; }
.legal p { color: var(--soft); max-width: 36em; }
.legal a { border-bottom: 1px solid var(--rule); }

/* ---------- inner pages ---------- */
.inner .nav { position: relative; border-bottom: 1px solid var(--rule); }
.page { padding: clamp(4rem, 9vw, 8rem) var(--pad); }
.page__head { margin-bottom: clamp(3rem, 6vw, 5rem); max-width: 44rem; }
.page__head h1 { font-size: clamp(2.8rem, 6vw, 5.4rem); }
.page__head .label { margin-bottom: 1.6rem; }
.page__lede { margin-top: 1.6rem; color: var(--soft); font-size: 1.05rem; }

/* ---------- essay ---------- */
.essay { padding: clamp(4rem, 9vw, 8rem) var(--pad) clamp(3rem, 6vw, 5rem); }
.essay__head { max-width: 46rem; margin: 0 auto clamp(3rem, 6vw, 5rem); text-align: center; }
.essay__head .label { margin-bottom: 2rem; }
.essay__head .label a:hover { color: var(--ink); }
.essay__head h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
.essay__sub { margin-top: 1.4rem; font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 2vw, 1.55rem); color: var(--soft); }
.essay__by { margin-top: 1.8rem; font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--soft); }
.prose { max-width: 40rem; margin: 0 auto; font-family: var(--serif); font-size: clamp(1.22rem, 1.5vw, 1.4rem); line-height: 1.62; font-weight: 400; }
.prose p { margin: 0 0 1.3em; }
.prose h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 2.6em 0 0.8em; }
.prose em { font-style: italic; }
.prose strong { font-weight: 500; }
.prose a { border-bottom: 1px solid var(--rule); }
.prose a:hover { border-color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 3em auto; width: 5rem; }
.prose blockquote { margin: 2.2em 0; padding-left: 1.6rem; border-left: 1px solid var(--ink); color: var(--soft); font-style: italic; }
.prose figure { margin: 2.6em calc(-1 * clamp(0px, 8vw, 7rem)); }
.prose figure img { width: 100%; height: auto; }
.prose figcaption { margin-top: 0.8rem; font-family: var(--sans); font-size: 0.78rem; font-weight: 300; color: var(--soft); text-align: center; }
.essay__end { max-width: 40rem; margin: clamp(4rem, 8vw, 7rem) auto 0; padding-top: 3rem; border-top: 1px solid var(--ink); }
.essay__orig { font-size: 0.85rem; color: var(--soft); margin-bottom: 3rem; }
.card--next { display: grid; grid-template-columns: 9rem 1fr; gap: 1.6rem; align-items: center; }
.card--next figure { aspect-ratio: 1; }
.card--next .card__meta { padding-top: 0; }
.card--next h3 { font-size: 1.4rem; }
.essay__cta { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--rule); font-family: var(--serif); font-size: 1.5rem; font-style: italic; }
.essay__cta .btn { display: flex; width: max-content; font-family: var(--sans); font-style: normal; }
@media (max-width: 560px) { .card--next { grid-template-columns: 6rem 1fr; } }

/* nav floats over the hero plate: invert against whatever is beneath */
.home .nav { color: #fff; mix-blend-mode: difference; }
.home .nav .nav__cta:hover { background: #fff; color: #000; }
.home .nav a:focus-visible { outline-color: #fff; }
.home .nav .nav__cta { border-color: #fff; }
.home .nav__links a:hover { border-color: #fff; }

/* ============================================================
   Immersive scenes: each moment is a full-screen painting.
   ============================================================ */
.home .nav { position: fixed; }
.scene {
  --light: #f4efe7;
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: clamp(6rem, 12vh, 10rem) var(--pad);
  color: var(--light); background: #0a0807;
}
.scene__bg {
  position: absolute; left: 0; top: -5%; z-index: -2;
  width: 100%; height: 110%; object-fit: cover;
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}
.scene__bg--low { object-position: 50% 85%; }
.scene__bg--mid { object-position: 50% 70%; }
.scene::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--scrim, none); pointer-events: none; }
.scene .label { color: rgba(244, 239, 231, 0.7); }
.scene p:not(.label) { color: rgba(244, 239, 231, 0.84); }
.scene .lead, .scene h1, .scene h2, .scene h3 { color: var(--light); }
.scene .btn { border-color: var(--light); color: var(--light); }
.scene .btn:hover { background: var(--light); color: #0a0807; }
.scene__text { position: relative; width: 100%; max-width: 40rem; text-shadow: 0 0 40px rgba(0,0,0,0.35); }
.scene--center { justify-content: center; text-align: center; }
.scene--center .scene__text { max-width: 44rem; }
.scene--right { justify-content: flex-end; }
.scene--right .scene__text { max-width: 36rem; }
.scene h2 { font-size: clamp(2rem, 4.2vw, 4rem); margin-bottom: 2rem; }
.scene .lead { margin-bottom: 1.8rem; }

/* reveal: a plain, slow fade */
.js .rv { opacity: 0; transition: opacity 1.8s ease; }
.js .rv.in { opacity: 1; }
.js .triad .rv { display: block; }

/* hero */
.scene--hero { align-items: flex-end; padding-bottom: clamp(4.5rem, 12vh, 9rem); --scrim: linear-gradient(180deg, rgba(10,8,7,0.35) 0%, rgba(10,8,7,0) 35%, rgba(10,8,7,0.7) 100%); }
.scene--hero .scene__text { max-width: 60rem; }
.scene--hero p.hero__title { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; color: var(--light); font-size: clamp(3.6rem, 10.5vw, 10.5rem); line-height: 0.98; margin-bottom: 0; }
/* hero: the painting arrives first, then the words */
.js .scene--hero .scene__bg { opacity: 0; transition: opacity 3.2s ease; }
.js .scene--hero.in .scene__bg { opacity: 1; }
.scene--hero .hero__lede { margin-top: 2.4rem; max-width: 30em; font-size: 1.05rem; }
.scene--hero .label.rv { transition-delay: 1.2s; }
.scene--hero .hero__title.rv { transition-delay: 1.6s; }
.scene--hero .hero__lede.rv { transition-delay: 2.2s; }
.scene--hero .btn.rv { transition-delay: 2.6s; }
.scene__cue { position: absolute; right: var(--pad); bottom: clamp(2rem, 6vh, 4rem); display: flex; flex-direction: column; align-items: center; gap: 0.9rem; font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(244,239,231,0.7); writing-mode: vertical-rl; }

.scene__cue i { width: 1px; height: 3.5rem; background: rgba(244,239,231,0.45); }

/* per-scene light */
.scene--stars { --scrim: radial-gradient(ellipse at center, rgba(8,8,10,0.78) 0%, rgba(8,8,10,0.55) 55%, rgba(8,8,10,0.35) 100%); }
.scene--pond { --scrim: linear-gradient(90deg, rgba(5,12,9,0.82) 0%, rgba(5,12,9,0.5) 50%, rgba(5,12,9,0.1) 100%); }
.scene--fountain { --scrim: linear-gradient(270deg, rgba(4,10,40,0.86) 0%, rgba(4,10,40,0.6) 45%, rgba(4,10,40,0.05) 100%); }
.scene--night { --scrim: linear-gradient(90deg, rgba(5,4,3,0.9) 0%, rgba(5,4,3,0.6) 50%, rgba(5,4,3,0.15) 100%); }
.scene--how { --scrim: radial-gradient(ellipse at center, rgba(8,8,10,0.8) 0%, rgba(8,8,10,0.6) 60%, rgba(8,8,10,0.4) 100%); }
.scene--begin { --scrim: radial-gradient(ellipse at center, rgba(14,6,4,0.7) 0%, rgba(14,6,4,0.45) 70%, rgba(14,6,4,0.55) 100%); }
.scene--grain { --scrim: rgba(18, 12, 4, 0.5); }
.scene--grain .scene__text { max-width: 78rem; }
.scene--threads { justify-content: center; }
.threads__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 2rem); margin-top: 1rem; }
.threads__grid article {
  padding: clamp(1.6rem, 2.6vw, 2.6rem);
  background: rgba(14, 9, 3, 0.42); border: 1px solid rgba(244,239,231,0.28);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.threads__grid .num { color: rgba(244,239,231,0.7); }
.threads__grid h3 { margin: 1rem 0 1rem; }
.threads__grid p { font-size: 0.97rem; }
.scene .triad { border-left: 0; padding: 0; margin: 2.2rem 0 !important; font-size: clamp(1.4rem, 2.2vw, 2rem); line-height: 1.5; color: var(--light); }
.scene .triad .rv { color: var(--light); }
.scene--begin h2 { font-size: clamp(2.4rem, 6vw, 5.6rem); margin: 0 auto 0; max-width: 14em; }
.scene--begin .begin__q { max-width: 28em; margin: 2.2rem auto 0; font-family: var(--serif); font-size: clamp(1.2rem, 1.8vw, 1.5rem); font-style: italic; }
.scene--begin .begin__line { margin-top: 4.5rem !important; font-family: var(--serif); font-size: 1.25rem; font-style: italic; }
.scene--begin .scene__text { max-width: 56rem; }
.triad { font-family: var(--serif); font-style: italic; }

@media (max-width: 860px) {
  .groups, .laura { grid-template-columns: 1fr; }
  .scene--pond, .scene--night { --scrim: linear-gradient(180deg, rgba(5,5,5,0.55), rgba(5,5,5,0.75)); }
  .scene--fountain { --scrim: linear-gradient(180deg, rgba(4,10,40,0.55), rgba(4,10,40,0.82)); }
  .scene--right { justify-content: flex-start; }
  .threads__grid { grid-template-columns: 1fr; }
  .scene--threads { align-items: flex-start; }
  .scene__cue { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .scene__bg { transform: none; }
  .js .rv, .js .scene--hero .scene__bg { opacity: 1; transition: none; }
}
