/* Kettle Observatory · site styles
   Tokens and the mark come straight from the brand book (brand/index.html).
   Four colours do all the work, each with one job (theme.js sets them per scheme):
     sky (--cobalt)    the nav bar, the hero, the footer, main buttons, links      milk (--cream)    the page and cards
     midnight (--ink)  text                                                         element (--coral) small highlights on sky
   Homepage: nav + hero (sky) → the game and the latest notes (milk) → footer (sky). */
:root {
  /* Nine O'Clock, the default scheme */
  --cobalt: #2B3BFF; --cream: #FFF3E2; --ink: #121218; --coral: #FF5A36;
  /* page chrome, from milk and midnight */
  --page: var(--cream); --surface: color-mix(in srgb, var(--cream) 55%, #fff); --fg: var(--ink);
  --muted: color-mix(in oklab, var(--ink) 66%, var(--cream)); --line: color-mix(in oklab, var(--cream) 86%, var(--ink));
  /* links: the sky colour, darkened a touch so small text stays readable on milk */
  --link: color-mix(in oklab, var(--cobalt) 80%, var(--ink));
  --body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --brand: 'Bricolage Grotesque', 'Helvetica Neue', sans-serif;
  --glide: cubic-bezier(.65, 0, .35, 1);
  --settle: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--page); color: var(--fg); font-family: var(--body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; transition: background-color .4s var(--settle), color .4s var(--settle); }
a { color: inherit; }
img, video { max-width: 100%; display: block; }
p { margin: 0; }
main { flex: 1; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 640px) { .wrap { padding-inline: 24px; } }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--fg); color: var(--page); padding: 10px 14px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 10px; }
:where(a, button, video):focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }

/* --- type --- */
.label { font-family: var(--mono); font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--muted); }
h1, h2, h3, h4 { font-family: var(--brand); font-variation-settings: 'opsz' 12; margin: 0; }
h1 { font-weight: 800; font-size: clamp(40px, 6.4vw, 72px); letter-spacing: -.04em; line-height: .98; }
h2 { font-weight: 800; font-size: clamp(34px, 5.2vw, 58px); letter-spacing: -.035em; line-height: 1; }
h3 { font-weight: 700; font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.025em; line-height: 1.1; }
.lede { font-size: 19px; color: var(--muted); max-width: 60ch; }

/* --- labels and statuses --- */
.tag { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; border-radius: 999px; padding: 6px 10px 6px 9px; line-height: 1; white-space: nowrap; background: var(--coral); color: var(--ink); }
.tag .tick { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; white-space: nowrap; text-transform: uppercase; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c, currentColor); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, currentColor) 25%, transparent); }

/* --- buttons --- */
.btn { display: inline-flex; align-items: center; gap: 10px; font: 600 15px/1 var(--body); color: inherit; text-decoration: none; background: transparent; border: 1.5px solid color-mix(in srgb, currentColor 40%, transparent); border-radius: 999px; padding: 0 22px; min-height: 50px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.btn:hover { border-color: currentColor; }
.btn.hot { background: var(--coral); color: var(--ink); border-color: var(--coral); }
.btn.hot:hover { background: color-mix(in srgb, var(--coral) 85%, #fff); }
.btn.sky { background: var(--cobalt); color: var(--cream); border-color: var(--cobalt); }
.btn.sky:hover { background: color-mix(in srgb, var(--cobalt) 85%, var(--ink)); border-color: color-mix(in srgb, var(--cobalt) 85%, var(--ink)); }
.btn .arr { transition: transform .35s var(--settle); }
.btn:hover .arr { transform: translate(2px, -2px); }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- the mark --- */
.m { overflow: visible; display: block; }
.k .ko-scope { transform-box: view-box; transform-origin: 75.19px 75.91px; }
.k .ko-knob, .k .ko-kettle { transform-box: fill-box; transform-origin: 50% 100%; }

/* the horizontal lockup (spacing as tuned in the brand book) */
.lh { --s: 28px; display: inline-flex; align-items: flex-end; gap: calc(var(--s) * .38); white-space: nowrap; }
.lh .m { height: calc(var(--s) * .98); width: calc(var(--s) * .98 * 76.06 / 60.8); flex: none; margin-bottom: calc(var(--s) * .09); }
.lh .w { font-family: var(--brand); font-variation-settings: 'opsz' 12; font-weight: 700; font-size: var(--s); letter-spacing: -.03em; line-height: 1; }

/* --- nav: a sky bar on every page, with the lockup and plain, readable links --- */
.nav { position: relative; z-index: 20; background: var(--cobalt); color: var(--cream); transition: background-color .4s var(--settle); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.nav .logo { --s: 22px; text-decoration: none; padding: 4px; margin-left: -4px; }
.nav .logo .ko-scope { transition: transform .5s var(--settle); animation: in-nod .9s .6s var(--glide) both; }
.nav .logo:hover .ko-scope, .nav .logo:focus-visible .ko-scope { transform: rotate(-18deg) translate(1.77px, -.94px); }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0 0 0 auto; padding: 0; }
.nav ul a { display: block; white-space: nowrap; text-decoration: none; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 16px; transition: background-color .15s; }
.nav ul a:hover { background: color-mix(in srgb, var(--cream) 14%, transparent); }
.nav ul a[aria-current="page"] { background: var(--cream); color: var(--cobalt); }
@media (max-width: 560px) {
  .nav .logo .w { display: none; }
  .nav .logo .m { height: 28px; width: calc(28px * 76.06 / 60.8); margin: 0; }
  .nav ul a { padding-inline: 12px; font-size: 15px; }
}

/* --- hero (homepage): the studio's line, big, and a link down to what's new --- */
.hero { position: relative; overflow: hidden; background: var(--cobalt); color: var(--cream); transition: background-color .4s var(--settle); }
.hero .wrap { position: relative; z-index: 1; display: grid; gap: clamp(48px, 7vw, 96px); padding-block: clamp(48px, 8vw, 112px) clamp(32px, 4vw, 48px); }
.hero .h-copy { display: grid; gap: clamp(18px, 2.4vw, 28px); justify-items: start; }
.hero .h-copy > .label { opacity: .8; }
.hero h1 { font-size: clamp(56px, 11vw, 156px); letter-spacing: -.05em; line-height: .86; max-width: 9.5em; }
.hero h1 .brew { position: relative; white-space: nowrap; }
.hero h1 .wisps { position: absolute; left: calc(100% + .02em); bottom: .5em; width: .62em; height: .55em; overflow: visible; }
.hero h1 .wisps path { opacity: 0; transform-box: fill-box; animation: wisp 3.4s ease-out infinite; }
.hero h1 .wisps path:nth-child(2) { animation-delay: 1.1s; }
.hero h1 .wisps path:nth-child(3) { animation-delay: 2.2s; }
@keyframes wisp { 0% { opacity: 0; transform: translateY(4px); } 25% { opacity: .7; } 100% { opacity: 0; transform: translateY(-10px); } }
.hero .h-foot { display: flex; justify-content: space-between; align-items: end; gap: 20px 32px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid color-mix(in srgb, var(--cream) 25%, transparent); }
.hero .sub { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; max-width: 44ch; opacity: .92; }
.hero .news { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; padding: 8px 18px 8px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 20%, transparent); border: 1px solid color-mix(in srgb, var(--cream) 25%, transparent); font-weight: 600; font-size: 16px; transition: background-color .15s; }
.hero .news:hover { background: color-mix(in srgb, var(--ink) 32%, transparent); }
.hero .news .arr { display: inline-block; transition: transform .35s var(--settle); }
.hero .news:hover .arr { transform: translateY(2px); }

/* entrance */
.hero.play .h-copy > * { animation: in-fade .8s var(--settle) both; }
.hero.play .h-copy > :nth-child(2) { animation-delay: .1s; }
.hero.play .h-foot { animation: in-fade .8s .3s var(--settle) both; }
@keyframes in-nod { 0%, 100% { rotate: 0deg; } 40% { rotate: -14deg; } 75% { rotate: 4deg; } }
@keyframes in-fade { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: none; } }
.js .hero:not(.ready) .h-copy, .js .hero:not(.ready) .h-foot { opacity: 0; }

/* --- stars --- */
.has-stars > svg.stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.stars .tw { animation: twinkle 3.2s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: var(--o, .6); } 50% { opacity: .1; } }

/* --- sections --- */
.sec { padding-block: clamp(64px, 9vw, 112px); }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head .label { color: var(--muted); }
.sec-head .row { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.more { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--link); white-space: nowrap; }
.more:hover { text-decoration: underline; text-underline-offset: 4px; }

/* --- the game (homepage, milk) --- */
.game-head { display: grid; gap: 24px clamp(32px, 5vw, 72px); align-items: end; margin-bottom: clamp(32px, 4vw, 48px); }
@media (min-width: 900px) { .game-head { grid-template-columns: 1.15fr 1fr; } }
.game-head .eyebrow { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.game-head .eyebrow img { width: 48px; height: 48px; border-radius: 22.5%; }
.game-head .eyebrow .tag { background: var(--cobalt); color: var(--cream); }
.game h2 { font-size: clamp(52px, 8.6vw, 112px); letter-spacing: -.045em; line-height: .88; }
.game-head .pitch { display: grid; gap: 22px; }
.game-head .pitch p { font-size: 19px; line-height: 1.5; color: var(--muted); max-width: 46ch; }
.game .trailer { box-shadow: 0 2px 6px color-mix(in srgb, var(--ink) 10%, transparent), 0 24px 56px color-mix(in srgb, var(--ink) 18%, transparent); }
.facts { margin: clamp(32px, 4vw, 44px) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); border-top: 1px solid var(--line); }
.facts div { padding: 20px 20px 0 0; display: grid; gap: 6px; align-content: start; }
.facts dt { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-family: var(--brand); font-variation-settings: 'opsz' 12; font-weight: 700; font-size: 22px; letter-spacing: -.02em; line-height: 1.15; }

/* --- trailer: poster, a play button, then the browser's own controls --- */
.trailer { position: relative; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.trailer video { width: 100%; height: 100%; object-fit: cover; }
.trailer .play { position: absolute; left: clamp(12px, 2.4vw, 28px); bottom: clamp(12px, 2.4vw, 28px); display: inline-flex; align-items: center; gap: 12px; padding: 0 22px 0 8px; min-height: 52px; border: 0; border-radius: 999px; background: var(--ink); color: var(--cream); font: 600 15px/1 var(--body); cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.3); transition: transform .35s var(--settle); }
.trailer .play:hover { transform: translateY(-2px); }
.trailer .play i { width: 38px; height: 38px; border-radius: 50%; background: var(--coral); display: grid; place-items: center; }
.trailer .play i::before { content: ''; margin-left: 3px; border-left: 12px solid var(--ink); border-block: 7.5px solid transparent; }
.trailer .play[hidden] { display: none; }

/* --- grounds for cards inside posts --- */
.on-midnight { background: var(--ink); color: var(--cream); }

/* --- notes: a plain dated list, on the homepage and the notes page --- */
.notes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.notes li { border-bottom: 1px solid var(--line); }
.notes a { display: grid; gap: 6px 32px; padding: 22px 0; text-decoration: none; }
@media (min-width: 720px) { .notes a { grid-template-columns: 140px minmax(0, 1fr); } .notes time { padding-top: .55em; } }
.notes time { color: var(--muted); }
.notes .t { font-family: var(--brand); font-variation-settings: 'opsz' 12; font-weight: 700; font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.025em; line-height: 1.15; transition: color .15s; }
.notes .s { display: block; color: var(--muted); margin-top: 6px; max-width: 62ch; }
.notes a:hover .t { color: var(--link); }
.notes .empty { padding: 22px 0; color: var(--muted); }

/* --- page header (notes, privacy) --- */
.page-head { padding-block: clamp(48px, 7vw, 88px) clamp(28px, 4vw, 44px); display: grid; gap: 16px; }
.page-head .label { color: var(--muted); }
.page-end { height: clamp(64px, 9vw, 112px); }

/* --- a post --- */
.post { max-width: 720px; margin: 0 auto; padding-block: clamp(40px, 6vw, 72px) clamp(64px, 9vw, 112px); }
.post-head { display: grid; gap: 18px; margin-bottom: clamp(28px, 4vw, 40px); }
.post-head time { color: var(--muted); }
.post-head .back { justify-self: start; }
.post-head h1 { font-size: clamp(38px, 6vw, 64px); }
.prose { font-size: 18px; line-height: 1.65; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose a { color: var(--link); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2.5px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--link); }
.prose blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--cobalt); font-family: var(--brand); font-variation-settings: 'opsz' 12; font-weight: 600; font-size: 24px; letter-spacing: -.02em; line-height: 1.25; }
.prose figure { margin-inline: 0; display: grid; gap: 10px; }
.prose figure > img { border-radius: 14px; width: 100%; height: auto; }
.prose figure .trailer { box-shadow: none; border-radius: 14px; }
.prose figcaption { font-size: 14px; color: var(--muted); line-height: 1.5; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }
.prose code { font-family: var(--mono); font-size: .88em; background: color-mix(in srgb, var(--fg) 7%, transparent); padding: .1em .35em; border-radius: 5px; }
/* screenshots in a post: two across where there's room, each opens the full-size picture */
.prose .shots { list-style: none; padding: 0; display: grid; gap: 24px 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.prose .shots li + li { margin-top: 0; }
.shots figure { margin: 0; display: grid; gap: 8px; }
.shots a { display: block; border-radius: 12px; }
.prose .shots img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.shots figcaption { font-size: 15px; line-height: 1.45; color: var(--fg); }
.shots figcaption b { display: block; font-family: var(--brand); font-variation-settings: 'opsz' 12; font-size: 17px; letter-spacing: -.015em; }
.shots figcaption span { color: var(--muted); }
/* the call to action at the end of a post */
.cta-card { margin-top: clamp(40px, 6vw, 56px); border-radius: 18px; padding: clamp(20px, 3vw, 28px); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 24px; align-items: center; }
.cta-card .icon { width: clamp(72px, 11vw, 104px); height: auto; border-radius: 22.5%; }
.cta-card .text { display: grid; gap: 8px; justify-items: start; }
.cta-card .text .label { opacity: .7; }
.cta-card h2 { font-size: clamp(26px, 3vw, 32px); letter-spacing: -.03em; }
.cta-card p { opacity: .82; margin-bottom: 8px; }
@media (max-width: 520px) { .cta-card { grid-template-columns: minmax(0, 1fr); } }
.post-foot { margin-top: clamp(40px, 6vw, 56px); padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }

/* --- privacy: the analytics switch --- */
.optout { margin-top: 1.4em; padding: 20px 22px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 14px; justify-items: start; font-size: 16px; }
.optout[hidden] { display: none; }
.optout .btn { min-height: 44px; font-size: 14px; }

/* --- footer (sky) --- */
.foot { background: var(--cobalt); color: var(--cream); padding-block: clamp(64px, 9vw, 104px) 28px; transition: background-color .4s var(--settle), color .4s var(--settle); }
.foot .hello { display: grid; gap: 14px; }
.foot .hello .label { opacity: .75; }
.foot .hello h2 { font-size: clamp(40px, 6.4vw, 72px); }
.foot .hello p { font-size: 18px; opacity: .88; }
.foot .mail { font-family: var(--brand); font-variation-settings: 'opsz' 12; font-weight: 700; font-size: clamp(20px, 3.4vw, 34px); letter-spacing: -.025em; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; overflow-wrap: anywhere; justify-self: start; margin-top: 6px; }
.foot .mail:hover { text-decoration-color: var(--coral); }
.foot .base { margin-top: clamp(48px, 7vw, 80px); padding-top: 24px; border-top: 1px solid color-mix(in srgb, var(--cream) 22%, transparent); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot .sign { display: grid; gap: 10px; }
.foot .sign .lh { --s: 22px; }
.foot .sign .tl { font-family: var(--brand); font-variation-settings: 'opsz' 12; font-weight: 500; font-size: 17px; letter-spacing: -.01em; opacity: .85; }
.foot .small { margin-top: 28px; display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; opacity: .7; }
.foot .small a { text-decoration: none; }
.foot .small nav { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.foot .small a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* scheme switcher: the current scheme's name sits above the swatches */
.tuner { display: grid; gap: 8px; justify-items: start; }
.tuner .name { opacity: .8; }
.swatches { display: flex; gap: 2px; flex-wrap: wrap; margin-left: -7px; }
.sw { width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: inherit; }
.sw .q { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; transform: rotate(-45deg); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--cream) 55%, transparent); transition: transform .35s var(--settle); }
.sw:hover .q { transform: rotate(-45deg) scale(1.1); }
.sw[aria-pressed="true"] { box-shadow: inset 0 0 0 2px currentColor; }

/* --- 404 --- */
.lost { min-height: 64vh; display: grid; place-content: center; justify-items: start; gap: 18px; padding-block: 64px; }
.lost .m { width: 120px; height: calc(120px * 68.1 / 79.1); color: var(--cobalt); }
.lost .ko-scope { animation: scan 4.4s var(--glide) infinite; }
@keyframes scan { 0%, 8% { transform: rotate(0); } 26% { transform: rotate(-16deg); } 48% { transform: rotate(12deg); } 62% { transform: rotate(0); } 70%, 88% { transform: translate(2.65px, -1.41px); } 100% { transform: rotate(0); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
