/* =====================================================================
   Lowkey Studios · Pablito
   One screen: the moving hero, the Steam note, and the studio's socials.
   Direction C "Lodge Condensed" from the game's UI kit: Truculenta for
   headings and labels, Crimson Text for reading, gold on the dark.
   ===================================================================== */

/* ---------- fonts (SIL OFL, subset; licences in assets/fonts/) ---------- */
@font-face {
  font-family: "Truculenta";
  src: url("../fonts/truculenta-var.woff") format("woff");
  font-weight: 400 900;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Crimson Text";
  src: url("../fonts/crimson-text-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rye";
  src: url("../fonts/rye-regular.woff") format("woff");
  font-display: swap;
}
/* the studio's own typefaces, for the About and legal pages (docs/studio-hub/brand) */
@font-face {
  font-family: "Anton";
  src: url("../fonts/anton-regular.woff") format("woff");
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff") format("woff");
  font-weight: 400 700;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;
  --void: #0A0A0C;
  --ember-deep: #B8321A;
  --gold: #FFB03A;
  --parchment: #D8C9A8;
  --bone: #EFE3C6;
  --ink: #17120F;
  --paper: #D9C6A0;
  --dim: rgba(216, 201, 168, .66);
  --hair: rgba(216, 201, 168, .18);
  --hair-2: rgba(216, 201, 168, .32);

  --sans: "Truculenta", "Arial Narrow", "Roboto Condensed", sans-serif;
  --serif: "Crimson Text", Georgia, "Times New Roman", serif;
  --sign: "Rye", "Rockwell", Georgia, serif;
  /* studio identity (direction B) */
  --studio-display: "Anton", "Arial Narrow", Impact, sans-serif;
  --studio-text: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --chalk: #FAFAF5;
  --chalk-dim: #D6D6CF;
  --concrete: #A3A39C;
  --asphalt: #2A2A2A;

  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='g' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .9 -.1'/></filter><rect width='100%25' height='100%25' filter='url(%23g)'/></svg>");
  --fibre: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='f' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.018 .045' numOctaves='3' seed='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .25  0 0 0 0 .15  0 0 0 .95 -.43'/></filter><rect width='100%25' height='100%25' filter='url(%23f)'/></svg>");

  --gutter: clamp(16px, 4vw, 48px);
  --head-h: 64px;
  --foot-h: 44px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--void); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--void); color: var(--parchment);
  font: 400 clamp(18px, 1.05vw + 13px, 20.5px)/1.62 var(--serif);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* a still film grain over everything (no animation: it never repaints) */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background-image: var(--grain); opacity: .055;
}
img, svg, canvas, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--gold); }
a:hover { color: var(--bone); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: rgba(255, 176, 58, .35); color: var(--bone); }
p { margin: 0 0 1em; }
h1 { margin: 0; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px;
  background: var(--gold); color: var(--ink); font: 700 16px/1 var(--sans); text-decoration: none;
}
.skip:focus { top: 12px; }
.call {
  font-family: var(--sign); font-style: normal; color: var(--gold); letter-spacing: .02em;
  text-shadow: 0 0 18px rgba(255, 176, 58, .28);
}

/* ---------- header ---------- */
.site-head {
  position: absolute; inset: 0 0 auto 0; z-index: 50; height: var(--head-h);
  display: flex; align-items: center; gap: 18px; padding: 0 var(--gutter);
  background: linear-gradient(rgba(10, 10, 12, .82), rgba(10, 10, 12, 0));
}
/* the studio's one-line lockup (direction B, outlined; docs/studio-hub/brand/logo) */
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand svg { height: 26px; width: auto; flex: 0 0 auto; }
.brand:hover svg { filter: brightness(1.12); }
.lang {
  margin: 0 0 0 auto; font: 650 14px/1 var(--sans); letter-spacing: .12em; display: inline-flex; gap: 6px; align-items: center; color: var(--dim);
}
.lang a, .lang span[aria-current] { text-decoration: none; padding: 6px 2px; }
.lang a { color: var(--dim); }
.lang a:hover { color: var(--bone); }
.lang span[aria-current] { color: var(--bone); border-bottom: 2px solid var(--gold); }

/* ---------- hero (the whole page) ---------- */
main { flex: 1; display: flex; }
.hero {
  position: relative; flex: 1; min-height: calc(100svh - var(--foot-h)); display: flex; align-items: flex-end;
  overflow: hidden; background: var(--void); isolation: isolate;
}
.hero-poster, .hero-poster img, .hero-stage { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-poster img { object-fit: cover; object-position: 50% 50%; }
.hero-stage { z-index: 1; opacity: 0; transition: opacity .6s ease; touch-action: pan-y; }
.hero-stage canvas { width: 100% !important; height: 100% !important; }
html[data-scene="live"] .hero-stage, html[data-scene="still-ready"] .hero-stage { opacity: 1; }
.hero-grade {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 10, 12, .9) 0%, rgba(10, 10, 12, .55) 34%, rgba(10, 10, 12, 0) 62%),
    linear-gradient(0deg, var(--void) 0%, rgba(10, 10, 12, 0) 28%),
    radial-gradient(120% 90% at 60% 45%, rgba(10, 10, 12, 0) 55%, rgba(10, 10, 12, .6) 100%);
}
.hero-copy {
  position: relative; z-index: 3; width: min(1240px, 100% - 2 * var(--gutter)); margin: 0 auto;
  padding: calc(var(--head-h) + 40px) 0 clamp(40px, 8vh, 96px);
}
.hero-copy > * { max-width: 560px; }
.eyebrow {
  font: 650 15px/1.2 var(--sans); font-stretch: 90%; letter-spacing: .24em; text-transform: uppercase; color: var(--parchment);
  margin: 0 0 18px;
}
.hero-logo { margin: 0 0 14px; width: clamp(260px, 38vw, 620px); max-width: 100%; }
.hero-logo img { width: 100%; filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .6)); }
.tagline {
  font: 680 clamp(17px, 1vw + 12px, 22px)/1.25 var(--sans); font-stretch: 86%; letter-spacing: .2em; text-transform: uppercase;
  color: var(--bone); margin: 0 0 22px; padding-bottom: 14px;
  background: linear-gradient(var(--gold), var(--gold)) left bottom / 88px 2px no-repeat;
}
.pitch { font-size: 1.12em; color: var(--bone); margin-bottom: 30px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; margin-bottom: 22px; }
.cta {
  display: inline-flex; align-items: center; gap: 12px; margin: 0; text-decoration: none;
  font: 780 17px/1 var(--sans); font-stretch: 86%; letter-spacing: .14em; text-transform: uppercase;
  padding: 17px 24px 16px; color: var(--ink); position: relative;
  background: var(--paper) var(--fibre); background-blend-mode: multiply;
  -webkit-mask: url("../kit/mask-deckle.svg") center / 100% 100% no-repeat;
  mask: url("../kit/mask-deckle.svg") center / 100% 100% no-repeat;
  transform: rotate(-1deg);
}
.cta svg { width: 22px; height: 22px; flex: 0 0 auto; }
.cta.is-soon { cursor: default; }
a.cta:hover { background-color: var(--bone); color: var(--ink); }
.status {
  font: 600 14.5px/1.4 var(--sans); font-stretch: 92%; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin: 0 0 26px;
}

/* ---------- studio-first hero: the studio is the heading, Pablito is its first game ---------- */
.studio-logo { margin: 0 0 20px; width: clamp(240px, 30vw, 470px); max-width: 100%; }
.studio-logo img { width: 100%; filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .6)); }
.studio-line {
  font: 500 clamp(18px, .9vw + 13px, 22px)/1.45 var(--studio-text); color: var(--chalk); margin: 0 0 30px;
  padding-bottom: 18px; background: linear-gradient(var(--gold), var(--gold)) left bottom / 88px 2px no-repeat;
}
.first-game { margin: 0 0 26px; }
.fg-label {
  font: 650 14px/1.2 var(--sans); font-stretch: 90%; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 12px;
}
.fg-logo { width: clamp(180px, 17vw, 270px); margin: 0 0 10px; filter: drop-shadow(0 4px 16px rgba(0, 0, 0, .6)); }
.fg-line {
  font: 680 clamp(15px, .5vw + 12px, 18px)/1.3 var(--sans); font-stretch: 86%; letter-spacing: .18em; text-transform: uppercase;
  color: var(--bone); margin: 0 0 18px;
}

/* ---------- rotating hero: studio, Pablito, studio card ---------- */
.slides { display: grid; }
.slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility 0s linear .7s; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .7s ease; }
.hero-copy { transition: opacity .7s ease, visibility 0s linear 0s; }
.slide-art {
  position: absolute; inset: 0; z-index: 3; background: var(--void); opacity: 0; visibility: hidden;
  transition: opacity .7s ease, visibility 0s linear .7s;
}
.slide-art img { width: 100%; height: 100%; object-fit: cover; }
.hero[data-slide="preview"] .slide-art { opacity: 1; visibility: visible; transition: opacity .7s ease; }
.hero[data-slide="preview"] .hero-copy { opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s; }
.hero[data-slide="preview"] .hero-caption, .hero[data-slide="preview"] .motion-toggle { opacity: 0; visibility: hidden; }
.hero-rotate {
  position: absolute; z-index: 6; left: 50%; bottom: 12px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 999px;
  background: rgba(10, 10, 12, .62); border: 1px solid var(--hair-2); backdrop-filter: blur(4px);
}
.hero-rotate button {
  display: grid; place-items: center; min-width: 40px; min-height: 40px; padding: 0; border: 0; background: none;
  color: var(--parchment); cursor: pointer; border-radius: 50%;
}
.hero-rotate button:hover { color: var(--bone); }
.hero-rotate svg { width: 18px; height: 18px; }
.hr-dot span { display: block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--parchment); transition: background-color .2s ease, border-color .2s ease; }
.hr-dot.is-active span { background: var(--gold); border-color: var(--gold); }
html.still-mode .hero-rotate, html.still-mode .slide-art { display: none; }

/* ---------- socials ---------- */
.socials { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.socials-label {
  margin: 0; font: 650 14px/1.2 var(--sans); font-stretch: 90%; letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
}
.socials ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.socials ul a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--parchment);
  transition: color .2s ease, background-color .2s ease;
}
.socials ul a:hover { color: var(--ink); background: var(--gold); }
.socials svg { width: 24px; height: 24px; }
.all-links {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; white-space: nowrap;
  font: 700 14px/1 var(--sans); font-stretch: 90%; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); text-decoration: none; border-bottom: 2px solid transparent;
}
.all-links:hover { color: var(--bone); border-bottom-color: var(--gold); }

/* ---------- caption, motion ---------- */
.hero-caption {
  position: absolute; z-index: 3; right: var(--gutter); bottom: clamp(40px, 8vh, 96px); margin: 0;
  width: min(360px, 40vw); text-align: right; pointer-events: none;
  font: 640 clamp(16px, .6vw + 12px, 20px)/1.3 var(--sans); font-stretch: 90%; letter-spacing: .16em; text-transform: uppercase;
  color: var(--bone); text-shadow: 0 2px 12px rgba(0, 0, 0, .8);
  opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .45s ease;
}
.hero-caption.is-on { opacity: 1; transform: none; }
.hero-caption::before { content: ""; display: block; margin: 0 0 10px auto; width: 40px; height: 2px; background: var(--gold); }
.motion-toggle {
  position: absolute; z-index: 4; right: var(--gutter); top: calc(var(--head-h) + 14px);
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: rgba(10, 10, 12, .72); border: 1px solid var(--hair-2); color: var(--parchment);
  font: 650 13px/1 var(--sans); font-stretch: 92%; letter-spacing: .14em; text-transform: uppercase; padding: 9px 12px;
}
.motion-toggle:hover { color: var(--bone); border-color: var(--gold); }
.motion-toggle svg { width: 12px; height: 12px; }

/* ---------- footer ---------- */
.foot {
  min-height: var(--foot-h); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px;
  padding: 0 var(--gutter); border-top: 1px solid var(--hair);
  font: 600 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--dim);
}
.foot p { margin: 0; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.foot-nav a { color: var(--dim); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.foot-nav a:hover, .foot-nav a[aria-current] { color: var(--gold); }

/* ---------- the studio's pages (About, Privacy, Cookies, Terms, 404): studio identity ---------- */
body.page::after { display: none; }
body.page .site-head { position: relative; background: var(--void); border-bottom: 1px solid var(--asphalt); }
body.page .site-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 5px;
  background: repeating-linear-gradient(-45deg, var(--gold) 0 8px, var(--void) 8px 16px);
}
body.page .foot { font: 600 12.5px/1 var(--studio-text); letter-spacing: .12em; color: var(--concrete); border-top-color: var(--asphalt); }
body.page .foot-nav a { color: var(--concrete); }
body.page .foot-nav a:hover, body.page .foot-nav a[aria-current] { color: var(--gold); }
body.page .lang { font-family: var(--studio-text); font-weight: 600; font-size: 13px; }
.doc-main { flex: 1; display: block; padding: 64px var(--gutter) 96px; }
.doc { max-width: 720px; margin: 0 auto; font: 400 17px/1.7 var(--studio-text); color: var(--chalk-dim); }
.doc .eyebrow { font: 600 13px/1.2 var(--studio-text); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
.doc h1 { font: 400 clamp(44px, 7vw, 80px)/.95 var(--studio-display); text-transform: uppercase; letter-spacing: .005em; color: var(--chalk); margin: 0 0 18px; }
.doc .updated { font: 600 13px/1.4 var(--studio-text); letter-spacing: .12em; text-transform: uppercase; color: var(--concrete); margin: 0 0 36px; }
.doc .lede { font-size: 20px; line-height: 1.6; color: var(--chalk); }
.doc h2 { font: 400 28px/1.1 var(--studio-display); text-transform: uppercase; letter-spacing: .01em; color: var(--chalk); margin: 52px 0 14px; }
.doc h2::before { content: ""; display: block; width: 40px; height: 4px; background: var(--gold); margin-bottom: 16px; }
.doc h3 { font: 700 17px/1.4 var(--studio-text); color: var(--chalk); margin: 24px 0 6px; }
.doc p { margin: 0 0 16px; }
.doc ul { margin: 0 0 16px; padding-left: 20px; }
.doc li { margin: 0 0 8px; }
.doc li::marker { color: var(--gold); }
.doc strong { color: var(--chalk); font-weight: 700; }
.doc a { color: var(--gold); text-underline-offset: .2em; }
.doc a:hover { color: var(--chalk); }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 15px; line-height: 1.5; }
.doc th { text-align: left; font: 600 12px/1.3 var(--studio-text); letter-spacing: .12em; text-transform: uppercase; color: var(--concrete); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--asphalt); }
.doc td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--asphalt); vertical-align: top; }
.doc code { font: 500 14px/1 ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--chalk); background: var(--asphalt); padding: 2px 6px; border-radius: 4px; }
.doc .contact {
  margin: 28px 0 8px; padding: 20px 22px; border: 1px solid var(--asphalt); border-left: 4px solid var(--gold); background: #111113;
}
.doc .contact p { margin: 0; }
.doc .contact .label { font: 600 12px/1.3 var(--studio-text); letter-spacing: .14em; text-transform: uppercase; color: var(--concrete); margin: 0 0 6px; }
.doc .contact a { font-size: 19px; font-weight: 600; }
.doc .socials { margin-top: 12px; }
.doc .socials-label { font-family: var(--studio-text); font-weight: 600; font-size: 13px; }
.doc .all-links { font-family: var(--studio-text); font-weight: 700; font-size: 13px; }
.doc .home-card {
  display: flex; align-items: center; gap: 20px; margin: 28px 0; padding: 18px; background: #111113; border: 1px solid var(--asphalt);
  text-decoration: none; color: var(--chalk-dim);
}
.doc .home-card:hover { border-color: var(--gold); color: var(--chalk); }
.doc .home-card img { width: 200px; flex: 0 0 auto; }
.doc .home-card span { font-size: 15px; line-height: 1.5; }
.doc .home-card b { display: block; color: var(--gold); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; margin-bottom: 4px; }

/* the still capture (?still=1): only the scene, full frame */
html.still-mode .site-head, html.still-mode .hero-copy, html.still-mode .hero-grade, html.still-mode .hero-caption,
html.still-mode .motion-toggle, html.still-mode .foot { display: none !important; }
html.still-mode body::after { display: none; }
html.still-mode .hero { min-height: 100svh; }
html.still-mode .hero-stage { transition: none; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  :root { --head-h: 58px; }
  .hero-grade {
    background: linear-gradient(0deg, var(--void) 0%, rgba(10, 10, 12, .92) 42%, rgba(10, 10, 12, .2) 66%, rgba(10, 10, 12, .35) 100%);
  }
  .hero-caption { left: var(--gutter); right: auto; top: calc(var(--head-h) + 56px); bottom: auto; text-align: left; width: auto; max-width: 60vw; }
  .hero-caption::before { margin: 0 0 10px 0; }
  .motion-toggle { top: calc(var(--head-h) + 12px); }
  .socials { gap: 8px; }
  .socials-label { flex-basis: 100%; }
  .socials ul { margin-left: -10px; gap: 0; }
  .foot { padding: 6px var(--gutter); }
  .foot-nav { gap: 0 14px; }
  .doc-main { padding-top: 40px; }
  .doc .home-card { flex-direction: column; align-items: flex-start; }
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc thead { display: none; }
  .doc td { border-bottom: 0; padding: 4px 0; }
  .doc tr { border-bottom: 1px solid var(--asphalt); padding: 10px 0; }
  .doc td::before { content: attr(data-label); display: block; font: 600 11px/1.3 var(--studio-text); letter-spacing: .12em; text-transform: uppercase; color: var(--concrete); }
}
@media (max-width: 480px) {
  .cta { font-size: 16px; padding: 16px 20px 15px; }
  .brand svg { height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
@media print {
  body::after, .hero-stage, .motion-toggle, .hero-caption, .hero-rotate, .slide-art { display: none !important; }
}
