/* © Copyright 2026, Tussock Studios, all rights reserved. */
@font-face { font-family: Manrope; font-weight: 400; font-display: swap; src: url(fonts/manrope-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Manrope; font-weight: 600; font-display: swap; src: url(fonts/manrope-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Manrope; font-weight: 800; font-display: swap; src: url(fonts/manrope-latin-800-normal.woff2) format('woff2'); }

:root {
  --night: #0B0E14; --paper: #F7F5F0;
  --gold: #F4C84F; --root: #14675F;
  --labs: #1FC6D6; --labs-ink: #0E7C8A;
  --games: #F2673A; --games-ink: #B8401F;
  --ink-2: #4A4E55;      /* secondary text on Paper */
  --mist: #B9BDC4;       /* secondary text on Night */
  --gutter: clamp(20px, 5vw, 72px);
  --band: clamp(72px, 10vw, 144px);
  --h1: clamp(2.6rem, 7.2vw, 6.25rem);
  --h2: clamp(2rem, 4.2vw, 3.5rem);
  --h3: clamp(1.4rem, 2.2vw, 1.875rem);
  --lead: clamp(1.15rem, 1.6vw, 1.4rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--night); font: 400 1.0625rem/1.6 Manrope, system-ui, sans-serif; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; }
h1 { font-size: var(--h1); line-height: 1; }
h2 { font-size: var(--h2); line-height: 1.06; }
h3 { font-size: var(--h3); line-height: 1.2; }
p { text-wrap: pretty; max-width: 66ch; }
ul, ol { list-style: none; }
img { display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 9; background: var(--night); color: var(--paper); padding: 10px 18px; border-radius: 99px; }
.skip:focus { left: 16px; }

.night { background: var(--night); color: var(--paper); }
.paper { background: var(--paper); color: var(--night); }
.rooted { background: var(--root); color: var(--paper); }
.band { padding: var(--band) var(--gutter); }
.inner { max-width: 1320px; margin-inline: auto; }
.lead { font-size: var(--lead); line-height: 1.45; max-width: 48ch; }
.quiet { color: var(--ink-2); }
.night .quiet { color: var(--mist); }
.by { font-weight: 400; letter-spacing: -0.02em; white-space: nowrap; }
.by.labs { color: var(--labs-ink); } .night .by.labs { color: var(--labs); }
.by.games { color: var(--games-ink); } .night .by.games { color: var(--games); }

/* Header */
.top { position: absolute; inset: 0 0 auto; z-index: 3; padding: clamp(18px, 2.4vw, 30px) var(--gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.top img { height: clamp(32px, 3.2vw, 42px); width: auto; }
.top ul { display: flex; gap: clamp(18px, 2.6vw, 36px); }
.top nav a { display: block; padding: 8px 0; font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; }
.top nav a:hover, .top nav a[aria-current] { border-color: currentColor; }

.btn { display: inline-block; padding: 14px 26px; border-radius: 99px; border: 2px solid currentColor; background: none; color: inherit; font: 600 1.0625rem/1.2 Manrope, system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--paper); color: var(--night); border-color: var(--paper); }

/* Landscape */
.scene { position: relative; overflow: hidden; isolation: isolate; }
.scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero { min-height: clamp(700px, 100svh, 1080px); padding: clamp(150px, 19vh, 220px) var(--gutter) 0; }
.hero h1 { max-width: 13ch; }
.hero .lead { margin-top: clamp(18px, 2.4vw, 30px); }
.hero .division { height: clamp(38px, 4.4vw, 58px); width: auto; margin: 0 0 clamp(20px, 3vw, 36px) -4px; }
.division-hero { min-height: clamp(680px, 92svh, 1000px); padding-top: clamp(130px, 16vh, 180px); }
.division-hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.75rem); max-width: 16ch; }

.lights { display: grid; grid-template-columns: 1fr 1fr; }
.light { min-height: clamp(660px, 88svh, 900px); padding: clamp(40px, 5vw, 80px) var(--gutter); }
.light img { height: clamp(40px, 4.4vw, 60px); width: auto; margin-left: -4px; }
.light p { margin: 22px 0 28px; font-size: var(--lead); line-height: 1.45; max-width: 34ch; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px clamp(40px, 8vw, 128px); align-items: start; }
.stack > * + * { margin-top: 1.1em; }

/* Product index */
.index { display: grid; gap: 0; margin-top: clamp(40px, 5vw, 72px); }
.index li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px clamp(40px, 7vw, 112px); align-items: baseline; padding: 22px 0; border-top: 2px solid currentColor; }
.index a { text-decoration: none; }
.index a:hover { text-decoration: underline; text-decoration-thickness: 3px; }

.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px clamp(32px, 5vw, 80px); margin-top: clamp(40px, 5vw, 72px); }
.ways h3 { margin-bottom: 12px; }

/* Product detail */
.product { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px clamp(40px, 7vw, 112px); padding-block: clamp(64px, 8vw, 112px); border-top: 2px solid rgb(247 245 240 / .22); scroll-margin-top: 0; }
.paper .product { border-color: rgb(11 14 20 / .2); }
.product:first-child { border-top: 0; padding-top: 0; }
.product:last-child { padding-bottom: 0; }
.product > h2 { grid-column: 1 / -1; }
.product h2 .by { font-size: .58em; }
.product .lead { margin-top: -6px; }
.product h3 { font-size: 1.2rem; letter-spacing: -0.02em; margin: 40px 0 14px; }
.product h3:first-child { margin-top: 0; }
.facts { margin-top: 28px; display: grid; gap: 10px; }
.facts div { display: grid; grid-template-columns: 7.5em 1fr; gap: 16px; }
.facts dt { color: var(--ink-2); } .night .facts dt { color: var(--mist); }
.facts dd { font-weight: 600; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 13px 20px 13px 0; border-bottom: 1px solid rgb(247 245 240 / .2); }
.paper th, .paper td { border-color: rgb(11 14 20 / .16); }
th { font-weight: 600; } td:nth-child(2):not(:last-child) { white-space: nowrap; } thead th { color: var(--mist); font-weight: 400; }
.paper thead th { color: var(--ink-2); }
.ticks li { padding: 9px 0 9px 24px; position: relative; max-width: 66ch; }
.ticks li::before { content: ''; position: absolute; left: 0; top: .72em; width: 5px; height: 1.05em; border-radius: 9px; background: linear-gradient(var(--t1), var(--t2)); }
.labs-page { --t1: #B4F25E; --t2: #2F5BFF; }
.games-page { --t1: #F0A133; --t2: #C2124F; }
.steps { counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.2em 1fr; padding: 14px 0; border-bottom: 1px solid rgb(11 14 20 / .16); max-width: 66ch; }
.steps li::before { content: counter(s); font-weight: 800; color: var(--games-ink); }
.night .steps li { border-color: rgb(247 245 240 / .2); }
.night .steps li::before { color: var(--games); }

/* Screenshots */
.product > .gallery { grid-column: 1 / -1; }
.shots { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 18px); }
@media (max-width: 860px) { .shots { --n: 2; } }
.shots button { display: block; width: 100%; padding: 0; border: 0; border-radius: 14px; background: none; cursor: zoom-in; color: inherit; }
.shots img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: top left; border-radius: 14px; box-shadow: 0 0 0 1px rgb(11 14 20 / .14); transition: box-shadow .15s; }
.night .shots img { box-shadow: 0 0 0 1px rgb(247 245 240 / .16); }
.shots button:hover img { box-shadow: 0 0 0 3px currentColor; }
.shots.tall img { aspect-ratio: 3 / 4; }
.shots.wide img { aspect-ratio: 1086 / 693; }
@media (min-width: 861px) { .shots.three { --n: 3; } }
.gallery .note { margin-top: 14px; font-size: .9375rem; }

.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: clamp(56px, 7vh, 84px) clamp(12px, 7vw, 96px) 24px; border: 0; background: rgb(11 14 20 / .96); color: var(--paper); }
.viewer::backdrop { background: rgb(11 14 20 / .7); }
.viewer[open] { display: grid; place-items: center; }
.viewer figure { margin: 0; display: grid; justify-items: center; gap: 14px; max-width: 100%; max-height: 100%; }
.viewer img { max-width: 100%; max-height: calc(100dvh - clamp(56px, 7vh, 84px) - 110px); width: auto; height: auto; border-radius: 10px; touch-action: pan-y; user-select: none; }
.viewer figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; max-width: 72ch; text-align: center; }
.v-count { color: var(--mist); font-variant-numeric: tabular-nums; }
.v-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 99px; border: 2px solid rgb(247 245 240 / .5); background: rgb(11 14 20 / .6); color: var(--paper); cursor: pointer; }
.v-btn:hover { border-color: var(--paper); background: var(--paper); color: var(--night); }
.v-prev { left: clamp(8px, 2vw, 28px); top: 50%; translate: 0 -50%; }
.v-next { right: clamp(8px, 2vw, 28px); top: 50%; translate: 0 -50%; }
.v-close { right: clamp(8px, 2vw, 28px); top: clamp(8px, 2vw, 20px); }
@media (max-width: 560px) { .v-prev, .v-next { top: auto; bottom: 16px; translate: none; } .viewer { padding-bottom: 84px; } .viewer img { max-height: calc(100dvh - 290px); } .viewer figcaption { font-size: .9375rem; } }

/* About, contact, legal */
.page-head { padding-top: clamp(150px, 20vh, 230px); padding-bottom: var(--band); }
.page-head h1 { max-width: 15ch; font-size: clamp(2.5rem, 5.2vw, 4.75rem); line-height: 1.04; }
.page-head .lead { margin-top: 26px; }
.bigmark { width: min(100%, 560px); height: auto; }
.tree { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; }
.tree > div { border-radius: 28px; padding: clamp(28px, 4vw, 52px); }
.tree .parent { grid-column: 1 / -1; background: var(--root); color: var(--paper); }
.tree img { height: 46px; width: auto; margin: 0 0 20px -4px; max-width: 100%; }
.tree ul { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 18px; font-weight: 600; }
.contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px clamp(32px, 5vw, 80px); }
.contact h2 { font-size: var(--h3); margin-bottom: 12px; }
.mail { font-size: clamp(1.3rem, 4.6vw, 3.5rem); font-weight: 800; letter-spacing: -0.03em; text-decoration-thickness: 4px; overflow-wrap: anywhere; }
.legal h2 { font-size: var(--h3); margin: 48px 0 12px; }
.legal h2:first-child { margin-top: 0; }

/* Footer */
.foot { padding: clamp(56px, 7vw, 96px) var(--gutter) 36px; }
.foot .cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 36px 64px; }
.foot img { height: 46px; width: auto; margin-left: -4px; }
.foot ul { display: flex; flex-wrap: wrap; gap: 10px 32px; }
.foot li a { display: inline-block; padding: 6px 0; text-decoration: none; font-weight: 600; }
.foot li a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.foot .copy { margin-top: 48px; color: var(--mist); font-size: .9375rem; }
.games-page .foot { border-top: 2px solid rgb(247 245 240 / .22); }

@media (max-width: 860px) {
  .lights, .split, .index li, .ways, .product, .contact, .tree { grid-template-columns: minmax(0, 1fr); }
  .light { min-height: 620px; }
}
@media (max-width: 560px) {
  .top { flex-direction: column; align-items: flex-start; gap: 6px; }
  .hero { padding-top: 148px; }
  .facts div { grid-template-columns: 6.2em 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.top.on-dark { color: var(--paper); }
