/*
 * Esmeralda — the look.
 *
 * Structure comes from the parent. This file carries only what is Esmeralda's
 * own taste, and every colour in it is a token from style.css.
 *
 * Sized from the narrow end. Checked at 379px wide and well past 1200 tall,
 * which is the pane Paige works in.
 */

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

body {
	background: var(--ground);
	color: var(--ink);
	font-family: var(--font-util);
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 3px;
}

img { max-width: 100%; display: block; }


/* ─────────────────────────────────────────────────────────────────────────
 * THE SITE HEADER
 * ───────────────────────────────────────────────────────────────────────── */

.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.4rem clamp(18px, 6vw, 72px);
	border-bottom: 1px solid var(--hairline);
	background: var(--ground);
	position: relative;
	z-index: 10;
}

.site-header__mark {
	font-family: var(--font-head);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: .18em;
	font-size: 1rem;
	color: var(--purple);
	white-space: nowrap;
}

.site-nav {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: .6rem 1.4rem;
}

.site-nav a {
	font-family: var(--font-util);
	font-size: .82rem;
	letter-spacing: .02em;
	color: var(--ink);
	opacity: .75;
	transition: opacity .3s ease;
}

.site-nav a:hover,
.site-nav .current_page_item a { opacity: 1; }

@media (max-width: 640px) {
	.site-header { flex-direction: column; align-items: flex-start; }
	.site-nav { justify-content: flex-start; }
}


/* ─────────────────────────────────────────────────────────────────────────
 * THE HOME HERO
 *
 * Held to a proportion with a ceiling rather than to the viewport alone. A
 * hero measured in svh opens with a screen of empty ground in a tall narrow
 * window, which is exactly the pane this is read in.
 * ───────────────────────────────────────────────────────────────────────── */

.hero {
	min-height: clamp(560px, 76svh, 800px);
	background: var(--entrance);
	background-size: cover;
	background-position: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 0;
	padding: clamp(48px, 8vh, 96px) clamp(18px, 6vw, 72px) clamp(56px, 9vh, 110px);
	position: relative;
	overflow: hidden;
}

.hero .eyebrow {
	font-family: var(--font-head);
	font-weight: 400;
	font-size: clamp(.68rem, 2.4vw, .74rem);
	letter-spacing: .32em;
	text-transform: uppercase;
	color: var(--lilac);
	margin: 0;
}

.wordmark {
	font-family: var(--font-head);
	font-weight: 200;
	text-transform: uppercase;
	letter-spacing: .14em;
	font-size: clamp(2.6rem, 11vw, 8.5rem);
	line-height: .9;
	color: var(--white);
	margin: .8em 0 0;

	/* The tracking pushes the last letter off centre without this. */
	text-indent: .14em;
}

.heading { margin-top: 1.35em; }

.heading__line1 {
	font-family: var(--font-head);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .03em;
	font-size: clamp(1.25rem, 5.4vw, 2.1rem);
	line-height: 1.15;
	color: var(--white);
	max-width: 18ch;
	margin: 0 auto;
}

.heading__line2 {
	font-family: var(--font-warm);
	font-style: italic;
	font-weight: 400;
	font-size: clamp(1.05rem, 4vw, 1.5rem);
	line-height: 1.2;
	color: var(--lilac);
	max-width: 26ch;
	margin: .3em auto 0;
}

/*
 * One phrase breathes at a time, and only where movement is welcome.
 */
@media (prefers-reduced-motion: no-preference) {
	.heading__line2 { animation: esm-breathe 5.5s ease-in-out 2s infinite; }
}

@keyframes esm-breathe {
	0%, 100% { transform: scale(1);     opacity: .92; }
	50%      { transform: scale(1.015); opacity: 1;   }
}


/* ─────────────────────────────────────────────────────────────────────────
 * THE DOORWAYS
 *
 * Equal in size, with no seam between them. The difference between the two
 * voices is carried by the faces and by the light, never by a colour block.
 * ───────────────────────────────────────────────────────────────────────── */

.doors {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(1.4rem, 4vw, 2.4rem);
	width: 100%;
	max-width: 30rem;
	margin: clamp(2.6rem, 8vw, 4.2rem) auto 0;
}

@media (min-width: 820px) {
	.doors {
		grid-template-columns: 1fr 1fr;
		max-width: 58rem;
		gap: clamp(2.5rem, 5vw, 4.5rem);
	}
}

.door {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0;
	min-height: clamp(128px, 30vw, 168px);
	padding: clamp(1.5rem, 5vw, 1.9rem) clamp(1.4rem, 5vw, 2.5rem);
	border-radius: 3px;
	background: rgba(255, 255, 255, .035);
	border: 1px solid rgba(255, 255, 255, .14);
	box-shadow: var(--surface-shadow);
	color: var(--door-ink);
	transition: transform .5s ease, box-shadow .5s ease, border-color .5s ease;
}

.door::before {
	content: "";
	position: absolute;
	inset: -20% -30%;
	border-radius: 50%;
	opacity: 0;
	transform: scale(.85);
	transition: opacity .6s ease, transform .6s ease;
	pointer-events: none;
	z-index: 0;
	background: var(--satin);
}

.door > * { position: relative; z-index: 1; }

.door:hover,
.door:focus-within {
	transform: translateY(-3px);
	border-color: rgba(255, 255, 255, .26);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .16),
		0 30px 60px -20px rgba(8, 2, 22, .70),
		0 12px 26px -12px rgba(8, 2, 22, .50);
}

.door:hover::before,
.door:focus-within::before { opacity: 1; transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
	.door,
	.door::before { transition: none; }
	.door:hover,
	.door:focus-within { transform: none; }
}

.door--pro::before { background: radial-gradient(circle, var(--glow-cool) 0%, transparent 70%); }
.door--esm::before { background: radial-gradient(circle, var(--lilac-soft) 0%, transparent 70%); }

.door__label { display: block; }

.door--pro .door__label {
	font-family: var(--font-head);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: .16em;
	font-size: clamp(.92rem, 3.6vw, 1.15rem);
	line-height: 1.3;
	color: var(--white);
	transition: letter-spacing .5s ease;
}

.door--pro:hover .door__label,
.door--pro:focus-within .door__label { letter-spacing: .24em; }

@media (prefers-reduced-motion: reduce) {
	.door--pro .door__label { transition: none; }
	.door--pro:hover .door__label,
	.door--pro:focus-within .door__label { letter-spacing: .16em; }
}

.door--esm .door__label {
	font-family: var(--font-warm);
	font-style: italic;
	font-weight: 500;
	font-size: clamp(1.45rem, 6vw, 2rem);
	line-height: 1.1;
	color: var(--white);
}

.door__sub {
	display: block;
	margin-top: .55em;
	font-family: var(--font-util);
	font-size: clamp(.8rem, 3.2vw, .84rem);
	line-height: 1.45;
	color: rgba(255, 255, 255, .72);
}


/* ─────────────────────────────────────────────────────────────────────────
 * WHY ESMERALDA EXISTS
 * ───────────────────────────────────────────────────────────────────────── */

.why {
	padding: clamp(4.5rem, 14vh, 9rem) clamp(18px, 6vw, 72px);
	text-align: center;
	max-width: 900px;
	margin-inline: auto;
}

.why__eyebrow {
	font-family: var(--font-head);
	font-size: clamp(.66rem, 2.4vw, .7rem);
	letter-spacing: .3em;
	text-transform: uppercase;
	color: var(--purple);
	margin: 0;
}

.why__statement {
	font-family: var(--font-head);
	font-weight: 300;
	font-size: clamp(1.5rem, 7vw, 2.6rem);
	line-height: 1.25;
	color: var(--purple);
	margin: .7em 0 0;
}

.why__pair {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	margin-top: clamp(2.4rem, 8vw, 3.2rem);
	text-align: left;
}

@media (min-width: 720px) {
	.why__pair { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

.why__col h2 {
	font-family: var(--font-head);
	font-weight: 400;
	font-size: clamp(.75rem, 3vw, .78rem);
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--purple);
	margin: 0 0 .6em;
}

.why__col p {
	font-family: var(--font-util);
	font-size: clamp(.94rem, 3.6vw, .98rem);
	line-height: 1.6;
	color: var(--body-muted);
	margin: 0;
}


/* ─────────────────────────────────────────────────────────────────────────
 * THE PAGE HERO — every page beyond Home
 * ───────────────────────────────────────────────────────────────────────── */

.page-hero {
	min-height: clamp(300px, 42svh, 440px);
	background: var(--entrance);
	background-size: cover;
	background-position: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: clamp(3rem, 9vh, 5.5rem) clamp(18px, 6vw, 72px);
}

.page-hero__eyebrow {
	font-family: var(--font-head);
	font-size: clamp(.66rem, 2.4vw, .7rem);
	letter-spacing: .3em;
	text-transform: uppercase;
	color: var(--lilac);
	margin: 0;
}

.page-hero__title {
	font-family: var(--font-head);
	font-weight: 300;
	text-transform: uppercase;
	letter-spacing: .06em;
	font-size: clamp(1.9rem, 8vw, 3.6rem);
	line-height: 1.05;
	color: var(--white);
	margin: .5em 0 0;
}

.page-hero--warm .page-hero__title {
	font-family: var(--font-warm);
	font-style: italic;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
}

.page-hero__sub {
	font-family: var(--font-util);
	font-size: clamp(.94rem, 3.6vw, .98rem);
	line-height: 1.55;
	color: rgba(255, 255, 255, .78);
	max-width: 46ch;
	margin: 1em auto 0;
}


/* ─────────────────────────────────────────────────────────────────────────
 * PAGE CONTENT
 * ───────────────────────────────────────────────────────────────────────── */

.page-body {
	padding: clamp(3.5rem, 11vh, 7rem) clamp(18px, 6vw, 72px);
	max-width: 760px;
	margin-inline: auto;
	font-family: var(--font-util);
	font-size: clamp(.96rem, 3.6vw, 1rem);
	line-height: 1.7;
	color: var(--body-muted);
}

.page-body h2,
.page-body h3 {
	font-family: var(--font-head);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: var(--purple);
	margin: 2.2em 0 .7em;
}

.page-body h2 { font-size: clamp(1rem, 4vw, 1.1rem); }
.page-body h3 { font-size: clamp(.82rem, 3.2vw, .88rem); }
.page-body p { margin: 0 0 1.2em; }
.page-body a { color: var(--purple); text-decoration: underline; text-underline-offset: .18em; }


/* ─────────────────────────────────────────────────────────────────────────
 * THE FOOTER
 * ───────────────────────────────────────────────────────────────────────── */

.site-footer {
	padding: clamp(3rem, 8vh, 4.5rem) clamp(18px, 6vw, 72px);
	text-align: center;
	background: var(--foot-ground);
	border-top: 1px solid var(--hairline);
}

.footer__mark {
	font-family: var(--font-warm);
	font-style: italic;
	font-size: clamp(1.5rem, 6vw, 1.9rem);
	color: var(--purple);
	margin: 0;
}

.footer__tag {
	font-family: var(--font-util);
	font-size: clamp(.84rem, 3.2vw, .88rem);
	line-height: 1.6;
	color: var(--body-muted);
	margin: .5em 0 0;
}

.footer__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .6rem 1.6rem;
	margin-top: 1.8rem;
}

.footer__links a {
	font-family: var(--font-util);
	font-size: .8rem;
	letter-spacing: .04em;
	color: var(--purple);
	opacity: .8;
	transition: opacity .3s ease;
}

.footer__links a:hover { opacity: 1; }

.footer__copy {
	font-family: var(--font-util);
	font-size: .74rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--body-muted);
	margin: 1.8rem 0 0;
}
