/* ==========================================================================
   COMPONENTS — header, navigation, buttons, footer
   All geometry below is measured from the live Framer build. Source values
   are noted inline so any future change can be checked against the original.
   ========================================================================== */

/* --------------------------------------------------------------------------
   HEADER
   Measured: wrapper padding 30px 50px; inner track 1200px, flex row, gap 30px;
   background rgba(0,0,0,0) at top -> rgb(255,255,255) once scrolled.
   -------------------------------------------------------------------------- */

.site-header {
	position: fixed;
	inset: 0 0 auto;
	z-index: var(--z-header);
	display: flex;
	justify-content: center;
	padding: 30px 50px;
	background-color: var(--c-transparent);
	transition: background-color var(--dur-base) var(--ease-out),
	            padding var(--dur-base) var(--ease-out);
}

.site-header__inner {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 30px;
	width: 100%;
	max-width: var(--container-max);
}

.site-header__brand {
	flex: 0 0 auto;
	/* Measured logo box: 137x37. */
	max-width: 137px;
}

.site-header__brand img,
.site-header__brand .custom-logo {
	width: auto;
	max-height: 37px;
}

/* Measured logo box: 137x37, two files (light over hero, dark on inner). */
.site-header__logo {
	display: block;
	/* Text fallback typography — overridden to 0 when an image is present. */
	font-family: var(--font-display);
	font-size: var(--fs-24);
	font-weight: var(--fw-medium);
	line-height: var(--lh-snug);
}

.site-header__logo:has(.site-header__mark) {
	line-height: 0;
}

.site-header__mark {
	display: none;
	width: auto;
	height: 37px;
}

.site-header--light .site-header__mark--light,
.site-header--dark .site-header__mark--dark {
	display: block;
}

/* Once the light header goes solid white, the dark mark takes over. */
.site-header--light.is-scrolled .site-header__mark--light { display: none; }
.site-header--light.is-scrolled .site-header__mark--dark { display: block; }

/* Nav sits hard right; the actions block follows it. */
.site-nav {
	flex: 1 1 auto;
}

.site-nav__list {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-end;
	gap: 20px;
}

/* Measured nav link: DM Sans 13px / 500, line-height 14.3px, tracking 0.52px
   (= exactly 0.04em), colour rgba(255,255,255,0.7) on the light variant. */
.site-nav__list a,
.mobile-menu__list a {
	display: inline-block;
	font-family: var(--font-body);
	font-size: var(--fs-13);
	font-weight: var(--fw-medium);
	/* 1.2em so the shadow offset below lines up exactly one row. */
	line-height: 1.2em;
	letter-spacing: var(--ls-4);
	/* The original renders nav labels and the CTA in caps. */
	text-transform: uppercase;
}

/*
 * MENU LINK SLIDE
 *
 * The label is painted twice with text-shadow rather than duplicated in the
 * DOM: one copy at rest colour sitting at 0 0, a second in the accent one row
 * (1.2em) below. `overflow: hidden` clips that second copy. On hover both
 * shift up 1.2em, so the accent copy slides into place as the rest copy
 * leaves — a single transition on text-shadow, no extra markup and no layout.
 *
 * The text itself is transparent, so `--link-c` carries the per-variant
 * colour instead of `color`. Scoped to hover-capable pointers: on touch there
 * is no hover, and transparent text would be a needless risk there.
 */
@media (hover: hover) {
	.site-nav__list a,
	.mobile-menu__list a {
		--link-c: var(--c-ink);
		--link-c-hover: var(--c-accent);
		color: transparent;
		overflow: hidden;
		text-shadow:
			0 0 var(--link-c),
			0 1.2em var(--link-c-hover);
		transition: text-shadow var(--dur-base) var(--ease-out);
	}

	.site-nav__list a:hover,
	.site-nav__list a:focus-visible,
	.mobile-menu__list a:hover,
	.mobile-menu__list a:focus-visible {
		text-shadow:
			0 -1.2em var(--link-c),
			0 0 var(--link-c-hover);
	}

	/*
	 * Forced-colours mode drops text-shadow entirely, which would leave the
	 * label invisible. Restore real text there.
	 */
	@media (forced-colors: active) {
		.site-nav__list a,
		.mobile-menu__list a {
			color: LinkText;
			text-shadow: none;
		}
	}
}

/* Reduced motion: swap the colour without the slide. */
@media (hover: hover) and (prefers-reduced-motion: reduce) {
	.site-nav__list a,
	.mobile-menu__list a {
		transition: none;
		color: var(--link-c);
		text-shadow: none;
	}

	.site-nav__list a:hover,
	.mobile-menu__list a:hover {
		color: var(--link-c-hover);
		text-shadow: none;
	}
}

.site-header__actions {
	flex: 0 0 auto;
}

/* --- Variants --------------------------------------------------------- */

.site-header--light .site-nav__list a { --link-c: var(--c-white-70); }
.site-header--dark .site-nav__list a { --link-c: var(--c-ink); }

.site-header--light .site-header__logo {
	color: var(--c-white-70);
}

.site-header--dark .site-header__logo {
	color: var(--c-ink);
}

/*
 * Scrolled state: solid white background. Applied by the header module once
 * the page passes the hero. On the dark variant the header is already solid,
 * so only the light variant needs its text colour inverted.
 */
.site-header.is-scrolled {
	background-color: var(--c-surface);
	/* Slightly tighter once pinned — keeps more of the viewport for content. */
	padding-block: 18px;
}

.site-header--light.is-scrolled .site-nav__list a { --link-c: var(--c-ink); }

.site-header--light.is-scrolled .site-header__logo {
	color: var(--c-ink);
}

.site-header--light.is-scrolled .btn--pill {
	color: var(--c-surface);
	background-color: var(--c-ink);
}

/* --------------------------------------------------------------------------
   BUTTONS
   Measured label: DM Sans 14px / 500, line-height 16.8px, tracking 0.28px
   (= exactly 0.02em).
   -------------------------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: var(--font-body);
	font-size: var(--fs-14);
	font-weight: var(--fw-medium);
	line-height: 1.2em;
	letter-spacing: var(--ls-2);
	text-align: center;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color var(--dur-base) var(--ease-out),
	            color var(--dur-base) var(--ease-out),
	            transform var(--dur-base) var(--ease-out);
}

.btn--pill {
	/* Measured 12px 20px at 41px tall, consistent across every pill. */
	padding: 12px 20px;
	min-height: 41px;
	border-radius: var(--r-pill);
	color: var(--c-surface);
	background-color: var(--c-ink);
}

.btn--light {
	color: var(--c-ink);
	background-color: var(--c-surface);
}

/* Outlined pill used by the post prev/next links. */
.btn--outline {
	color: var(--c-ink);
	background-color: transparent;
	border: 1px solid var(--c-body-20);
}

.btn--block {
	display: flex;
	width: 100%;
}

/* Contact submit: square corners and a taller box, not the pill. */
.btn--submit {
	padding: 18px 24px;
	border-radius: var(--r-sm);
	color: var(--c-surface);
	background-color: var(--c-ink);
}

.site-header--light .btn--pill {
	color: var(--c-ink);
	background-color: var(--c-surface);
}

/* --------------------------------------------------------------------------
   HOVER STATES
   The Framer original has none — verified by driving a real cursor onto every
   link and card and diffing computed styles across the full subtree.
   These are a deliberate addition for usability: links pick up the existing
   accent, and every button flips to the accent with white text.
   Delete this block to return to a strict 1:1 clone.
   -------------------------------------------------------------------------- */

/*
 * TEXT LINKS — animated underline.
 *
 * The underline is a pseudo-element scaled on the X axis rather than
 * `text-decoration`, because text-decoration cannot be transitioned. It grows
 * from the left on hover and retracts to the right on leave, so the motion
 * reads as directional rather than simply appearing.
 *
 * transform-origin flips between the two states to produce that; animating
 * `width` instead would trigger layout on every frame.
 */
.link-underline {
	position: relative;
	display: inline-block;
	text-decoration: none;
	transition: color var(--dur-base) var(--ease-out);
}

.link-underline::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -4px;
	width: 100%;
	height: 1px;
	background-color: currentColor;
	transform: scaleX(0);
	transform-origin: right center;
	transition: transform var(--dur-base) var(--ease-out);
}

/*
 * Links that carry a rule at rest invert the effect: the underline is visible
 * by default and wipes away on hover, retracting to the right, while the text
 * turns accent. The origin flip is what makes it retract rather than shrink
 * from both ends.
 */
.link-underline--always::after {
	transform: scaleX(1);
	transform-origin: left center;
}

@media (hover: hover) {
	.link-underline:hover,
	.link-underline:focus-visible,
	.footer-widget__list a:hover,
	.footer-widget__list a:focus-visible {
		color: var(--c-accent);
	}

	.link-underline:hover::after,
	.link-underline:focus-visible::after {
		transform: scaleX(1);
		transform-origin: left center;
	}

	/* Inverted: the rule wipes away instead of growing in. */
	.link-underline--always:hover::after,
	.link-underline--always:focus-visible::after {
		transform: scaleX(0);
		transform-origin: right center;
	}

	/*
	 * Every button — dark pill, white pill, outlined and the form submit —
	 * resolves to the same accent-on-white hover. Listed explicitly rather
	 * than relying on .btn alone, because the variants set their own
	 * background and would otherwise win on specificity.
	 */
	.btn:hover,
	.btn:focus-visible,
	.btn--pill:hover,
	.btn--pill:focus-visible,
	.btn--light:hover,
	.btn--light:focus-visible,
	.btn--outline:hover,
	.btn--outline:focus-visible,
	.btn--submit:hover,
	.btn--submit:focus-visible,
	.site-header--light .btn--pill:hover,
	.site-header--light .btn--pill:focus-visible,
	.site-header--light.is-scrolled .btn--pill:hover,
	.site-header--light.is-scrolled .btn--pill:focus-visible,
	.contact-card .btn:hover,
	.contact-card .btn:focus-visible {
		color: var(--c-surface);
		background-color: var(--c-accent);
		/* Outlined buttons need their border to follow the fill. */
		border-color: var(--c-accent);
	}
	.contact-card .btn:hover{background-color: #000;}
	.site-footer__email:hover,
	.site-footer__email:focus-visible {
		color: var(--c-accent);
	}
}

/* --------------------------------------------------------------------------
   MOBILE MENU
   Measured phone header: inner 350x38 at y20 -> 20px wrapper padding.
   Hamburger: 32px hit area, 24x1px lines.
   -------------------------------------------------------------------------- */

.menu-toggle {
	display: none;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}

.menu-toggle__label {
	font-family: var(--font-body);
	font-size: var(--fs-14);
	font-weight: var(--fw-medium);
	letter-spacing: var(--ls-2);
}

.menu-toggle__icon {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-end;
	gap: 6px;
	width: 32px;
	height: 32px;
}

.menu-toggle__line {
	display: block;
	width: 24px;
	height: 1px;
	background-color: currentColor;
	transition: transform var(--dur-base) var(--ease-out),
	            opacity var(--dur-fast) var(--ease-out);
}

/* Hamburger -> close, without changing the markup. */
.menu-toggle[aria-expanded="true"] .menu-toggle__line:first-child {
	transform: translateY(3.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__line:last-child {
	transform: translateY(-3.5px) rotate(-45deg);
}

.site-header--light .menu-toggle { color: var(--c-surface); }
.site-header--dark .menu-toggle { color: var(--c-ink); }
.site-header--light.is-scrolled .menu-toggle { color: var(--c-ink); }

.mobile-menu {
	position: fixed;
	inset: 0;
	z-index: var(--z-menu);
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 50px;
	/* Measured: 20px panel padding; logo sits at 20,20. */
	padding: 20px;
	background-color: var(--c-surface);
	/* Animated open/closed by the menu module; this is the closed state. */
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity var(--dur-base) var(--ease-out),
	            transform var(--dur-base) var(--ease-out);
}

/*
 * The closed state is carried by the `hidden` attribute, not by
 * visibility. Transitioning visibility makes the panel unfocusable for the
 * duration of the transition, so focus() silently no-ops and the menu opens
 * without moving keyboard focus into it. The attribute selector out-specifies
 * the display:flex above.
 */
.mobile-menu[hidden] {
	display: none;
}

.mobile-menu.is-open {
	opacity: 1;
	transform: translateY(0);
}

.mobile-menu__list {
	display: flex;
	flex-direction: column;
	/* Measured row pitch ~48px against a 17.6px line box. */
	gap: 26px;
}

/* --- Panel header: logo left, close right ------------------------------- */

.mobile-menu__top {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.mobile-menu__logo {
	display: block;
	line-height: 0;
}

.mobile-menu__mark {
	/* Measured 137x38, same box as the header logo. */
	width: auto;
	max-width: 137px;
	height: 38px;
	object-fit: contain;
}

/* Measured: "CLOSE" 16px DM Sans 500, uppercase, 0.04em tracking. */
.mobile-menu__close {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
	font-family: var(--font-body);
	font-size: var(--fs-16);
	font-weight: var(--fw-medium);
	line-height: 1.1em;
	letter-spacing: var(--ls-4);
	text-transform: uppercase;
	color: var(--c-ink);
	background: none;
	border: 0;
	cursor: pointer;
	transition: color var(--dur-fast) var(--ease-out);
}

/* The X: two 1px bars crossed, matching the hamburger's stroke weight. */
.mobile-menu__close-icon {
	position: relative;
	display: block;
	width: 16px;
	height: 16px;
}

.mobile-menu__close-icon span {
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 1px;
	background-color: currentColor;
}

.mobile-menu__close-icon span:first-child { transform: rotate(45deg); }
.mobile-menu__close-icon span:last-child { transform: rotate(-45deg); }

@media (hover: hover) {
	.mobile-menu__close:hover { color: var(--c-accent); }
}

/* Nav takes the remaining height so the CTA can sit under it, not centred. */
.mobile-menu__nav {
	margin-top: 30px;
}

.mobile-menu__list a {
	/* Measured: DM Sans 16px/500 at 17.6px, tracking 0.64px (= 0.04em). */
	font-family: var(--font-body);
	font-size: var(--fs-16);
	font-weight: var(--fw-medium);
	line-height: 1.1em;
	letter-spacing: var(--ls-4);
	text-transform: uppercase;
	color: var(--c-ink);
}

/* Locks background scroll while the menu is open. */
body.menu-open {
	overflow: hidden;
}

/*
 * The header CTA appears only on desktop. Verified against the original at
 * 900px and 1100px (nav links, no button) and 1250px (button present), so
 * this hides below the 1200px desktop breakpoint rather than at phone.
 */
@media (max-width: 1199.98px) {
	.site-header__actions {
		display: none;
	}
}

@media (max-width: 809.98px) {
	.site-header {
		padding: 20px;
	}

	.site-header.is-scrolled {
		padding-block: 14px;
	}

	.site-header__inner {
		justify-content: space-between;
		gap: 0;
	}

	.menu-toggle {
		display: flex;
	}
}

/* --------------------------------------------------------------------------
   FOOTER
   Measured: padding 100px 50px (desktop) / 60px 20px (phone);
   widget row flex-end gap 30px (desktop) / grid gap 50px (phone);
   link column gap 20px; copyright row gap 20px.
   -------------------------------------------------------------------------- */

.site-footer {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	/* Top padding lives on .site-footer__top; the wordmark band sits above it. */
	padding: 0 50px 100px;
	/*
	 * Light footer. Verified by measuring the oversized wordmark, which
	 * computes to rgb(27,29,31) — dark text — with every ancestor
	 * background transparent, i.e. sitting on the page's white.
	 */
	color: var(--c-ink);
	background-color: var(--c-surface);
	overflow: hidden;
}

.site-footer__inner {
	width: 100%;
	max-width: var(--container-max);
}

.site-footer__top {
	/*
	 * Measured column positions: left copy at x=120 (container start), right
	 * links at x=942 — i.e. 822px in on a 1200px track, so the right column is
	 * 378px wide. space-between would push it flush right instead.
	 */
	display: grid;
	grid-template-columns: 1fr 378px;
	align-items: start;
	/* Measured: 131px from the wordmark rule down to "Get in touch". */
	padding-top: 131px;
}

.site-footer__about {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
}

.site-footer__eyebrow {
	font-family: var(--font-body);
	/* Measured: DM Sans 14px/500, tracking 0.28px (0.02em), solid ink. */
	font-size: var(--fs-14);
	font-weight: var(--fw-medium);
	line-height: 1.2em;
	letter-spacing: var(--ls-2);
	color: var(--c-ink);
	text-transform: uppercase;
	/* Measured gap to the heading: y 437 -> 474. */
	margin-bottom: 20px;
}

.site-footer__heading {
	/* Measured: Instrument Sans 36px at 43.2px (1.2em), 480px column. */
	font-size: var(--fs-36);
	line-height: var(--lh-snug);
	color: var(--c-ink);
	max-width: 480px;
	/* Measured gap down to the Contact Us link. */
	margin-bottom: 19px;
}

/*
 * The footer call to action is an underlined text link in the original, not
 * a pill button.
 */
.site-footer__cta {
	font-family: var(--font-display);
	/* Measured: 24px at 28.8px line-height. */
	font-size: var(--fs-24);
	font-weight: var(--fw-medium);
	line-height: var(--lh-snug);
	color: var(--c-ink);
	/*
	 * Rule drawn by the .link-underline pseudo-element rather than a border,
	 * so it can animate. It starts visible via --always and recolours on
	 * hover along with the text.
	 */
	text-decoration: none;
}

.site-footer__text {
	font-size: var(--fs-16);
	line-height: var(--lh-body);
	color: var(--c-body-80);
}

.site-footer__widgets {
	display: flex;
	flex-direction: row;
	/* The grid cell already positions this column; flex-end pushed it flush
	   right, past the measured x=939. */
	justify-content: flex-start;
	gap: 30px;
}

.footer-widget__title {
	/* Measured gap to the first link: y 437 -> 474. */
	margin-bottom: 20px;
	font-family: var(--font-body);
	/* Measured: DM Sans 14px/500, tracking 0.28px, rgba(27,29,31,0.8). */
	font-size: var(--fs-14);
	font-weight: var(--fw-medium);
	line-height: 1.2em;
	letter-spacing: var(--ls-2);
	color: var(--c-ink-80);
	text-transform: uppercase;
}

.footer-widget__list {
	display: flex;
	flex-direction: column;
	/* Measured row pitch 39px against a 28.8px line box. */
	gap: 10px;
}

.footer-widget__list a {
	font-family: var(--font-display);
	/* Measured: Instrument Sans 24px/500 at 28.8px. */
	font-size: var(--fs-24);
	font-weight: var(--fw-medium);
	line-height: var(--lh-snug);
	color: var(--c-ink);
}

.site-footer__bottom {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	/* Measured: rule at y=752, bottom row baseline y=853. */
	margin-top: 100px;
	padding-top: 30px;
	border-top: 1px solid rgba(27, 29, 31, 0.2);
}

.site-footer__copyright,
.site-footer__email {
	font-size: var(--fs-14);
	line-height: var(--lh-body);
	letter-spacing: var(--ls-2);
	color: var(--c-body-80);
	/* Both render in caps in the original. */
	text-transform: uppercase;
}

/* --- Oversized wordmark band -------------------------------------------- */

.footer-wordmark {
	/*
	 * Full-bleed: the measured rule spans 1440px at x=0, while the rest of the
	 * footer sits on the 1200px track. Negative margins cancel the footer's
	 * 50px horizontal padding.
	 */
	align-self: stretch;
	width: auto;
	margin-inline: -50px;
	padding-top: 100px;
	/* Measured: wordmark baseline y=124 h=154, rule at y=306 -> 28px below. */
	padding-bottom: 28px;
	overflow: hidden;
	user-select: none;
	/* Measured full-bleed: 1440px wide at x=0, not the 1200px track. */
	border-bottom: 1px solid rgba(27, 29, 31, 0.2);
}

.footer-wordmark__track {
	display: flex;
	gap: 40px;
	white-space: nowrap;
	will-change: transform;
}

.footer-wordmark__item {
	font-family: var(--font-display);
	/* Measured: 140px Instrument Sans 500, line-height 154px (1.1em). */
	font-size: var(--fs-140);
	font-weight: var(--fw-medium);
	line-height: var(--lh-tight);
	letter-spacing: var(--ls-0);
	/* Measured rgb(27,29,31) rendered at low opacity against the white footer. */
	color: rgba(27, 29, 31, 0.2);
	text-transform: uppercase;
}

@media (min-width: 810px) and (max-width: 1199.98px) {
	.site-footer { padding: 0 30px 90px; }
	.footer-wordmark { margin-inline: -30px; padding-top: 90px; }
	.site-footer__top { grid-template-columns: 1fr 300px; padding-top: 80px; }
}

@media (max-width: 809.98px) {
	.site-footer {
		padding: 0 20px 60px;
	}

	.footer-wordmark {
		margin-inline: -20px;
		padding-top: 60px;
	}

	.site-footer__top {
		grid-template-columns: minmax(0, 1fr);
		gap: 50px;
		padding-top: 50px;
	}

	.site-footer__heading { font-size: var(--fs-28); }

	.site-footer__top {
		flex-direction: column;
		gap: 50px;
	}

	.site-footer__widgets {
		display: grid;
		gap: 50px;
		justify-content: stretch;
	}

	.site-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
		margin-top: 50px;
	}
}
