/* =========================================================
   LogoExpert — main styles
   Light is the default; html.dark switches tokens.
   ========================================================= */

:root {
	--bg: #ffffff;
	--fg: #0a0a0a;
	--card: #ffffff;
	--muted: #f5f5f5;
	--muted-fg: #737373;
	--border: #e5e5e5;
	--border-strong: #a1a1a1;
	--primary: #171717;
	--primary-fg: #fafafa;
	--shadow: 0 1px 2px rgba(10, 10, 10, .04), 0 8px 24px -8px rgba(10, 10, 10, .12);
	--shadow-lg: 0 2px 4px rgba(10, 10, 10, .04), 0 18px 40px -12px rgba(10, 10, 10, .18);
	--glass: rgba(255, 255, 255, .72);
	--sky-top: #d6e8f8;
	--sky-mid: #eef5fc;
	--cloud: rgba(255, 255, 255, .95);
	--giant: #f5f5f5;
	--dot: rgba(10, 10, 10, .14);
	--accent: #e4572e;
	--accent-soft: rgba(228, 87, 46, .12);

	--tone-sky: linear-gradient(160deg, #b9cdf3 0%, #dfe7f8 45%, #f3e3ec 100%);
	--tone-sand: linear-gradient(160deg, #ead9c0 0%, #f4ebdd 50%, #fbf7f0 100%);
	--tone-sage: linear-gradient(160deg, #c3d4c6 0%, #e3ece3 50%, #f6f8f3 100%);
	--tone-lilac: linear-gradient(160deg, #cfc6ef 0%, #e8e3f8 50%, #f7f1f6 100%);
	--tone-mono: linear-gradient(160deg, #e5e5e5 0%, #f5f5f5 60%, #ffffff 100%);

	--f-sans: "TikTok Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
	--f-hand: "Reenie Beanie", "Bradley Hand", cursive;

	--frame: 1200px;
	--gutter: clamp(16px, 4vw, 28px);
	--radius: 10px;
	--ease: cubic-bezier(.22, 1, .36, 1);
	--ease-pop: cubic-bezier(.34, 1.4, .64, 1);
	--admin: var(--wp-admin--admin-bar--height, 0px);
	color-scheme: light;
}

html.dark {
	--bg: #0a0a0a;
	--fg: #fafafa;
	--card: #171717;
	--muted: #262626;
	--muted-fg: #a1a1a1;
	--border: rgba(255, 255, 255, .1);
	--border-strong: #737373;
	--primary: #e5e5e5;
	--primary-fg: #171717;
	--shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -8px rgba(0, 0, 0, .6);
	--shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 18px 40px -12px rgba(0, 0, 0, .7);
	--glass: rgba(23, 23, 23, .72);
	--sky-top: #0f1726;
	--sky-mid: #0c0f15;
	--cloud: rgba(120, 140, 180, .14);
	--giant: #141414;
	--dot: rgba(255, 255, 255, .12);
	--accent: #ff7a52;
	--accent-soft: rgba(255, 122, 82, .16);

	--tone-sky: linear-gradient(160deg, #26345a 0%, #1b2236 50%, #2a1f2a 100%);
	--tone-sand: linear-gradient(160deg, #3d3326 0%, #2a241c 50%, #1a1712 100%);
	--tone-sage: linear-gradient(160deg, #2a3a2f 0%, #1f2a22 50%, #141a15 100%);
	--tone-lilac: linear-gradient(160deg, #332c55 0%, #241f3a 50%, #1d1824 100%);
	--tone-mono: linear-gradient(160deg, #262626 0%, #1a1a1a 60%, #121212 100%);
	color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--f-sans);
	font-size: 16px;
	line-height: 1.5;
	letter-spacing: -.04em;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
	transition: background-color .4s var(--ease), color .4s var(--ease);
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; letter-spacing: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 8px; }

.muted { color: var(--muted-fg); }
.label { font-size: 16px; font-weight: 500; color: var(--muted-fg); margin: 0 0 16px; }
.label--lg { font-size: 24px; font-weight: 400; }
.h2 { font-size: clamp(26px, 2.6vw, 32px); line-height: 1.15; letter-spacing: -.04em; }
.h3 { font-size: 22px; line-height: 1.2; }
.hand { font-family: var(--f-hand); font-size: 30px; line-height: 1; letter-spacing: 0; color: var(--muted-fg); font-weight: 400; }
.icon { width: 18px; height: 18px; flex: none; }

/* ---------- frame + guide lines ---------- */
.frame { width: 100%; max-width: var(--frame); margin: 0 auto; padding: 0 var(--gutter); position: relative; }
.frame--lined { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.band { position: relative; border-top: 1px solid var(--border); }
.band > .frame--lined { padding-top: clamp(70px, 9vw, 120px); padding-bottom: clamp(70px, 9vw, 120px); }
.band > .frame--lined::before, .band > .frame--lined::after {
	content: ""; position: absolute; top: -3px; width: 5px; height: 5px; border-radius: 50%; background: var(--border-strong);
}
.band > .frame--lined::before { left: -3px; }
.band > .frame--lined::after { right: -3px; }

/* ---------- buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 44px; padding: 0 22px; border-radius: 999px;
	background: var(--card); color: var(--fg);
	border: 1px solid var(--border); box-shadow: var(--shadow);
	font-size: 15px; font-weight: 500; white-space: nowrap;
	transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--outline { border: 2px solid var(--fg); }
.btn--solid { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.btn .icon { width: 15px; height: 15px; }

/* =========================================================
   Header — floating pill nav
   ========================================================= */
.site-header {
	position: fixed; z-index: 100; left: 0; right: 0; top: calc(24px + var(--admin));
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 0 24px; pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px 0 8px; border-radius: 999px; transition: background .3s, box-shadow .3s; }
.brand__mark { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--fg); color: var(--bg); }
.brand__mark svg { width: 22px; height: 22px; }
.brand__name { font-weight: 600; font-size: 17px; }
.brand__img { max-height: 40px; width: auto; }
.is-scrolled .brand { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); }

.nav-wrap { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; }
.pill-nav {
	background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
	border: 1px solid var(--border); border-radius: 999px; padding: 4px; box-shadow: var(--shadow);
}
.pill-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.pill-nav__list a {
	display: flex; align-items: center; height: 44px; padding: 0 13px; border-radius: 999px;
	color: var(--muted-fg); font-size: 15px; transition: background .3s, color .3s, box-shadow .3s;
}
.pill-nav__list a:hover { color: var(--fg); }
.pill-nav__list a.is-active, .pill-nav__list .current-menu-item > a { background: var(--card); color: var(--fg); box-shadow: var(--shadow); }
.pill-nav__label {
	display: inline-block; max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap;
	transition: max-width .5s var(--ease), opacity .3s, margin .5s var(--ease);
}
.is-scrolled .pill-nav__label, .pill-nav:hover .pill-nav__label { max-width: 90px; opacity: 1; margin-left: 7px; }
.pill-nav__list--text a { padding: 0 16px; }

.cta-pill {
	display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 22px 0 6px;
	border-radius: 999px; background: var(--primary); color: var(--primary-fg);
	box-shadow: var(--shadow-lg); font-size: 17px; font-weight: 500; white-space: nowrap;
	transition: transform .3s var(--ease);
}
.cta-pill:hover { transform: translateY(-2px); }
.cta-pill__dot { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--primary-fg); animation: spin 9s linear infinite; }
.cta-pill__dot i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--primary); }
.cta-pill__dot i:nth-child(1) { left: 12px; top: 10px; }
.cta-pill__dot i:nth-child(2) { left: 22px; top: 14px; width: 5px; height: 5px; }
.cta-pill__dot i:nth-child(3) { left: 14px; top: 21px; width: 3px; height: 3px; }
.cta-pill__dot i:nth-child(4) { left: 24px; top: 25px; }
.cta-pill__dot i:nth-child(5) { left: 17px; top: 29px; width: 3px; height: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.theme-toggle {
	width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
	background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
	border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .4s var(--ease-pop);
}
.theme-toggle:hover { transform: rotate(-20deg); }
.theme-toggle .icon { grid-area: 1 / 1; transition: opacity .3s, transform .5s var(--ease); }
.theme-toggle__sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
html.dark .theme-toggle__moon { opacity: 0; transform: rotate(90deg) scale(.6); }
html.dark .theme-toggle__sun { opacity: 1; transform: none; }

/* section rail — line per section; labels slide out on hover, active one in the accent colour */
.rail { position: fixed; left: 12px; top: 50%; transform: translateY(-50%); z-index: 90; display: flex; flex-direction: column; gap: 2px; }
.rail a { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--muted-fg); border-radius: 0; }
.rail a::before {
	content: ""; display: block; flex: none; height: 2px; border-radius: 2px; width: var(--w, 12px);
	background: currentColor; opacity: .5; transition: width .5s var(--ease), opacity .3s, background-color .3s, height .3s;
}
.rail__label {
	font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; letter-spacing: -.01em;
	padding: 6px 10px; border-radius: 999px; background: var(--glass); border: 1px solid var(--border);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow);
	opacity: 0; filter: blur(4px); transform: translateX(-8px) scale(.96); transform-origin: left center; pointer-events: none;
	transition: opacity .35s var(--ease), transform .45s var(--ease), filter .35s var(--ease), color .3s;
}
.rail:hover .rail__label, .rail:focus-within .rail__label { opacity: .7; filter: none; transform: none; }
.rail a:hover, .rail a:focus-visible { color: var(--fg); }
.rail a:hover::before, .rail a:focus-visible::before { opacity: 1; width: max(var(--w, 12px), 28px); }
.rail a:hover .rail__label, .rail a:focus-visible .rail__label { opacity: 1; transform: translateX(2px); }
.rail a.is-active { color: var(--accent); }
.rail a.is-active::before { opacity: 1; height: 3px; }
.rail a.is-active .rail__label { color: var(--accent); border-color: var(--accent-soft); background: var(--card); }
.rail a.is-active:not(:hover) .rail__label { opacity: 0; }
.rail:hover a.is-active .rail__label { opacity: 1; }
.rail a:focus-visible { outline: none; }

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 130px 0 80px; overflow: hidden; }
.sky { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 38%, var(--bg) 72%); transition: background .5s; }
.cloud { position: absolute; display: block; background: var(--cloud); border-radius: 50%; filter: blur(22px); animation: drift 60s linear infinite alternate; }
.c1 { width: 240px; height: 90px; left: 2%; top: 7%; }
.c2 { width: 210px; height: 70px; left: 31%; top: 25%; animation-duration: 75s; }
.c3 { width: 170px; height: 60px; left: 50%; top: 13%; animation-duration: 55s; }
.c4 { width: 200px; height: 64px; left: 49%; top: 20%; animation-duration: 80s; }
.c5 { width: 190px; height: 70px; right: 9%; top: 6%; animation-duration: 70s; }
@keyframes drift { to { transform: translateX(70px); } }

.hero__grid { display: grid; grid-template-columns: 1fr 1.05fr 1fr; gap: 40px; align-items: center; }
.hero__title { font-size: clamp(34px, 3.2vw, 46px); line-height: 1.08; font-weight: 600; letter-spacing: -.04em; max-width: 13ch; }
.w { display: inline-block; }
.js .w { opacity: 0; filter: blur(10px); transform: translateY(6px); animation: blurIn .9s var(--ease) forwards; animation-delay: calc(var(--i) * 90ms + 150ms); }
@keyframes blurIn { to { opacity: 1; filter: blur(0); transform: none; } }

.hero__for { display: flex; gap: .3em; font-size: clamp(22px, 2vw, 28px); font-weight: 500; margin-top: 10px; color: var(--muted-fg); }
.rotator { position: relative; display: inline-block; height: 1.25em; min-width: 9em; color: var(--fg); }
.rotator__item { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; filter: blur(8px); transform: translateY(40%); transition: opacity .6s, filter .6s, transform .6s var(--ease); }
.rotator__item.is-on { opacity: 1; filter: blur(0); transform: none; }
.rotator__item.is-out { transform: translateY(-40%); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero__art { position: relative; margin: 0; aspect-ratio: 1; max-width: 420px; justify-self: center; width: 100%; color: var(--fg); }
.hero__photo { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.construct { width: 100%; height: 100%; overflow: visible; }
.construct__guides { color: var(--border-strong); opacity: .7; }
.construct__guides > * { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s var(--ease) forwards; }
.construct__guides > *:nth-child(2) { animation-delay: .2s; } .construct__guides > *:nth-child(3) { animation-delay: .35s; }
.construct__guides > *:nth-child(4) { animation-delay: .5s; } .construct__guides > *:nth-child(5) { animation-delay: .65s; }
.construct__guides rect { stroke-dasharray: 4 6; stroke-dashoffset: 0; opacity: 0; animation: fade 1s .9s forwards; }
.construct__stroke { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s var(--ease) 1.1s forwards; }
.construct__dot { transform-origin: 252px 108px; transform: scale(0); animation: popIn .7s var(--ease-pop) 2.1s forwards; }
.construct__pins { opacity: 0; animation: fade .5s 2.4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes popIn { to { transform: scale(1); } }

.hero__right { display: grid; gap: 14px; font-size: 18px; max-width: 340px; justify-self: end; }
.hero__kicker { font-size: 18px; color: var(--fg); }
.hero__text { line-height: 1.55; }
.status { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0; color: var(--muted-fg); margin-top: 6px; }
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }

/* handwritten margin notes */
.note { position: absolute; white-space: nowrap; pointer-events: none; z-index: 2; }
.note .doodle { display: inline-block; vertical-align: middle; color: var(--muted-fg); }
.note--grid { left: -6%; bottom: -2%; transform: rotate(-5deg); }
.note--dot { right: -4%; top: 16%; transform: rotate(6deg); }
.note--head { position: static; display: inline-flex; align-items: flex-end; gap: 2px; margin-top: 14px; transform: rotate(-3deg); }
.note--head .doodle { width: 32px; height: 40px; margin-left: 4px; }
.note--case { right: 18px; top: 16px; transform: rotate(3deg); color: var(--fg); opacity: .7; }
.note--process { position: static; display: inline-flex; align-items: center; gap: 6px; margin-top: 28px; transform: rotate(-2deg); }
.note--process .doodle { width: 26px; height: 26px; }
.note--fact { right: 16px; top: 14px; transform: rotate(4deg); }
.doodle path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s var(--ease) .3s; }
.is-in .doodle path, .doodle.is-in path, .no-js .doodle path { stroke-dashoffset: 0; }
.hero .doodle path { stroke-dashoffset: 0; }

/* =========================================================
   Client marks + statement
   ========================================================= */
.clients { padding: 0 0 clamp(40px, 6vw, 70px); }
.clients .label { margin-bottom: 28px; }
.clients__row { list-style: none; margin: 0; padding: clamp(24px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: var(--muted); border-radius: 24px; }
.coin { display: grid; place-items: center; border-radius: 50%; background: var(--fg); color: var(--bg); aspect-ratio: 1; transition: transform .6s var(--ease-pop); --mark-bg: var(--fg); }
.coin svg { width: 52%; height: 52%; }
.coin--xl { width: clamp(90px, 13vw, 180px); }
.coin--lg { width: clamp(80px, 11vw, 160px); }
.coin--md { width: clamp(70px, 10vw, 150px); }
.coin--sm { width: clamp(60px, 8.5vw, 120px); }
.coin:hover { transform: rotate(-12deg) scale(1.05); }
.statement { font-size: clamp(28px, 3.4vw, 48px); line-height: 1.15; font-weight: 500; letter-spacing: -.04em; max-width: 26ch; margin-top: clamp(40px, 6vw, 70px); }

/* =========================================================
   Section heads
   ========================================================= */
.section-head { position: relative; margin-bottom: clamp(32px, 5vw, 56px); max-width: 760px; }
.section-head__sub { margin-top: 12px; font-size: 17px; max-width: 56ch; }

/* =========================================================
   Stress tests
   ========================================================= */
.tests { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.test { background: var(--muted); border: 1px solid var(--border); border-radius: 24px; padding: 12px 12px 22px; display: flex; flex-direction: column; }
.test--wide { grid-column: span 2; }
.test__stage {
	background: var(--card); border: 1px solid var(--border); border-radius: 16px; min-height: 220px;
	display: grid; place-items: center; padding: 24px; margin-bottom: 18px; position: relative; overflow: hidden;
	transition: background .35s, color .35s;
}
.test__title { font-size: 17px; padding: 0 10px; }
.test__text { font-size: 14.5px; color: var(--muted-fg); padding: 4px 10px 0; letter-spacing: -.02em; }

.scale { display: flex; align-items: flex-end; gap: clamp(18px, 4vw, 44px); }
.scale__item { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.scale__item svg { width: var(--s); height: var(--s); }
.scale__item small { font-family: var(--f-mono); font-size: 11px; color: var(--muted-fg); letter-spacing: 0; }

.test__stage--mono { color: #4f6b5a; }
.test__stage--mono .mono-mark { width: 110px; height: 110px; }
.test__stage--mono[data-mono-stage="black"] { background: #fff; color: #0a0a0a; --mark-bg: #fff; }
.test__stage--mono[data-mono-stage="white"] { background: #0a0a0a; color: #fff; --mark-bg: #0a0a0a; }
.seg { display: inline-flex; align-self: center; gap: 2px; padding: 3px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; margin: -6px 0 16px; }
.seg button { height: 30px; padding: 0 14px; border-radius: 999px; font-size: 13px; color: var(--muted-fg); }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--primary-fg); }

.squint { display: block; width: 120px; height: 120px; filter: blur(var(--blur)); transition: filter .2s; }
.squint svg { width: 100%; height: 100%; }
.range { display: flex; align-items: center; gap: 12px; padding: 0 10px 14px; font-size: 13px; color: var(--muted-fg); }
.range input { flex: 1; accent-color: var(--fg); }

.clearspace { position: relative; display: block; width: 100px; height: 100px; }
.clearspace svg { width: 100%; height: 100%; position: relative; }
.clearspace__box { position: absolute; inset: -26px; border: 1.5px dashed var(--border-strong); border-radius: 4px; }
.clearspace__x { position: absolute; font-family: var(--f-mono); font-style: normal; font-size: 11px; color: var(--muted-fg); letter-spacing: 0; }
.clearspace__x--t { top: -24px; left: 50%; transform: translateX(-50%); }
.clearspace__x--r { right: -22px; top: 50%; transform: translateY(-50%); }

.swatches { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 6px; }
.swatch { width: 100%; display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 10px; text-align: left; transition: background .2s; }
.swatch:hover { background: var(--muted); }
.swatch__chip { width: 26px; height: 26px; border-radius: 8px; background: var(--c); box-shadow: inset 0 0 0 1px var(--border); }
.swatch__name { font-size: 14px; }
.swatch code { font-family: var(--f-mono); font-size: 12px; color: var(--muted-fg); letter-spacing: 0; }
.swatch.is-copied code::after { content: " ✓"; color: var(--fg); }

/* =========================================================
   Work
   ========================================================= */
.work-head { display: grid; gap: 22px; margin-bottom: clamp(36px, 5vw, 60px); }
.work-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; background: var(--muted); border-radius: 999px; border: 1px solid var(--border); }
.tab { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; color: var(--muted-fg); transition: background .25s, color .25s, box-shadow .25s; }
.tab .icon { width: 15px; height: 15px; }
.tab:hover { color: var(--fg); }
.tab[aria-pressed="true"] { background: var(--card); color: var(--fg); box-shadow: var(--shadow); }
.tab__count { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0; opacity: .7; }
.work-count { font-size: 14px; }

.cases { display: grid; gap: clamp(70px, 9vw, 120px); }
.case[hidden] { display: none; }
.case__head { margin-bottom: 28px; padding: 0 clamp(0px, 2vw, 20px); }
.case__title { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; letter-spacing: -.04em; max-width: 30ch; }
.case__title a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.case__lead { font-weight: 500; }
.case__tags { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted-fg); }

.case__body { display: grid; grid-template-columns: 1.12fr 1fr; gap: 16px; }
.case__visual {
	position: relative; border-radius: 24px; min-height: clamp(320px, 36vw, 460px); overflow: hidden;
	display: grid; place-items: center; padding: 40px;
}
.tone-sky { background: var(--tone-sky); } .tone-sand { background: var(--tone-sand); }
.tone-sage { background: var(--tone-sage); } .tone-lilac { background: var(--tone-lilac); } .tone-mono { background: var(--tone-mono); }
.case__art {
	width: min(62%, 260px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 32px;
	background: var(--card); color: var(--fg); box-shadow: var(--shadow-lg);
	transition: transform .7s var(--ease);
}
.case__art svg { width: 58%; height: 58%; }
.case__art img { width: 80%; height: 80%; object-fit: contain; }
.case:hover .case__art { transform: rotate(-3deg) scale(1.03); }
.case__chips { position: absolute; left: 20px; bottom: 20px; display: flex; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 6px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: 14px; color: var(--fg); }
.chip__icon { --mark-bg: var(--fg); width: 28px; height: 28px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; }
.chip__icon svg { width: 16px; height: 16px; }
.chip--dark { --mark-bg: var(--fg); width: 40px; padding: 0; justify-content: center; background: var(--fg); color: var(--bg); border-radius: 12px; }
.chip--dark svg { width: 22px; height: 22px; }

.case__info { background: var(--muted); border-radius: 24px; padding: clamp(16px, 2vw, 24px); display: flex; flex-direction: column; gap: 22px; }
.case__summary { background: var(--card); border-radius: 20px; padding: clamp(20px, 2.4vw, 28px); font-size: 17px; line-height: 1.5; letter-spacing: -.02em; }
.case__meta { margin: auto 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.case__meta dt { font-size: 13px; color: var(--muted-fg); }
.case__meta dd { margin: 2px 0 0; font-size: 15px; letter-spacing: -.02em; }
.case__meta-wide { grid-column: 1 / -1; }
.case__more { align-self: flex-end; }

.case__features { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.feature { background: var(--muted); border: 1px solid var(--border); border-radius: 20px; padding: 24px 24px 28px; }
.feature .icon { width: 22px; height: 22px; color: var(--muted-fg); }
.feature__title { font-size: 16px; color: var(--muted-fg); margin: clamp(36px, 5vw, 70px) 0 8px; }
.feature p { font-size: 14px; letter-spacing: -.02em; line-height: 1.45; }

/* grid view */
.cases.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 16px; }
.cases.is-grid .case__features, .cases.is-grid .case__info, .cases.is-grid .note--case, .cases.is-grid .case__tags { display: none; }
.cases.is-grid .case__body { grid-template-columns: 1fr; }
.cases.is-grid .case__head { order: 2; margin: 16px 0 0; padding: 0; }
.cases.is-grid .case { display: flex; flex-direction: column; }
.cases.is-grid .case__title { font-size: 20px; }
.cases.is-grid .case__visual { min-height: 320px; }

/* =========================================================
   Process
   ========================================================= */
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.steps__row { display: grid; grid-template-columns: 1.25fr 2fr 1.25fr .6fr; gap: 24px; padding: 18px 12px; border-bottom: 1px solid var(--border); align-items: baseline; transition: background .25s; }
.steps__row:not(.steps__row--head):hover { background: var(--muted); }
.steps__row--head { font-size: 13px; color: var(--muted-fg); padding-top: 12px; padding-bottom: 12px; }
.steps__name { font-size: 16px; }
.steps__num { font-family: var(--f-mono); font-size: 12px; color: var(--muted-fg); letter-spacing: 0; margin-right: 8px; }
.steps__what { font-size: 15px; color: var(--muted-fg); letter-spacing: -.02em; }
.steps__get { font-size: 15px; }
.steps__when { font-size: 13px; color: var(--muted-fg); text-align: right; }

/* =========================================================
   About
   ========================================================= */
.about { max-width: 1060px; }
.about__title { font-size: clamp(28px, 3vw, 36px); max-width: 30ch; }
.about__text { margin-top: 16px; display: grid; gap: 12px; font-size: 18px; line-height: 1.55; color: var(--fg); opacity: .85; letter-spacing: -.03em; }
.facts { list-style: none; margin: clamp(40px, 6vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fact { position: relative; border-radius: 20px; padding: 28px; min-height: 200px; display: flex; flex-wrap: wrap; align-content: flex-end; gap: 0 4px; border: 1px solid var(--border); }
.dots { background-color: var(--muted); background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 12px 12px; }
.fact__num { font-size: clamp(44px, 5vw, 64px); line-height: 1; font-weight: 600; letter-spacing: -.05em; }
.fact__plus { font-size: 32px; font-weight: 500; color: var(--muted-fg); align-self: flex-start; padding-top: 4px; }
.fact__label { flex-basis: 100%; margin-top: 8px; color: var(--muted-fg); }

.kit { margin-top: clamp(56px, 7vw, 90px); }
.kit .h3 { margin-bottom: 20px; }
.kit__list { margin: 0; border-top: 1px solid var(--border); }
.kit__row { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 16px 12px; border-bottom: 1px solid var(--border); }
.kit__row dt { font-weight: 500; }
.kit__row dd { margin: 0; color: var(--muted-fg); letter-spacing: -.02em; }

/* =========================================================
   FAQ
   ========================================================= */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.faq .section-head { position: sticky; top: 120px; }
.faq__list { border-top: 1px solid var(--border); }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 4px; cursor: pointer; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item h3 { font-size: 18px; letter-spacing: -.03em; }
.faq__icon { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--muted); transition: transform .4s var(--ease), background .3s; }
.faq__item[open] .faq__icon { transform: rotate(45deg); background: var(--primary); color: var(--primary-fg); }
.faq__item p { padding: 0 60px 24px 4px; color: var(--muted-fg); font-size: 16px; line-height: 1.6; letter-spacing: -.02em; }

/* =========================================================
   Quote
   ========================================================= */
.quote { margin: 0; text-align: center; padding: clamp(30px, 6vw, 80px) 0; }
.quote blockquote { margin: 0; }
.quote p { font-size: clamp(32px, 5vw, 64px); line-height: 1.08; font-weight: 500; letter-spacing: -.05em; max-width: 18ch; margin: 0 auto; }
.quote [data-words] .w { opacity: .12; filter: none; transform: none; animation: none; transition: opacity .4s; }
.quote [data-words] .w.on { opacity: 1; }
.quote figcaption { margin-top: 22px; font-size: 16px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { border-top: 1px solid var(--border); overflow: hidden; position: relative; }
.site-footer .frame { padding-top: clamp(60px, 8vw, 110px); }
.site-footer__top { display: flex; justify-content: space-between; gap: 50px; flex-wrap: wrap; }
.site-footer__intro { display: grid; gap: 22px; align-content: start; }
.site-footer__lead { font-size: clamp(26px, 3vw, 36px); font-weight: 500; line-height: 1.1; max-width: 16ch; }
.site-footer__intro .btn { justify-self: start; }
.site-footer__cols { display: flex; gap: 48px; }
.site-footer__title { font-size: 16px; color: var(--muted-fg); margin-bottom: 16px; }
.site-footer .menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer .menu a { display: block; width: 130px; padding: 6px 0; border-bottom: 1px solid var(--border); color: var(--muted-fg); transition: color .2s, border-color .2s; }
.site-footer .menu a:hover { color: var(--fg); border-color: var(--fg); }
.site-footer__credit { text-align: center; color: var(--muted-fg); margin-top: clamp(60px, 8vw, 100px); font-size: 15px; }
.site-footer__giant {
	font-size: clamp(70px, 18vw, 290px); line-height: .78; font-weight: 600; letter-spacing: -.06em;
	color: var(--giant); text-align: center; white-space: nowrap; margin: 30px 0 -.1em; user-select: none;
}
.footer-widgets { margin-top: 40px; }

.to-top {
	position: fixed; right: 24px; bottom: 24px; z-index: 80; width: 52px; height: 52px; border-radius: 50%;
	display: grid; place-items: center; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
	border: 1px solid var(--border); box-shadow: var(--shadow);
	opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .4s var(--ease);
}
.to-top .icon { transform: rotate(180deg); }
.is-scrolled-far .to-top { opacity: 1; transform: none; pointer-events: auto; }

/* =========================================================
   Inner pages
   ========================================================= */
.page-head { padding-top: calc(150px + var(--admin)); padding-bottom: clamp(40px, 6vw, 70px); }
.page-title { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.08; font-weight: 600; letter-spacing: -.05em; max-width: 22ch; }
.page-head__sub { margin-top: 14px; font-size: 18px; max-width: 60ch; }
.page-head__search { margin-top: 26px; max-width: 520px; }
.page-head--404 { text-align: center; }
.page-head--404 .page-title, .page-head--404 .page-head__sub, .page-head--404 .page-head__search { margin-left: auto; margin-right: auto; }
.page-head--404 .btn { margin-top: 24px; }
.giant-404 { font-size: clamp(120px, 24vw, 300px); line-height: .8; font-weight: 600; letter-spacing: -.07em; color: var(--muted); margin-bottom: 20px; }
.page-body { border-top: 1px solid var(--border); padding-top: clamp(40px, 6vw, 70px); padding-bottom: clamp(60px, 8vw, 110px); }
.crumbs { font-size: 14px; color: var(--muted-fg); margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--fg); }
.case--single .case__features .feature__title { font-size: 16px; }
.cover { margin: 0 0 40px; }
.cover img { width: 100%; border-radius: 24px; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--muted); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.card__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card__body { padding: 20px 22px 24px; display: grid; gap: 8px; }
.card__title { font-size: 20px; }
.empty { text-align: center; padding: 40px 0; display: grid; gap: 14px; justify-items: center; }
.empty .hand { font-size: 34px; }

.search-form { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 16px; background: var(--muted); border: 1px solid var(--border); border-radius: 999px; }
.search-form .icon { color: var(--muted-fg); }
.search-field { flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: var(--fg); padding: 10px 4px; letter-spacing: -.02em; }
.search-field:focus { outline: none; }

.entry-content { max-width: 760px; margin: 0 auto; font-size: 18px; line-height: 1.7; letter-spacing: -.02em; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { font-size: 28px; line-height: 1.2; margin-top: 1.8em; }
.entry-content h3 { font-size: 22px; margin-top: 1.6em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry-content img { border-radius: 16px; }
.entry-content blockquote { margin: 1.6em 0; padding-left: 22px; border-left: 2px solid var(--border-strong); font-size: 22px; }
.entry-content ul, .entry-content ol { padding-left: 1.2em; }
.entry-content code { font-family: var(--f-mono); font-size: .85em; background: var(--muted); padding: .1em .4em; border-radius: 6px; letter-spacing: 0; }
.entry-content .alignwide { max-width: 1100px; margin-left: calc(50% - min(550px, 50vw)); margin-right: calc(50% - min(550px, 50vw)); }
.entry-content .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.wp-block-button__link { border-radius: 999px; background: var(--primary); color: var(--primary-fg); }

.post-navigation { max-width: 760px; margin: 60px auto 0; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.post-navigation a { display: grid; gap: 4px; padding: 20px; border-radius: 20px; background: var(--muted); border: 1px solid var(--border); }
.post-navigation .label { margin: 0; font-size: 13px; }
.post-navigation .nav-next { text-align: right; }
.pagination { margin-top: 50px; }
.pagination .nav-links { display: flex; gap: 6px; justify-content: center; }
.page-numbers { min-width: 40px; height: 40px; padding: 0 14px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--muted); font-size: 14px; }
.page-numbers.current { background: var(--primary); color: var(--primary-fg); }

.comments { max-width: 760px; margin: 60px auto 0; }
.comment-list { list-style: none; padding: 0; }
.comment-form { display: grid; gap: 12px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 12px 16px; font: inherit; color: var(--fg); background: var(--muted); border: 1px solid var(--border); border-radius: 14px;
}

/* =========================================================
   Inner-page hero (same sky + blur-in title as the homepage)
   ========================================================= */
.page-hero { position: relative; overflow: hidden; padding: calc(150px + var(--admin)) 0 clamp(56px, 7vw, 90px); }
.page-hero .sky { background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 45%, var(--bg) 100%); }
.page-hero__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.page-hero__grid--solo { grid-template-columns: minmax(0, 1fr); }
.page-hero__label { margin-bottom: 12px; }
.page-hero .page-title { max-width: 20ch; }
.page-hero .page-head__sub { color: var(--muted-fg); }
.page-hero__meta { margin-top: 18px; }
.page-hero__art { position: relative; justify-self: center; width: 100%; max-width: 340px; aspect-ratio: 1; display: grid; place-items: center; color: var(--fg); }
.page-hero__note { left: -8%; bottom: 0; transform: rotate(-5deg); }
.hero-coins { list-style: none; margin: 0; padding: 0; position: relative; width: 100%; height: 100%; }
.hero-coins__item { position: absolute; --mark-bg: var(--fg); box-shadow: var(--shadow-lg); animation: floaty 7s ease-in-out infinite alternate; }
.hero-coins__item svg { width: 52%; height: 52%; }
.hero-coins__item--0 { width: 58%; left: 4%; top: 6%; }
.hero-coins__item--1 { width: 38%; right: 2%; top: 30%; animation-delay: -2s; background: var(--card); color: var(--fg); --mark-bg: var(--card); border: 1px solid var(--border); }
.hero-coins__item--2 { width: 30%; left: 30%; bottom: 4%; animation-delay: -4s; }
@keyframes floaty { to { transform: translateY(-10px) rotate(-4deg); } }
.hero-tile {
	width: 62%; aspect-ratio: 1; border-radius: 32%; display: grid; place-items: center;
	background: var(--fg); color: var(--bg); box-shadow: var(--shadow-lg); transform: rotate(-6deg);
	animation: floaty 7s ease-in-out infinite alternate;
}
.hero-tile .icon { width: 44%; height: 44%; stroke-width: 1.3; }

.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .5; }

.section-more { margin-top: clamp(40px, 5vw, 60px); text-align: center; }
.about__more { margin-top: 10px; }
.entry-band__title { margin-bottom: 32px; }
.page-body--flush { border-top: 0; }
.btn--lg { height: 52px; padding: 0 28px; font-size: 16px; }

/* values / steps grid */
.value-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.value-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.value-grid .feature__title { color: var(--fg); font-size: 18px; margin-top: clamp(28px, 4vw, 56px); }
.value-grid .feature p { color: var(--muted-fg); font-size: 15px; }
#values .statement { margin-top: clamp(50px, 7vw, 90px); }

/* industries */
.industries { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.industry { position: relative; padding: 22px 22px 26px; border-radius: 20px; border: 1px solid var(--border); background: var(--card); transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s; }
.industry:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.industry__icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--muted); transition: background .3s, color .3s, transform .5s var(--ease-pop); }
.industry:hover .industry__icon { background: var(--fg); color: var(--bg); transform: rotate(-10deg); }
.industry__icon .icon { width: 20px; height: 20px; }
.industry__title { font-size: 17px; margin: 18px 0 6px; }
.industry__text { font-size: 14px; color: var(--muted-fg); line-height: 1.45; letter-spacing: -.02em; }

/* services */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.service { display: grid; grid-template-rows: auto 1fr; background: var(--muted); border: 1px solid var(--border); border-radius: 24px; padding: 10px; }
.service__visual { position: relative; border-radius: 18px; min-height: 170px; display: grid; place-items: center; overflow: hidden; }
.service__num { position: absolute; left: 18px; top: 14px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0; color: var(--fg); opacity: .6; }
.service__icon { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow-lg); transition: transform .6s var(--ease); }
.service__icon .icon { width: 30px; height: 30px; }
.service:hover .service__icon { transform: rotate(-8deg) scale(1.06); }
.service__body { padding: 22px 16px 12px; display: flex; flex-direction: column; gap: 14px; }
.service__title { font-size: 22px; letter-spacing: -.04em; }
.service__text { color: var(--muted-fg); letter-spacing: -.02em; }
.service__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.service__list li { display: flex; gap: 10px; align-items: center; }
.service__list .icon { width: 16px; height: 16px; color: var(--accent); }
.service__foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.service__foot .status { margin: 0; }
.service__foot .status .icon { width: 15px; height: 15px; }
.kit--flush { margin-top: 0; }
.kit--flush .section-head__sub { margin-bottom: 28px; }

/* closing CTA */
.cta-block { position: relative; border-radius: 28px; border: 1px solid var(--border); padding: clamp(36px, 6vw, 80px); display: grid; gap: 16px; justify-items: start; overflow: hidden; }
.cta-block__title { font-size: clamp(30px, 4vw, 52px); line-height: 1.05; font-weight: 600; letter-spacing: -.05em; max-width: 18ch; }
.cta-block__text { font-size: 18px; max-width: 52ch; }
.cta-block .hero__actions { margin-top: 10px; }
.cta-block .status { margin: 0; }
.cta-block__note { right: clamp(20px, 6vw, 80px); bottom: clamp(28px, 5vw, 60px); transform: rotate(-4deg); display: inline-flex; align-items: center; gap: 6px; }
.cta-block__note .doodle { width: 54px; height: 30px; }

/* contact */
.contact { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.contact__side { position: sticky; top: 120px; }
.form { display: grid; gap: 16px; margin-top: 28px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-size: 14px; color: var(--muted-fg); }
.field input, .field select, .field textarea {
	width: 100%; font: inherit; letter-spacing: -.02em; color: var(--fg); background: var(--card);
	border: 1px solid var(--border); border-radius: 14px; padding: 13px 16px; transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted-fg) 50%), linear-gradient(135deg, var(--muted-fg) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 4px var(--accent-soft); }
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: 10px; }
.field--check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--fg); }
.field--check label { font-size: 14px; }
.field--check a { text-decoration: underline; text-underline-offset: 3px; }
.form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* field validation */
.field__error { font-size: 13.5px; color: var(--accent); min-height: 0; }
.field__error:empty { display: none; }
.field__foot { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.field__count { margin-left: auto; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0; color: var(--muted-fg); }
.field__count.is-low { color: var(--accent); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field.is-valid input:not([type="checkbox"]), .field.is-valid textarea { border-color: rgba(34, 197, 94, .55); }
.field--check .field__error { grid-column: 2; }
.field--check.has-error input { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.is-sending { opacity: .7; pointer-events: none; }
.btn.is-sending svg { animation: lexNudge .8s ease-in-out infinite; }
@keyframes lexNudge { 50% { transform: translate(3px, -3px); } }

/* sent confirmation */
.form-success { margin-top: 28px; padding: clamp(24px, 4vw, 40px); border-radius: 24px; border: 1px solid rgba(34, 197, 94, .35); background: linear-gradient(160deg, rgba(34, 197, 94, .1), transparent 70%), var(--card); display: grid; gap: 12px; justify-items: start; outline: none; animation: lexPop .7s var(--ease-pop) both; }
.form-success__icon { width: 56px; height: 56px; color: #16a34a; }
html.dark .form-success__icon { color: #4ade80; }
.form-success__icon svg { width: 100%; height: 100%; }
.form-success__icon circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: lexDraw .8s var(--ease) .15s forwards; }
.form-success__icon path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: lexDraw .5s var(--ease) .7s forwards; }
.form-success__title { margin: 4px 0 0; }
.form-success .hero__actions { margin-top: 10px; }
@keyframes lexDraw { to { stroke-dashoffset: 0; } }
@keyframes lexPop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

.form-notice { margin-top: 20px; padding: 14px 18px; border-radius: 14px; font-size: 15px; border: 1px solid var(--border); }
.form-notice--ok { background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .35); }
.form-notice--err { background: var(--accent-soft); border-color: var(--accent); }
.contact-card { position: relative; border: 1px solid var(--border); border-radius: 24px; padding: 28px; display: grid; gap: 16px; }
.contact-card .status { margin: 0; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.contact-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); word-break: break-word; }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .icon { color: var(--muted-fg); }
.contact-list a { text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.contact-list a:hover { text-decoration-color: var(--fg); }

/* legal */
.legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.legal .entry-content { margin: 0; }
.toc { position: sticky; top: 120px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; border-left: 1px solid var(--border); }
.toc li { counter-increment: toc; }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; font-size: 14px; color: var(--muted-fg); border-left: 2px solid transparent; transition: color .2s, border-color .2s; }
.toc a::before { content: counter(toc, decimal-leading-zero) "  "; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0; }
.toc a:hover { color: var(--fg); border-color: var(--fg); }
.entry-content h2[id] { scroll-margin-top: 120px; }

/* blog cards + article */
.card { display: flex; flex-direction: column; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card__img { display: block; overflow: hidden; }
.card__img img { transition: transform .7s var(--ease); }
.card:hover .card__img img { transform: scale(1.03); }
.card__placeholder { display: grid; place-items: center; aspect-ratio: 4 / 3; }
.card__placeholder .coin { width: 34%; --mark-bg: var(--fg); box-shadow: var(--shadow-lg); }
.card__placeholder .coin svg { width: 52%; height: 52%; }
.card:hover .card__placeholder .coin { transform: rotate(-12deg) scale(1.05); }
.card__body { flex: 1; }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--muted-fg); }
.card__cat { color: var(--accent); font-weight: 500; }
.card__title a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.card__more { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.card__more .icon { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.card:hover .card__more .icon { transform: translate(2px, -2px); }
.card--featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; }
.card--featured .card__img, .card--featured .card__placeholder, .card--featured .card__img img { height: 100%; aspect-ratio: auto; min-height: 300px; object-fit: cover; }
.card--featured .card__body { padding: clamp(24px, 3vw, 40px); align-content: center; }
.card--featured .card__title { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; letter-spacing: -.04em; }
.work-head nav.tabs a.tab { text-decoration: none; }

.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted-fg); font-size: 15px; }
.post-meta__avatar { border-radius: 50%; width: 32px; height: 32px; }
.post-tags { max-width: 760px; margin: 40px auto 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.post-tags .label { margin: 0 8px 0 0; }
.post-tags a { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--muted); }
.author-box { max-width: 760px; margin: 50px auto 0; display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 24px; border-radius: 20px; border: 1px solid var(--border); }
.author-box__mark { width: 52px; height: 52px; }
.author-box__mark svg { width: 30px; height: 30px; }
.author-box__name { font-weight: 600; font-size: 18px; margin-bottom: 4px; }
.author-box__links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 14px; }
.author-box__links a { text-decoration: underline; text-underline-offset: 3px; }

/* footer additions */
.site-footer__about { max-width: 42ch; font-size: 15px; }
.site-footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px 30px; flex-wrap: wrap; margin-top: clamp(60px, 8vw, 100px); }
.site-footer__bottom .site-footer__credit { margin: 0; text-align: left; }
.site-footer__credit a { text-decoration: underline; text-underline-offset: 3px; }
.site-footer .site-footer__legal .menu { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer .site-footer__legal .menu a { width: auto; border: 0; padding: 0; font-size: 14px; }

/* =========================================================
   Portrait (hero intro + About story)
   ========================================================= */
.portrait { position: relative; margin: 0; border-radius: 28px; isolation: isolate; background: var(--muted); box-shadow: 0 0 0 1px var(--border), 0 30px 60px -28px rgba(17, 17, 17, .45), 0 0 0 8px var(--card); }
.portrait__pic { display: block; position: absolute; inset: 0; border-radius: inherit; overflow: hidden; z-index: -1; }
.portrait__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; filter: contrast(1.06) saturate(1.08) brightness(1.03); transition: transform 1.2s var(--ease), filter .6s var(--ease); }
/* warm accent wash at the top, soft shade at the bottom for the name tag */
.portrait::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(120% 70% at 85% 0%, var(--accent-soft), transparent 60%), linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .38)); mix-blend-mode: normal; }
.portrait__tag { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0; color: #111; background: rgba(255, 255, 255, .78); border: 1px solid rgba(255, 255, 255, .6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); white-space: nowrap; }
.portrait__tag .status__dot { width: 7px; height: 7px; }

html.dark .portrait { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 70px -30px rgba(255, 122, 82, .35), 0 0 0 8px var(--card); }
html.dark .portrait__img { filter: contrast(1.1) saturate(1.05) brightness(.92); }
html.dark .portrait::before { background: radial-gradient(120% 70% at 85% 0%, rgba(255, 122, 82, .22), transparent 60%), linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .55)); }
html.dark .portrait__tag { color: #fafafa; background: rgba(23, 23, 23, .62); border-color: rgba(255, 255, 255, .12); }

/* hero: photo first, then the intro text takes its place */
.hero__right { position: relative; }
.hero__intro { display: grid; gap: 14px; }
.hero__right > .portrait--hero, .hero__right > .hero__intro { grid-area: 1 / 1; }
.hero__right { --swap: cubic-bezier(.65, 0, .35, 1); }
/* the entrance runs on the inner layers, so the frame's fade-out transition is never blocked by an animation */
.portrait--hero > .portrait__pic, .portrait--hero > .portrait__tag { animation: portraitIn 1s var(--ease) backwards; }
.portrait--hero > .portrait__tag { animation-delay: .35s; }
.portrait--hero { min-height: 340px; z-index: 2; will-change: opacity, transform, filter; transition: opacity 1.1s var(--swap), transform 1.2s var(--swap), filter 1.1s var(--swap), visibility 0s linear 1.2s; }
.portrait--hero::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 6px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .85); transform: scaleX(0); transform-origin: left; transition: opacity .3s; }
.is-timing .portrait--hero::after { animation: portraitTimer 3s linear forwards; }
.is-done .portrait--hero { opacity: 0; transform: scale(.96); filter: blur(10px) saturate(.6); visibility: hidden; pointer-events: none; }
.is-done .portrait--hero::after { opacity: 0; }
/* text lines rise in one after another, overlapping the photo's fade */
.js .hero__intro > * { opacity: 0; transform: translateY(14px); filter: blur(6px); transition: opacity .9s var(--swap), transform 1s var(--swap), filter .9s var(--swap); transition-delay: calc(.35s + var(--n, 0) * 110ms); }
.hero__intro > :nth-child(2) { --n: 1; } .hero__intro > :nth-child(3) { --n: 2; } .hero__intro > :nth-child(4) { --n: 3; } .hero__intro > :nth-child(5) { --n: 4; }
.js .is-done .hero__intro > * { opacity: 1; transform: none; filter: none; }
html:not(.js) .portrait--hero { display: none; }
@keyframes portraitIn { from { opacity: 0; transform: scale(1.04); filter: blur(10px); } }
@keyframes portraitTimer { to { transform: scaleX(1); } }

/* About: story with the portrait beside it */
.about--story { max-width: none; display: grid; grid-template-columns: minmax(260px, 400px) minmax(0, 1fr); gap: clamp(36px, 6vw, 80px); align-items: center; }
.portrait--story { aspect-ratio: 4 / 5; box-shadow: 0 0 0 1px var(--border), 0 40px 70px -34px rgba(17, 17, 17, .5); }
html.dark .portrait--story { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 80px -30px rgba(255, 122, 82, .3); }
.portrait--story::after { content: ""; position: absolute; inset: 0; z-index: -2; border-radius: inherit; border: 1.5px dashed var(--border-strong); background: var(--accent-soft); transform: translate(18px, 18px) rotate(3deg); transition: transform .8s var(--ease); }
.portrait--story:hover .portrait__img { transform: scale(1.04); }
.portrait--story:hover::after { transform: translate(24px, 22px) rotate(5deg); }
.note--portrait { right: -18px; top: -26px; transform: rotate(7deg); color: var(--fg); }
/* the dashed back card sits outside the clipped picture */
.portrait--story .portrait__pic { z-index: 0; }
.portrait--story::before { z-index: 1; }
.portrait--story .portrait__tag { z-index: 2; }

@media (max-width: 860px) {
	.portrait--hero { max-width: 420px; justify-self: start; width: 100%; }
	.about--story { grid-template-columns: 1fr; }
	.portrait--story { max-width: 360px; width: calc(100% - 24px); }
}

/* =========================================================
   Reveal
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity .8s var(--ease), transform .9s var(--ease), filter .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; filter: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
	.brand__name { display: none; }
	.rail { display: none; }
}

@media (max-width: 1020px) {
	.hero__grid { grid-template-columns: 1fr 1fr; }
	.hero__art { grid-column: 2; grid-row: 1 / span 2; }
	.hero__right { grid-column: 1; justify-self: start; }
	.tests { grid-template-columns: 1fr 1fr; }
	.test--wide { grid-column: 1 / -1; }
	.case__features { grid-template-columns: 1fr 1fr; }
	.faq { grid-template-columns: 1fr; }
	.faq .section-head { position: static; }
	.card-grid { grid-template-columns: 1fr 1fr; }
	.value-grid, .industries { grid-template-columns: 1fr 1fr; }
	.contact { grid-template-columns: 1fr; }
	.contact__side { position: static; }
	.legal { grid-template-columns: 1fr; }
	.toc { position: static; }
}

@media (max-width: 860px) {
	/* nav docks to the bottom on phones */
	.site-header { top: calc(14px + var(--admin)); padding: 0 14px; }
	.nav-wrap { position: fixed; left: 50%; top: auto; bottom: 14px; transform: translateX(-50%); }
	.pill-nav__list a { padding: 0 11px; height: 42px; }
	.pill-nav__label, .is-scrolled .pill-nav__label { max-width: 0 !important; opacity: 0 !important; margin: 0 !important; }
	.cta-pill { padding: 0 6px; height: 52px; }
	.cta-pill__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.to-top { bottom: 84px; right: 14px; width: 44px; height: 44px; }

	.hero { padding-top: 100px; min-height: auto; }
	.hero__grid { grid-template-columns: 1fr; gap: 28px; }
	.hero__art { grid-column: auto; grid-row: auto; max-width: 300px; order: -1; }
	.hero__right { grid-column: auto; max-width: none; }
	.note--grid { left: 50%; bottom: -7%; transform: translateX(-50%) rotate(-3deg); font-size: 24px; }
	.note--dot { right: 0; }

	.clients__row { justify-content: center; }
	.case__body { grid-template-columns: 1fr; }
	.case__visual { min-height: 300px; }
	.cases.is-grid { grid-template-columns: 1fr; }
	.steps__row { grid-template-columns: 1fr; gap: 6px; padding: 18px 4px; }
	.steps__row--head { display: none; }
	.steps__when { text-align: left; }
	.steps__get::before { content: "→ "; color: var(--muted-fg); }
	.facts { grid-template-columns: 1fr; }
	.fact { min-height: 150px; }
	.kit__row { grid-template-columns: 1fr; gap: 4px; padding: 14px 4px; }
	.site-footer__top { flex-direction: column; }
	.site-footer { padding-bottom: 80px; }
	.page-hero { padding-top: calc(100px + var(--admin)); }
	.page-hero__grid { grid-template-columns: 1fr; gap: 28px; }
	.page-hero__art { max-width: 220px; order: -1; justify-self: start; }
	.page-hero__note { display: none; }
	.services { grid-template-columns: 1fr; }
	.value-grid--3 { grid-template-columns: 1fr; }
	.form__row, .form__row--3 { grid-template-columns: 1fr; }
	.card--featured { grid-template-columns: 1fr; }
	.card--featured .card__img, .card--featured .card__placeholder, .card--featured .card__img img { min-height: 220px; }
	.cta-block__note { position: static; }
}

@media (max-width: 560px) {
	body { font-size: 15px; }
	.frame--lined { border-left: 0; border-right: 0; }
	.band > .frame--lined::before, .band > .frame--lined::after { display: none; }
	.tests { grid-template-columns: 1fr; }
	.case__features { grid-template-columns: 1fr; }
	.feature__title { margin-top: 24px; }
	.pill-nav__list a { padding: 0 9px; }
	.pill-nav__list li:nth-child(n+6) { display: none; }
	.scale { gap: 14px; }
	.scale__item:first-child svg { width: 72px; height: 72px; }
	.faq__item p { padding-right: 4px; }
	.card-grid { grid-template-columns: 1fr; }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.site-footer__cols { gap: 30px; }
	.value-grid, .industries { grid-template-columns: 1fr; }
	.page-hero__art { max-width: 160px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.js .w, .js .reveal { opacity: 1; filter: none; transform: none; }
	.portrait--hero > * { animation: none; }
	.construct__guides > *, .construct__stroke { stroke-dashoffset: 0; }
	.construct__dot { transform: none; }
}
