/* Mahalaya: dark only. Tokens from the design handoff. */
:root {
	--ink: #0a0603;
	--ink-2: #0d0805;
	--gold: #d6a54a;
	--gold-dim: #a87c36;
	--warm: #e2cdae;
	--body: #c4b198;
	--mute: #9d8c76;
	--serif: 'Cormorant Garamond', Georgia, serif;
	--sans: Urbanist, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
	--ease: cubic-bezier(.22, .61, .36, 1);
	--rail-x: clamp(7px, 1.6vw, 13px);
	--chain-pad: clamp(30px, 6vw, 52px);
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--ink); }

body {
	margin: 0;
	background: var(--ink);
	color: var(--body);
	font-family: var(--sans);
	font-weight: 300;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { color: var(--gold); }
a:hover { color: var(--warm); }

:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

.mh-skip {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 100;
	padding: 10px 16px;
	background: var(--ink);
	color: var(--gold);
	font-size: .75rem;
	letter-spacing: .2em;
	text-transform: uppercase;
	text-decoration: none;
	border: 1px solid rgba(214, 165, 74, .4);
}
.mh-skip:focus { top: 16px; }

@keyframes mh-breathe {
	0%, 100% { opacity: .86; transform: scale(1); }
	50% { opacity: 1; transform: scale(1.05); }
}
@keyframes mh-enter {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: none; }
}

.mh-enter { animation: mh-enter 2.4s var(--ease) var(--d, 0s) both; }

/* ---------- Hero ---------- */

.mh-hero {
	position: relative;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 7vh 24px 6vh;
	text-align: center;
	overflow: hidden;
}

.mh-hero__glow {
	position: absolute;
	inset: -10%;
	z-index: 0;
	pointer-events: none;
	background:
		radial-gradient(ellipse 52% 46% at 50% 40%, rgba(158, 94, 22, .40) 0%, rgba(92, 51, 10, .22) 36%, rgba(30, 16, 4, .08) 66%, rgba(0, 0, 0, 0) 85%),
		radial-gradient(ellipse 120% 95% at 50% 46%, rgba(40, 22, 6, .55) 0%, rgba(0, 0, 0, 0) 72%);
	animation: mh-breathe var(--mh-breath, 16s) ease-in-out infinite;
}

.mh-hero__vignette {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: radial-gradient(ellipse 92% 78% at 50% 45%, rgba(0, 0, 0, 0) 42%, rgba(10, 6, 3, .75) 100%);
}

.mh-hero__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 700px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.mh-hero__mark {
	position: relative;
	width: min(82vw, 600px);
	margin: 0 0 clamp(24px, 4.5vw, 40px);
	font-size: inherit;
	line-height: 0;
}
.mh-hero__mark::before {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 150%;
	height: 340%;
	transform: translate(-50%, -50%);
	background: radial-gradient(ellipse at center, rgba(198, 126, 36, .30) 0%, rgba(140, 80, 18, .13) 38%, rgba(0, 0, 0, 0) 70%);
	pointer-events: none;
}
.mh-logo { position: relative; display: block; width: 100%; height: auto; }

.mh-hero__tagline {
	font-family: var(--serif);
	font-weight: 300;
	font-size: clamp(.82rem, 2.1vw, .98rem);
	letter-spacing: .34em;
	text-transform: uppercase;
	color: var(--gold-dim);
	margin: calc(clamp(24px, 4.5vw, 40px) * -1 + 2px) 0 clamp(26px, 4.2vw, 40px);
}

.mh-rule {
	width: 100px;
	height: 1px;
	margin: 0 0 clamp(24px, 3.5vw, 36px);
	background: linear-gradient(90deg, rgba(214, 165, 74, 0) 0%, rgba(214, 165, 74, .55) 50%, rgba(214, 165, 74, 0) 100%);
}

.mh-hero__lede {
	font-family: var(--serif);
	font-style: italic;
	font-weight: 300;
	font-size: clamp(1.45rem, 4.2vw, 2.05rem);
	line-height: 1.3;
	color: var(--gold);
	margin: 0 0 clamp(20px, 3.2vw, 26px);
}

.mh-hero__body { max-width: 53ch; }
.mh-hero__body p {
	font-size: clamp(1rem, 2.4vw, 1.075rem);
	line-height: 1.85;
	color: var(--body);
	margin: 0 0 1.2em;
}

.mh-hero__rings {
	position: relative;
	z-index: 2;
	display: block;
	margin-top: calc(clamp(38px, 6vh, 68px) / 2);
	overflow: visible;
}
.mh-hero__rings circle { fill: none; stroke: rgba(214, 165, 74, .42); stroke-width: 1; }

.mh-hero__cue {
	position: relative;
	z-index: 2;
	margin-top: calc(clamp(38px, 6vh, 68px) / 2);
	font-size: .66rem;
	letter-spacing: .24em;
	text-transform: uppercase;
	color: rgba(190, 148, 80, .55);
	text-decoration: none;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	transition: color .4s ease;
}
.mh-hero__cue:hover { color: var(--gold); }
.mh-hero__cue span {
	display: block;
	width: 1px;
	height: 34px;
	background: linear-gradient(180deg, rgba(214, 165, 74, .5), rgba(214, 165, 74, 0));
}

/* ---------- Stream ---------- */

.mh-stream {
	position: relative;
	background: var(--ink-2);
	padding: clamp(72px, 11vh, 128px) 24px clamp(60px, 9vh, 100px);
	border-top: 1px solid rgba(168, 124, 54, .13);
}
.mh-stream::before {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(ellipse 70% 40% at 50% 0%, rgba(120, 70, 16, .16) 0%, rgba(0, 0, 0, 0) 70%);
}

.mh-stream__wrap { position: relative; max-width: 760px; margin: 0 auto; }

.mh-eyebrow {
	font-size: .68rem;
	letter-spacing: .28em;
	text-transform: uppercase;
	color: var(--gold-dim);
	margin: 0 0 14px;
	text-align: center;
}

.mh-stream__heading {
	font-family: var(--serif);
	font-weight: 400;
	font-size: clamp(1.85rem, 5vw, 2.6rem);
	color: var(--warm);
	margin: 0 0 18px;
	text-align: center;
	line-height: 1.2;
}

.mh-stream__intro {
	max-width: 56ch;
	margin: 0 auto clamp(52px, 7vh, 76px);
	text-align: center;
}
.mh-stream__intro p {
	margin: 0;
	font-size: clamp(.98rem, 2.3vw, 1.04rem);
	line-height: 1.8;
	color: var(--body);
}
.mh-stream__intro p + p { margin-top: 1em; }

/* Chain + rail */

.mh-chain {
	list-style: none;
	/* Shrink to rail gutter + 50ch text column and center it under the heading. */
	max-width: calc(50ch + var(--chain-pad));
	margin: 0 auto;
	padding: 0 0 0 var(--chain-pad);
	position: relative;
}
.mh-chain::before {
	content: '';
	position: absolute;
	left: var(--rail-x);
	top: 6px;
	bottom: 6px;
	width: 1px;
	background: linear-gradient(180deg, rgba(214, 165, 74, 0) 0%, rgba(214, 165, 74, .42) 7%, rgba(214, 165, 74, .42) 88%, rgba(214, 165, 74, .9) 97%, rgba(214, 165, 74, 0) 100%);
}

.mh-stage { position: relative; padding-bottom: clamp(32px, 5vh, 46px); }

.mh-stage::before {
	content: '';
	position: absolute;
	left: calc(var(--rail-x) - var(--chain-pad) - 3px);
	top: 7px;
	width: 7px;
	height: 7px;
	background: var(--gold-dim);
	transform: rotate(45deg);
	box-shadow: 0 0 0 4px var(--ink-2), 0 0 14px rgba(214, 165, 74, .35);
}
.mh-stage--source::before {
	background: transparent;
	border: 1px solid var(--gold-dim);
	box-shadow: 0 0 0 4px var(--ink-2);
}
.mh-stage--now::before {
	background: var(--gold);
	box-shadow: 0 0 0 4px var(--ink-2), 0 0 20px rgba(214, 165, 74, .8);
}

/* Reveal: only hidden when JS is present and motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
	.js .mh-stage {
		opacity: 0;
		transform: translateY(18px);
		transition: opacity .9s ease, transform .9s var(--ease);
	}
	.js .mh-stage.is-in { opacity: 1; transform: none; }
}

.mh-stage__era {
	display: block;
	font-size: .64rem;
	letter-spacing: .24em;
	text-transform: uppercase;
	color: var(--gold-dim);
	margin-bottom: 7px;
}

.mh-stage__title {
	font-family: var(--serif);
	font-weight: 500;
	font-size: clamp(1.2rem, 3.2vw, 1.5rem);
	color: var(--gold);
	margin: 0 0 8px;
	line-height: 1.25;
}

.mh-stage__summary {
	margin: 0;
	max-width: 50ch;
	font-size: clamp(.94rem, 2.2vw, 1rem);
	line-height: 1.75;
	color: var(--mute);
}

.mh-stage__figure {
	margin: 20px 0 0;
	max-width: 50ch;
	aspect-ratio: 3 / 2;
	border: 1px solid rgba(168, 124, 54, .18);
	background: var(--ink);
	overflow: hidden;
}
.mh-stage__figure img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mh-stage__more {
	margin: 20px 0 0;
	max-width: 50ch;
	border-top: 1px solid rgba(168, 124, 54, .14);
	padding-top: 2px;
}

.mh-stage__more summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 15px 0 13px;
	min-height: 16px;
	font-size: .64rem;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--gold-dim);
	transition: color .3s ease;
}
.mh-stage__more summary::-webkit-details-marker { display: none; }
.mh-stage__more summary::marker { content: ''; }
.mh-stage__more summary:hover { color: var(--gold); }

.mh-plus {
	display: inline-block;
	flex: none;
	width: 9px;
	height: 9px;
	position: relative;
	transition: transform .35s var(--ease);
}
.mh-plus::before,
.mh-plus::after {
	content: '';
	position: absolute;
	background: currentColor;
}
.mh-plus::before { left: 0; top: 4px; width: 9px; height: 1px; }
.mh-plus::after { left: 4px; top: 0; width: 1px; height: 9px; }
.mh-stage__more[open] .mh-plus { transform: rotate(45deg); }

.mh-stage__full { padding-bottom: 2px; }
.mh-stage__full p {
	margin: 16px 0 0;
	font-size: .92rem;
	line-height: 1.8;
	color: var(--mute);
	max-width: 50ch;
}
.mh-stage__full h4 {
	margin: 22px 0 0;
	font-family: var(--serif);
	font-weight: 500;
	font-size: .92rem;
	letter-spacing: .26em;
	color: var(--warm);
}
.mh-stage__full h4 + p { margin-top: 7px; }
.mh-stage__full a { color: rgba(190, 148, 80, .85); }

/* Coda, attribution, pore breathing */

.mh-coda {
	max-width: 56ch;
	margin: clamp(56px, 8vh, 84px) auto 0;
	padding-top: clamp(32px, 5vh, 44px);
	border-top: 1px solid rgba(168, 124, 54, .14);
	text-align: center;
}
.mh-coda p {
	margin: 0;
	font-size: clamp(.94rem, 2.2vw, 1rem);
	line-height: 1.8;
	color: var(--mute);
}
.mh-coda p + p { margin-top: 1em; }
.mh-coda strong { color: var(--warm); font-weight: 400; }

.mh-attribution,
.mh-disclaimer {
	max-width: 60ch;
	margin: clamp(30px, 4vh, 42px) auto 0;
	text-align: center;
	font-size: .8rem;
	line-height: 1.7;
	color: rgba(141, 124, 103, .75);
}
.mh-attribution p { margin: 0; }
.mh-disclaimer { margin-top: 14px; color: rgba(141, 124, 103, .6); }

.mh-attribution a,
.mh-quiet-link {
	color: rgba(190, 148, 80, .85);
	text-decoration: none;
	border-bottom: 1px solid rgba(190, 148, 80, .28);
	transition: color .3s ease, border-color .3s ease;
}
.mh-attribution a:hover,
.mh-quiet-link:hover { color: var(--gold); border-color: rgba(214, 165, 74, .6); }

.mh-door {
	max-width: 52ch;
	margin: clamp(56px, 8vh, 84px) auto 0;
	padding-top: clamp(32px, 5vh, 44px);
	border-top: 1px solid rgba(168, 124, 54, .14);
	text-align: center;
}
.mh-door__heading {
	font-family: var(--serif);
	font-weight: 400;
	font-size: clamp(1.4rem, 3.6vw, 1.75rem);
	color: var(--warm);
	margin: 0 0 14px;
	line-height: 1.25;
}
.mh-door__body {
	margin: 0 0 20px;
	font-size: clamp(.94rem, 2.2vw, 1rem);
	line-height: 1.8;
	color: var(--mute);
}
.mh-door .mh-quiet-link {
	font-size: .7rem;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: rgba(190, 148, 80, .7);
	border-bottom-color: rgba(190, 148, 80, .3);
}

/* ---------- Footer ---------- */

.mh-footer {
	background: var(--ink);
	padding: clamp(44px, 7vh, 72px) 24px clamp(40px, 6vh, 60px);
	font-size: .7rem;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: rgba(190, 148, 80, .55);
	text-align: center;
	line-height: 2;
	border-top: 1px solid rgba(168, 124, 54, .1);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}
.mh-footer .mh-quiet-link { color: inherit; border-bottom-color: rgba(190, 148, 80, .3); }
.mh-footer .mh-quiet-link:hover { color: var(--gold); }

/* ---------- Fallback pages ---------- */

.mh-plain {
	min-height: 70svh;
	padding: clamp(48px, 10vh, 96px) 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.mh-plain__logo { display: block; width: min(60vw, 320px); margin-bottom: clamp(40px, 7vh, 64px); line-height: 0; }
.mh-plain__article { width: 100%; max-width: 64ch; text-align: left; }
.mh-plain__title {
	font-family: var(--serif);
	font-weight: 400;
	font-size: clamp(1.85rem, 5vw, 2.6rem);
	color: var(--warm);
	line-height: 1.2;
	margin: 0 0 24px;
	text-align: center;
}
.mh-plain__article p,
.mh-plain__article li { line-height: 1.8; }
.mh-plain__article h2,
.mh-plain__article h3 { font-family: var(--serif); font-weight: 500; color: var(--gold); }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.mh-enter,
	.mh-hero__glow { animation: none; }
	.mh-plus,
	.mh-hero__cue,
	.mh-quiet-link { transition: none; }
}
