/* ==========================================================================
   Faisil Studio — editorial agency theme
   Paper + ink, one vermilion accent. Archivo (variable width) + Instrument Serif.
   ========================================================================== */

:root {
	--paper: #f1eee8;
	--paper-2: #e7e3db;
	--ink: #111110;
	--ink-2: #5b5852;
	--ink-3: #8b877f;
	--line: rgba(17, 17, 16, 0.14);
	--accent: #e2461f;
	--dark: #111110;
	--dark-line: rgba(241, 238, 232, 0.16);
	--pad: clamp(20px, 4vw, 64px);
	--gap: clamp(16px, 2vw, 32px);
	--sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
	--serif: "Instrument Serif", "Times New Roman", serif;
	--ease: cubic-bezier(0.2, 0.7, 0.1, 1);
	--header-h: 76px;
}

[x-cloak] { display: none !important; }

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body.fs {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: clamp(16px, 1.05vw, 18px);
	line-height: 1.55;
	font-variation-settings: "wdth" 100;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Film grain */
body.fs::after {
	content: "";
	position: fixed;
	inset: -50%;
	z-index: 9999;
	pointer-events: none;
	opacity: 0.07;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.fs img { max-width: 100%; height: auto; display: block; }
.fs a { color: inherit; text-decoration: none; }
.fs ::selection { background: var(--accent); color: var(--paper); }
.fs h1, .fs h2, .fs h3, .fs p, .fs figure, .fs blockquote, .fs dl, .fs dd, .fs ol, .fs ul { margin: 0; }
.fs :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { padding-inline: var(--pad); }

.skip-link {
	position: absolute; left: -9999px; top: 8px; z-index: 10000;
	background: var(--ink); color: var(--paper); padding: 10px 14px;
}
.skip-link:focus { left: 8px; }

.fs-icon { width: 1em; height: 1em; flex: none; }
.flip .fs-icon { transform: scaleX(-1); }

/* ── Type ──────────────────────────────────────────────────────────────── */

.display {
	font-family: var(--sans);
	font-weight: 500;
	font-variation-settings: "wdth" 78;
	font-size: clamp(3.1rem, 10.5vw, 11.5rem);
	line-height: 0.9;
	letter-spacing: -0.045em;
}
.display--sm { font-size: clamp(2.6rem, 7vw, 7rem); }
.display em,
.section-title em,
.footer-cta em,
.now__text em {
	font-family: var(--serif);
	font-style: italic;
	font-weight: 400;
	font-variation-settings: normal;
	letter-spacing: -0.02em;
	color: var(--accent);
}
.display sup, .section-title sup {
	font-size: 0.22em;
	letter-spacing: 0;
	vertical-align: super;
	font-variation-settings: "wdth" 100;
	color: var(--ink-3);
	margin-left: 0.15em;
}
.display .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.display .line > span { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; }
.display .line:nth-child(2) > span { animation-delay: 0.08s; }
.display .line:nth-child(3) > span { animation-delay: 0.16s; }

@keyframes rise { to { transform: translateY(0); } }

.eyebrow {
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-2);
	font-variation-settings: "wdth" 100;
}
.eyebrow .sep { color: var(--accent); margin: 0 0.4em; }
.eyebrow--light { color: rgba(241, 238, 232, 0.6); }

.section-head {
	display: flex; align-items: end; justify-content: space-between; gap: var(--gap);
	padding-bottom: clamp(20px, 2.5vw, 36px);
	border-bottom: 1px solid var(--line);
	margin-bottom: clamp(28px, 4vw, 64px);
}
.section-title {
	font-weight: 500;
	font-variation-settings: "wdth" 80;
	font-size: clamp(2rem, 4.6vw, 4.6rem);
	line-height: 0.95;
	letter-spacing: -0.035em;
}

.link-arrow {
	display: inline-flex; align-items: center; gap: 0.5em;
	font-weight: 500; white-space: nowrap;
	border-bottom: 1px solid currentColor; padding-bottom: 2px;
	transition: gap 0.3s var(--ease), color 0.2s;
}
.link-arrow:hover { gap: 0.85em; color: var(--accent); }

.btn {
	display: inline-flex; align-items: center; gap: 0.6em;
	padding: 0.95em 1.4em;
	border: 1px solid var(--ink); border-radius: 999px;
	font-weight: 500; font-size: 0.95rem; line-height: 1;
	transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); }

/* ── Header ────────────────────────────────────────────────────────────── */

.site-header {
	position: sticky; top: 0; z-index: 100;
	background: color-mix(in srgb, var(--paper) 82%, transparent);
	backdrop-filter: blur(14px) saturate(1.2);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	border-bottom: 1px solid transparent;
	transition: border-color 0.3s, transform 0.45s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.admin-bar .site-header { top: 32px; }

.site-header__inner {
	display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--gap);
	height: var(--header-h); padding-inline: var(--pad);
}
.wordmark { display: flex; flex-direction: column; line-height: 1.05; justify-self: start; }
.wordmark__name { font-weight: 600; font-variation-settings: "wdth" 85; font-size: 1.12rem; letter-spacing: -0.02em; }
.wordmark__role { font-family: var(--serif); font-style: italic; color: var(--ink-2); font-size: 0.98rem; }

.status {
	display: inline-flex; align-items: center; gap: 0.6em;
	font-size: 0.78rem; letter-spacing: 0.02em; color: var(--ink-2);
	padding: 0.45em 0.9em; border: 1px solid var(--line); border-radius: 999px;
}
.status__dot { width: 7px; height: 7px; border-radius: 50%; background: #2fae5b; box-shadow: 0 0 0 0 rgba(47,174,91,.5); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(47,174,91,0); } 100% { box-shadow: 0 0 0 0 rgba(47,174,91,0); } }

.nav { display: flex; gap: clamp(18px, 2.4vw, 40px); justify-self: end; }
.nav__link { position: relative; display: inline-flex; align-items: baseline; gap: 0.35em; font-weight: 500; }
.nav__num { font-size: 0.65rem; color: var(--ink-3); }
.nav__link::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor;
	transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease);
}
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }

.menu-toggle {
	display: none; justify-self: end;
	background: none; border: 1px solid var(--ink); border-radius: 999px;
	padding: 0.55em 1.1em; font: inherit; font-weight: 500; color: inherit; cursor: pointer;
}

.mobile-menu {
	position: fixed; inset: 0; z-index: 90; background: var(--ink); color: var(--paper);
	display: flex; flex-direction: column; justify-content: space-between;
	padding: calc(var(--header-h) + 40px) var(--pad) 40px;
}
.mobile-menu nav { display: flex; flex-direction: column; gap: 6px; }
.mobile-menu nav a {
	font-size: clamp(3rem, 15vw, 6rem); font-weight: 500; font-variation-settings: "wdth" 78;
	letter-spacing: -0.04em; line-height: 1; display: flex; align-items: start; gap: 0.25em;
}
.mobile-menu nav a span { font-size: 0.85rem; letter-spacing: 0; color: var(--accent); margin-top: 0.5em; }
.menu-open .site-header { background: var(--ink); color: var(--paper); }
.menu-open .menu-toggle { border-color: var(--paper); }
.menu-open .wordmark__role { color: rgba(241,238,232,.6); }

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero { padding-top: clamp(48px, 9vw, 140px); padding-bottom: clamp(48px, 7vw, 110px); }
.hero__eyebrow { margin-bottom: clamp(20px, 3vw, 40px); }
.hero__title { max-width: 14ch; }
.hero__foot {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--gap);
	margin-top: clamp(36px, 5vw, 80px); padding-top: clamp(20px, 2vw, 32px); border-top: 1px solid var(--line);
}
.hero__lede { max-width: 52ch; font-size: clamp(1.05rem, 1.35vw, 1.3rem); line-height: 1.5; color: var(--ink-2); }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Stats band ────────────────────────────────────────────────────────── */

.stats { background: var(--dark); color: var(--paper); padding-block: clamp(48px, 7vw, 110px); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats__grid--1 { grid-template-columns: 1fr; }
.stats__grid--2 { grid-template-columns: repeat(2, 1fr); }
.stats__grid--3 { grid-template-columns: repeat(3, 1fr); }
.stat { padding: 0 clamp(16px, 2vw, 32px); border-left: 1px solid var(--dark-line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__value {
	font-weight: 500; font-variation-settings: "wdth" 72;
	font-size: clamp(2.6rem, 5.4vw, 6rem); line-height: 0.95; letter-spacing: -0.045em;
	white-space: nowrap;
}
.stat__value small { font-size: 0.32em; letter-spacing: 0; font-variation-settings: "wdth" 100; color: rgba(241,238,232,.55); margin: 0 0.1em 0 0.08em; }
.stat__label { margin-top: 18px; max-width: 22ch; font-size: 0.95rem; color: rgba(241,238,232,.85); }
.stat__label span { display: block; margin-top: 6px; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--accent); }

/* ── Work grid + cards ─────────────────────────────────────────────────── */

.work { padding-block: clamp(64px, 9vw, 150px); }
.work__grid {
	display: grid; grid-template-columns: repeat(12, 1fr);
	column-gap: var(--gap); row-gap: clamp(48px, 7vw, 120px);
}
.work__grid > .card:nth-child(4n + 1) { grid-column: 1 / span 7; }
.work__grid > .card:nth-child(4n + 2) { grid-column: 9 / span 4; margin-top: clamp(80px, 14vw, 260px); }
.work__grid > .card:nth-child(4n + 3) { grid-column: 2 / span 5; }
.work__grid > .card:nth-child(4n + 4) { grid-column: 7 / span 6; margin-top: clamp(40px, 8vw, 140px); }
.work__grid > .card:nth-child(4n + 2) .card__media,
.work__grid > .card:nth-child(4n + 3) .card__media { aspect-ratio: 4 / 5; }

.work__grid--index { grid-template-columns: repeat(2, 1fr); row-gap: clamp(40px, 5vw, 80px); }
.work__grid--index .work-index__item:nth-child(even) { transform: translateY(clamp(0px, 6vw, 110px)); }
.work__grid--index .card__media { aspect-ratio: 4 / 3 !important; }

.card__link { display: block; }
.card__media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--paper-2); }
.card__media img {
	width: 100%; height: 100%; object-fit: cover;
	transform: scale(1.02); transition: transform 1.1s var(--ease), filter 0.6s;
}
.card__link:hover .card__media img { transform: scale(1.07); }
.card__media::after {
	content: ""; position: absolute; inset: 0; background: var(--accent);
	mix-blend-mode: multiply; opacity: 0; transition: opacity 0.5s var(--ease);
}
.card__link:hover .card__media::after { opacity: 0.12; }

.card__body { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; padding-top: 18px; align-items: start; }
.card__index { font-size: 0.75rem; color: var(--ink-3); padding-top: 0.5em; font-variant-numeric: tabular-nums; }
.card__title {
	font-weight: 500; font-variation-settings: "wdth" 85;
	font-size: clamp(1.3rem, 1.9vw, 1.9rem); line-height: 1.05; letter-spacing: -0.025em;
}
.card__meta { margin-top: 6px; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink-2); }
.card__summary { margin-top: 10px; max-width: 46ch; font-size: 0.93rem; color: var(--ink-2); }
.card__arrow {
	display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%;
	font-size: 1rem; transition: background 0.3s, color 0.3s, transform 0.5s var(--ease), border-color .3s;
}
.card__link:hover .card__arrow { background: var(--accent); border-color: var(--accent); color: var(--paper); transform: rotate(45deg); }

/* ── Now strip ─────────────────────────────────────────────────────────── */

.now { padding-bottom: clamp(56px, 7vw, 110px); }
.now__inner {
	display: grid; grid-template-columns: 1fr 3fr; gap: var(--gap);
	padding-top: clamp(24px, 3vw, 40px); border-top: 1px solid var(--line);
}
.now__text { font-size: clamp(1.4rem, 2.6vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em; font-variation-settings: "wdth" 90; max-width: 30ch; }
.now__text strong { font-weight: 600; }

/* ── Marquee ───────────────────────────────────────────────────────────── */

.marquee { border-block: 1px solid var(--line); overflow: hidden; padding-block: clamp(18px, 2.2vw, 30px); }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee ul { display: flex; list-style: none; padding: 0; }
.marquee li {
	font-size: clamp(1.6rem, 3.4vw, 3.4rem); font-weight: 500; font-variation-settings: "wdth" 80;
	letter-spacing: -0.03em; white-space: nowrap; padding-inline: 0.6em; display: flex; align-items: center;
}
.marquee li::after { content: "✳"; font-size: 0.45em; color: var(--accent); margin-left: 1.2em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Capabilities ──────────────────────────────────────────────────────── */

.capabilities { padding-block: clamp(64px, 9vw, 150px); }
.cap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.cap { border-top: 1px solid var(--ink); padding-top: 18px; }
.cap__num { font-size: 0.75rem; color: var(--accent); }
.cap__title { margin: 28px 0 14px; font-weight: 500; font-variation-settings: "wdth" 85; font-size: clamp(1.25rem, 1.7vw, 1.7rem); line-height: 1.05; letter-spacing: -0.02em; }
.cap p { color: var(--ink-2); font-size: 0.95rem; }

/* ── Testimonials ──────────────────────────────────────────────────────── */

.quotes { background: var(--dark); color: var(--paper); padding-block: clamp(64px, 9vw, 150px); }
.quotes__stage { display: grid; margin-top: clamp(24px, 3vw, 48px); min-height: 1px; }
.quote { grid-area: 1 / 1; }
.quote blockquote p {
	font-family: var(--serif); font-size: clamp(1.8rem, 4.2vw, 4.4rem); line-height: 1.08; letter-spacing: -0.015em;
	max-width: 24ch;
}
.quote figcaption { margin-top: clamp(24px, 3vw, 44px); display: flex; gap: 0.8em; align-items: baseline; flex-wrap: wrap; }
.quote figcaption strong { font-weight: 500; }
.quote figcaption span { color: rgba(241,238,232,.55); }
.quote-enter { transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.quote-enter-start { opacity: 0; transform: translateY(16px); }
.quote-enter-end { opacity: 1; transform: none; }
.quotes__nav { display: flex; align-items: center; gap: 12px; margin-top: clamp(32px, 4vw, 56px); padding-top: 20px; border-top: 1px solid var(--dark-line); }
.quotes__count { margin-right: auto; font-variant-numeric: tabular-nums; color: rgba(241,238,232,.6); font-size: 0.85rem; }
.quotes__btn {
	display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
	background: none; color: var(--paper); border: 1px solid var(--dark-line); cursor: pointer; font-size: 1.1rem;
	transition: background 0.3s, border-color 0.3s;
}
.quotes__btn:hover { background: var(--accent); border-color: var(--accent); }

/* ── Page hero (inner pages) ───────────────────────────────────────────── */

.page-hero { padding-top: clamp(48px, 8vw, 130px); padding-bottom: clamp(36px, 5vw, 80px); }
.page-hero .eyebrow { margin-bottom: clamp(16px, 2vw, 28px); }
.page-hero--404 { min-height: 60vh; }
.page-hero--404 .hero__lede { margin: 28px 0; }

/* ── Work index ────────────────────────────────────────────────────────── */

.work-index { padding-bottom: clamp(100px, 12vw, 220px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(32px, 4vw, 64px); padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.chip {
	font: inherit; font-size: 0.9rem; font-weight: 500; cursor: pointer;
	padding: 0.55em 1.1em; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink);
	transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── Case study ────────────────────────────────────────────────────────── */

.case-hero { padding-top: clamp(40px, 6vw, 100px); padding-bottom: clamp(40px, 5vw, 80px); }
.crumbs { display: flex; gap: 0.6em; font-size: 0.85rem; color: var(--ink-2); margin-bottom: clamp(20px, 3vw, 40px); }
.crumbs a { border-bottom: 1px solid var(--line); }
.crumbs a:hover { color: var(--accent); border-color: var(--accent); }
.case-hero__title { font-size: clamp(2.8rem, 8.4vw, 9.5rem); max-width: 16ch; }
.case-hero__lede {
	margin-top: clamp(24px, 3vw, 44px); max-width: 38ch;
	font-family: var(--serif); font-size: clamp(1.45rem, 2.5vw, 2.5rem); line-height: 1.15; color: var(--ink);
}

.case-meta {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--gap);
	margin-top: clamp(36px, 5vw, 72px); padding-top: 20px; border-top: 1px solid var(--line);
}
.case-meta dt { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.case-meta dd { font-weight: 500; }
.case-meta dd a { border-bottom: 1px solid var(--line); }
.case-meta dd a:hover { color: var(--accent); }
.case-meta--stack { grid-template-columns: 1fr; gap: 22px; border-top: 0; padding-top: 0; }

.case-cover { overflow: hidden; height: clamp(320px, 75vh, 920px); background: var(--paper-2); }
.case-cover img { width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.case-cover--inset { margin-inline: var(--pad); height: clamp(300px, 68vh, 820px); }

.stats--case .stat__value { font-size: clamp(2.4rem, 5vw, 5.4rem); }

.case-story { padding-block: clamp(64px, 9vw, 150px); display: grid; gap: clamp(56px, 7vw, 120px); }
.case-story:not(:has(*)) { display: none; }
.case-cover + .case-gallery, .stats + .case-gallery { padding-top: var(--gap); }
.story-block { display: grid; grid-template-columns: 4fr 8fr; gap: var(--gap); }
.story-block__label {
	position: sticky; top: calc(var(--header-h) + 24px); align-self: start;
	display: flex; gap: 14px; align-items: baseline;
	font-weight: 500; font-variation-settings: "wdth" 85; font-size: clamp(1.3rem, 2vw, 2rem); letter-spacing: -0.025em;
}
.story-block__label span { font-size: 0.75rem; color: var(--accent); letter-spacing: 0; }

.rich { font-size: clamp(1.08rem, 1.3vw, 1.3rem); line-height: 1.55; max-width: 62ch; color: var(--ink); }
.rich > * + * { margin-top: 1em; }
.rich ul { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.rich ul li { padding: 0.75em 0 0.75em 2em; border-bottom: 1px solid var(--line); position: relative; margin: 0; }
.rich ul li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.rich ol { padding-left: 1.3em; }
.rich a { border-bottom: 1px solid var(--accent); }
.rich strong { font-weight: 600; }
.rich h2, .rich h3 { font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; margin-top: 1.6em; }

.case-videos { display: grid; gap: var(--gap); }
.case-videos--grid { grid-template-columns: repeat(2, 1fr); row-gap: clamp(28px, 3vw, 48px); }
.yt__frame { position: relative; aspect-ratio: 16 / 9; background: var(--ink); overflow: hidden; }
.yt__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt__poster { position: absolute; inset: 0; display: block; cursor: pointer; }
.yt__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter 0.5s; filter: saturate(0.9); }
.yt__poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(17,17,16,.35)); }
.yt__play {
	position: absolute; left: 50%; top: 50%; z-index: 1; translate: -50% -50%;
	display: grid; place-items: center; width: clamp(64px, 7vw, 96px); aspect-ratio: 1; border-radius: 50%;
	background: var(--paper); color: var(--ink);
	transition: background 0.3s, color 0.3s, scale 0.5s var(--ease);
}
.yt__play svg { width: 34%; height: 34%; margin-left: 6%; }
.yt__poster:hover img { transform: scale(1.04); filter: none; }
.yt__poster:hover .yt__play { background: var(--accent); color: var(--paper); scale: 1.08; }
.yt__caption { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding-top: 12px; font-size: 0.9rem; color: var(--ink-2); }
.yt__caption a { display: inline-flex; align-items: center; gap: 0.35em; white-space: nowrap; color: var(--ink); border-bottom: 1px solid var(--line); }
.yt__caption a:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 800px) { .case-videos--grid { grid-template-columns: 1fr; } .yt__caption { flex-direction: column; gap: 4px; } }

.case-gallery {
	display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap);
	padding-bottom: clamp(80px, 10vw, 160px);
}
.case-gallery__item { overflow: hidden; background: var(--paper-2); }
.case-gallery__item:nth-child(3n + 1) { grid-column: 1 / -1; }
.case-gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.case-gallery__item:nth-child(3n + 1) img { max-height: 92vh; }

.next-project {
	display: grid; grid-template-columns: 1fr minmax(0, 34%); align-items: center;
	background: var(--paper-2); border-top: 1px solid var(--line); overflow: hidden;
}
.next-project__inner { padding-block: clamp(48px, 7vw, 110px); display: grid; gap: 18px; }
.next-project__title {
	display: inline-flex; align-items: center; gap: 0.3em; flex-wrap: wrap;
	font-weight: 500; font-variation-settings: "wdth" 78; letter-spacing: -0.04em; line-height: 0.95;
	font-size: clamp(2.2rem, 6vw, 6.4rem); transition: color 0.3s;
}
.next-project__title .fs-icon { font-size: 0.6em; transition: transform 0.5s var(--ease); }
.next-project:hover .next-project__title { color: var(--accent); }
.next-project:hover .next-project__title .fs-icon { transform: translateX(12px); }
.next-project__media { height: 100%; }
.next-project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.next-project:hover .next-project__media img { transform: scale(1.05); }

/* ── About ─────────────────────────────────────────────────────────────── */

.about-intro { display: grid; grid-template-columns: 5fr 7fr; gap: var(--gap); padding-bottom: clamp(64px, 9vw, 140px); border-top: 1px solid var(--line); padding-top: clamp(24px, 3vw, 44px); }
.about-intro__lead p { font-family: var(--serif); font-size: clamp(1.6rem, 2.8vw, 2.8rem); line-height: 1.1; }
.experience { padding-bottom: clamp(64px, 9vw, 140px); }
.exp-list { list-style: none; padding: 0; }
.exp {
	display: grid; grid-template-columns: 1.2fr 2fr 2.2fr 3fr; gap: var(--gap); align-items: baseline;
	padding-block: clamp(18px, 2vw, 28px); border-bottom: 1px solid var(--line);
	transition: background 0.3s, padding 0.4s var(--ease);
}
.exp:hover { background: var(--paper-2); padding-inline: 14px; }
.exp__years { font-size: 0.85rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.exp__org { font-weight: 500; font-variation-settings: "wdth" 85; font-size: clamp(1.15rem, 1.6vw, 1.6rem); letter-spacing: -0.02em; line-height: 1.1; }
.exp__role { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--ink-2); }
.exp__note { font-size: 0.95rem; color: var(--ink-2); }
.about-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); padding-bottom: clamp(64px, 9vw, 140px); }
.about-cols p { color: var(--ink-2); }
.about-cols > div { border-top: 1px solid var(--ink); padding-top: 18px; }

/* ── Contact ───────────────────────────────────────────────────────────── */

.contact { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 120px); padding-bottom: clamp(80px, 10vw, 180px); border-top: 1px solid var(--line); padding-top: clamp(24px, 3vw, 44px); }
.contact__lede { font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2.4rem); line-height: 1.12; margin-bottom: 40px; }
.contact__form form { display: grid; gap: 12px; }
.contact__form p { margin: 0; }
.contact__form br { display: none; }
.contact__form input[type="text"],
.contact__form input[type="email"],
.contact__form textarea {
	width: 100%; font: inherit; font-size: clamp(1.1rem, 1.6vw, 1.5rem); color: var(--ink);
	background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
	padding: 0.9em 0; transition: border-color 0.3s;
}
.contact__form textarea { min-height: 180px; resize: vertical; }
.contact__form input:focus, .contact__form textarea:focus { outline: none; border-bottom-color: var(--ink); }
.contact__form ::placeholder { color: var(--ink-3); }
.contact__form button[type="submit"],
.contact__form input[type="submit"] {
	justify-self: start; margin-top: 20px; cursor: pointer;
	font: inherit; font-weight: 500; padding: 1em 1.6em; border-radius: 999px;
	background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
	transition: background 0.3s, border-color 0.3s;
}
.contact__form button[type="submit"]:hover,
.contact__form input[type="submit"]:hover { background: var(--accent); border-color: var(--accent); }
.wpcf7-not-valid-tip { color: var(--accent); font-size: 0.85rem; margin-top: 6px; }
.wpcf7-response-output { margin: 16px 0 0 !important; padding: 12px 16px !important; border: 1px solid var(--line) !important; }

/* ── Generic page ──────────────────────────────────────────────────────── */

.page-body { padding-bottom: clamp(80px, 10vw, 160px); }
.post-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.post-list a { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.post-list time { color: var(--ink-3); }

/* ── Footer ────────────────────────────────────────────────────────────── */

.site-footer { background: var(--dark); color: var(--paper); padding-top: clamp(72px, 10vw, 160px); overflow: hidden; position: relative; }
.footer-cta {
	margin-top: 22px; font-weight: 500; font-variation-settings: "wdth" 78;
	font-size: clamp(2.6rem, 8vw, 9rem); line-height: 0.92; letter-spacing: -0.045em; max-width: 13ch;
}
.footer-cta a { display: inline; transition: color 0.3s; }
.footer-cta .fs-icon { font-size: 0.55em; vertical-align: middle; transition: transform 0.5s var(--ease); }
.footer-cta a:hover { color: var(--accent); }
.footer-cta a:hover em { color: var(--paper); }
.footer-cta a:hover .fs-icon { transform: translate(8px, -8px); }
.footer-grid {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap);
	margin-top: clamp(56px, 8vw, 120px); padding-top: 24px; border-top: 1px solid var(--dark-line);
}
.footer-grid > div { display: flex; flex-direction: column; gap: 4px; }
.footer-grid a { width: fit-content; border-bottom: 1px solid transparent; transition: border-color 0.3s, color .3s; }
.footer-grid a:hover { color: var(--accent); border-color: var(--accent); }
.footer-label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; font-weight: 500; }
.site-footer .footer-label { color: rgba(241,238,232,.45); }
.footer-base { display: flex; gap: 24px; margin-top: clamp(48px, 6vw, 96px); padding-block: 20px; border-top: 1px solid var(--dark-line); font-size: 0.85rem; color: rgba(241,238,232,.6); }
.footer-base .to-top { margin-left: auto; display: inline-flex; gap: 0.4em; align-items: center; }
.footer-base .to-top .fs-icon { transform: rotate(-90deg); }
.footer-base a:hover { color: var(--paper); }
.footer-giant {
	font-weight: 600; font-variation-settings: "wdth" 70; letter-spacing: -0.06em; line-height: 0.8;
	font-size: 19.5vw; white-space: nowrap; text-align: center;
	color: transparent; -webkit-text-stroke: 1px rgba(241,238,232,.18);
	margin-bottom: -0.12em; user-select: none;
}

/* ── Cursor ────────────────────────────────────────────────────────────── */

.cursor {
	position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none;
	width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%;
	background: var(--accent); color: var(--paper);
	display: grid; place-items: center; font-size: 0.85rem; font-weight: 500;
	transform: translate3d(-200px, -200px, 0) scale(0); transition: transform 0.35s var(--ease) , opacity .3s;
	opacity: 0;
}
.cursor.is-active { opacity: 1; }
@media (hover: none) { .cursor { display: none; } }

/* ── Reveal on scroll ──────────────────────────────────────────────────── */

.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
	.js [data-reveal] { opacity: 1; transform: none; }
	.display .line > span { transform: none; }
	.marquee__track { animation: none; }
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
	.status { display: none; }
	.site-header__inner { grid-template-columns: 1fr auto; }
	.cap-grid { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
	.stats__grid, .stats__grid--3 { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
	.stats__grid .stat:nth-child(3) { border-left: 0; padding-left: 0; }
	.exp { grid-template-columns: 1fr 2fr; }
	.exp__role, .exp__note { grid-column: 2; }
}

@media (max-width: 800px) {
	:root { --header-h: 64px; }
	.nav { display: none; }
	.menu-toggle { display: inline-block; }
	.hero__foot { grid-template-columns: 1fr; }
	.work__grid { grid-template-columns: 1fr; }
	.work__grid > .card:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
	.work__grid > .card .card__media { aspect-ratio: 4 / 3; }
	.work__grid--index .work-index__item:nth-child(even) { transform: none; }
	.now__inner, .story-block, .about-intro, .contact { grid-template-columns: 1fr; }
	.story-block__label { position: static; }
	.cap-grid, .about-cols { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
	.case-gallery { grid-template-columns: 1fr; }
	.next-project { grid-template-columns: 1fr; }
	.next-project__media { height: 240px; }
	.card__summary { display: none; }
	.exp { grid-template-columns: 1fr; gap: 6px; }
	.exp__role, .exp__note { grid-column: auto; }
	.admin-bar .site-header { top: 46px; }
}

@media (max-width: 520px) {
	.stats__grid, .stats__grid--2, .stats__grid--3 { grid-template-columns: 1fr; }
	.stat, .stats__grid .stat:nth-child(3) { border-left: 0; padding: 0 0 28px; border-bottom: 1px solid var(--dark-line); }
	.footer-base { flex-wrap: wrap; }
}
