/*
 * NS Digital Consulting — custom site stylesheet.
 * Self-hosted fonts, no external CDN requests, no framework.
 */

@font-face {
	font-family: 'Bricolage';
	src: url('../fonts/bricolage-grotesque.woff2') format('woff2');
	font-weight: 200 800;
	font-display: swap;
}
@font-face {
	font-family: 'Plex Mono';
	src: url('../fonts/ibm-plex-mono.woff2') format('woff2');
	font-weight: 500;
	font-display: swap;
}

:root {
	--ink: #14101b;
	--paper: #faf8fb;
	--paper-tint: #f1edf3;
	--mauve: #6e6478;
	--magenta: #ce0074;
	--violet: #3e1070;
	/* Always this exact shade, in either theme — logo mark, hero mosaic,
	   primary CTA buttons. These pair with a fixed white/near-black
	   partner color, so they can't be allowed to drift toward a
	   dark-mode-brightened shade without breaking that contrast. */
	--magenta-fixed: #ce0074;
	--violet-fixed: #3e1070;
	--border: rgba(20, 16, 27, 0.13);
	--border-strong: rgba(20, 16, 27, 0.22);
	--success-bg: #e6f4ea;
	--success-text: #1e4620;
	--error-bg: #fdecea;
	--error-text: #611a15;
	--font-display: 'Bricolage', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--font-mono: 'Plex Mono', ui-monospace, Consolas, monospace;
	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	color-scheme: light;
}

/* ---------- Dark mode ----------
   --ink/--paper/--paper-tint/--mauve/--magenta/--violet are the only
   tokens that re-theme; everything built on them (body text/bg, cards,
   bands, borders) follows automatically. Applies when the OS prefers
   dark and the user hasn't overridden it, OR when the user has
   explicitly chosen a theme (data-theme, set by assets/js/theme.js and
   persisted to localStorage) — an explicit choice always wins over the
   OS preference, in either direction. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--ink: #f6f2f8;
		--paper: #14101b;
		--paper-tint: #1e1826;
		--mauve: #a89db1;
		--magenta: #ff4fa3;
		--violet: #9a6bdd;
		--border: rgba(246, 242, 248, 0.13);
		--border-strong: rgba(246, 242, 248, 0.22);
		--success-bg: rgba(30, 120, 60, 0.18);
		--success-text: #8fd8a0;
		--error-bg: rgba(190, 40, 40, 0.2);
		--error-text: #ff9d94;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--ink: #f6f2f8;
	--paper: #14101b;
	--paper-tint: #1e1826;
	--mauve: #a89db1;
	--magenta: #ff4fa3;
	--violet: #9a6bdd;
	--border: rgba(246, 242, 248, 0.13);
	--border-strong: rgba(246, 242, 248, 0.22);
	--success-bg: rgba(30, 120, 60, 0.18);
	--success-text: #8fd8a0;
	--error-bg: rgba(190, 40, 40, 0.2);
	--error-text: #ff9d94;
	color-scheme: dark;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* scrollbar-gutter keeps the scrollbar's width reserved even on pages
   short enough not to need one. Without it, a short page (Contact) is
   ~15px wider than a long one (Home), and because .site-container is
   centred the header lands 7.5px further right — a visible sideways
   jump on every navigation, which the view transition then animates. */
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--ink);
	background: var(--paper);
	line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--magenta); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--magenta); outline-offset: 2px; }

/* ---------- Custom cursor (desktop pointer devices only — see assets/js/cursor.js) ---------- */
body.has-custom-cursor, body.has-custom-cursor a, body.has-custom-cursor button { cursor: none; }
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 999; border-radius: 50%; transform: translate(-50%, -50%); }
.cursor-dot { width: 6px; height: 6px; background: var(--magenta); transition: transform 0.15s ease, opacity 0.15s ease; }
.cursor-ring { width: 34px; height: 34px; border: 1px solid var(--border-strong); transition: transform 0.18s cubic-bezier(0.22, 0.61, 0.36, 1), width 0.2s ease, height 0.2s ease, border-color 0.2s ease, opacity 0.15s ease; }
body.cursor-hover .cursor-ring { width: 64px; height: 64px; border-color: var(--magenta); }
@media (prefers-reduced-motion: reduce) { .cursor-dot, .cursor-ring { transition: none; } }

h1, h2, h3, h4, .site-branding {
	font-family: var(--font-display);
	font-weight: 700;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

/* ---------- Motion: scroll reveals ----------
   Hidden state is scoped to html.js (set before paint in header.php), so
   with no JS nothing is ever hidden. .reveal slides up; .reveal-fade only
   fades (used inside clipped/overflow-hidden contexts like the bento). */
.js .reveal, .js .reveal-fade {
	opacity: 0;
	transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), filter 0.85s cubic-bezier(0.16, 1, 0.3, 1);
	will-change: opacity, transform;
}
/* Text blocks also de-blur as they settle; cards don't, so their borders
   and images stay crisp throughout. */
.js .reveal { transform: translateY(22px); filter: blur(5px); }
.reveal.is-visible, .reveal-fade.is-visible { opacity: 1; transform: none; filter: blur(0); }

/* Word-by-word heading reveal: each word rises out from behind a mask.
   The per-word delay is set inline by animations.js as it splits the text. */
.js .reveal-text .word { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.js .reveal-text .word-inner { display: inline-block; transform: translateY(110%); transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-text.is-visible .word-inner { transform: translateY(0); }
/* Staggered cascades within known groups. */
.js .stats-strip .stat:nth-child(2) { transition-delay: 0.07s; }
.js .stats-strip .stat:nth-child(3) { transition-delay: 0.14s; }
.js .stats-strip .stat:nth-child(4) { transition-delay: 0.21s; }
.js .bento .card:nth-child(2) { transition-delay: 0.07s; }
.js .bento .card:nth-child(3) { transition-delay: 0.14s; }
.js .bento .card:nth-child(4) { transition-delay: 0.21s; }
.js .process-grid > div:nth-child(2) { transition-delay: 0.1s; }
.js .process-grid > div:nth-child(3) { transition-delay: 0.2s; }
.js .portfolio-grid .reveal-fade:nth-child(2) { transition-delay: 0.08s; }
.js .portfolio-grid .reveal-fade:nth-child(3) { transition-delay: 0.16s; }

/* ---------- Motion: hero entrance + mosaic float ----------
   Scoped to html.js and to users who haven't asked for reduced motion.
   The hero button fades only (no transform) so its hover-lift stays free;
   the float lives on the .hero-mosaic container, never the squares, so it
   never fights their hover-pop transform. */
@media (prefers-reduced-motion: no-preference) {
	.js .hero .eyebrow, .js .hero h1, .js .hero .lead { opacity: 0; animation: heroIn 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
	.js .hero .eyebrow { animation-delay: 0.05s; }
	.js .hero h1 { animation-delay: 0.16s; }
	.js .hero .lead { animation-delay: 0.3s; }
	.js .hero .button { opacity: 0; animation: fadeIn 0.7s ease 0.46s forwards; }
	.js .hero-mosaic { animation: mosaicIn 1s cubic-bezier(0.16, 1, 0.3, 1) both, floatMosaic 6s ease-in-out 1.1s infinite; }
}
@keyframes heroIn { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes mosaicIn { from { opacity: 0; transform: translateY(10px) scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes floatMosaic { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (prefers-reduced-motion: reduce) {
	.js .reveal, .js .reveal-fade { opacity: 1; transform: none; filter: none; transition: none; }
	.js .reveal-text .word-inner { transform: none; transition: none; }
}

/* ---------- Motion: cross-page view transitions ----------
   Same-origin navigations cross-fade instead of hard-cutting. Browsers
   without support just navigate normally. The header and footer are
   named so they stay put while only the page body transitions. */
@media (prefers-reduced-motion: no-preference) {
	@view-transition { navigation: auto; }
}
.site-header { view-transition-name: site-header; }
.site-footer { view-transition-name: site-footer; }
::view-transition-old(root) { animation: vtOut 0.26s cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vtIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Layout ---------- */
.site-container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.site-header { border-bottom: 0.5px solid var(--border); padding: 20px 0; }
.site-header .site-container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.site-branding { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 700; font-size: 1.15rem; }
.site-branding a { color: var(--ink); display: flex; align-items: center; gap: 10px; }
.primary-navigation { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.primary-navigation ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; flex-wrap: wrap; }
.primary-navigation a {
	color: var(--mauve);
	font-family: var(--font-mono);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.primary-navigation a.current { color: var(--ink); }
.header-socials { display: flex; gap: 8px; padding-left: 16px; border-left: 0.5px solid var(--border); }
.header-socials .social-icon { width: 30px; height: 30px; }
.theme-toggle {
	display: flex; align-items: center; justify-content: center;
	width: 30px; height: 30px; border-radius: 50%; padding: 0;
	border: 0.5px solid var(--border); background: none; color: var(--mauve);
	cursor: pointer; transition: color 0.25s ease, border-color 0.25s ease;
}
.theme-toggle:hover, .theme-toggle:focus-visible { color: var(--magenta); border-color: var(--magenta); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
	:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}
.skip-link {
	position: absolute; left: -9999px; top: 0;
	background: var(--ink); color: var(--paper);
	padding: 10px 16px; z-index: 10000;
}
.skip-link:focus { left: 12px; top: 12px; }

.site-main { min-height: 50vh; }
.site-main > .site-container { padding: 48px 24px; }
.site-footer { border-top: 0.5px solid var(--border); padding: 32px 0; margin-top: 48px; font-size: 0.9rem; color: var(--mauve); }
.site-footer .site-branding { font-size: 0.95rem; }
.footer-contact { margin: 4px 0 16px; }
.footer-contact a { color: var(--mauve); }
.footer-contact a:hover { color: var(--magenta); }

.social-icons { display: flex; gap: 10px; margin: 16px 0; }
.social-icon {
	display: flex; align-items: center; justify-content: center;
	width: 36px; height: 36px; border-radius: 50%;
	border: 0.5px solid var(--border);
	color: var(--mauve);
	transition: color 0.25s ease, border-color 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease;
}
.social-icon svg path { fill: currentColor; }
.social-icon:hover, .social-icon:focus-visible {
	color: var(--magenta); border-color: var(--magenta);
	filter: brightness(1.15); box-shadow: 0 6px 16px -6px var(--magenta);
	text-decoration: none;
}

/* ---------- Hero + hover-pop mosaic ---------- */
.hero { position: relative; overflow: visible; padding: 64px 0 56px; text-align: left; }
/* Aurora: two soft colour blooms drifting behind the hero. Pure radial
   gradients (no blur filter) so nothing bleeds up into the header and
   there's no per-frame filter cost. */
.hero::before {
	content: '';
	position: absolute;
	top: 0; left: -10%; right: -10%;
	height: 440px;
	z-index: 0;
	pointer-events: none;
	background:
		radial-gradient(42% 48% at 28% 42%, rgba(206, 0, 116, 0.16), transparent 70%),
		radial-gradient(38% 44% at 72% 30%, rgba(62, 16, 112, 0.16), transparent 70%);
}
@media (prefers-reduced-motion: no-preference) {
	.hero::before { animation: auroraDrift 20s ease-in-out infinite alternate; }
}
@keyframes auroraDrift {
	from { transform: translate3d(-2.5%, 0, 0) scale(1); }
	to { transform: translate3d(2.5%, -1.5%, 0) scale(1.09); }
}
/* The glow needs more presence against a dark page. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .hero::before {
		background:
			radial-gradient(42% 48% at 28% 42%, rgba(206, 0, 116, 0.28), transparent 70%),
			radial-gradient(38% 44% at 72% 30%, rgba(124, 58, 200, 0.24), transparent 70%);
	}
}
:root[data-theme="dark"] .hero::before {
	background:
		radial-gradient(42% 48% at 28% 42%, rgba(206, 0, 116, 0.28), transparent 70%),
		radial-gradient(38% 44% at 72% 30%, rgba(124, 58, 200, 0.24), transparent 70%);
}
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.1; margin: 0 0 20px; max-width: 16ch; }
.hero .lead, p.lead { font-size: 1.1rem; color: var(--mauve); max-width: 46ch; margin: 0 0 28px; }
.eyebrow { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--magenta); margin: 0 0 18px; }

.hero-mosaic { position: absolute; top: -28px; right: -12px; width: 150px; height: 150px; perspective: 500px; z-index: 0; }
.hero-mosaic-sq { position: absolute; border-radius: 3px; transform-style: preserve-3d; transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease; will-change: transform; }
.hero-mosaic-sq:hover { transform: translateZ(34px) scale(1.08); filter: brightness(1.4) saturate(1.1); z-index: 1; }
.hero-mosaic-sq.sq-1 { top: 0; left: 60px; width: 50px; height: 50px; background: var(--magenta-fixed); }
.hero-mosaic-sq.sq-2 { top: 50px; left: 110px; width: 40px; height: 40px; background: var(--violet-fixed); opacity: 0.85; }
.hero-mosaic-sq.sq-3 { top: 50px; left: 60px; width: 40px; height: 40px; background: var(--violet-fixed); opacity: 0.5; }
.hero-mosaic-sq.sq-4 { top: 90px; left: 110px; width: 30px; height: 30px; background: var(--magenta-fixed); opacity: 0.3; }
.hero-mosaic-sq.sq-1:hover, .hero-mosaic-sq.sq-4:hover { box-shadow: 0 16px 30px -8px rgba(206, 0, 116, 0.55); opacity: 1; }
.hero-mosaic-sq.sq-2:hover, .hero-mosaic-sq.sq-3:hover { box-shadow: 0 16px 30px -8px rgba(62, 16, 112, 0.55); opacity: 1; }
.hero > * { position: relative; z-index: 1; }
@media (max-width: 640px) { .hero-mosaic { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero-mosaic-sq { transition: none; } }

/* ---------- Stats strip ---------- */
.stats-strip { display: flex; flex-wrap: wrap; gap: 32px; padding: 24px 0 8px; margin-bottom: 8px; border-bottom: 0.5px solid var(--border); }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-icon { display: inline-flex; color: var(--magenta); margin-bottom: 4px; }
.stat-value { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--ink); }
.stat-label { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--mauve); }
@media (max-width: 560px) { .stats-strip { gap: 20px 28px; } .stat-value { font-size: 1.3rem; } }

/* ---------- Buttons ---------- */
.button, button[type="submit"] {
	display: inline-block; background: var(--magenta-fixed); color: #fff;
	padding: 12px 24px; border-radius: 3px; font-weight: 600;
	border: none; cursor: pointer; font-size: 0.95rem; font-family: inherit;
}
.button:hover, .button:focus-visible, button[type="submit"]:hover { background: var(--violet); color: var(--paper); text-decoration: none; }
.button-ghost {
	display: inline-block; padding: 11px 22px; border: 0.5px solid var(--border-strong);
	border-radius: 3px; font-weight: 600; color: var(--ink);
}
.button-ghost:hover, .button-ghost:focus-visible { border-color: var(--ink); text-decoration: none; }
/* Micro-interactions: buttons lift, "See all" arrows slide. */
/* transform easing is tuned for the magnetic pull in animations.js:
   quick enough to track the cursor, soft enough to spring back. */
.button { transition: background 0.25s ease, color 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease; }
.button:hover, .button:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 26px -12px var(--magenta-fixed); }
.button-ghost { transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.button-ghost:hover, .button-ghost:focus-visible { transform: translateY(-2px); }
.arrow-link { font-weight: 600; }
.arrow-link .arrow { display: inline-block; transition: transform 0.2s ease; }
.arrow-link:hover, .arrow-link:focus-visible { text-decoration: none; }
.arrow-link:hover .arrow, .arrow-link:focus-visible .arrow { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) {
	.button, .button-ghost, .arrow-link .arrow { transition: none; }
	.button:hover, .button:focus-visible, .button-ghost:hover, .button-ghost:focus-visible { transform: none; }
	.arrow-link:hover .arrow, .arrow-link:focus-visible .arrow { transform: none; }
}

/* ---------- Generic section ---------- */
.section { padding: 48px 0; }
.section-icon { display: inline-flex; color: var(--magenta); margin-bottom: 10px; }
.section-tint { background: var(--paper-tint); margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); padding-left: calc(50vw - 50%); padding-right: calc(50vw - 50%); }
.section h2 { font-size: 1.5rem; margin: 0 0 12px; }

/* ---------- Bento grid: Services + Why us combined ----------
   Packed tight, like an actual bento box: cards touch, a 1px shared
   background shows through as a hairline divider instead of a visible
   gap, and the whole grid is one rounded rectangle (overflow:hidden
   clips the corner cards) rather than four separately-rounded boxes. */
.bento {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	background: var(--border);
	border: 0.5px solid var(--border);
	border-radius: 8px;
	overflow: hidden;
	margin: 28px 0;
}
.bento .card { padding: 24px; background: var(--paper-tint); }
.bento .card-icon { display: inline-flex; margin-bottom: 12px; color: var(--magenta); }
.bento .card.b-tall .card-icon { color: #ce0074; }
.bento .card.b-accent .card-icon { color: var(--paper); opacity: 0.9; }
/* Every cell is placed explicitly so the four cards tile the 4x2 grid
   exactly. With auto-placement the spans only covered 6 of the 8 cells,
   and the 2 leftovers showed the container's --border through as grey
   gaps. Total card area must always equal the grid area — grid-auto-flow
   can't fill a shortfall.
       row 1:  [ Build ......... ][ Direct ][ Maintain ]
       row 2:  [ Editable ...... ][   "    ][    "     ]                */
.bento .card.b-wide { grid-column: 1 / 3; grid-row: 1; }
.bento .card.b-tall { grid-column: 3; grid-row: 1 / 3; }
.bento .card.b-side { grid-column: 4; grid-row: 1 / 3; }
.bento .card.b-accent { grid-column: 1 / 3; grid-row: 2; }
/* Fixed color, not a theme token — this card is meant to always read as
   a bright inverted accent, regardless of the page's own theme. */
.bento .card.b-tall { background: #faf8fb; color: #14101b; }
.bento .card.b-tall h3, .bento .card.b-tall p { color: #14101b; }
.bento .card.b-tall p { color: rgba(20, 16, 27, 0.75); }
.bento .card.b-tall .tag { color: #ce0074; }
/* Token-driven — brightens along with the rest of the page in dark mode. */
.bento .card.b-accent { background: var(--violet); color: var(--paper); }
.bento .card.b-accent h3 { color: var(--paper); }
.bento .card.b-accent p, .bento .card.b-accent .tag { color: var(--paper); opacity: 0.8; }
.bento h3 { font-size: 1.05rem; margin: 0 0 8px; }
.bento p { color: var(--mauve); margin: 0; font-size: 0.92rem; }
.bento .tag {
	font-family: var(--font-mono); font-size: 10px; text-transform: uppercase;
	letter-spacing: 0.06em; color: var(--magenta); display: block; margin-bottom: 10px;
}
/* Narrower layouts drop the explicit placement and re-tile: at two
   columns the wide cards span the full width and the two small ones
   share the middle row (2+1+1+2 = 6 cells = 3 full rows); at one column
   everything simply stacks. Both fill completely, so no grey shows. */
@media (max-width: 760px) {
	.bento { grid-template-columns: 1fr 1fr; }
	.bento .card.b-wide, .bento .card.b-accent { grid-column: span 2; grid-row: auto; }
	.bento .card.b-tall, .bento .card.b-side { grid-column: auto; grid-row: auto; }
}
@media (max-width: 520px) {
	.bento { grid-template-columns: 1fr; }
	.bento .card.b-wide, .bento .card.b-tall, .bento .card.b-side, .bento .card.b-accent { grid-column: auto; grid-row: auto; }
}

/* ---------- How we work ----------
   No special band treatment — background/text just follow the normal
   page tokens, so this section is plain white in light mode and matches
   the page background exactly in dark mode, same as any other section. */
.process { background: var(--paper); color: var(--ink); }
.process h2 { color: var(--ink); }
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; margin: 24px 0; }
.process-grid > div { border-top: 2px solid var(--magenta); padding-top: 18px; }
.process-icon { display: inline-flex; color: var(--magenta); margin-bottom: 12px; }
.process-grid h3 { color: var(--ink); font-size: 1.05rem; margin: 0 0 8px; }
.process-grid p { color: var(--mauve); margin: 0; }
.step-no { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: #ce0074; display: block; margin: 0 0 10px; }

/* ---------- CTA band ---------- */
.cta-band {
	display: flex; align-items: center; justify-content: space-between;
	gap: 24px; flex-wrap: wrap;
	background: var(--violet); color: var(--paper);
	padding: 40px 32px; margin: 40px 0; border-radius: 4px;
}
.cta-band h2 { margin: 0; font-size: 1.5rem; color: var(--paper); }
.cta-band .button { background: var(--paper); color: var(--violet); }
.cta-band .button:hover { background: var(--ink); color: var(--paper); }

/* ---------- Founder profile ---------- */
.founder-profile { display: flex; gap: 40px; align-items: flex-start; margin: 32px 0; }
.founder-photo { flex: 0 0 33%; margin: 0; }
.founder-photo img { border-radius: 4px; aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper-tint); }
.founder-bio { flex: 1; }
@media (max-width: 599px) { .founder-profile { flex-direction: column; } }

/* ---------- Testimonials ---------- */
.testimonial-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-left: 62px; }

/* ---------- Testimonial spotlight (replaces the card grid above) ---------- */
.testi-spotlight { display: flex; align-items: center; gap: 20px; margin: 28px 0 18px; }
.testi-nav {
	flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
	border: 0.5px solid var(--border-strong); background: none;
	display: flex; align-items: center; justify-content: center; font-size: 1.1rem; cursor: pointer;
}
.testi-nav:hover { border-color: var(--magenta); color: var(--magenta); }
/* Height is set inline by assets/js/app.js to match the active slide's
   actual content (slides are absolutely positioned for the crossfade,
   so they can't size this wrapper on their own) — min-height is just
   the pre-JS/no-JS fallback. */
.testi-slide-wrap { position: relative; flex: 1; min-height: 160px; transition: height 0.35s ease; }
.testi-slide { position: absolute; inset: 0; opacity: 0; transform: translateY(10px); transition: opacity 0.35s ease, transform 0.35s ease; pointer-events: none; }
.testi-slide.is-active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.testi-quote { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.1rem, 2.2vw, 1.5rem); line-height: 1.4; margin: 0 0 20px; text-wrap: balance; }
.testi-who b { display: block; font-size: 0.95rem; }
.testi-who span { color: var(--mauve); font-size: 0.85rem; }
.testi-dots { display: flex; gap: 8px; margin: 0 0 24px 62px; }
.testi-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--border-strong); cursor: pointer; padding: 0; }
.testi-dot.is-active { background: var(--magenta); width: 22px; border-radius: 5px; transition: width 0.25s ease, background 0.25s ease; }
@media (max-width: 560px) {
	.testi-spotlight { gap: 10px; }
	.testimonial-actions, .testi-dots { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .testi-slide, .testi-dot, .testi-slide-wrap { transition: none; } }

/* ---------- Partners / collaborators ---------- */
.partners-row { display: flex; flex-wrap: wrap; gap: 32px 40px; margin: 28px 0; }
.partner-item { min-width: 160px; }
.partner-item .partner-name { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; color: var(--ink); }
.partner-item a.partner-name:hover { color: var(--magenta); }
.partner-item .partner-role { display: block; color: var(--mauve); font-size: 0.85rem; margin-top: 2px; }

/* ---------- Portfolio grid + cards ---------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin: 32px 0; }
.portfolio-card { border: 0.5px solid var(--border); border-radius: 4px; overflow: hidden; display: block; color: inherit; transition: box-shadow 0.3s ease, filter 0.3s ease; }
.portfolio-card:hover, .portfolio-card:focus-visible { filter: brightness(1.05); box-shadow: 0 16px 32px -12px var(--magenta); text-decoration: none; outline: none; }
.portfolio-card .shot { aspect-ratio: 16 / 10; background: var(--paper-tint); overflow: hidden; }
.portfolio-card .shot img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-card .body { padding: 16px 18px; }
.portfolio-card h3 { font-size: 1.02rem; margin: 0 0 6px; }
.portfolio-card p { color: var(--mauve); margin: 0; font-size: 0.92rem; }
.portfolio-card-empty { border: 1px dashed var(--border-strong); padding: 40px 24px; text-align: center; color: var(--mauve); grid-column: 1 / -1; }

/* ---------- Card 3D tilt (see assets/js/animations.js) ----------
   The transform itself is written inline per-frame by JS; these rules
   own the easing and the cursor-tracking sheen. The fast transition
   while tilting keeps it responsive; the slow one springs it back. */
.tilt { position: relative; transform-style: preserve-3d; transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, filter 0.3s ease; }
.tilt.is-tilting { transition: transform 0.12s ease-out, box-shadow 0.3s ease, filter 0.3s ease; }
.tilt::after {
	content: '';
	position: absolute; inset: 0;
	border-radius: inherit;
	pointer-events: none;
	z-index: 2;
	background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.16), transparent 62%);
	opacity: 0;
	transition: opacity 0.35s ease;
}
.tilt.is-tilting::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
	.tilt, .tilt.is-tilting { transition: none; }
	.tilt::after { display: none; }
}

/* ---------- Timeline (see assets/js/timeline.js) ---------- */
.timeline { position: relative; padding-left: 36px; margin-top: 32px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: var(--border-strong); }
/* Spine draw: a coloured line fills over the grey track as you scroll.
   --spine is set by animations.js from scroll position. */
.timeline::after {
	content: '';
	position: absolute;
	left: 9px; top: 8px;
	width: 2px;
	height: var(--spine, 0%);
	max-height: calc(100% - 16px);
	background: linear-gradient(180deg, var(--magenta), var(--violet));
	pointer-events: none;
}
.timeline-year { position: relative; margin-bottom: 52px; }
/* Year markers pop in as their group is reached. */
.js .timeline-year .ty-dot { transform: scale(0); transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); }
.timeline-year.is-visible .ty-dot { transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
	.js .timeline-year .ty-dot { transform: none; transition: none; }
}
.timeline-year:last-child { margin-bottom: 0; }
.ty-label-row { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.ty-dot { position: absolute; left: -27px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 3px solid var(--magenta); }
.timeline-year.is-compact .ty-dot { border-color: var(--mauve); }
.ty-label { font-size: 1.4rem; margin: 0; }
.ty-note { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mauve); }

.timeline-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 4px; }
.filter-chip {
	font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em;
	padding: 7px 14px; border-radius: 999px; border: 0.5px solid var(--border); background: var(--paper);
	color: var(--mauve); cursor: pointer; transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.filter-chip:hover, .filter-chip:focus-visible { color: var(--magenta); border-color: var(--magenta); outline: none; }
.filter-chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.timeline-year.is-filtered-out, .featured-card.is-filtered-out, .compact-row.is-filtered-out { display: none; }

.featured-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.featured-card { border: 0.5px solid var(--border); border-radius: 8px; overflow: hidden; text-decoration: none; color: var(--ink); display: block; transition: box-shadow 0.25s ease, transform 0.25s ease; }
.featured-card:hover, .featured-card:focus-visible { box-shadow: 0 24px 48px -16px var(--magenta); transform: translateY(-3px); outline: none; text-decoration: none; }
.featured-card .fc-shot { aspect-ratio: 16 / 10; background: var(--paper-tint); overflow: hidden; }
.featured-card .fc-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fc-body { padding: 18px 20px; }
.fc-body h4 { margin: 0 0 6px; font-size: 1.05rem; }
.fc-body p { margin: 0; color: var(--mauve); font-size: 0.9rem; }
@media (max-width: 700px) { .featured-grid { grid-template-columns: 1fr; } }

.compact-list { border-top: 0.5px solid var(--border); }
.compact-row {
	display: flex; align-items: baseline; justify-content: space-between;
	padding: 16px 4px; border-bottom: 0.5px solid var(--border);
	text-decoration: none; color: var(--ink); background: none; border-left: none; border-right: none; width: 100%;
	font: inherit; text-align: left; cursor: pointer;
	transition: padding-left 0.2s ease, color 0.2s ease;
}
.compact-row:hover, .compact-row:focus-visible { padding-left: 14px; color: var(--magenta); outline: none; }
.compact-row .cr-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.compact-row .cr-meta { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mauve); }
.compact-row:hover .cr-meta, .compact-row:focus-visible .cr-meta { color: var(--magenta); }

.preview-float {
	position: fixed; top: 0; left: 0; width: 260px; height: 175px;
	border-radius: 6px; overflow: hidden; pointer-events: none; z-index: 50;
	opacity: 0; transform: translate(-50%, -50%) scale(0.92);
	transition: opacity 0.2s ease, transform 0.2s ease;
	box-shadow: 0 30px 60px -20px rgba(20, 16, 27, 0.4); border: 0.5px solid var(--border);
}
.preview-float.is-active { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.preview-float img { width: 100%; height: 100%; object-fit: cover; display: block; }
.timeline-hint { font-size: 11px; color: var(--mauve); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 20px; }

/* ---------- Single project popup ---------- */
.project-popup { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.project-popup.is-open { opacity: 1; pointer-events: auto; }
.popup-backdrop { position: absolute; inset: 0; background: rgba(20, 16, 27, 0.72); border: none; padding: 0; }
.popup-panel {
	position: relative; background: var(--paper); width: 100%; max-width: 640px; max-height: 86vh; overflow-y: auto;
	border-radius: 8px; transform: translateY(18px) scale(0.98);
	transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
	box-shadow: 0 50px 90px -20px rgba(0, 0, 0, 0.5);
}
.project-popup.is-open .popup-panel { transform: translateY(0) scale(1); }
.popup-close {
	position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
	border: 0.5px solid var(--border-strong); background: var(--paper); font-size: 1.2rem; line-height: 1;
	cursor: pointer; z-index: 2; color: var(--ink);
}
.popup-close:hover { border-color: var(--magenta); color: var(--magenta); }
.popup-shot { aspect-ratio: 16 / 9; background: var(--paper-tint); overflow: hidden; }
.popup-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.popup-body { padding: 26px 28px 6px; }
.popup-body h2 { margin: 4px 0 6px; font-size: 1.5rem; }
.popup-type { color: var(--magenta); font-size: 11px; margin: 0 0 16px; }
.popup-desc { color: var(--mauve); margin: 0; }
.popup-actions { margin: 18px 0 4px; }
.popup-nav { display: flex; justify-content: space-between; border-top: 0.5px solid var(--border); padding: 14px 28px 20px; margin-top: 16px; }
.popup-nav button {
	background: none; border: none; font-family: var(--font-mono); font-size: 11px;
	text-transform: uppercase; letter-spacing: 0.06em; color: var(--mauve); cursor: pointer; padding: 0;
}
.popup-nav button:hover { color: var(--magenta); }
@media (prefers-reduced-motion: reduce) {
	.preview-float, .popup-panel, .project-popup, .compact-row, .featured-card { transition: none; }
}

/* ---------- Single project ---------- */
.archive-intro { padding: 8px 0 24px; }
.archive-intro h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 14px; }
.back-link { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mauve); }
.project-header { padding: 8px 0 24px; }
.project-header h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 6px 0 0; }
.project-shot { border: 0.5px solid var(--border); margin-bottom: 32px; }
.project-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: start; }
.project-content { max-width: 68ch; }
.project-content :first-child { margin-top: 0; }
.project-meta { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 24px; border: 0.5px solid var(--border); border-radius: 4px; padding: 20px; background: var(--paper-tint); }
.project-meta-label { display: block; font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--mauve); margin-bottom: 8px; }
.project-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.project-tags li { font-size: 0.8rem; border: 0.5px solid var(--border-strong); border-radius: 999px; padding: 3px 10px; }
.project-meta-link { font-weight: 600; word-break: break-word; }
.project-meta-cta { display: block; text-align: center; width: 100%; box-sizing: border-box; }
@media (max-width: 780px) { .project-layout { grid-template-columns: 1fr; } .project-meta { position: static; } }

.project-nav {
	display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
	border-top: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border);
	padding: 20px 0; margin: 8px 0 0; font-weight: 600;
}
.project-nav a { color: var(--ink); }
.project-nav-next { text-align: right; margin-left: auto; }

/* ---------- Contact details ---------- */
.contact-details { margin: 28px 0; display: flex; flex-direction: column; gap: 18px; }
.contact-detail { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.contact-icon {
	display: flex; align-items: center; justify-content: center; flex-shrink: 0;
	width: 46px; height: 46px; border-radius: 50%;
	border: 0.5px solid var(--border); color: var(--mauve);
	transition: color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-icon svg path { fill: currentColor; }
.contact-text { display: flex; flex-direction: column; }
.contact-label {
	font-family: var(--font-mono); font-size: 0.72rem;
	text-transform: uppercase; letter-spacing: 0.07em; color: var(--mauve); margin-bottom: 2px;
}
.contact-value { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink); transition: color 0.25s ease; }
.contact-detail:hover, .contact-detail:focus-visible { text-decoration: none; }
.contact-detail:hover .contact-icon, .contact-detail:focus-visible .contact-icon {
	color: var(--magenta); border-color: var(--magenta);
	box-shadow: 0 10px 22px -8px var(--magenta); transform: translateY(-2px);
}
.contact-detail:hover .contact-value, .contact-detail:focus-visible .contact-value { color: var(--magenta); }
@media (prefers-reduced-motion: reduce) { .contact-icon { transition: none; } }

/* ---------- FAQ accordion ---------- */
.faq-list { border-top: 0.5px solid var(--border); margin: 24px 0; }
.faq-item { border-bottom: 0.5px solid var(--border); }
.faq-question {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	width: 100%; padding: 18px 4px; background: none; border: none; cursor: pointer;
	font: inherit; text-align: left; color: var(--ink); font-weight: 600; font-size: 1rem;
}
.faq-question:hover, .faq-question:focus-visible { color: var(--magenta); outline: none; }
.faq-icon { position: relative; flex-shrink: 0; width: 18px; height: 18px; color: var(--mauve); }
.faq-question:hover .faq-icon, .faq-question:focus-visible .faq-icon { color: var(--magenta); }
.faq-icon::before, .faq-icon::after {
	content: ''; position: absolute; top: 50%; left: 50%; background: currentColor;
	transform: translate(-50%, -50%); transition: transform 0.25s ease;
}
.faq-icon::before { width: 14px; height: 2px; }
.faq-icon::after { width: 2px; height: 14px; }
.faq-question.is-open .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg) scaleX(0); }
.faq-answer { overflow: hidden; padding: 0 4px; }
.faq-answer[hidden] { display: none; }
.faq-answer p { margin: 0 0 18px; color: var(--mauve); max-width: 68ch; }
@media (prefers-reduced-motion: reduce) { .faq-icon::before, .faq-icon::after { transition: none; } }

/* ---------- Vortex gallery (see assets/js/gallery.js) ---------- */
.nsdc-vortex { margin: 24px 0; }
.nsdc-vortex-controls { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; }
.nsdc-vortex-controls-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--mauve); margin-right: 4px; font-family: var(--font-mono); }
.nsdc-vortex-mode-btn { font-family: var(--font-mono); font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 999px; border: 0.5px solid var(--border); background: var(--paper); color: var(--mauve); cursor: pointer; }
.nsdc-vortex-mode-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.nsdc-vortex-track { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.nsdc-vortex-ring { display: contents; }
.nsdc-vortex-card { display: block; text-decoration: none; color: inherit; border: 0.5px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--paper-tint); transition: box-shadow 0.3s ease, filter 0.3s ease; }
.nsdc-vortex-card:hover, .nsdc-vortex-card:focus-visible { filter: brightness(1.05); box-shadow: 0 16px 32px -12px var(--magenta); outline: none; }
.nsdc-vortex-shot { display: block; aspect-ratio: 16 / 10; background: var(--paper-tint); overflow: hidden; }
.nsdc-vortex-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nsdc-vortex-label { display: block; padding: 14px 16px; }
.nsdc-vortex-year { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--magenta); margin-bottom: 4px; }
.nsdc-vortex-title { display: block; font-weight: 700; font-size: 0.98rem; }
.nsdc-vortex-hint { display: none; text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--mauve); margin: 14px 0 0; }
.nsdc-vortex.is-mode-3d .nsdc-vortex-hint, .nsdc-vortex.is-mode-2d .nsdc-vortex-hint { display: block; }
.nsdc-vortex.is-mode-3d .nsdc-vortex-track { display: flex; align-items: center; justify-content: center; position: relative; height: 420px; perspective: 1500px; }
.nsdc-vortex.is-mode-3d .nsdc-vortex-ring { display: block; position: relative; width: 250px; height: 320px; transform-style: preserve-3d; cursor: grab; touch-action: pan-y; transition: transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1); }
.nsdc-vortex-ring.is-dragging { transition: none; cursor: grabbing; }
.nsdc-vortex.is-mode-3d .nsdc-vortex-card { position: absolute; inset: 0; backface-visibility: hidden; box-shadow: 0 20px 40px -12px rgba(20, 16, 27, 0.35); }
.nsdc-vortex.is-mode-2d .nsdc-vortex-track { overflow: hidden; }
.nsdc-vortex.is-mode-2d .nsdc-vortex-ring { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 16px; scrollbar-width: thin; }
.nsdc-vortex.is-mode-2d .nsdc-vortex-card { flex: 0 0 240px; scroll-snap-align: start; }
.nsdc-vortex.is-mode-3d .nsdc-vortex-shot, .nsdc-vortex.is-mode-2d .nsdc-vortex-shot { aspect-ratio: auto; height: 160px; }
.nsdc-vortex.is-mode-3d .nsdc-vortex-shot { height: 72%; }
.nsdc-vortex.is-mode-3d .nsdc-vortex-label { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, rgba(20, 16, 27, 0.94), rgba(20, 16, 27, 0)); color: #fff; padding: 34px 14px 12px; }
.nsdc-vortex.is-mode-3d .nsdc-vortex-year { color: #ff9ecf; }
.nsdc-vortex-empty { border: 1px dashed var(--border); padding: 32px; text-align: center; color: var(--mauve); }

@media (prefers-reduced-motion: reduce) {
	.nsdc-vortex-ring, .nsdc-vortex-card { transition: none !important; }
}

/* ---------- Utility ---------- */
.visually-hidden {
	position: absolute !important; width: 1px; height: 1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
