/* kontrollable.com
   The standard studio page, kept minimal: one ink ground, one grotesk,
   Kontrol Yellow only where it does a job (the main action, the history
   rail), hairlines instead of boxes. The grid sits behind the opening only. */

@font-face {
	font-family: 'Schibsted Grotesk';
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url('../fonts/schibsted-grotesk-normal-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Schibsted Grotesk';
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url('../fonts/schibsted-grotesk-normal-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4;
}
@font-face {
	font-family: 'Schibsted Grotesk';
	font-style: italic;
	font-weight: 400 800;
	font-display: swap;
	src: url('../fonts/schibsted-grotesk-italic-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Schibsted Grotesk';
	font-style: italic;
	font-weight: 400 800;
	font-display: swap;
	src: url('../fonts/schibsted-grotesk-italic-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4;
}

:root {
	--ink: #0F0E13;
	--paper: #F4F1EA;
	--paper-2: rgba(244, 241, 234, 0.74);
	--paper-3: rgba(244, 241, 234, 0.6);
	--line: rgba(244, 241, 234, 0.13);
	--line-strong: rgba(244, 241, 234, 0.28);
	--yellow: #FFE16B;
	--yellow-press: #F2CD3F;
	--font: 'Schibsted Grotesk', 'Segoe UI', system-ui, sans-serif;
	--ease: cubic-bezier(0.16, 1, 0.3, 1);
	--gutter: clamp(1.25rem, 4vw, 3rem);
	--section: clamp(4.5rem, 7.5vw, 6.75rem);
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #3A3843 var(--ink); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
	margin: 0;
	background: var(--ink);
	color: var(--paper);
	font: 400 1.0625rem/1.6 var(--font);
	/* no tabular-nums here: in this face it also widens . , and :, which spaces out every sentence */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	caret-color: var(--yellow);
}
::selection { background: var(--yellow); color: var(--ink); }
img, video, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 2px; }
section[id] { scroll-margin-top: 4.5rem; }

.wrap { width: 100%; max-width: 74rem; margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 20; background: var(--yellow); color: var(--ink); padding: 0.6rem 1rem; font-weight: 600; }
.skip:focus { top: 1rem; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 3.25rem; padding: 0.85rem 1.6rem;
	background: var(--yellow); color: var(--ink);
	font: 600 1.0625rem/1.2 var(--font); text-decoration: none;
	border: 1px solid var(--yellow); border-radius: 999px;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--yellow-press); border-color: var(--yellow-press); }
.btn-ghost { background: transparent; color: var(--paper); border-color: var(--line-strong); }
.btn-ghost:hover { background: transparent; border-color: var(--paper); }
.btn-small { min-height: 2.5rem; padding: 0.5rem 1.1rem; font-size: 0.9375rem; }
.btn-large { min-height: 3.75rem; padding: 1rem 2rem; font-size: clamp(1rem, 0.85rem + 0.6vw, 1.25rem); overflow-wrap: anywhere; }

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.bar { position: sticky; top: 0; z-index: 10; background: var(--ink); border-bottom: 1px solid transparent; transition: border-color 0.3s ease; }
.bar.is-stuck { border-bottom-color: var(--line); }
.bar-inner { display: flex; align-items: center; gap: 2rem; height: 4.25rem; }
.bar-home { display: block; padding: 0.4rem 0; }
.bar-home img { width: 2.75rem; height: auto; }
.bar-nav { display: flex; gap: 1.75rem; margin-left: auto; font-size: 0.9375rem; }
.bar-nav a { color: var(--paper-2); text-decoration: none; padding: 0.5rem 0; transition: color 0.2s ease; }
.bar-nav a:hover { color: var(--paper); }
@media (max-width: 640px) {
	.bar-nav { display: none; }
	.bar .btn-small { margin-left: auto; }
}

/* ── Opening: the grid, the wordmark, the definition ─────────────────────── */
.hero {
	position: relative;
	min-height: min(62svh, 38rem);
	display: flex; align-items: center;
	padding-block: clamp(2rem, 4vw, 3rem);
	isolation: isolate;
}
/* the original site's perspective grid, faded out at the bottom so the next section starts clean */
.hero::before {
	content: ''; position: absolute; inset: 0; z-index: -1;
	background: url('../images/grid.png') center / 100% 100% no-repeat;
	-webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent);
	mask-image: linear-gradient(to bottom, #000 62%, transparent);
}
.wordmark { margin: 0 0 1.25rem; line-height: 0; }
.wordmark img { width: clamp(15rem, 12rem + 14vw, 25rem); height: auto; }
.pron { color: var(--paper-2); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); margin-bottom: 0.35rem; }
.pron i { color: var(--paper-3); margin-left: 0.5rem; }
.definition { font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem); line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; max-width: 30ch; text-wrap: balance; margin-bottom: 1rem; }
.makers { color: var(--paper-2); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); max-width: 72ch; margin-bottom: 2rem; }
.makers a { color: var(--paper); }
.actions { display: flex; flex-wrap: wrap; gap: 0.875rem; }

/* ── Impact Point ────────────────────────────────────────────────────────── */
.game { padding-block: 2.5rem var(--section); border-top: 1px solid var(--line); }
.game-inner {
	display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: auto 1fr;
	grid-template-areas: 'media text' 'links text'; gap: 1.75rem clamp(2rem, 5vw, 4.5rem); align-items: start;
}
.game-media { grid-area: media; }
.game-text { grid-area: text; }
/* where to get it sits under the clip, so the two columns end together */
.game-links { grid-area: links; align-self: end; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.game-media { position: relative; border: 1px solid var(--line-strong); background: #000; aspect-ratio: 1200 / 674; overflow: hidden; }
.game-media video { width: 100%; height: 100%; object-fit: cover; }
.clip-toggle {
	position: absolute; right: 0.75rem; bottom: 0.75rem;
	display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0;
	background: rgba(15, 14, 19, 0.82); color: var(--paper);
	border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}
.clip-toggle[hidden] { display: none; }
.clip-toggle:hover { border-color: var(--yellow); color: var(--yellow); }
.clip-toggle svg { width: 1rem; height: 1rem; fill: currentColor; }
.clip-toggle .i-pause, .is-playing .clip-toggle .i-play { display: none; }
.is-playing .clip-toggle .i-pause { display: inline; }
/* while the clip is stopped, play sits big in the middle of the poster; once it plays, pause tucks into the corner */
.game-media:not(.is-playing) .clip-toggle { right: 50%; bottom: 50%; transform: translate(50%, 50%); width: 4rem; height: 4rem; }
.game-media:not(.is-playing) .clip-toggle svg { width: 1.375rem; height: 1.375rem; }
.game h2 { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; margin-bottom: 0.6rem; }
.meta { color: var(--paper-3); font-size: 0.9375rem; margin-bottom: 1.5rem; }
.lede { color: var(--paper-2); font-size: 1.125rem; max-width: 44ch; margin-bottom: 1.5rem; }
.facts { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.facts li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); color: var(--paper-2); }
.facts strong { color: var(--paper); font-weight: 600; }

/* Steam pill (simple-icons mark, CC0) */
.steam {
	--si: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M11.979 0C5.678 0 .511 4.86.022 11.037l6.432 2.658c.545-.371 1.203-.59 1.912-.59.063 0 .125.004.188.006l2.861-4.142V8.91c0-2.495 2.028-4.524 4.524-4.524 2.494 0 4.524 2.031 4.524 4.527s-2.03 4.525-4.524 4.525h-.105l-4.076 2.911c0 .052.004.105.004.159 0 1.875-1.515 3.396-3.39 3.396-1.635 0-3.016-1.173-3.331-2.727L.436 15.27C1.862 20.307 6.486 24 11.979 24c6.627 0 11.999-5.373 11.999-12S18.605 0 11.979 0zM7.54 18.21l-1.473-.61c.262.543.714.999 1.314 1.25 1.297.539 2.793-.076 3.332-1.375.263-.63.264-1.319.005-1.949s-.75-1.121-1.377-1.383c-.624-.26-1.29-.249-1.878-.03l1.523.63c.956.4 1.409 1.5 1.009 2.455-.397.957-1.497 1.41-2.454 1.012H7.54zm11.415-9.303c0-1.662-1.353-3.015-3.015-3.015-1.665 0-3.015 1.353-3.015 3.015 0 1.665 1.35 3.015 3.015 3.015 1.663 0 3.015-1.35 3.015-3.015zm-5.273-.005c0-1.252 1.013-2.266 2.265-2.266 1.249 0 2.266 1.014 2.266 2.266 0 1.251-1.017 2.265-2.266 2.265-1.253 0-2.265-1.014-2.265-2.265z'/></svg>");
	display: inline-flex; align-items: center; gap: 0.6rem;
	padding: 0.7rem 1.2rem; border: 1px solid var(--line-strong); border-radius: 999px;
	font-weight: 600; text-decoration: none; color: var(--paper);
	transition: border-color 0.2s ease, color 0.2s ease;
}
.steam::before { content: ''; width: 1.2rem; height: 1.2rem; background: currentColor; -webkit-mask: var(--si) center / contain no-repeat; mask: var(--si) center / contain no-repeat; }
.steam:hover { border-color: var(--yellow); color: var(--yellow); }

/* ── History: the one signature ──────────────────────────────────────────── */
.history { padding-block: var(--section); border-top: 1px solid var(--line); }
.history h2, .founder h2, .contact h2 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3.1rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; }
.section-lede { color: var(--paper-2); font-size: 1.125rem; margin-top: 0.85rem; max-width: 52ch; }

.timeline { --node: 0.875rem; --gap: 2.25rem; position: relative; list-style: none; padding: 0; margin-top: clamp(2.75rem, 5vw, 4rem); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.timeline li { position: relative; padding: calc(var(--node) + 1.5rem) 1.75rem 0 0; }
/* the node: solid for what shipped, hollow for what's next */
.timeline li::before { content: ''; position: absolute; z-index: 2; left: 0; top: 0; width: var(--node); height: var(--node); background: var(--yellow); border-radius: 2px; }
.timeline li.next::before { background: var(--ink); box-shadow: inset 0 0 0 2px var(--yellow); }
/* the rail, one segment per step so it is anchored to the nodes: solid from 2017 into the
   "now" stretch, then dashed into the hollow Mobile node, and nothing past it */
.timeline li::after { content: ''; position: absolute; top: calc(var(--node) / 2 - 1px); left: var(--node); right: 0; height: 2px; background: var(--yellow); transform-origin: left center; }
.timeline li.now::after { right: 50%; }
.timeline li.next::after { left: auto; right: 100%; width: 50%; height: 0; background: none; border-top: 2px dashed var(--yellow); }
.when { display: block; color: var(--yellow); font-weight: 700; font-size: clamp(1.875rem, 1rem + 1.9vw, 2.875rem); line-height: 1; letter-spacing: -0.03em; margin-bottom: 0.9rem; white-space: nowrap; }
.timeline h3 { font-size: 1.1875rem; font-weight: 600; margin-bottom: 0.4rem; }
.timeline p { color: var(--paper-2); max-width: 30ch; }
.timeline li.next p { color: var(--paper); }
/* the draw: an ink cover over the rail (under the nodes) slides off in one eased stroke, so the
   line reads as drawn from 2017 to Mobile without the line or its dashes ever being stretched.
   site.js arms it only when motion is welcome; without that the cover is never there. */
.timeline::before { content: ''; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: var(--node); background: var(--ink); transform: scaleX(0); transform-origin: right center; pointer-events: none; }
.timeline.is-armed:not(.is-drawn)::before { transform: scaleX(1); }
.timeline.is-drawn::before { transition: transform 1.4s var(--ease); }

@media (max-width: 860px) {
	.timeline { grid-template-columns: 1fr; row-gap: var(--gap); padding-left: 2rem; }
	.timeline li { padding: 0; }
	.timeline li::before { left: -2rem; top: 0.55rem; }
	.timeline li::after { top: calc(0.55rem + var(--node)); bottom: calc(-1 * var(--gap) - 0.55rem); left: calc(-2rem + var(--node) / 2 - 1px); right: auto; width: 2px; height: auto; transform-origin: center top; }
	.timeline li.now::after { bottom: 0; right: auto; }
	.timeline li.next::after { top: calc(-1 * var(--gap)); bottom: auto; left: calc(-2rem + var(--node) / 2 - 1px); right: auto; width: 0; height: calc(var(--gap) + 0.55rem); border-top: 0; border-left: 2px dashed var(--yellow); }
	.timeline::before { right: auto; bottom: 0; width: 2rem; height: auto; transform: scaleY(0); transform-origin: center bottom; }
	.timeline.is-armed:not(.is-drawn)::before { transform: scaleY(1); }
	.timeline p { max-width: 46ch; }
}

/* ── Founder ─────────────────────────────────────────────────────────────── */
.founder { padding-block: var(--section); border-top: 1px solid var(--line); }
/* mirrored against the Impact Point spread: words left, portrait right */
.founder-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.founder-inner .portrait { order: 2; }
/* the box takes the portrait's own shape so the live dots line up with the still */
.portrait { position: relative; aspect-ratio: 1000 / 1130; background: #0c0c0c; border: 1px solid var(--line-strong); overflow: hidden; }
.portrait img, .portrait .hero-dots { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait .hero-dots + img, .portrait img + .hero-dots { z-index: 1; }
.founder-text .meta { margin: 0.6rem 0 1.25rem; }
.founder-text p:not(.meta) { color: var(--paper-2); font-size: 1.125rem; max-width: 46ch; margin-bottom: 1.5rem; }
.more { font-weight: 600; color: var(--paper); }
.more:hover { color: var(--yellow); }

/* ── Contact ─────────────────────────────────────────────────────────────── */
.contact { padding-block: var(--section); border-top: 1px solid var(--line); }
.contact .btn-large { margin-top: 2rem; }
.social { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; list-style: none; padding: 0; margin-top: 2rem; }
.social a { color: var(--paper-2); }
.social a:hover { color: var(--paper); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); padding-block: 2rem; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--paper-3); font-size: 0.9375rem; }
.foot img { width: 2.25rem; height: auto; opacity: 0.9; }

/* ── Narrow laptops and tablets: the game entry is too tight to balance in two columns ── */
@media (max-width: 1160px) {
	.game-inner { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: 'media' 'text' 'links'; }
	.game-links { align-self: start; justify-content: flex-start; }
}

/* ── Small screens ───────────────────────────────────────────────────────── */
@media (max-width: 860px) {
	.game-inner, .founder-inner { grid-template-columns: 1fr; }
	.game-inner { grid-template-rows: none; grid-template-areas: 'media' 'text' 'links'; }
	.founder-inner .portrait { max-width: 22rem; order: 0; }
	.hero { min-height: auto; }
	.hero::before { background-size: 220% 100%; }
}
@media (max-width: 480px) {
	.actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}
