/* Architectural Storytelling — main stylesheet
   One file for the whole site. Sections:
   1 Tokens  2 Base  3 Layout  4 Header  5 Hero  6 Journal  7 Posts
   8 Forms & buttons  9 Footer  10 Utilities  11 Motion & print */

/* 1 Tokens ------------------------------------------------------------ */
:root {
	--ink: #1d1d1f;
	--ink-soft: rgba(0, 0, 0, .78);
	--muted: #6e6e73;
	--faint: #86868b;
	--line: #e5e5ea;
	--line-strong: #d2d2d7;
	--paper: #fff;
	--soft: #fafafa;
	--red: #eb0000;
	--red-text: #c8102e;
	--link-line: rgba(172, 0, 0, .55);
	--font-display: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--font-body: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--header-h: 56px;
	--wrap: 1180px;
	--narrow: 680px;
	--gutter: 22px;
	--radius: 20px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

/* 2 Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
	margin: 0;
	background: var(--paper);
	color: #000;
	font: 400 18px/1.69 var(--font-body);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, video, iframe, svg { max-width: 100%; height: auto; }
img { display: block; }
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: 400;
	color: var(--ink);
	letter-spacing: -.015em;
	line-height: 1.15;
	margin: 0 0 .6em;
}
h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 500; letter-spacing: -.025em; line-height: 1.05; }
h2 { font-size: clamp(28px, 3.2vw, 40px); }
h3 { font-size: clamp(20px, 2vw, 24px); }
p, ul, ol, figure, blockquote { margin: 0 0 1.2em; }
a { color: var(--ink); text-decoration: none; transition: color .2s, text-decoration-color .2s; }
a:hover { color: #000; }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
address { font-style: normal; }

.prose a,
.as-door .prose a, .as-door .lede a, .as-door .sub a, .as-door .note a, .as-door .ans a, .as-door section > p a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: var(--link-line);
}
.prose a:hover,
.as-door .prose a:hover, .as-door .lede a:hover, .as-door .sub a:hover, .as-door .note a:hover, .as-door .ans a:hover, .as-door section > p a:hover {
	color: #ac0000;
	text-decoration-color: #ac0000;
}

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }

.eyebrow {
	display: block;
	font: 400 13px/1.2 var(--font-display);
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--red-text);
	margin: 0 0 12px;
}

/* 3 Layout ------------------------------------------------------------ */
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap-narrow { width: min(var(--narrow), 100% - 2 * var(--gutter)); margin-inline: auto; }
.site-content { position: relative; z-index: 2; }
.page-head { padding: 64px 0 8px; }
.page-main > .as-door, .page-main > .as-home { position: relative; }
/* Home: the blurred backdrop behind the four lanes stays inside its section. */
.as-home .lanes { overflow: clip; }

/* 4 Header ------------------------------------------------------------ */
.skip-link {
	position: fixed; top: 12px; left: 12px; z-index: 1000;
	background: #111; color: #fff; padding: 10px 16px; border-radius: 4px;
	transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: #fff; }

.site-header {
	position: sticky; top: 0; z-index: 50;
	height: var(--header-h);
	background: rgba(255, 255, 255, .78);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid rgba(0, 0, 0, .07);
}
.has-hero .site-header { background: rgba(255, 255, 255, .95); }
.site-header__inner {
	height: 100%;
	display: flex; align-items: center; gap: 24px;
	padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2));
}
.site-logo { display: flex; align-items: center; flex: 0 0 auto; margin-right: auto; }
.site-logo img { height: 19px; width: auto; }

.site-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.site-nav .menu > li { position: relative; padding: 0 13px; height: var(--header-h); display: flex; align-items: center; }
.site-nav .menu > li > a { font: 400 13px/1 var(--font-body); letter-spacing: -.005em; color: var(--ink-soft); }
.site-nav .menu > li > a:hover, .site-nav .menu > li.current-menu-item > a { color: #000; }
.site-nav .menu > li:first-of-type { order: 99; padding-right: 0; }
.site-nav .menu > li:first-of-type > a {
	background: var(--ink); color: #fff; border-radius: 980px; padding: 8px 15px; font-size: 12px; font-weight: 500;
}
.site-nav .menu > li:first-of-type > a:hover { background: #000; }
.site-nav .sub-menu {
	list-style: none; margin: 0; padding: 10px 0;
	position: absolute; top: var(--header-h); left: 0; min-width: 240px;
	background: rgba(255, 255, 255, .96);
	-webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
	border: 1px solid rgba(0, 0, 0, .06); border-radius: 14px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .12);
	opacity: 0; visibility: hidden; transform: translateY(-4px);
	transition: opacity .2s, transform .2s, visibility .2s;
}
.site-nav .menu > li:first-of-type .sub-menu { left: auto; right: 0; }
.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub-menu a { display: block; font-size: 13px; color: rgba(0, 0, 0, .75); padding: 7px 20px; line-height: 1.4; }
.site-nav .sub-menu a:hover { color: #000; }

.nav-toggle { display: none; }

@media (max-width: 1024px) {
	:root { --header-h: 52px; }
	.site-logo img { height: 17px; }
	.nav-toggle {
		display: flex; align-items: center; justify-content: center;
		width: 40px; height: 40px; margin-right: -8px;
		background: none; border: 0; color: var(--ink); cursor: pointer;
	}
	.nav-toggle__bars, .nav-toggle__bars::before { display: block; position: relative; width: 20px; height: 1.5px; background: currentColor; transition: transform .25s var(--ease); }
	.nav-toggle__bars { background: none; }
	.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; width: 20px; height: 1.5px; background: currentColor; transition: transform .25s var(--ease); }
	.nav-toggle__bars::before { top: -3px; }
	.nav-toggle__bars::after { top: 3px; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(3px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-3px) rotate(-45deg); }

	.site-nav {
		position: fixed; inset: var(--header-h) 0 0 0;
		background: #fff; overflow-y: auto;
		padding: 12px 24px 40px;
		border-top: 1px solid rgba(0, 0, 0, .06);
		display: none;
	}
	.nav-open .site-nav { display: block; }
	/* A backdrop filter would trap the fixed menu panel inside the header bar. */
	.nav-open .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; }
	.nav-open { overflow: hidden; }
	.site-nav .menu { display: block; }
	.site-nav .menu > li { display: block; height: auto; padding: 0; }
	.site-nav .menu > li > a { display: block; font: 500 24px/1.3 var(--font-display); letter-spacing: -.02em; color: var(--ink); padding: 10px 0; }
	.site-nav .menu > li:first-of-type > a { background: none; color: var(--red); padding: 10px 0; font-size: 24px; border-radius: 0; }
	.site-nav .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none;
		background: none; border: 0; box-shadow: none; padding: 0 0 8px; min-width: 0;
		-webkit-backdrop-filter: none; backdrop-filter: none;
	}
	.site-nav .sub-menu a { font-size: 16px; color: rgba(0, 0, 0, .6); padding: 6px 0; }
}

/* 5 Hero -------------------------------------------------------------- */
.hero {
	position: relative; z-index: 1;
	height: calc(100svh - var(--header-h)); min-height: 520px;
	color: #fff;
	font-family: var(--font-display);
}
.hero-bg {
	position: fixed; inset: 0; z-index: 0;
	overflow: hidden; background: #0b0b0b; transform: translateZ(0);
}
.hero-bg img, .hero-bg video {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-bg img { z-index: 1; opacity: 0; transition: opacity 1.2s ease; }
.hero-bg img.on { opacity: 1; animation: hero-drift 26s ease-in-out infinite alternate; }
.hero-bg img.gone { opacity: 0; }
.hero-bg video { z-index: 1; pointer-events: none; }
.hero-bg iframe {
	position: absolute; top: 50%; left: 50%; z-index: 1;
	width: 100vw; height: 56.25vw; min-height: 100vh; min-width: 177.78vh;
	transform: translate(-50%, -50%) scale(var(--hero-z, 1.02));
	border: 0; pointer-events: none;
}
.hero-bg::after {
	content: ""; position: absolute; inset: 0; z-index: 2;
	background: linear-gradient(180deg, rgba(0, 0, 0, .32) 0%, rgba(0, 0, 0, .04) 34%, rgba(0, 0, 0, .22) 58%, rgba(0, 0, 0, .78) 100%);
}
.hero-tilt { position: absolute; inset: -40px; will-change: transform; }
.hero-copy {
	position: relative; z-index: 3;
	height: 100%; max-width: var(--wrap); margin: 0 auto;
	padding: 60px 24px 64px;
	display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-copy a.back { position: absolute; top: 22px; left: 24px; color: #fff; opacity: .85; font-size: 14px; }
.hero-copy .eyebrow, .hero-eyebrow {
	display: flex; align-items: center; gap: 14px;
	font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
	color: rgba(255, 255, 255, .88); margin: 0 0 18px;
}
.hero-copy .eyebrow::before, .hero-eyebrow::before { content: ""; flex: 0 0 40px; height: 2px; background: var(--red); }
.hero-copy h1, .hero-title {
	font: 300 clamp(34px, 5vw, 64px)/1.05 var(--font-display);
	letter-spacing: -.02em; color: #fff; margin: 0 0 18px; max-width: 17em;
	text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}
.hero-copy h1 .eyebrow { font-weight: 400; text-shadow: none; }
.hero-copy h1 em { font-style: normal; font-weight: 600; color: #fff; }
.hero-copy .lede { color: rgba(255, 255, 255, .9); font: 400 18px/1.55 var(--font-body); max-width: 32em; margin: 0 0 24px; }
.hero-copy .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.hero-copy .btn { background: var(--red); color: #fff; border-color: var(--red); border-radius: 2px; font-weight: 600; font-size: 16px; padding: 15px 26px; }
.hero-copy .soft, .hero-copy .soft a { color: #fff; font-size: 15px; }
.hero-cue {
	position: absolute; left: 50%; bottom: 18px; z-index: 3;
	width: 1px; height: 38px; background: rgba(255, 255, 255, .6);
	transform-origin: top; animation: hero-cue 2.2s ease-in-out infinite;
}
/* Page content rises over the fixed hero image. */
.is-under-hero { padding-top: 34vh; }
.is-under-hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	/* Eased fade from the photograph into the page, with no visible edge. */
	background: linear-gradient(180deg,
		rgba(255, 255, 255, 0) 0,
		rgba(255, 255, 255, .04) 4vh,
		rgba(255, 255, 255, .13) 8vh,
		rgba(255, 255, 255, .27) 12vh,
		rgba(255, 255, 255, .45) 16vh,
		rgba(255, 255, 255, .64) 20vh,
		rgba(255, 255, 255, .8) 24vh,
		rgba(255, 255, 255, .92) 28vh,
		rgba(255, 255, 255, .98) 32vh,
		#fff 36vh, #fff 100%);
}
.has-hero .as-door .hero { display: none; }
/* Let the fade carry into page sections: no white box, no rule at the seam. */
.has-hero .as-door { background: transparent; }
.has-hero .as-door .hero + section { border-top: 0; }

@media (max-width: 860px) {
	.hero-copy { padding: 56px 22px 104px; }
	.hero-copy a.back { top: 16px; left: 22px; }
	.hero-copy h1, .hero-title { font-size: 34px; line-height: 1.08; }
	.hero-copy .lede { font-size: 17px; }
	.is-under-hero { padding-top: 24vh; }
	.hero-bg img.on { animation: none; }
}

@keyframes hero-drift { from { transform: scale(1.03); } to { transform: scale(1.12) translate(-1.2%, -.8%); } }
@keyframes hero-cue { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* 6 Journal ----------------------------------------------------------- */
.list-head { padding: 64px 0 40px; text-align: center; }
.list-intro { max-width: 640px; margin: 14px auto 0; font-size: 17px; line-height: 1.5; color: var(--muted); }
.jnav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px auto 0; max-width: 900px; }
.jnav a { font-size: 13px; line-height: 1.2; padding: 8px 15px; border-radius: 980px; border: 1px solid var(--line-strong); color: var(--ink); }
.jnav a:hover, .jnav a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 28px; padding-bottom: 32px; }
.card__link { display: block; color: inherit; }
.card__media { margin: 0 0 16px; overflow: hidden; border-radius: 14px; aspect-ratio: 3 / 2; background: var(--soft); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card__link:hover .card__media img { transform: scale(1.03); }
.card .eyebrow { font-size: 12px; margin-bottom: 8px; }
.card__title { font-size: 22px; line-height: 1.2; margin: 0 0 8px; }
.card__excerpt { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0; }
@media (max-width: 1024px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; gap: 40px; } }

.pagination { margin: 24px 0 80px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers { min-width: 40px; padding: 8px 14px; border-radius: 980px; border: 1px solid var(--line-strong); text-align: center; font-size: 14px; }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }

/* 7 Posts ------------------------------------------------------------- */
.post-head { padding: 64px 0 0; }
.post-meta { color: var(--faint); font-size: 14px; padding-top: 24px; }
.is-under-hero .post-meta { padding-top: 0; }
.prose { font-size: 19px; line-height: 1.65; padding-bottom: 32px; }
.prose > * { max-width: var(--narrow); margin-left: auto; margin-right: auto; }
.prose h2 { margin-top: 72px; margin-bottom: 18px; }
.prose h3 { margin-top: 48px; }
.prose > figure.wp-block-image,
.prose > figure.wp-block-video,
.prose > .as-pair,
.prose > .wp-block-gallery {
	max-width: none;
	width: min(var(--wrap), 100vw - 48px);
	position: relative; left: 50%; transform: translateX(-50%);
	margin-top: 64px; margin-bottom: 64px;
}
.prose figure img, .prose figure video { width: 100%; height: auto; border-radius: var(--radius); }
.prose figcaption { text-align: center; font-size: 13px; line-height: 1.5; color: var(--faint); margin: 14px auto 0; max-width: 560px; }
.prose .as-pair { display: flex; gap: 16px; align-items: flex-start; }
.prose .as-pair > figure { margin: 0; min-width: 0; }
.prose .wp-block-pullquote { max-width: 820px; border: 0; margin: 96px auto; padding: 0; text-align: center; }
.prose .wp-block-pullquote p { font: 300 clamp(28px, 3.6vw, 46px)/1.2 var(--font-display); letter-spacing: -.02em; }
.prose blockquote { border-left: 2px solid var(--red); padding-left: 20px; font-style: normal; }
@media (max-width: 767px) {
	.prose { font-size: 17px; }
	.prose > figure.wp-block-image, .prose > figure.wp-block-video, .prose > .as-pair, .prose > .wp-block-gallery { width: calc(100vw - 24px); margin-top: 40px; margin-bottom: 40px; }
	.prose figure img { border-radius: 14px; }
	.prose .as-pair { gap: 8px; }
}

.post-cta { border-top: 1px solid var(--line); padding: 48px 0; margin-top: 32px; }
.post-cta h2 { font-size: clamp(24px, 3vw, 32px); }
.post-cta p:last-child { display: flex; flex-wrap: wrap; gap: 10px; }

.post-nav { padding: 32px 0 80px; }
.post-nav .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.post-nav a { display: block; font: 400 18px/1.3 var(--font-display); color: var(--ink); }
.post-nav .nav-next { text-align: right; }
.post-nav .eyebrow { font-size: 11px; margin-bottom: 6px; }

#jp-relatedposts { max-width: var(--wrap); margin: 0 auto 48px !important; padding-inline: var(--gutter); }

/* 8 Forms & buttons --------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--ink); border-radius: 999px;
	padding: 11px 22px; font: 500 15px/1.2 var(--font-body);
	background: var(--ink); color: #fff; cursor: pointer;
	transition: background .2s, color .2s;
}
.btn:hover { background: #000; color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }

input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="url"], select, textarea {
	width: 100%;
	border: 1px solid var(--line-strong); border-radius: 12px;
	padding: 12px 14px; font: 400 16px/1.4 var(--font-body);
	color: var(--ink); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
::placeholder { color: #8e8e93; }
textarea { min-height: 120px; resize: vertical; }

.wpcf7 .cf-grid > p { display: contents; }
.wpcf7 .cf-grid br, .wpcf7 .cf-more br { display: none; }
.wpcf7 .cf-grid label { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 600px) { .wpcf7 .cf-grid { grid-template-columns: 1fr !important; } }

.search-form { display: flex; gap: 8px; max-width: 520px; margin: 24px auto 0; }
.search-form .search-submit { flex: 0 0 auto; }

/* 9 Footer ------------------------------------------------------------ */
.site-footer { position: relative; z-index: 2; background: var(--soft); border-top: 1px solid var(--line); font-size: 14px; line-height: 1.6; color: var(--muted); }
.site-footer__inner {
	width: min(var(--wrap), 100% - 2 * var(--gutter)); margin: 0 auto;
	display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
	padding: 64px 0 40px;
}
.site-footer__name { font: 500 18px/1.2 var(--font-display); color: var(--ink); margin: 0 0 12px; }
.site-footer h2 { font: 400 12px/1.2 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 6px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer__legal {
	width: min(var(--wrap), 100% - 2 * var(--gutter)); margin: 0 auto;
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
	padding: 20px 0 32px; border-top: 1px solid var(--line); font-size: 13px;
}
.site-footer__legal p { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
@media (max-width: 900px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 560px) {
	.site-footer__inner { gap: 32px 20px; padding: 48px 0 32px; font-size: 14px; }
	.site-footer__col:last-child ul { columns: 2; column-gap: 20px; }
	.site-footer__col:last-child { grid-column: 1 / -1; }
	.site-footer__legal { flex-direction: column; }
}
/* Pages with the fixed call bar: keep the footer and chat clear of it. */
/* Pages with the fixed call bar: keep the footer and chat bubble clear of it. */
.has-callbar .site-footer { padding-bottom: 80px; }
.has-callbar #sotellus-chat { bottom: 68px !important; }
/* Contact routes: one clean column on phones, numbers never wrap. */
.as-door .routes a[href^="tel:"] strong { white-space: nowrap; }
.as-door .routes a[href^="mailto:"] { overflow-wrap: anywhere; }
@media (max-width: 600px) {
	.as-door .routes { grid-template-columns: 1fr !important; gap: 18px !important; }
	.as-door .routes > * { height: auto !important; padding: 16px 0 !important; }
}
/* Home headline: enough leading that descenders clear the next line. */
body .as-home .stage h1 { line-height: 1.02; }

/* 10 Utilities -------------------------------------------------------- */
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.notfound { padding: 96px 0; text-align: center; }
.notfound__links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.alignwide { width: min(var(--wrap), 100vw - 48px); }
.alignfull { width: 100vw; position: relative; left: 50%; transform: translateX(-50%); }

/* Legacy colour fixes carried over from the accessibility pass. */
.as-prep .ey { color: #c80000; }
.close .doors a.here b, .ils-list .n { color: #ff5a5a; }
.cl-note { color: #666; }

/* 11 Motion & print --------------------------------------------------- */
.reveal { opacity: 0; transform: translate(-50%, 28px); transition: opacity .9s ease, transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	.reveal { opacity: 1; transform: translateX(-50%); }
}

@media print {
	.site-header, .site-footer, .hero, .post-nav, .post-cta, #jp-relatedposts { display: none !important; }
	.is-under-hero { padding-top: 0; }
	body { font-size: 12pt; }
}
