/* ---------- Fonts ---------- */
/* Playfair Display (Google Fonts, SIL Open Font License), loaded in functions.php.
   Helvetica comes from the visitor's system (Arial elsewhere). */

/* ---------- Tokens ---------- */
/* Palette from america.gov: ink #000C1F, navy #002664, #F7F7F7 / white, ink at 5–65% for secondary text and hairlines. */
:root {
	/* Light palette (america.gov): white page, #F7F7F7 card, ink #000C1F */
	--bg: #ffffff;
	--card: #f7f7f7;
	--ink: 0, 12, 31;                /* text color as RGB */
	--hl: #000c1f;                   /* clickable + emphasised text */
	--dim: rgba(var(--ink), 0.5);    /* body copy: readable, but recedes */
	--faint: rgba(var(--ink), 0.45);
	--rule: rgba(var(--ink), 0.1);
	--chat: #3421f0;

	--glass-tint: rgba(255, 255, 255, 0.6);
	--glass-tint-2: rgba(255, 255, 255, 0.2);
	--glass-edge: rgba(0, 12, 31, 0.1);
	--glass-shine: rgba(255, 255, 255, 1);
	--glass-shadow: rgba(0, 12, 31, 0.12);
	--glass-ink: #000c1f;
	--serif: "Playfair Display", Georgia, serif;
	--sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--measure: 920px;                /* max line length for all copy */
	/* Type scale: every size scales with the viewport between phone and desktop, so the
	   proportions stay consistent (desktop: 96 / 60 / 24px). */
	--fs-display: clamp(48px, 4.5vw + 31.1px, 96px);   /* 48px on a 375px phone → 96px at 1440px */
	--fs-title: clamp(30px, 2.82vw + 19.4px, 60px);    /* 30px → 60px */
	--fs-text: clamp(17px, 0.66vw + 14.5px, 24px);     /* 17px → 24px */
	--space: clamp(28px, 3.5vw, 48px);   /* one vertical rhythm unit, used everywhere */
	--page-r: clamp(24px, 3vw, 40px);     /* bottom corners of the page card that slides off the footer */
	color-scheme: light;
}

/* Registered so the glass lighting can glide instead of jump. */
@property --ix { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --iy { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --sx { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --sy { syntax: "<number>"; inherits: true; initial-value: 6; }
@property --mx { syntax: "<percentage>"; inherits: true; initial-value: 30%; }
@property --my { syntax: "<percentage>"; inherits: true; initial-value: 0%; }

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	/* Overscroll ("bounce") colour: white near the top, footer blue near the end (toggled in main.js). */
	background: var(--bg);
}
html.at-end { background: var(--chat); }

body {
	margin: 0;
	color: var(--dim);
	font-family: var(--sans);
	font-weight: 300;
	-webkit-font-smoothing: antialiased;
	transition: background-color .6s ease, color .6s ease;
	overflow-x: hidden;
}

a { color: inherit; }
button { font: inherit; color: inherit; }

/* ---------- Custom cursor ---------- */
.has-cursor,
.has-cursor * { cursor: none !important; }

.cursor {
	position: fixed;
	top: 0;
	left: 0;
	width: 10px;
	height: 10px;
	margin: -5px 0 0 -5px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 12, 31, .35), 0 0 0 .5px rgba(0, 12, 31, .08);
	pointer-events: none;
	z-index: 2147483647;          /* above everything, including pop-ups */
	opacity: 0;
	transition: width .25s ease, height .25s ease, margin .25s ease, background-color .25s ease, box-shadow .25s ease, opacity .3s ease;
}
.has-cursor .cursor { opacity: 1; }
.cursor.is-hover {
	width: 38px;
	height: 38px;
	margin: -19px 0 0 -19px;
	background: rgba(255, 255, 255, .16);
	box-shadow: inset 0 0 0 1.5px #fff, 0 2px 10px rgba(0, 12, 31, .3);
}

/* ---------- Liquid glass ---------- */
.glass {
	position: relative;
	isolation: isolate;
	color: var(--glass-ink);
	background: linear-gradient(135deg, var(--glass-tint), var(--glass-tint-2));
	-webkit-backdrop-filter: blur(14px) saturate(180%) brightness(1.08);
	backdrop-filter: blur(14px) saturate(180%) brightness(1.08);
	border: 1px solid var(--glass-edge);
	/* --ix/--iy: rim light on the edge nearest the cursor; --sx/--sy: shadow falling away
	   from it; --mx/--my: specular spot. Set by main.js only while this element is hovered. */
	box-shadow:
		inset calc(var(--ix) * 1px) calc(var(--iy) * 1px) 1px var(--glass-shine),
		inset calc(var(--ix) * -1px) calc(var(--iy) * -1px) 2px rgba(0, 0, 0, .1),
		inset 0 0 12px rgba(255, 255, 255, .06),
		calc(var(--sx) * 1px) calc(var(--sy) * 1px) 24px var(--glass-shadow);
	transition: --ix .5s ease-out, --iy .5s ease-out, --sx .5s ease-out, --sy .5s ease-out, --mx .5s ease-out, --my .5s ease-out;
}
.glass::before {      /* specular highlight across the top */
	content: "";
	position: absolute;
	inset: 1px;
	border-radius: inherit;
	background: radial-gradient(80% 90% at var(--mx) var(--my), rgba(255, 255, 255, .35), transparent 60%);
	mix-blend-mode: soft-light;
	pointer-events: none;
	z-index: -1;
}
.glass::after {       /* soft caustic along the bottom edge */
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: radial-gradient(80% 50% at calc(100% - var(--mx)) calc(110% - var(--my)), rgba(255, 255, 255, .14), transparent 70%);
	pointer-events: none;
	z-index: -1;
}

/* ---------- Pinned logo ---------- */
/* Zero-height sticky bar: the logo sits in the card's top padding and stays put while scrolling. */
.masthead {
	position: sticky;
	top: 0;
	z-index: 50;
	height: 0;
	--logo-h: 18px;           /* 30% smaller than before (26px) */
	--logo-top: calc(clamp(16px, 2vw, 24px) + var(--space));
}
.masthead::before {          /* blur behind the logo, in the logo's own shape (thickened + feathered: img/logo-halo.svg) */
	content: "";
	position: absolute;
	top: calc(var(--logo-top) - var(--logo-h) * 40 / 39);
	left: 50%;
	width: calc(var(--logo-h) * 417.45 / 39);
	height: calc(var(--logo-h) * 119 / 39);
	transform: translateX(-50%);
	background: var(--card);             /* matches whatever is behind: card, then page (see .logo-over-page) */
	-webkit-backdrop-filter: blur(36px);
	backdrop-filter: blur(36px);
	-webkit-mask: url("../img/logo-halo.svg") center / 100% 100% no-repeat;
	mask: url("../img/logo-halo.svg") center / 100% 100% no-repeat;
	pointer-events: none;
	transition: opacity .35s ease, background-color .3s ease;
}
.logo-over-page .masthead::before { background: var(--bg); }
.masthead .masthead-logo {
	position: absolute;
	top: var(--logo-top);
	left: 50%;
	width: auto;
	height: var(--logo-h);
	transform: translateX(-50%);
	background: var(--dim);              /* same colour as the body text */
	transition: opacity .35s ease;
}
.masthead.is-hidden .masthead-logo,
.masthead.is-hidden::before { opacity: 0; pointer-events: none; }

/* ---------- Typography ---------- */
.eyebrow {
	max-width: var(--measure);
	margin: 0 auto var(--space);
	font-family: var(--sans);
	font-weight: 400;
	font-size: var(--fs-text);
	line-height: 1.5;
	letter-spacing: -0.01em;
	color: var(--dim);
	text-align: center;
}
.eyebrow.small {
	font-family: var(--sans);
	font-size: 12px;
	color: var(--faint);
	line-height: 1.6;
}
.lead {
	margin: 0 auto;
	max-width: var(--measure);
	font-family: var(--serif);
	font-weight: 400;
	font-size: var(--fs-display);
	line-height: 1.06;
	letter-spacing: -0.02em;
	color: var(--dim);
	text-align: center;
	text-wrap: balance;
}
.hl-static { color: var(--hl); }
.hl .punct { color: var(--dim); }
.hl-arrow {
	position: relative;
	width: 0;                   /* zero width: punctuation sits where it normally would */
	height: 1em;
	vertical-align: top;
}
.hl-arrow svg {
	position: absolute;
	top: .12em;                 /* top right of the last word, above any comma/full stop */
	left: -.02em;
	display: block;
	width: .3em;
	height: .3em;
	transition: transform .3s ease;
}
.hl[aria-expanded="true"] .hl-arrow svg { transform: rotate(90deg); }

/* Clickable highlight */
.hl {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	letter-spacing: inherit;
	line-height: inherit;
	text-align: inherit;
	color: var(--hl);
	cursor: pointer;
	transition: color .35s ease;
}
/* While one highlight is in focus, the others in the same paragraph drop back to body color. */
.lead:has(.hl.is-active, .hl:focus-visible, .hl[aria-expanded="true"]) .hl:not(.is-active, :focus-visible, [aria-expanded="true"]) {
	color: var(--dim);
}
.hl:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; border-radius: 4px; }

/* ---------- Character float-in ---------- */
.w { white-space: nowrap; }
.ch,
.logo-stack {
	display: inline-block;
	opacity: 0;
	filter: blur(5px);
	transform: translate(-.35em, -.5em);
	transition:
		opacity .55s ease,
		filter .55s ease,
		transform .75s cubic-bezier(.2, .8, .2, 1);
}
.is-in .ch,
.is-in .logo-stack {
	opacity: 1;
	filter: blur(0);
	transform: none;
	transition-delay: var(--d, 0ms);   /* stagger only on the way in */
}

@media (prefers-reduced-motion: reduce) {
	.ch { transition: opacity .3s ease; transform: none; filter: none; transition-delay: 0ms; }
}

/* ---------- Inline client logos ---------- */
.logo-stack {
	display: inline-flex;
	align-items: center;
	vertical-align: -0.14em;
	margin: 0 .24em;            /* same gap before and after the chips */
	padding: 0;
	border: 0;
	background: none;
	font-size: inherit;
	cursor: pointer;
	perspective: 4em;
}
.disc {
	--glyph-color: #fff;
	position: relative;
	flex: none;
	width: .9em;
	height: .9em;
	margin-left: -.24em;
	border-radius: 50%;
	border: .035em solid #fff;
	background-color: #ccc;
	box-shadow: 0 .05em .16em rgba(0, 12, 31, .35);
	transition: transform .22s ease-in;
}
.logo-pool + .disc { margin-left: 0; }   /* first visible disc: no overlap with the word before */
.disc.is-turning { transform: rotateY(90deg); }
.disc::after {
	content: "";
	position: absolute;
	inset: 24%;
	background: var(--glyph-color);
	-webkit-mask: var(--glyph) center / contain no-repeat;
	mask: var(--glyph) center / contain no-repeat;
}
.logo-stack:hover .disc { box-shadow: 0 .07em .22em rgba(0, 12, 31, .45); }
.logo-stack:focus-visible { outline: 1px solid currentColor; outline-offset: 6px; border-radius: 1em; }

.disc[data-brand="mcdonalds"] { background-color: #da291c; --glyph-color: #ffc72c; --glyph: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/mcdonalds.svg"); }
.disc[data-brand="cocacola"]  { background-color: #f40009; --glyph: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/cocacola.svg"); }
.disc[data-brand="cocacola"]::after { inset: 12%; }
.disc[data-brand="instagram"] { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); --glyph: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/instagram.svg"); }
.disc[data-brand="facebook"]  { background-color: #fff; --glyph-color: #0866ff; --glyph: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/facebook.svg"); }
.disc[data-brand="facebook"]::after { inset: 10%; }
.disc[data-brand="aldi"]      { background-color: #00005f; --glyph: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/aldisud.svg"); }

/* ---------- Hero ---------- */
.hero-wrap { padding: clamp(16px, 2vw, 24px); }   /* was 8px */
.hero-card {
	min-height: calc(100vh - 2 * clamp(16px, 2vw, 24px));
	min-height: calc(100svh - 2 * clamp(16px, 2vw, 24px));
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: calc(var(--space) * 3) clamp(16px, 6vw, 80px) calc(var(--space) * 3.9);   /* bottom: +30% */
	border-radius: 28px;
	background: var(--card);
	transition: background-color .6s ease;
}

/* ---------- Clients (sticky) ---------- */
.clients-track { height: 170vh; }
.lead-sm + .lead-sm { margin-top: 1em; }
.clients-sticky {
	position: sticky;
	top: 0;
	height: 100vh;
	height: 100svh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: calc(var(--space) * 2) clamp(16px, 6vw, 80px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility 0s linear .3s;
}
.clients-on .clients-sticky {
	opacity: 1;
	visibility: visible;
	transition: opacity .3s ease, visibility 0s;
}
.lead-sm {
	font-family: var(--sans);
	font-weight: 400;
	font-size: var(--fs-text);
	line-height: 1.5;
	letter-spacing: -0.01em;
}

/* ---------- CTA ---------- */
.rule {
	max-width: var(--measure);
	margin: 0 auto;
	width: calc(100% - 32px);
	border: 0;
	border-top: 1px solid var(--rule);
}
/* Pinned like the clients section: stays centred on screen for a while before scrolling on. */
.cta-track { height: 170vh; }
.cta {
	position: sticky;
	top: 0;
	height: 100vh;
	height: 100svh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0 16px;
	transition: opacity .4s ease, visibility 0s;
}
/* Fades out once the credits in the footer come into view. */
.credits-on .cta {
	opacity: 0;
	visibility: hidden;
	transition: opacity .4s ease, visibility 0s linear .4s;
}
.cta-question {
	max-width: var(--measure);
	margin: 0 0 calc(var(--space) * 1.5);   /* optically matches the heading → question gap */
	font-family: var(--serif);
	font-weight: 400;
	font-size: var(--fs-title);
	line-height: 1.04;
	letter-spacing: -0.015em;
	text-align: center;
	color: var(--hl);                 /* emphasised */
	text-wrap: balance;
}
.cta-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: .4em;                       /* one gap between all three: button → LinkedIn → Dribbble */
	font-size: var(--fs-text);
}
.icon-link {                       /* LinkedIn / Dribbble: icon only, body-text colour */
	display: inline-grid;
	place-items: center;
	width: 2.7em;                    /* same height as the Let's chat button */
	height: 2.7em;
	border-radius: 50%;
	background: rgba(var(--ink), .06);   /* visible circle */
	color: var(--dim);
	transition: color .25s ease, background-color .25s ease, transform .35s cubic-bezier(.2, .8, .2, 1.2);
}
.icon-link svg { width: 1.1em; height: 1.1em; fill: currentColor; }
.icon-link:hover { color: var(--hl); background: rgba(var(--ink), .1); transform: scale(1.04); }
.icon-link:focus-visible,
.cta-button:focus-visible { outline: 2px solid var(--chat); outline-offset: 3px; }
.cta-button {
	display: inline-flex;
	align-items: center;
	padding: .6em 1.35em;              /* scales with the text: 2.7em tall */
	border-radius: 999px;
	background: var(--chat);
	color: #fff;
	font-family: var(--sans);
	font-weight: 400;
	font-size: var(--fs-text);
	line-height: 1.5;
	letter-spacing: -0.01em;
	text-decoration: none;
	transition: transform .35s cubic-bezier(.2, .8, .2, 1.2), filter .3s ease;
}
.cta-button:hover { transform: scale(1.04); filter: brightness(1.12); }

/* ---------- Page card + reveal footer ---------- */
/* All content sits on a white card with rounded bottom corners. The blue footer is pinned
   to the bottom of the screen behind it, so the card slides up off it at the end. */
.page {
	position: relative;
	z-index: 1;
	display: block;
	background: var(--bg);
	border-radius: 0 0 var(--page-r) var(--page-r);
	box-shadow:
		0 1px 2px rgba(0, 12, 31, .04),
		0 18px 40px -16px rgba(0, 12, 31, .22);
}
.footer {
	position: sticky;
	bottom: 0;
	z-index: 0;
	margin-top: calc(-1 * var(--page-r));        /* tuck under the card's rounded corners */
	padding: calc(var(--page-r) + var(--space) * 1.5) 0 0;   /* logo runs edge to edge, flush with the bottom */
	background: var(--chat);
	text-align: center;
	overflow: hidden;
}
.credits {
	max-width: var(--measure);
	margin: 0 auto var(--space);
	padding: 0 16px;
	font-family: var(--sans);
	font-weight: 400;
	font-size: var(--fs-text);
	line-height: 1.5;
	letter-spacing: -0.01em;
	color: rgba(255, 255, 255, .7);
}
.footer .logo-mark {               /* the SVG logo (img/logo.svg) in white, full page width */
	width: 100%;
	margin: 0;
	background: #fff;
}
.logo-mark {
	display: block;
	width: min(var(--measure), 100%);
	margin: 0 auto;
	aspect-ratio: 337.45 / 39;
	background: rgba(var(--ink), .85);
	-webkit-mask: url("../img/logo.svg") center / contain no-repeat;
	mask: url("../img/logo.svg") center / contain no-repeat;
}

/* ---------- Pop-up ---------- */
.popover {
	position: fixed;
	z-index: 60;
	top: 0;
	left: 0;
	width: min(420px, calc(100vw - 32px));
	padding: 18px 22px 22px;
	border-radius: 24px;
	font-family: var(--sans);
	font-weight: 400;
	font-size: var(--fs-text);
	line-height: 1.35;
	letter-spacing: -0.01em;
	opacity: 0;
	transform: scale(.94) translateY(-4px);
	transform-origin: var(--origin, top center);
	transition: opacity .25s ease, transform .35s cubic-bezier(.2, .9, .3, 1.3), --ix .5s ease-out, --iy .5s ease-out, --sx .5s ease-out, --sy .5s ease-out, --mx .5s ease-out, --my .5s ease-out;
	pointer-events: none;
}
.popover.is-open { opacity: 1; transform: none; pointer-events: auto; }
.popover-label {
	display: block;
	margin-bottom: 4px;
	font-family: var(--sans);
	font-weight: 400;
	font-size: var(--fs-text);
	line-height: 1.5;
	letter-spacing: -0.01em;
	opacity: .5;
}
.popover-note { display: block; }

/* ---------- Without JavaScript ---------- */
/* Nothing is split or animated, so make sure nothing stays hidden. */
.no-js .clients-sticky { opacity: 1; visibility: visible; }
.no-js .logo-stack { display: none; }
.no-js .masthead::before { display: none; }
