/*
	Ean Canfield brand layer
	Loaded after main.css. Colors and font stacks were swapped directly in main.css;
	this file handles the details that go beyond a color swap.

	Harbor navy #1B3A6B | Marigold #E8A33D | Lake blue #2B6CC4
	Dark bg #0E1829 | Surface #15233A | Ink blue #8DB8F2 | Soft text #A9B8CC
*/

/* Photo background for the top (banner / page header) and bottom (footer).
   The middle sections have solid fills, so the photo only shows at the ends.
   The navy overlay keeps white text readable on the bright photo. */
	body {
		background-color: #0E1829;
		background-image: linear-gradient(rgba(14, 24, 41, 0.72), rgba(14, 24, 41, 0.72)), url("../../images/rainier-bg.jpg");
		background-size: auto, cover;
		background-position: center, center;
		background-repeat: no-repeat, no-repeat;
		background-attachment: fixed, fixed;
	}

	/* Below 1280px the template gives each end its own background instead of a
	   fixed page background (fixed backgrounds are unreliable on phones). */
	@media screen and (max-width: 1280px) {
		body {
			background-image: none;
		}

		#banner,
		#wrapper > header,
		#footer {
			background-color: #0E1829;
			background-image: linear-gradient(rgba(14, 24, 41, 0.72), rgba(14, 24, 41, 0.72)), url("../../images/rainier-bg.jpg");
			background-size: auto, cover;
			background-position: center, center;
			background-repeat: no-repeat, no-repeat;
			background-attachment: scroll, scroll;
		}
	}

/* Type: brand guide uses sentence case, tight tracking, 600-800 headings */
	body, input, select, textarea {
		font-weight: 400;
		color: #E8EEF7;
	}

	h1, h2, h3, h4, h5, h6 {
		letter-spacing: -0.01em;
		text-transform: none;
		font-weight: 700;
	}

	h2 { font-size: 1.6em; }
	h3 { font-size: 1.15em; font-weight: 600; }

	h1.major, h2.major, h3.major, h4.major, h5.major, h6.major {
		border-bottom: 0;
		position: relative;
	}

		h1.major:after, h2.major:after, h3.major:after, h4.major:after, h5.major:after, h6.major:after {
			content: '';
			position: absolute;
			left: 0;
			bottom: 0;
			width: 44px;
			height: 3px;
			border-radius: 4px;
			background: #E8A33D;
		}

		.wrapper.spotlight:nth-child(2n - 1) .major:after {
			left: auto;
			right: 0;
		}

	strong, b {
		color: #ffffff;
	}

	p, li, dd, .contact li {
		color: #CFDAE8;
	}

	a {
		border-bottom-color: rgba(141, 184, 242, 0.45);
		color: #8DB8F2;
	}

		a:hover {
			color: #ffffff !important;
		}

	a.special:not(.button),
	#header h1 a,
	#header nav a,
	input[type="submit"], input[type="reset"], input[type="button"], button, .button,
	#menu .inner .links li a {
		letter-spacing: 0.04em;
	}

	a.special:not(.button) {
		color: #ffffff;
	}

		a.special:not(.button):before {
			border-color: #E8A33D;
			color: #E8A33D;
		}

		a.special:not(.button):hover:before {
			background-color: rgba(232, 163, 61, 0.12);
		}

/* Buttons */
	input[type="submit"].primary, .button.primary,
	input[type="submit"] {
		background-color: #E8A33D;
		box-shadow: none;
		color: #1B3A6B !important;
		font-weight: 700;
	}

		input[type="submit"]:hover, .button.primary:hover {
			background-color: #F0B45A;
		}

		input[type="submit"]:active, .button.primary:active {
			background-color: #D18F2C;
		}

/* Header */
	#header h1 a {
		display: inline-flex;
		align-items: center;
		gap: 0.6em;
		text-transform: none;
		letter-spacing: -0.01em;
		font-weight: 700;
	}

		#header h1 svg {
			width: 1.6em;
			height: 1.6em;
		}

	/* Inline links on wide screens, menu button on narrow ones */
	#header nav a.nav-link {
		display: none;
		color: #CFDAE8;
		text-decoration: none;
		padding: 0 0.9em;
		transition: color 0.2s ease-in-out;
	}

		#header nav a.nav-link:hover,
		#header nav a.nav-link:focus-visible {
			color: #E8A33D;
		}

	@media screen and (min-width: 981px) {
		#header nav a.nav-link { display: inline-block; }
		#header nav a[href="#menu"] { display: none; }
	}

/* Projects page: second group heading */
	h2.earlier-work {
		margin-top: 3em;
	}

/* Banner */
	#banner .pitch {
		margin-top: 1.25em;
		color: #ffffff;
	}

	#banner .actions {
		margin-top: 1.5em;
		margin-bottom: 0;
	}

	#banner .logo .ec-mark {
		display: inline-block;
		width: 7em;
		height: 7em;
	}

	#banner h2 {
		font-size: 3.25em;
		font-weight: 800;
		letter-spacing: -0.03em;
		border-bottom: 0;
		padding-bottom: 0;
		margin-bottom: 0.35em;
	}

	#banner p {
		font-family: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
		font-size: 1.25em;
		font-weight: 400;
		letter-spacing: 0;
		text-transform: none;
		color: #CFDAE8;
	}

	@media screen and (max-width: 736px) {
		#banner .logo .ec-mark { width: 5em; height: 5em; }
		#banner h2 { font-size: 2.1em; }
		#banner p { font-size: 1em; }
	}

/* Monogram draw-in, from the brand guide */
	.ec-mark path {
		fill: none;
		stroke-linecap: round;
		stroke-linejoin: round;
	}

	.ec-mark.draw path {
		stroke-dasharray: 320;
		stroke-dashoffset: 320;
		animation: ec-draw 1.4s ease forwards;
	}

		.ec-mark.draw path:nth-child(2) { animation-delay: 0.5s; }
		.ec-mark.draw path:nth-child(3) { animation-delay: 0.8s; }
		.ec-mark.draw path:nth-child(4) { animation-delay: 1.1s; }

	@keyframes ec-draw {
		to { stroke-dashoffset: 0; }
	}

	@media (prefers-reduced-motion: reduce) {
		.ec-mark.draw path { animation: none; stroke-dashoffset: 0; }
	}

/* Cards and quotes */
	.features article {
		border: 1px solid #2A3D58;
		border-radius: 14px;
	}

	blockquote {
		border-left-color: #E8A33D;
		font-family: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
		font-size: 1.3em;
		font-style: normal;
		line-height: 1.35;
		color: #ffffff;
	}

	.image img {
		border-radius: 12px;
	}

/* About */
	.about-grid {
		display: grid;
		grid-template-columns: 3fr 2fr;
		gap: 3em;
		align-items: start;
	}

	.about-lead {
		font-family: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
		font-size: 1.5em;
		font-weight: 600;
		line-height: 1.3;
		letter-spacing: -0.01em;
		color: #ffffff;
		padding-left: 0.9em;
		border-left: 4px solid #E8A33D;
	}

	.about-facts {
		background: #0E1829;
		border: 1px solid #2A3D58;
		border-radius: 14px;
		padding: 1.75em 1.75em 0.5em 1.75em;
	}

		.about-facts dl {
			margin: 0;
		}

		.about-facts dt {
			color: #E8A33D;
			font-size: 0.75em;
			font-weight: 600;
			letter-spacing: 0.08em;
			text-transform: uppercase;
			margin: 0;
		}

		.about-facts dd {
			margin: 0.2em 0 1.25em 0;
			color: #E8EEF7;
			line-height: 1.5;
		}

	.about-photos {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1em;
		margin: 0.5em 0 2em 0;
	}

		.about-photos img {
			display: block;
			width: 100%;
			aspect-ratio: 1 / 1;
			object-fit: cover;
			border-radius: 12px;
			border: 1px solid #2A3D58;
		}

	@media screen and (max-width: 980px) {
		.about-grid { grid-template-columns: 1fr; gap: 2em; }
	}

	@media screen and (max-width: 736px) {
		.about-lead { font-size: 1.25em; }
	}

/* Project pages */
	.back-link {
		display: inline-block;
		margin: 0 0 1.5em 0;
		border-bottom: 0;
		font-weight: 600;
	}

	.project-hero img {
		max-height: 26em;
		object-fit: cover;
	}

	.project-glance {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1.5em;
		margin: 0 0 3em 0;
	}

		.project-glance > div {
			background: #15233A;
			border: 1px solid #2A3D58;
			border-radius: 14px;
			padding: 1.5em 1.75em 0.5em 1.75em;
		}

		.project-glance h4 {
			color: #E8A33D;
			font-size: 0.8em;
			letter-spacing: 0.08em;
			text-transform: uppercase;
			margin: 0 0 0.5em 0;
		}

		.project-glance > div:first-child p {
			font-family: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
			font-size: 1.35em;
			font-weight: 600;
			line-height: 1.3;
			color: #ffffff;
		}

		.project-glance.single {
			grid-template-columns: 1fr;
		}

	@media screen and (max-width: 736px) {
		.project-glance { grid-template-columns: 1fr; }
	}

	.project-gallery {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1.25em;
		margin: 0 0 2.5em 0;
	}

		.project-gallery figure {
			margin: 0;
		}

		.project-gallery figure.wide {
			grid-column: 1 / -1;
		}

		.project-gallery img {
			display: block;
			width: 100%;
			height: auto;
			border-radius: 12px;
			border: 1px solid #2A3D58;
		}

		.project-gallery figcaption {
			color: #A9B8CC;
			font-size: 0.85em;
			margin-top: 0.6em;
		}

	@media screen and (max-width: 480px) {
		.project-gallery { grid-template-columns: 1fr; }
	}

/* Project popup */
	html.project-modal-open {
		overflow: hidden;
	}

	.project-modal {
		border: 0;
		padding: 0;
		margin: auto;
		width: min(52em, calc(100vw - 2em));
		max-height: calc(100vh - 3em);
		max-height: calc(100dvh - 3em);
		background: transparent;
		color: inherit;
		overflow: visible;
	}

		.project-modal::backdrop {
			background: rgba(14, 24, 41, 0.55);
			-webkit-backdrop-filter: blur(10px) saturate(120%);
			backdrop-filter: blur(10px) saturate(120%);
		}

		.project-modal[open] {
			animation: project-modal-in 0.25s ease-out;
		}

		.project-modal[open]::backdrop {
			animation: project-modal-fade 0.25s ease-out;
		}

	@keyframes project-modal-in {
		from { opacity: 0; transform: translateY(1em) scale(0.98); }
		to { opacity: 1; transform: none; }
	}

	@keyframes project-modal-fade {
		from { opacity: 0; }
		to { opacity: 1; }
	}

	@media (prefers-reduced-motion: reduce) {
		.project-modal[open], .project-modal[open]::backdrop { animation: none; }
	}

	.project-modal-panel {
		position: relative;
		display: flex;
		flex-direction: column;
		max-height: inherit;
		background: #0E1829;
		border: 1px solid #2A3D58;
		border-radius: 18px;
		box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
		overflow: hidden;
	}

	.project-modal-body {
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 2.5em 2.5em 0.5em 2.5em;
	}

		.project-modal-head h2 {
			font-size: 2em;
			font-weight: 800;
			letter-spacing: -0.02em;
			margin: 0 2em 0.25em 0;
		}

		.project-modal-head p {
			color: #A9B8CC;
			font-size: 0.85em;
			letter-spacing: 0.08em;
			text-transform: uppercase;
			margin-bottom: 1.5em;
		}

		.project-modal-body .project-hero img {
			max-height: 18em;
		}

		.project-modal-loading {
			color: #A9B8CC;
			padding: 3em 0;
			text-align: center;
		}

	.project-modal-close {
		position: absolute;
		top: 0.75em;
		right: 0.75em;
		z-index: 1;
		width: 44px;
		height: 44px;
		padding: 0;
		border-radius: 100%;
		background: rgba(21, 35, 58, 0.9);
		box-shadow: inset 0 0 0 2px #2A3D58;
		color: #ffffff !important;
		font-family: Arial, sans-serif;
		font-size: 28px;
		font-weight: 400;
		line-height: 42px;
		letter-spacing: 0;
	}

		.project-modal-close:hover {
			box-shadow: inset 0 0 0 2px #E8A33D;
			background: rgba(21, 35, 58, 0.9);
		}

	.project-modal-foot {
		border-top: 1px solid #2A3D58;
		padding: 1em 2.5em;
		text-align: right;
	}

		.project-modal-foot a {
			border-bottom: 0;
			font-weight: 600;
		}

	@media screen and (max-width: 736px) {
		.project-modal {
			width: calc(100vw - 1em);
			max-height: calc(100dvh - 1em);
		}

		.project-modal-body { padding: 2em 1.25em 0.5em 1.25em; }
		.project-modal-head h2 { font-size: 1.5em; }
		.project-modal-foot { padding: 0.9em 1.25em; }
	}

/* Menu */
	#menu .inner {
		border-radius: 14px;
	}

/* Charts exported on a white background */
	.project-gallery img.chart {
		background: #ffffff;
		padding: 0.5em;
	}
