/* =============================================================================
   Shaiya Devoted — base
   Reset, the page's ambient light, type, layout primitives, utilities, and the
   site-wide motion rules. Tokens come from tokens.css.
     1. Reset          3. Type            5. Utilities
     2. Atmosphere     4. Layout          6. Motion
   ========================================================================== */

/* 1. Reset ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); scroll-padding-top: calc(var(--header-h) + 20px); -webkit-text-size-adjust: 100%; scrollbar-color: var(--gold-lo) var(--ground); scrollbar-width: thin; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
  background: var(--ground); color: var(--ink);
  font: var(--step-0)/1.6 var(--font-body); -webkit-font-smoothing: antialiased;
}
/* Cormorant's default figures are old-style, which reads badly in data. Every `font:` shorthand resets the
   figure style, so lining figures are asked for once, here, with the one !important in the system. */
*, ::before, ::after { font-feature-settings: "lnum" 1 !important; }
main { flex: 1; }
img, svg, canvas, video { max-width: 100%; }
img { height: auto; }
a { color: inherit; }
a:hover { color: var(--ink); }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--teal-hi); outline-offset: 3px; border-radius: 1px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: var(--z-skip); padding: 10px 16px; background: var(--gold); color: var(--on-accent); font: var(--label); letter-spacing: var(--label-track); text-transform: uppercase; text-decoration: none; transition: top var(--dur-2); }
.skip-link:focus { top: 12px; }

/* 2. Atmosphere --------------------------------------------------------------
   Every page stands in the same room: sea-light falling from above onto
   stone, a little grain, darkness at the edges. One fixed layer, no script. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    var(--tex-grain),
    radial-gradient(120% 70% at 50% -10%, rgb(var(--c-teal) / .13), transparent 62%),
    radial-gradient(140% 100% at 50% 40%, transparent 52%, rgb(0 0 0 / .6));
}

/* 3. Type ------------------------------------------------------------------ */
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: .005em; text-wrap: balance; }
.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.15em; }
.num, .mono { font-family: var(--font-body); font-variant-numeric: tabular-nums lining-nums; letter-spacing: 0; }
code, pre, .mono--code { font-family: var(--font-mono); }
.label { font: var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--mute); }
.label--gold { color: var(--gold); }
kbd { font: 500 11px var(--font-body); border: 1px solid var(--line-2); border-bottom-width: 2px; padding: 1px 6px; color: var(--soft); background: rgb(0 0 0 / .3); }

/* Pearl lettering, like the logo's: for the few headings that are struck rather than written. */
.gilt { background: var(--pearl-sheen); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Long-form text (news bodies, rules). */
.prose { color: var(--soft); max-width: 70ch; font-size: var(--step-0); line-height: 1.75; }
.prose h2, .prose h3 { color: var(--ink); margin: 1.6em 0 .5em; }
.prose h2 { font-size: var(--step-2); } .prose h3 { font-size: var(--step-1); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--gold); }
.prose a { color: var(--accent-2); text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose code { font-size: .9em; background: var(--surface-2); padding: 1px 6px; }
.prose blockquote { margin: 1.4em 0; padding: 2px 20px; border-left: 2px solid var(--gold); font: 500 1.2em/1.5 var(--font-display); font-style: italic; color: var(--soft); }

/* 4. Layout ---------------------------------------------------------------- */
.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.wrap--narrow { max-width: 860px; }
.wrap--wide { max-width: 1480px; }
.section { position: relative; padding-block: var(--section); }
.section--tight { padding-block: clamp(36px, 5vw, 64px); }
.section--solid { background: linear-gradient(180deg, transparent, rgb(var(--c-surface) / .85) 14%, rgb(var(--c-surface) / .85) 86%, transparent); }
.stack { display: flex; flex-direction: column; gap: var(--stack-gap, 16px); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, 10px); }
.grid { display: grid; gap: var(--grid-gap, 16px); grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--grid-min, 260px)), 1fr)); }
.split { display: grid; gap: clamp(20px, 3vw, 40px); grid-template-columns: minmax(0, var(--split-a, 1.6fr)) minmax(0, var(--split-b, 1fr)); align-items: start; }

/* 5. Utilities ------------------------------------------------------------- */
.muted { color: var(--mute); } .soft { color: var(--soft); } .ink { color: var(--ink); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); } .gold { color: var(--gold); } .ion { color: var(--accent); }
.center { text-align: center; } .right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.w-full { width: 100%; }
.small { font-size: 13px; }
.crest-title { font: 600 var(--step-2)/1.1 var(--font-display); }
.divider { border: 0; height: 1px; margin: 20px 0; background: var(--line); }
.divider--gold { background: var(--gold-rule); }

/* 6. Motion ------------------------------------------------------------------
   One language: things rise into place (opacity and 16px), gold catches the
   light once on hover, panels lift a few pixels. Nothing loops except flame,
   glass and the status dot. */
@keyframes spin { to { transform: rotate(360deg) } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) } }
@keyframes fade { from { opacity: 0 } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px) } }
@keyframes blink { 50% { opacity: .35 } }
@keyframes ping { to { transform: scale(2.2); opacity: 0 } }
@keyframes flame { 0%, 100% { transform: scale(1, 1) } 40% { transform: scale(.94, 1.07) } 70% { transform: scale(1.04, .96) } }

/* Scroll reveals (reveal.js adds .has-reveal to <html>, then .is-seen per element).
   Without script, or with reduced motion, everything is simply visible. */
.has-reveal :is([data-reveal], .reveal) { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-3) var(--ease) var(--reveal-delay, 0ms), transform var(--dur-3) var(--ease) var(--reveal-delay, 0ms); }
.has-reveal :is([data-reveal], .reveal).is-seen { opacity: 1; transform: none; }

/* Page-to-page transitions (Chromium); other browsers navigate normally. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out var(--dur-2) var(--ease) both; }
::view-transition-new(root) { animation: vt-in var(--dur-3) var(--ease) both; }
@keyframes vt-out { to { opacity: 0 } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px) } }

@media (max-width: 1180px) { .split { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1181px) { .only-mobile { display: none !important; } }
@media (max-width: 640px) { .hide-sm { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  /* Delays go too: an entrance that waits half a second is still an entrance. */
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}
