/* Colours follow EldencrestTheme.uss, so the site and the game's UI read as one thing. */
:root {
	--bg: #0a0806;
	--panel: #12100e;
	--panel-raised: #1a1713;
	--line: #2a241a;
	--line-strong: #3e3424;
	--gold: #a88c52;
	--gold-soft: #c4ac80;
	--ember: #d3aa64;
	--heading: #e6d6b4;
	--body: #c6b9a2;
	--muted: #9a8f7e;
	--bright: #f0e6d2;
	--danger: #e0796c;
	--display: 'IM Fell English', 'Iowan Old Style', Georgia, serif;
	--label: 'Cinzel', 'Iowan Old Style', Georgia, serif;
	--text: 'Spectral', 'Iowan Old Style', Georgia, serif;
	--gutter: clamp(16px, 5vw, 48px);
	color-scheme: dark;
}

@font-face { font-family: 'IM Fell English'; src: url('../fonts/im-fell-english-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'IM Fell English'; font-style: italic; src: url('../fonts/im-fell-english-latin-400-italic.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Cinzel'; font-weight: 600; src: url('../fonts/cinzel-latin-600-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Spectral'; src: url('../fonts/spectral-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Spectral'; font-style: italic; src: url('../fonts/spectral-latin-400-italic.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Spectral'; font-weight: 600; src: url('../fonts/spectral-latin-600-normal.woff2') format('woff2'); font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--body);
	font: 400 clamp(1.0625rem, 1rem + .25vw, 1.1875rem)/1.65 var(--text);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ember); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--bright); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { color: var(--heading); font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 2rem + 4vw, 5rem); }
h2 { font-size: clamp(2rem, 1.6rem + 2vw, 3.25rem); }
h3 { font-size: clamp(1.375rem, 1.25rem + .5vw, 1.625rem); }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { padding: 0; margin: 0; list-style: none; }

.skip-link, .screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; z-index: 100; top: 8px; left: 8px; width: auto; height: auto; clip-path: none;
	background: var(--panel-raised); color: var(--bright); padding: 8px 16px;
}
.admin-note { margin: 0; padding: 6px var(--gutter); background: #3a2c14; color: var(--bright); font-size: .875rem; text-align: center; }
.admin-note a { color: inherit; }

/* Buttons */
.btn {
	display: inline-block; padding: .8em 1.5em; border: 1px solid var(--gold); border-radius: 2px; cursor: pointer;
	background: linear-gradient(#8c6e3c, #6f5730); color: #fff6e3;
	font: 600 .9rem/1.2 var(--label); letter-spacing: .1em; text-decoration: none; text-transform: uppercase;
	box-shadow: 0 0 0 0 rgba(211, 170, 100, 0); transition: box-shadow .25s, background .25s;
}
.btn:hover { color: #fff; background: linear-gradient(#a88c52, #8c6e3c); box-shadow: 0 0 28px rgba(211, 170, 100, .3); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn--ghost { background: rgba(10, 8, 6, .45); color: var(--heading); border-color: var(--line-strong); }
.btn--ghost:hover { background: rgba(26, 23, 19, .8); border-color: var(--gold); }
.btn--small { padding: .6em 1.1em; font-size: .75rem; }

/* Scene behind the hero: the corridor, a pointer torch and embers */
.fx { position: absolute; inset: 0; overflow: hidden; --mx: 50%; --my: 45%; }
.fx__img { position: absolute; inset: -2%; background: center 45% / cover no-repeat; filter: saturate(1.1) brightness(.92); animation: breathe 9s ease-in-out infinite alternate; }
.fx__torch { position: absolute; inset: 0; mix-blend-mode: soft-light; background: radial-gradient(38vmax 34vmax at var(--mx) var(--my), rgba(255, 190, 110, .85), rgba(255, 150, 70, .25) 45%, transparent 72%); animation: flicker 5s linear infinite; }
.fx__embers { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx__fade { position: absolute; inset: 0; background: linear-gradient(rgba(10, 8, 6, .35), transparent 22%, transparent 55%, var(--bg) 98%); }
@keyframes breathe { to { transform: scale(1.04); } }
@keyframes flicker {
	0%, 100% { opacity: .9; } 12% { opacity: .78; } 21% { opacity: .95; } 37% { opacity: .82; }
	52% { opacity: 1; } 68% { opacity: .8; } 83% { opacity: .96; }
}

/* Teaser: one screen, with nothing below it to scroll to */
.ec-teaser { display: flex; flex-direction: column; min-height: calc(100svh - var(--wp-admin--admin-bar--height, 0px)); }
.ec-teaser main { flex: 1; display: flex; flex-direction: column; }
.teaser { position: relative; flex: 1; display: flex; flex-direction: column; isolation: isolate; }
.teaser__inner, .hero__inner { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.teaser__inner { padding: clamp(16px, 3vh, 40px) var(--gutter); }
.hero__inner { padding: 48px var(--gutter) 64px; }
.teaser__logo, .hero__logo { margin: 0 0 clamp(12px, 2.5vh, 28px); filter: drop-shadow(0 4px 28px rgba(0, 0, 0, .75)); }
.teaser__logo img, .hero__logo img { width: min(640px, 86vw); height: auto; }
.teaser__tagline, .hero__tagline { color: var(--bright); font: 400 clamp(1.75rem, 1.2rem + 2.8vw, 3.25rem)/1.15 var(--display); margin-bottom: .5em; text-shadow: 0 2px 22px #000, 0 0 2px #000; text-wrap: balance; }
.teaser__pitch, .hero__pitch { max-width: 36em; color: var(--bright); margin-bottom: clamp(16px, 3vh, 28px); text-shadow: 0 1px 14px #000, 0 0 3px #000; }
.teaser__pillars { position: relative; display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter) 20px; font-size: .9rem; line-height: 1.45; }
.teaser__pillars li { border-top: 1px solid var(--line-strong); padding-top: 10px; }
.teaser__pillars strong { display: block; color: var(--gold-soft); font: 600 .8125rem/1.3 var(--label); letter-spacing: .08em; text-transform: uppercase; margin-bottom: .35em; }
.ec-teaser .site-footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 8px 24px; padding-top: 10px; padding-bottom: 10px; }
.ec-teaser .site-footer__line { display: none; }
.ec-teaser .site-footer__legal { order: -1; }
@media (max-width: 899px), (max-height: 719px) {
	.teaser__pillars { display: none; }
}

/* Signup */
.signup { width: min(34rem, 100%); }
.signup__row { display: flex; gap: 8px; }
.signup input[type='email'] {
	flex: 1; min-width: 0; padding: .8em 1em; border: 1px solid var(--line-strong); border-radius: 2px;
	background: rgba(14, 12, 10, .85); color: var(--bright); font: inherit; font-size: 1rem;
}
.signup input[type='email']::placeholder { color: var(--muted); }
.signup input[type='email']:focus { border-color: var(--gold); }
.signup .btn { white-space: nowrap; }
.signup__consent { display: flex; gap: 10px; align-items: flex-start; justify-content: center; margin-top: 12px; color: var(--body); font-size: .9rem; line-height: 1.4; text-align: left; text-shadow: 0 1px 10px #000; }
.signup__consent input { margin: .2em 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--gold); }
.signup__status { min-height: 1.4em; margin: 8px 0 0; color: var(--gold-soft); font-size: .95rem; text-shadow: 0 1px 10px #000; }
.signup__status.is-error { color: var(--danger); }
.signup__closed { color: var(--gold-soft); font: 600 .875rem var(--label); letter-spacing: .1em; text-transform: uppercase; }
.signup__trap { position: absolute; left: -9999px; }
.notice { padding: .6em 1.2em; border: 1px solid var(--gold); background: rgba(10, 8, 6, .75); color: var(--bright); }

/* Header */
.site-header { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 20; background: rgba(10, 8, 6, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 24px; max-width: 80rem; margin: 0 auto; padding: 10px var(--gutter); }
.site-header__logo img { width: 160px; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: clamp(14px, 2vw, 26px); }
.site-nav a { color: var(--body); font: 600 .8125rem/1 var(--label); letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ember); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-strong); border-radius: 2px; color: var(--heading); padding: 8px 14px; font: 600 .75rem var(--label); letter-spacing: .08em; text-transform: uppercase; }

/* Hero and page heads */
.hero { position: relative; isolation: isolate; }
.hero__inner { min-height: calc(100svh - 58px); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.page-head { position: relative; isolation: isolate; min-height: clamp(280px, 42vh, 420px); display: flex; align-items: flex-end; }
.page-head .fx__img { filter: saturate(1.1) brightness(.6); }
.page-head__inner { position: relative; width: 100%; max-width: 72rem; margin: 0 auto; padding: 64px var(--gutter) 24px; }
.page-head h1 { margin-bottom: .2em; text-shadow: 0 2px 20px #000; }
.lead { max-width: 38em; color: var(--bright); font-size: 1.2em; text-shadow: 0 1px 14px #000; margin: 0; }

/* Sections */
.section { width: 100%; max-width: 72rem; margin: 0 auto; padding: clamp(48px, 8vw, 104px) var(--gutter); }
.section--wide { max-width: 88rem; }
.eyebrow { color: var(--gold); font: 600 .8125rem/1.3 var(--label); letter-spacing: .14em; text-transform: uppercase; margin-bottom: .75em; }
.caption { color: var(--muted); font-size: .9rem; font-style: italic; margin-top: 1.5em; }
.link { font: 600 .875rem var(--label); letter-spacing: .1em; text-transform: uppercase; }
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

.statement { text-align: center; }
.statement__text { max-width: 26em; margin: 0 auto .9em; color: var(--heading); font: 400 clamp(1.75rem, 1.3rem + 2.2vw, 3rem)/1.25 var(--display); }
.statement__text em { color: var(--ember); }

.run { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 2em; }
.run__step { position: relative; border-top: 1px solid var(--gold); padding-top: 20px; }
.run__step::before { content: ''; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 14px 3px rgba(211, 170, 100, .6); }
.run__num { color: var(--gold); font: 600 .8125rem var(--label); letter-spacing: .1em; }
.run__step h3 { margin-top: .3em; }

.pillars { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); background: var(--line); border: 1px solid var(--line); margin-top: 2em; }
.pillars li { background: var(--panel); padding: 28px; }
.pillars p { margin: 0; }

.classes { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); margin-top: 2em; }
.class-card { padding: 28px; background: linear-gradient(var(--panel-raised), var(--panel)); border: 1px solid var(--line); border-top-color: var(--line-strong); transition: border-color .3s, box-shadow .3s; }
.class-card:hover { border-color: var(--gold); box-shadow: 0 0 44px rgba(211, 170, 100, .12); }
.class-card h3 a { color: inherit; text-decoration: none; }
.class-card h3 a::after { content: ''; position: absolute; inset: 0; }
.class-card { position: relative; }
.class-card__role { color: var(--gold-soft); font-style: italic; }
.class-icon { width: 112px; height: 112px; margin-bottom: 16px; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .6)); }

.map-strip { display: flex; gap: 8px; margin-top: 2em; height: clamp(320px, 46vw, 520px); }
.map-strip__item { position: relative; flex: 1; min-width: 0; overflow: hidden; background: var(--panel); transition: flex .5s ease; }
.map-strip__item:hover, .map-strip__item:focus-within { flex: 2.4; }
.map-strip__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.map-strip__item a { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; text-decoration: none; background: linear-gradient(transparent 45%, rgba(10, 8, 6, .92)); }
.map-strip__item h3 { margin: 0; }
.map-strip__item p { margin: .2em 0 0; color: var(--body); font-size: .9rem; }

.solo { max-width: 46rem; text-align: center; }
.cta { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cta .signup__consent { justify-content: flex-start; }

/* Inner pages */
.prose { max-width: 46rem; }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; list-style: square; }
.prose li { margin-bottom: .4em; }
.dropcap { color: var(--heading); font: 400 clamp(1.5rem, 1.2rem + 1vw, 2rem)/1.3 var(--display); }

.people { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 1.5em; }
.people li { border-left: 1px solid var(--gold); padding-left: 18px; }
.people p { margin: 0; }

.ledger { width: 100%; border-collapse: collapse; }
.ledger th, .ledger td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ledger thead th { color: var(--gold); font: 600 .8125rem var(--label); letter-spacing: .1em; text-transform: uppercase; }
.ledger tbody th { color: var(--heading); font-weight: 600; width: 34%; }

.class-row { display: grid; grid-template-columns: 144px 1fr; gap: 28px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.class-row:first-child { padding-top: 0; }
.class-row .class-icon { width: 144px; height: 144px; margin: 0; }
.class-row ul { padding-left: 1.2em; list-style: square; }

.map-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; margin-bottom: clamp(40px, 6vw, 72px); }
.map-row:nth-child(even) img { order: 2; }
.map-row img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.map-row__marks { color: var(--gold-soft); font-style: italic; }

/* A map with its own page: its card on Maps, and the full map */
.page-head__up { margin-bottom: .5em; text-shadow: 0 1px 10px #000; }
.page-head__up a { color: inherit; text-decoration: none; }
.page-head__up a::before { content: '\2190\00a0'; }
.page-head__up a:hover { color: var(--bright); }
.map-cards { display: grid; gap: 24px; }
.map-rows { padding-top: 0; }
.map-card { position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(16px, 2.5vw, 28px); background: linear-gradient(var(--panel-raised), var(--panel)); border: 1px solid var(--line); border-top-color: var(--line-strong); transition: border-color .3s, box-shadow .3s; }
.map-card:hover, .map-card:focus-within { border-color: var(--gold); box-shadow: 0 0 44px rgba(211, 170, 100, .12); }
.map-card img { width: 100%; aspect-ratio: 688 / 392; object-fit: cover; }
.map-card h2 a { color: inherit; text-decoration: none; }
.map-card h2 a::after { content: ''; position: absolute; inset: 0; }
.map-card__more { margin: 0; color: var(--ember); }
.map-card__more::after { content: '\00a0\2192'; }

.run-map { display: grid; grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.run-map__figure { margin: 0; }
.run-map__frame { position: relative; border: 1px solid var(--line-strong); background: var(--panel); box-shadow: 0 0 0 4px var(--panel), 0 0 0 5px var(--line); }
.run-map__frame img { width: 100%; aspect-ratio: 1; }
.run-map__figure .caption { margin-top: 1.25em; }
.run-map__pins { position: absolute; inset: 0; pointer-events: none; }
.run-map__pin { position: absolute; width: 0; height: 0; }
.run-map__pip { position: relative; display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; color: var(--heading); font: 600 .75rem/1 var(--label); }
.run-map__pip::before { content: ''; position: absolute; inset: 5px; z-index: -1; transform: rotate(45deg); background: rgba(10, 8, 6, .9); border: 1px solid var(--gold); box-shadow: 0 0 10px rgba(0, 0, 0, .7); }
.run-map__pins .run-map__pip { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); isolation: isolate; }
.run-map__name { position: absolute; left: 18px; top: 0; transform: translateY(-50%); white-space: nowrap; padding: 1px 8px; background: rgba(10, 8, 6, .8); border: 1px solid var(--line-strong); color: var(--bright); font-size: .8125rem; line-height: 1.5; }
.run-map__pin--left .run-map__name { left: auto; right: 18px; }
.run-map__key h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2.125rem); }
.run-map__legend { margin-bottom: 1.25em; }
.run-map__legend li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--heading); isolation: isolate; }
.run-map__key p { color: var(--body); }
.prose .people { padding-left: 0; list-style: none; }

.stages { position: relative; padding-left: 28px; border-left: 1px solid var(--line-strong); }
.stages__item { position: relative; padding-bottom: 32px; }
.stages__item::before { content: ''; position: absolute; left: -33px; top: .6em; width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.stages__item.is-now::before { background: var(--ember); box-shadow: 0 0 16px 4px rgba(211, 170, 100, .6); }
.stages__item h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2.125rem); margin-bottom: .2em; display: inline-block; }
.stages__item p { margin: 0; }
.stages__now { margin-left: 12px; color: var(--ember); font: 600 .75rem var(--label); letter-spacing: .1em; text-transform: uppercase; }

.faq { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 0; color: var(--heading); font-weight: 600; }
.faq summary:hover { color: var(--ember); }
.faq p { padding-bottom: 8px; }

.press { display: grid; gap: clamp(32px, 5vw, 64px); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.press .prose { max-width: none; }
.downloads { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.downloads a { display: block; padding: 16px 20px; border: 1px solid var(--line-strong); text-decoration: none; }
.downloads a:hover { border-color: var(--gold); }
.downloads strong { display: block; color: var(--heading); }
.downloads span { color: var(--muted); font-size: .9rem; }

.news-item { padding: 24px 0; border-bottom: 1px solid var(--line); }
.news-item time { color: var(--muted); font-size: .9rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--panel); }
.site-footer__inner { max-width: 72rem; margin: 0 auto; padding: 32px var(--gutter); display: grid; gap: 8px 24px; grid-template-columns: 1fr auto; align-items: center; }
.site-footer__line { margin: 0; color: var(--heading); font: italic 400 1.2rem var(--display); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer__links a { color: var(--body); font-size: .95rem; }
.site-footer__legal { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .85rem; }

@media (max-width: 960px) {
	.nav-toggle { display: block; }
	.site-header__cta { display: none; }
	.site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; background: var(--panel); border-bottom: 1px solid var(--line-strong); }
	.site-nav.is-open { display: block; }
	.site-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter); }
	.site-nav a { display: block; padding: 14px 0; font-size: .9rem; }
	.map-strip { flex-direction: column; height: auto; }
	.map-strip__item { flex: none; height: 180px; }
	.map-strip__item:hover, .map-strip__item:focus-within { flex: none; }
	.map-row { grid-template-columns: 1fr; }
	.map-row:nth-child(even) img { order: 0; }
	.map-card { grid-template-columns: 1fr; }
	.run-map { grid-template-columns: 1fr; }
}
/* Too narrow for names on the picture: the numbers point to the list. */
@media (max-width: 719px) {
	.run-map__name { display: none; }
	.run-map__pip { width: 26px; height: 26px; font-size: .6875rem; }
}
@media (max-width: 560px) {
	.signup__row { flex-direction: column; }
	.class-row { grid-template-columns: 1fr; gap: 8px; }
	.site-footer__inner { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.fx__img, .fx__torch { animation: none; }
	.js .reveal { opacity: 1; transform: none; transition: none; }
	.map-strip__item { transition: none; }
}
