/* ============================================================
   genikai2026 design system (2026-09-23, direction v2).
   Bold minimalist type on solid paper and solid ink. Hierarchy comes from
   size, weight and space: no eyebrow labels, no dots, no pills, no boxed
   cards, no icon rows. One faint gradient wash on the hero, nothing else.
   Navigation is a fixed left rail; "Menu" opens a full-height ink panel and
   the page folds sideways to make room. No em-dashes anywhere in copy.
   ============================================================ */

:root {
	--paper: #f7f7f4;
	--ink: #0b0b0c;
	--ink-2: #45454b;
	--muted: #8a8a92;
	--muted-dark: #6f6f77;
	--blue: #267bd9;
	--font-display: "Inter Tight", "Inter", system-ui, sans-serif;
	--font-body: "Inter", system-ui, sans-serif;
	--rail: 84px;
	--panel: 440px;
	--gutter: clamp(24px, 5vw, 96px);
	--max: 1360px;
	--ease: cubic-bezier(0.7, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-anchor: none; }
body {
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.55;
	color: var(--ink);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.035em; line-height: 0.96; }
h1 { font-size: clamp(3rem, 8.4vw, 8rem); }
h2 { font-size: clamp(2.2rem, 5.2vw, 4.6rem); }
h3 { font-size: clamp(1.5rem, 2.6vw, 2.4rem); letter-spacing: -0.025em; line-height: 1.02; }

.wrap { max-width: var(--max); padding: 0 var(--gutter); }

/* ---------- Page frame: fixed left rail + folding page ---------- */
.frame { padding-left: var(--rail); }
.page {
	transition: transform 0.7s var(--ease), opacity 0.7s var(--ease);
	transform-origin: left center;
}
body.menu-open .page { transform: translateX(calc(var(--panel) - var(--rail))); opacity: 0.35; pointer-events: none; }

.rail {
	position: fixed;
	inset: 0 auto 0 0;
	width: var(--rail);
	z-index: 120;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	padding: 28px 0;
	background: var(--paper);
	color: var(--ink);
	transition: background 0.5s var(--ease), color 0.5s var(--ease);
}
body.menu-open .rail, body.rail-dark .rail { background: var(--ink); color: var(--paper); }
.rail-mark { display: block; width: 22px; height: 22px; }
.rail-mark svg { display: block; width: 100%; height: 100%; }
.rail-mark path { fill: var(--blue); }
.rail-word {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	color: inherit;
	transition: opacity 0.4s var(--ease);
}
.rail-section {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--muted);
	min-height: 1em;
	transition: opacity 0.4s var(--ease);
}
.rail-section:empty { opacity: 0; }
.menu-btn {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-weight: 500;
	font-size: 0.95rem;
	letter-spacing: 0.01em;
	padding: 8px 4px;
	color: inherit;
}
.menu-btn .close { display: none; }
body.menu-open .menu-btn .open { display: none; }
body.menu-open .menu-btn .close { display: inline; }

/* The menu panel: ink, full height, oversized links */
.panel {
	position: fixed;
	inset: 0 auto 0 var(--rail);
	width: calc(var(--panel) - var(--rail));
	z-index: 110;
	background: var(--ink);
	color: var(--paper);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 40px 40px 36px;
	transform: translateX(-100%);
	visibility: hidden;
	transition: transform 0.7s var(--ease), visibility 0s linear 0.7s;
}
body.menu-open .panel { transform: none; visibility: visible; transition-delay: 0s; }
.panel-logo { width: 168px; height: auto; }
.panel-links { list-style: none; display: grid; gap: 6px; margin-top: 56px; }
.panel-links a {
	display: block;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(2.4rem, 3.6vw, 3.4rem);
	letter-spacing: -0.035em;
	line-height: 1.05;
	color: var(--paper);
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.25s var(--ease);
}
body.menu-open .panel-links a { opacity: 1; transform: none; }
.panel-links li:nth-child(1) a { transition-delay: 0.25s; }
.panel-links li:nth-child(2) a { transition-delay: 0.31s; }
.panel-links li:nth-child(3) a { transition-delay: 0.37s; }
.panel-links li:nth-child(4) a { transition-delay: 0.43s; }
.panel-links a:hover { color: var(--blue); }
.panel-foot { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.panel-foot a { color: var(--paper); }
.panel-foot a:hover { color: var(--blue); }
.panel-scrim { position: fixed; inset: 0; z-index: 105; display: none; }
body.menu-open .panel-scrim { display: block; }

/* The triangle mask: difference blend inverts everything under it.
   Drawn as an inline SVG polygon rather than a clip-path on a filled box:
   blend modes only act on painted pixels, so the unpainted corners of the
   square do not join the backdrop readback (which left a hairline box and a
   tint shift over the hero gradient in Chrome). */
.tri-mask {
	position: fixed;
	left: 0;
	top: 0;
	z-index: 90;
	width: min(46vw, 640px);
	height: min(46vw, 640px);
	pointer-events: none;
	background: transparent;
	mix-blend-mode: difference;
	will-change: transform;
	transform: translate3d(55vw, 12vh, 0);
	transition: opacity 0.4s var(--ease);
}

/* The paper fold (see genikai_tri_svg). The scene is a 3D context inside
   the blended layer; every piece is a full-size layer stacked in it, packets
   as divs and leaves as SVGs. A flap rotates about its shared edge with the
   middle piece, from folded flat (--a0) to open. A leaf's fill starts
   near-black, which the difference blend turns into a faintly shaded paper
   tone (the underside of the sheet), and flips to white (which the blend
   turns black) as it passes edge-on: at 50% of a symmetric ease. */
.tri-scene {
	position: absolute;
	inset: 0;
	perspective: 1400px;
	transform-style: preserve-3d;
}
.tri-node {
	position: absolute;
	inset: 0;
	transform-style: preserve-3d;
}
svg.tri-node {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
	fill: #fff;
	stroke: #fff; /* fill-coloured stroke: hides antialiasing seams between pieces */
	stroke-width: 0.3;
	stroke-linejoin: round;
}
.tri-unfold .tri-backer { animation: tri-backer 0.25s linear 2.7s both; }
.tri-flap { transform-origin: var(--ox) var(--oy); }
.tri-unfold .tri-flap {
	animation: tri-fold var(--dur) cubic-bezier(0.7, 0, 0.3, 1) var(--d) both;
}
.tri-unfold .tri-face {
	animation: tri-face var(--fdur) linear var(--fd) both;
}
.tri-unfold .tri-flap.tri-face {
	animation:
		tri-fold var(--dur) cubic-bezier(0.7, 0, 0.3, 1) var(--d) both,
		tri-face var(--fdur) linear var(--fd) both;
}
@keyframes tri-fold {
	from { transform: translateZ(var(--z)) rotate3d(var(--ux), var(--uy), 0, var(--a0)); }
	to   { transform: translateZ(var(--z)) rotate3d(var(--ux), var(--uy), 0, 0deg); }
}
@keyframes tri-backer {
	from { fill: #000; stroke: #000; }
	to   { fill: #fff; stroke: #fff; }
}
@keyframes tri-face {
	0%, 50%     { fill: #161616; stroke: #161616; }
	50.01%, 100% { fill: #fff; stroke: #fff; }
}

/* Top bar (mobile only) */
.topbar { display: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(96px, 13vw, 200px) 0; }
.dark { background: var(--ink); color: var(--paper); }
.dark .muted, .dark .lede { color: #b9b9b4; }
.lede { font-size: clamp(1.15rem, 1.55vw, 1.4rem); line-height: 1.45; color: var(--ink-2); max-width: 44ch; }
.muted { color: var(--muted-dark); }
.statement {
	font-family: var(--font-display);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.02;
	font-size: clamp(1.9rem, 4.2vw, 3.8rem);
	max-width: 20ch;
}
.statement .fade { color: var(--muted); }
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.7em;
	font-weight: 500;
	font-size: 1rem;
	padding: 1em 1.6em;
	border-radius: 999px;
	background: var(--ink);
	color: var(--paper);
	transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { background: var(--blue); transform: translateY(-1px); }
.dark .btn { background: var(--paper); color: var(--ink); }
.dark .btn:hover { background: var(--blue); color: #fff; }
.tlink { font-weight: 500; transition: color 0.2s var(--ease); }
.tlink:hover { color: var(--blue); }
.tlink .arr { display: inline-block; margin-left: 0.4em; transition: transform 0.3s var(--ease); }
.tlink:hover .arr { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 120px 0 clamp(40px, 6vw, 80px);
	position: relative;
	/* The one gradient on the site: a faint wash, top right. */
	background:
		radial-gradient(60% 55% at 85% 18%, rgba(38, 123, 217, 0.10), transparent 70%),
		radial-gradient(40% 40% at 20% 100%, rgba(38, 123, 217, 0.05), transparent 70%),
		var(--paper);
}
.hero-title { max-width: 11.5ch; }
.hero-row {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 48px;
	align-items: end;
	margin-top: clamp(40px, 5vw, 72px);
}
.hero-row .lede { max-width: 40ch; }
.hero-line {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(1.1rem, 1.5vw, 1.35rem);
	letter-spacing: -0.02em;
	line-height: 1.3;
	color: var(--ink);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; margin-top: 32px; }

/* ---------- Manifesto band ---------- */
.manifesto { padding: clamp(96px, 13vw, 200px) 0; }
.manifesto p {
	font-family: var(--font-display);
	font-weight: 600;
	letter-spacing: -0.035em;
	line-height: 0.98;
	font-size: clamp(2.4rem, 7vw, 6.6rem);
	color: var(--muted-dark);
}
.manifesto p.now { color: var(--paper); }
.manifesto p.manifesto-note {
	font-family: var(--font-body);
	font-weight: 400;
	letter-spacing: 0;
	font-size: clamp(1.05rem, 1.4vw, 1.25rem);
	line-height: 1.5;
	color: #b9b9b4;
	margin-top: 56px;
	max-width: 44ch;
}

/* ---------- Systems: numbered list, hover fades the others ---------- */
.sys-list { margin-top: clamp(56px, 7vw, 110px); }
.sys-row { padding: clamp(22px, 3vw, 40px) 0; transition: opacity 0.35s var(--ease); }
.sys-list:hover .sys-row:not(.active) { opacity: 0.35; }
.sys-head {
	display: grid;
	grid-template-columns: clamp(64px, 8vw, 120px) 1fr;
	align-items: baseline;
	gap: 24px;
	width: 100%;
	text-align: left;
}
.sys-num {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(1.1rem, 1.6vw, 1.4rem);
	letter-spacing: -0.02em;
	color: var(--muted);
	transition: color 0.3s var(--ease);
}
.sys-row.active .sys-num { color: var(--blue); }
.sys-title {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(2rem, 5.2vw, 4.8rem);
	letter-spacing: -0.035em;
	line-height: 0.98;
}
.sys-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.55s var(--ease); }
.sys-body > div { overflow: hidden; }
.sys-row.active .sys-body { grid-template-rows: 1fr; }
.sys-inner {
	display: grid;
	grid-template-columns: clamp(64px, 8vw, 120px) minmax(0, 1.3fr) minmax(0, 1fr);
	gap: 24px 48px;
	padding-top: 28px;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.4s var(--ease) 0.15s, transform 0.4s var(--ease) 0.15s;
}
.sys-row.active .sys-inner { opacity: 1; transform: none; }
.sys-desc { font-size: clamp(1.05rem, 1.35vw, 1.25rem); line-height: 1.45; color: var(--ink-2); max-width: 46ch; }
.sys-includes { font-size: 1rem; line-height: 1.6; color: var(--muted-dark); }
.sys-includes strong { display: block; color: var(--ink); font-weight: 500; }
.sys-includes p + p { margin-top: 14px; }

/* ---------- Approach ---------- */
.approach-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 64px; align-items: start; }
.approach-sticky { position: sticky; top: 96px; }
.approach-sticky .lede { margin-top: 32px; }
.principle {
	display: grid;
	grid-template-columns: clamp(56px, 6vw, 90px) 1fr;
	gap: 20px;
	padding: 0 0 clamp(40px, 5vw, 72px);
}
.principle:last-child { padding-bottom: 0; }
.principle .sys-num { padding-top: 0.35em; }
.principle p { margin-top: 18px; color: var(--ink-2); max-width: 48ch; font-size: 1.05rem; }

/* ---------- Closing band ---------- */
.closing { padding: clamp(96px, 13vw, 200px) 0; }
.closing h2 { max-width: 15ch; }
.closing-row {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 48px;
	align-items: end;
	margin-top: clamp(40px, 5vw, 72px);
}
.closing-actions { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; margin-top: 32px; }

/* ---------- Footer ---------- */
.site-footer { padding: clamp(72px, 9vw, 140px) 0 40px; }
.footer-mail {
	display: inline-block;
	font-family: var(--font-display);
	font-weight: 600;
	letter-spacing: -0.035em;
	line-height: 1;
	font-size: clamp(2rem, 6vw, 5.6rem);
	transition: color 0.25s var(--ease);
}
.footer-mail:hover { color: var(--blue); }
.footer-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 16px 40px;
	margin-top: clamp(48px, 6vw, 96px);
	font-size: 0.95rem;
	color: var(--muted-dark);
}
.footer-row nav { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.footer-row a { color: var(--ink); font-weight: 500; }
.footer-row a:hover { color: var(--blue); }

/* ---------- Inner pages ---------- */
.page-hero { padding: clamp(120px, 16vw, 200px) 0 clamp(48px, 6vw, 88px); }
.page-hero h1 { max-width: 12ch; }
.page-hero .lede { margin-top: 40px; }

.prose { max-width: 62ch; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 2.4em 0 0.6em; }
.prose h3 { font-size: 1.2rem; margin: 1.8em 0 0.5em; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.1em; color: var(--ink-2); }
.prose li { margin: 0.35em 0 0.35em 1.2em; }
.prose a { color: var(--ink); font-weight: 500; }
.prose a:hover { color: var(--blue); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose .legal-meta { color: var(--muted); font-size: 0.9rem; }

/* Company page */
.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 48px; }
.story + .story { margin-top: clamp(64px, 8vw, 120px); }
.story h3 { max-width: 12ch; }
.story .prose p:first-child { font-size: clamp(1.15rem, 1.5vw, 1.35rem); line-height: 1.45; color: var(--ink); }
.big-list { list-style: none; margin-top: clamp(56px, 7vw, 110px); }
.big-list li {
	font-family: var(--font-display);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.02;
	font-size: clamp(1.7rem, 3.4vw, 3.2rem);
	color: var(--muted);
	padding: 0.18em 0;
}
.big-list li strong { color: var(--ink); font-weight: 600; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 64px; align-items: start; }
.contact-side .footer-mail { font-size: clamp(1.6rem, 2.8vw, 2.6rem); margin-bottom: 28px; }
.contact-side p { color: var(--ink-2); max-width: 38ch; }
.contact-side p + p { margin-top: 1em; }

/* Contact Form 7: the one place with hairlines, because fields need edges. */
.wpcf7 .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.wpcf7 p { margin: 0; }
.wpcf7 label { display: block; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 textarea, .wpcf7 select {
	width: 100%;
	font: inherit;
	font-size: 1.05rem;
	padding: 18px 0;
	margin-bottom: 6px;
	border: 0;
	border-bottom: 1px solid rgba(11, 11, 12, 0.22);
	border-radius: 0;
	background: transparent;
	color: var(--ink);
	transition: border-color 0.2s var(--ease);
	-webkit-appearance: none;
	appearance: none;
}
.wpcf7 select { cursor: pointer; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230b0b0c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right center; }
.wpcf7 textarea { min-height: 160px; resize: vertical; }
.wpcf7 input:focus, .wpcf7 textarea:focus, .wpcf7 select:focus { outline: none; border-bottom-color: var(--ink); }
.wpcf7 ::placeholder { color: var(--muted); }
.wpcf7 input[type="submit"] {
	margin-top: 32px;
	cursor: pointer;
	font: inherit;
	font-size: 1rem;
	font-weight: 500;
	padding: 1em 1.7em;
	border: 0;
	border-radius: 999px;
	background: var(--ink);
	color: var(--paper);
	transition: background 0.25s var(--ease);
}
.wpcf7 input[type="submit"]:hover { background: var(--blue); }
.wpcf7-spinner { display: none; }
.wpcf7 form .wpcf7-response-output { margin: 24px 0 0; padding: 0; border: 0; font-size: 1rem; color: var(--ink); }
.wpcf7-not-valid-tip { font-size: 0.85rem; color: #b42318; margin-top: 4px; }

/* Posts (unused for now, kept functional) */
.post-list article { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 28px 0; }
.post-list h3 a:hover { color: var(--blue); }
.post-list p { color: var(--ink-2); margin-top: 8px; }
.pagination { margin-top: 32px; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
body.qa .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
	.js .reveal { opacity: 1; transform: none; transition: none; }
	.tri-unfold .tri-flap, .tri-unfold .tri-face, .tri-unfold .tri-backer { animation: none; }
	.page, .panel, .panel-links a, .sys-body, .sys-inner, .sys-row { transition: none !important; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
	.approach-grid, .story, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
	.approach-sticky { position: static; }
	.sys-inner { grid-template-columns: clamp(64px, 8vw, 120px) 1fr; }
	.sys-includes { grid-column: 2; }
	.hero-row, .closing-row { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Mobile: rail becomes a top bar, panel is full-screen ---------- */
@media (max-width: 720px) {
	:root { --rail: 0px; --gutter: 20px; }
	.frame { padding-left: 0; }
	.rail { display: none; }
	.topbar {
		position: fixed;
		inset: 0 0 auto 0;
		z-index: 120;
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 64px;
		padding: 0 var(--gutter);
		background: var(--paper);
		color: var(--ink);
		transition: background 0.5s var(--ease), color 0.5s var(--ease);
	}
	body.menu-open .topbar { background: var(--ink); color: var(--paper); }
	.topbar-logo { display: block; height: 20px; width: auto; }
		.topbar-logo.on-ink { display: none; }
	body.menu-open .topbar-logo.on-paper { display: none; }
	body.menu-open .topbar-logo.on-ink { display: block; }
	.topbar .menu-btn { writing-mode: horizontal-tb; transform: none; font-size: 1rem; padding: 10px 0; }
	.panel { inset: 64px 0 0 0; width: auto; padding: 32px var(--gutter) 28px; transform: translateY(-100%); }
	body.menu-open .page { transform: none; opacity: 1; }
	.panel-links a { font-size: 2.6rem; }
	.panel-logo { display: none; }
	.tri-mask { width: 72vw; height: 72vw; }
	.hero { min-height: 0; padding-top: 120px; }
	.sys-head { grid-template-columns: 44px 1fr; gap: 14px; }
	.sys-inner { grid-template-columns: 1fr; padding-left: 58px; }
	.sys-includes { grid-column: auto; }
	.sys-list:hover .sys-row:not(.active) { opacity: 1; }
	.principle { grid-template-columns: 44px 1fr; gap: 14px; }
	.wpcf7 .form-row { grid-template-columns: 1fr; }
	.footer-row { flex-direction: column; }
}
