/* Theme pages (one per area): gold line drawings that draw themselves as they reach the screen, documents with
   seals, topic cards, a quiet booking line and the office visit. js/tema.js adds .is-drawn; html.rv-js gates the
   hidden states, so without script or under reduced motion everything is simply shown. */

/* ---------- line drawing ---------- */
.ln { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ln--thin { stroke-width: 1; opacity: .5; }
.ln--dash { stroke-dasharray: 3 7; }
.ln--bright { stroke: #d8bd84; }
.fillsoft { fill: color-mix(in oklab, var(--accent) 9%, transparent); }
.fillgold { fill: var(--accent); stroke: none; }
.lbl { fill: var(--muted); font: 500 12px/1 var(--font-text); letter-spacing: .2em; }
.lbl--gold { fill: var(--accent); }
.lbl--serif { fill: var(--accent); font: italic 400 20px/1 var(--font-display); letter-spacing: 0; }
html.rv-js .draw .d { stroke-dasharray: 1 2; stroke-dashoffset: 1.01; transition: stroke-dashoffset 1.5s cubic-bezier(.65,0,.35,1) var(--d, 0s); }
html.rv-js .draw.is-drawn .d { stroke-dashoffset: 0; }
html.rv-js .draw .f { opacity: 0; transition: opacity .9s ease var(--d, 0s); }
html.rv-js .draw.is-drawn .f { opacity: 1; }
.spin { transform-box: fill-box; transform-origin: center; animation: t-spin 60s linear infinite; }
@keyframes t-spin { to { rotate: 360deg; } }
/* gold coins flowing along a line */
.flow { fill: none; stroke: #d8bd84; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 0 24; animation: t-flow 2.8s linear infinite; }
@keyframes t-flow { to { stroke-dashoffset: -24; } }
html.rv-js .draw:not(.is-drawn) .flow { opacity: 0; }
.draw .flow { transition: opacity 1s ease var(--fd, 2.2s); }
.glow { transform-box: fill-box; transform-origin: center; }
.is-drawn .glow { animation: t-glow 2.8s ease-in-out infinite; animation-delay: calc(var(--d, 0s) + 1.2s); }
@keyframes t-glow { 0%, 100% { filter: none; } 45% { filter: drop-shadow(0 0 10px rgb(216 189 132 / .45)); } }

/* ---------- 1. the opening: words on the left, the theme's drawing on the right ---------- */
.t-hero { overflow: hidden; }
.t-hero > .wrap { justify-content: center; }
.t-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); align-items: center; }
.t-hero .lead { margin-bottom: var(--s-7); }
.t-kicker { margin: 0 0 var(--s-4); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.t-hero .t-ask { margin: calc(var(--s-5) * -1) 0 var(--s-7); max-width: 34ch; font: italic 400 clamp(22px, 2vw, 28px)/1.35 var(--font-display); color: var(--accent); }
.t-actions { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }
.crumb span { color: var(--muted); margin-inline: 6px; }
.ledger { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 43px, color-mix(in oklab, var(--accent) 8%, transparent) 43px 44px);
  -webkit-mask-image: radial-gradient(60% 70% at 72% 50%, #000 20%, transparent 78%); mask-image: radial-gradient(60% 70% at 72% 50%, #000 20%, transparent 78%); }
.t-art { margin: 0; width: 100%; max-width: 540px; justify-self: end;
  transform: perspective(1300px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .9s cubic-bezier(.22,1,.36,1); }
.t-art.is-tilting { transition: transform .15s linear; }
.t-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.t-badge { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 var(--s-7); padding: 10px 16px 10px 12px; border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent);
  border-radius: 999px; font-size: var(--t-small); color: color-mix(in oklab, var(--ink) 88%, transparent); }
.t-badge svg { width: 22px; height: 22px; flex: none; }

/* ---------- 2. two documents side by side, each with its seal ---------- */
.docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); }
.doc { --fold: 46px; position: relative; display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-7) var(--s-6) var(--s-6); min-height: 440px;
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent); border-radius: var(--r-md);
  background: repeating-linear-gradient(to bottom, transparent 0 31px, rgb(181 155 103 / .05) 31px 32px), linear-gradient(160deg, #201c16, #12110e 65%);
  clip-path: polygon(0 0, calc(100% - var(--fold)) 0, 100% var(--fold), 100% 100%, 0 100%); overflow: clip;
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .7s cubic-bezier(.22,1,.36,1), border-color .4s ease; }
.doc.is-tilting { transition: transform .12s linear, border-color .4s ease; }
.doc:hover { border-color: color-mix(in oklab, var(--accent) 70%, transparent); }
.doc::after { content: ""; position: absolute; top: 0; right: 0; width: var(--fold); height: var(--fold); border-bottom-left-radius: 6px;
  background: linear-gradient(225deg, transparent calc(50% - 1px), rgb(181 155 103 / .55) 50%, #2c271f calc(50% + 1px)); box-shadow: -4px 4px 10px rgb(0 0 0 / .45); }
.doc__icon { width: 58px; height: 58px; overflow: visible; }
.doc__tag { margin: 0; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.doc h3 { margin: 0; font: var(--display-weight) clamp(30px, 2.8vw, 42px)/1.08 var(--font-display); letter-spacing: var(--display-tracking); }
.doc > p:not(.doc__tag) { margin: 0; max-width: 46ch; color: color-mix(in oklab, var(--ink) 84%, transparent); font-size: var(--t-body); line-height: 1.6; }
.doc--sealed > p:not(.doc__tag) { max-width: min(46ch, calc(100% - 120px)); }
.doc__req { list-style: none; margin: auto 0 0; padding: var(--s-4) 0 0; display: grid; gap: 10px; border-top: 1px solid color-mix(in oklab, var(--accent) 20%, transparent); max-width: calc(100% - 150px); }
.doc__req li { position: relative; padding-left: 26px; font-size: var(--t-small); line-height: 1.45; }
.doc__req li::before { content: ""; position: absolute; left: 0; top: .2em; width: 14px; height: 14px; border: 1px solid var(--accent); border-radius: 3px; }
.doc__req li::after { content: ""; position: absolute; left: 4px; top: calc(.2em + 2px); width: 5px; height: 8px; border: solid var(--accent); border-width: 0 1.5px 1.5px 0; rotate: 45deg;
  transition: opacity .3s ease calc(1.6s + var(--i, 0) * .25s), scale .3s cubic-bezier(.3,1.6,.5,1) calc(1.6s + var(--i, 0) * .25s); }
.doc__req li:nth-child(2) { --i: 1; } .doc__req li:nth-child(3) { --i: 2; } .doc__req li:nth-child(4) { --i: 3; }
html.rv-js .doc:not(.is-drawn) .doc__req li::after { opacity: 0; scale: 0; }
/* the seal comes down on the page */
.stamp { position: absolute; right: var(--s-5); bottom: var(--s-5); width: 128px; height: 128px; color: #c9ad74; rotate: -14deg; opacity: .85; pointer-events: none; mix-blend-mode: screen; }
.stamp__txt { fill: currentColor; font: 500 11px/1 var(--font-text); letter-spacing: .12em; }
html.rv-js .doc:not(.is-drawn) .stamp { opacity: 0; scale: 2.4; rotate: -34deg; }
.doc.is-drawn .stamp { transition: opacity .2s ease .9s, scale .38s cubic-bezier(.55,0,.85,.35) .9s, rotate .38s cubic-bezier(.55,0,.85,.35) .9s; }
.doc.is-drawn:has(.stamp, .gavel) { animation: t-thud .4s ease-out 1.28s; }
@keyframes t-thud { 0% { translate: 0 0; } 30% { translate: 0 3px; } 100% { translate: 0 0; } }
/* the judge's gavel strikes once */
.gavel { position: absolute; right: var(--s-4); bottom: var(--s-4); width: 150px; height: 140px; color: #c9ad74; pointer-events: none; overflow: visible; }
.gavel__arm { transform-box: view-box; transform-origin: 136px 87.5px; }
html.rv-js .doc:not(.is-drawn) .gavel__arm { rotate: 30deg; }
.doc.is-drawn .gavel__arm { transition: rotate .34s cubic-bezier(.6,0,.9,.45) .95s; }
.gavel__ripple { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; opacity: 0; }
.doc.is-drawn .gavel__ripple { animation: t-ripple .7s ease-out 1.28s; }
@keyframes t-ripple { 0% { opacity: 0; } 20% { opacity: .9; } 100% { opacity: 0; } }

/* ---------- topic cards: an icon that draws itself, a title, a paragraph ---------- */
.topics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: var(--s-5); }
.topic { position: relative; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-6) var(--s-5); border-radius: var(--r-md); isolation: isolate; overflow: hidden;
  background: color-mix(in oklab, var(--p-bg) 55%, transparent); border: 1px solid color-mix(in oklab, var(--accent) 22%, transparent);
  transition: border-color .4s ease, translate .4s cubic-bezier(.22,1,.36,1); }
.topic::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), color-mix(in oklab, var(--accent) 20%, transparent), transparent 70%); }
.topic:hover { border-color: color-mix(in oklab, var(--accent) 65%, transparent); translate: 0 -3px; }
.topic:hover::before { opacity: 1; }
.topic__icon { width: 52px; height: 52px; margin-bottom: var(--s-2); overflow: visible; }
.topic h3 { margin: 0; font: var(--display-weight) var(--t-card)/1.25 var(--font-display); letter-spacing: var(--display-tracking); }
.topic p { margin: 0; color: color-mix(in oklab, var(--ink) 78%, transparent); line-height: 1.6; font-size: var(--t-body); }
.topic--wide { grid-column: span 2; }

/* ---------- a split: words on one side, a scene on the other ---------- */
.t-split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--s-8); align-items: center; }
.t-split--flip > :first-child { order: 2; }
.t-split__text > p { margin: var(--s-5) 0 0; max-width: 48ch; font-size: var(--t-lead); line-height: 1.55; color: color-mix(in oklab, var(--ink) 86%, transparent); }
.t-split__text > .t-kicker { margin: 0 0 var(--s-4); font-size: 12px; line-height: 1.4; color: var(--accent); }
.t-punch { font: italic 400 clamp(26px, 2.6vw, 38px)/1.25 var(--font-display) !important; color: var(--accent) !important; }
.t-scene { margin: 0; }
.t-scene svg { display: block; width: 100%; height: auto; overflow: visible; }
.t-chips { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.t-chips li { padding: 8px 14px; border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent); border-radius: 999px; font-size: var(--t-small); color: color-mix(in oklab, var(--ink) 86%, transparent); }
.t-chips--check li { position: relative; padding-left: 34px; }
.t-chips--check li::before { content: ""; position: absolute; left: 14px; top: 50%; width: 5px; height: 9px; margin-top: -6px; border: solid var(--accent); border-width: 0 1.5px 1.5px 0; rotate: 45deg; }
.t-more { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--s-6); color: var(--accent); font-weight: 500; font-size: var(--t-small); padding: 10px 0; min-height: 44px; border-bottom: 1px solid color-mix(in oklab, var(--accent) 40%, transparent); }

/* ---------- a timeline that draws from left to right ---------- */
.t-line { position: relative; list-style: none; margin: 0; padding: var(--s-7) 0 0; display: grid; grid-template-columns: repeat(var(--steps, 3), minmax(0, 1fr)); gap: var(--s-6); }
.t-line::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 1px; background: var(--accent); transform-origin: left; transition: transform 1.6s cubic-bezier(.65,0,.35,1); }
html.rv-js .t-line:not(.is-drawn)::before { transform: scaleX(0); }
.t-line > li { position: relative; transition: opacity .8s ease calc(.4s + var(--i, 0) * .45s), translate .8s cubic-bezier(.22,1,.36,1) calc(.4s + var(--i, 0) * .45s); }
.t-line > li::before { content: ""; position: absolute; left: 0; top: calc(var(--s-7) * -1 + 3px); width: 15px; height: 15px; border-radius: 50%; background: var(--p-bg); border: 1px solid var(--accent); box-shadow: 0 0 0 4px var(--p-bg); }
.t-line > li.is-key::before { background: var(--accent); }
html.rv-js .t-line:not(.is-drawn) > li { opacity: 0; translate: 0 12px; }
.t-line > li:nth-child(2) { --i: 1; } .t-line > li:nth-child(3) { --i: 2; } .t-line > li:nth-child(4) { --i: 3; }
.t-line b { display: block; margin-bottom: var(--s-2); font: var(--display-weight) clamp(28px, 2.6vw, 40px)/1.1 var(--font-display); color: var(--accent); }
.t-line h3 { margin: 0 0 var(--s-2); font: var(--display-weight) var(--t-card)/1.25 var(--font-display); }
.t-line p { margin: 0; color: color-mix(in oklab, var(--ink) 80%, transparent); line-height: 1.6; max-width: 40ch; }

/* ---------- the visit ---------- */
main > section.section.t-short { min-height: 0 !important; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-7); }
.perks li { border-top: 1px solid color-mix(in oklab, var(--accent) 30%, transparent); padding-top: var(--s-5); }
.perk__icon { width: 44px; height: 44px; margin-bottom: var(--s-4); }
.perks h3 { margin: 0 0 var(--s-3); font: var(--display-weight) var(--t-card)/1.25 var(--font-display); letter-spacing: var(--display-tracking); }
.perks p { margin: 0; color: var(--muted); line-height: 1.6; }

/* ---------- the close: a quiet line, not a banner ---------- */
main > section.section.t-cta { padding-block: var(--s-8) calc(var(--s-8) + var(--bar, 0px)); }
.t-cta__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); flex-wrap: wrap;
  padding-top: var(--s-6); border-top: 1px solid color-mix(in oklab, var(--accent) 25%, transparent); }
.t-cta h2 { margin: 0; font: var(--display-weight) clamp(24px, 2.2vw, 30px)/1.2 var(--font-display); letter-spacing: var(--display-tracking); }
main > section.t-cta h2::after { display: none; }
.t-cta__row p { margin: 8px 0 0; color: var(--muted); font-size: var(--t-body); }
.t-cta__link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 20px; border: 1px solid color-mix(in oklab, var(--accent) 55%, transparent);
  color: var(--accent); font-size: var(--t-small); font-weight: 500; letter-spacing: .02em; transition: background-color .3s ease, color .3s ease, border-color .3s ease; }
.t-cta__link:hover { background: var(--accent); color: var(--p-bg); border-color: var(--accent); }
.t-cta__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.t-cta .seealso { margin: var(--s-6) 0 0; font-size: var(--t-small); color: var(--muted); }
.seealso a { color: var(--accent); border-bottom: 1px solid color-mix(in oklab, var(--accent) 40%, transparent); }

@media (max-width: 1279px) { .topics { --cols: 2; } .topic--wide { grid-column: auto; } }
@media (max-width: 1023px) {
  .t-hero__grid, .t-split { grid-template-columns: 1fr; }
  .t-split--flip > :first-child { order: 0; }
  .t-art { justify-self: center; max-width: 460px; }
  .t-line { grid-template-columns: 1fr; padding: 0 0 0 var(--s-7); gap: var(--s-6); }
  .t-line::before { left: 7px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; transform-origin: top; }
  html.rv-js .t-line:not(.is-drawn)::before { transform: scaleY(0); }
  .t-line > li::before { left: calc(var(--s-7) * -1); top: 4px; }
}
@media (max-width: 767px) {
  .docs, .perks, .topics { grid-template-columns: 1fr; }
  .doc { min-height: 0; }
  .doc:has(.stamp, .gavel) { padding-bottom: 170px; }
  .doc__req, .doc--sealed > p:not(.doc__tag) { max-width: none; }
}

/* a seal waiting above its page, or a drawing's overhang, never widens the page */
main { overflow-x: clip; }

/* ---------- a short summary in plain prose ---------- */
.t-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-6) var(--s-8); max-width: 1100px; }
.t-summary p { margin: 0; font-size: var(--t-lead); line-height: 1.6; color: color-mix(in oklab, var(--ink) 88%, transparent); }
.t-summary p b { font-weight: 400; color: var(--accent); }
@media (max-width: 1023px) { .t-summary { grid-template-columns: 1fr; } }

/* ---------- questions and answers: the question as a heading, the answer in its first sentence ---------- */
.t-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-8); }
.t-faq__item { padding: var(--s-5) 0; border-top: 1px solid color-mix(in oklab, var(--accent) 22%, transparent); }
.t-faq__item h3 { margin: 0 0 var(--s-3); font: var(--display-weight) clamp(20px, 1.6vw, 24px)/1.3 var(--font-display); letter-spacing: var(--display-tracking); }
.t-faq__item p { margin: 0; color: color-mix(in oklab, var(--ink) 82%, transparent); line-height: 1.65; font-size: var(--t-body); }
.t-faq__item p a { color: var(--accent); border-bottom: 1px solid color-mix(in oklab, var(--accent) 40%, transparent); }
@media (max-width: 1023px) { .t-faq { grid-template-columns: 1fr; } }
