/* tnodes.org: dark, playful, mobile first. Fonts are self-hosted (no requests to other sites). */

@font-face {
  font-family: "Lilita One";
  src: url("../fonts/lilita-one-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/rubik-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  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: "Rubik";
  src: url("../fonts/rubik-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #0a0c16;
  --bg-alt: #10142a;
  --surface: #171c38;
  --surface-2: #1f2547;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4f6ff;
  --muted: #aab1d3;
  --accent: #5cf08f;      /* brand green, brightened for the dark background */
  --accent-ink: #052611;
  --sun: #ffd23f;
  --pink: #ff5c9a;
  --radius: 18px;
  --radius-sm: 12px;
  --gutter: 16px;
  --max: 1160px;
  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--body);
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: #8ff7b1; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; letter-spacing: 0.01em; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 880px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--sun); color: #000; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- header / footer ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 12, 22, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand img { height: 38px; width: auto; }
.brand-small img { height: 34px; margin-bottom: 10px; }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--text); text-decoration: none; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; transition: background 0.2s;
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a[aria-current="page"] { background: var(--surface-2); }

.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 40px 0 24px; margin-top: 0; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.legal { margin-top: 24px; font-size: 0.82rem; color: var(--muted); }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

/* ---------- buttons, badges, pills ---------- */
.button {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; text-decoration: none;
  padding: 12px 20px; border-radius: 999px;
  box-shadow: 0 4px 0 #2a9c55;
  transition: transform 0.15s, box-shadow 0.15s;
}
.button:hover { color: var(--accent-ink); transform: translateY(-2px); box-shadow: 0 6px 0 #2a9c55; }
.button:active { transform: translateY(2px); box-shadow: 0 2px 0 #2a9c55; }
.button-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--line); }
.button-ghost:hover { color: var(--text); box-shadow: inset 0 0 0 2px var(--accent); }

.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0; }
.badge { display: block; border-radius: 9px; transition: transform 0.15s; }
.badge:hover { transform: translateY(-2px); }
.badge img { height: 48px; width: auto; }
.badges-small .badge img { height: 40px; }
.soon {
  display: grid; grid-template-columns: auto; line-height: 1.2;
  padding: 8px 16px; border-radius: 12px; text-decoration: none;
  background: linear-gradient(135deg, var(--sun), #ff9d3f); color: #241500;
  box-shadow: 0 4px 0 #b86a14;
}
.soon:hover { color: #241500; }
.soon-kicker { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.soon-store { font-family: var(--display); font-size: 1.25rem; }
.badges-small .soon { padding: 6px 12px; }
.badges-small .soon-store { font-size: 1.05rem; }
.pill { position: absolute; top: 12px; left: 12px; font-weight: 700; font-size: 0.78rem; padding: 4px 10px; border-radius: 999px; }
.pill-soon { background: var(--sun); color: #241500; }

/* ---------- sections ---------- */
.section { padding: 48px 0; }
.section-tight { padding: 28px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-title { font-size: clamp(1.6rem, 5vw, 2.3rem); }
.page-head { padding: 40px 0 8px; }
.page-title { font-size: clamp(2.2rem, 9vw, 3.6rem); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.kicker { font-weight: 700; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sun); margin-bottom: 8px; }

/* ---------- home hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 64px; isolation: isolate; }
.hero-art {
  position: absolute; inset: -20px 0; z-index: -1;
  display: grid; align-content: center; gap: 14px;
  transform: rotate(-8deg) scale(1.15);
  opacity: 0.55;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 80% at 10% 40%, rgba(10, 12, 22, 0.96) 25%, rgba(10, 12, 22, 0.55) 70%, rgba(10, 12, 22, 0.3)),
    linear-gradient(to top, var(--bg) 0, transparent 30%);
}
.marquee { overflow: hidden; }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: slide 70s linear infinite; }
.marquee-rev .marquee-track { animation-direction: reverse; animation-duration: 85s; }
.tile { width: 180px; flex: none; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); aspect-ratio: 2 / 3; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
@keyframes slide { to { transform: translateX(-50%); } }
.hero-content { position: relative; }
.hero-title { font-size: clamp(2.6rem, 11vw, 5rem); max-width: 12ch; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); }
.hero-title::after { content: ""; display: block; width: 90px; height: 8px; margin-top: 18px; border-radius: 8px; background: linear-gradient(90deg, var(--accent), var(--sun), var(--pink)); }
.hero-text { font-size: 1.15rem; max-width: 40ch; color: #dfe3f7; }
@media (min-width: 900px) { .hero { padding: 110px 0 120px; } }

/* ---------- game cards ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } .grid-featured { grid-template-columns: repeat(2, 1fr); } }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); border-color: rgba(92, 240, 143, 0.35); }
.card-link { color: inherit; text-decoration: none; flex: 1; }
.card-link:hover { color: inherit; }
.card-media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.card-media img, .card-media video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { display: flex; align-items: center; gap: 14px; padding: 16px 16px 0; }
.card-icon { width: 64px; height: 64px; border-radius: 16px; margin-top: -40px; border: 3px solid var(--surface); background: var(--surface); flex: none; position: relative; }
.card-title { font-size: 1.3rem; margin: 0; }
.card-meta { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.card-text { padding: 10px 16px 0; margin: 0; color: #d4d9f0; }
.card .badges { padding: 0 16px 16px; margin: 14px 0 0; }

/* ---------- icon grid ---------- */
.icon-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px 12px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.icon-grid a { display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--text); text-decoration: none; font-size: 0.85rem; font-weight: 600; line-height: 1.25; }
.icon-tile { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); transition: transform 0.2s; }
.icon-grid a:hover .icon-tile { transform: translateY(-4px) rotate(-3deg); }
.icon-grid-small .icon-tile { width: 64px; height: 64px; border-radius: 16px; }
.icon-grid-small { margin-top: 32px; }

/* ---------- studio ---------- */
.studio { display: grid; gap: 28px; align-items: center; }
.studio-logo { width: 160px; border-radius: 32px; justify-self: start; }
.studio-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
@media (min-width: 800px) { .studio { grid-template-columns: 1fr 260px; } .studio-logo { width: 240px; justify-self: end; transform: rotate(4deg); } }

/* ---------- game page ---------- */
.game-hero { position: relative; isolation: isolate; padding-top: min(46vw, 420px); }
.game-hero-media { position: absolute; inset: 0 0 auto; height: min(62vw, 560px); z-index: -1; overflow: hidden; }
.game-hero-media img, .game-hero-media video { width: 100%; height: 100%; object-fit: cover; }
.game-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10, 12, 22, 0) 30%, rgba(10, 12, 22, 0.75) 70%, var(--bg)); }
.game-hero-content { display: grid; gap: 16px; padding-bottom: 12px; }
.game-icon { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); border: 3px solid rgba(255, 255, 255, 0.12); }
.game-title { font-size: clamp(2.2rem, 9vw, 4rem); margin-bottom: 8px; }
.game-tagline { font-size: 1.15rem; color: #dfe3f7; max-width: 50ch; }
@media (min-width: 800px) { .game-hero-content { grid-template-columns: auto 1fr; align-items: end; gap: 28px; } .game-icon { width: 140px; height: 140px; border-radius: 32px; } }

.facts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 24px 0 0; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.facts dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.facts dd { margin: 2px 0 0; font-weight: 600; }

.shots {
  --pad: var(--gutter);
  list-style: none; margin: 0; padding: 4px var(--pad) 16px;
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad);
  scrollbar-width: thin; scrollbar-color: var(--surface-2) transparent;
}
.shots li { flex: none; scroll-snap-align: start; }
.shots a { display: block; border-radius: var(--radius-sm); overflow: hidden; }
.shots img { height: 190px; width: auto; max-width: none; background: var(--surface); }
@media (min-width: 600px) { .shots img { height: 280px; } }
@media (min-width: 900px) {
  .shots { --pad: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
  .shots img { height: 380px; }
}

/* ---------- YouTube facade ---------- */
.yt { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.yt-short { aspect-ratio: 9 / 16; border-radius: var(--radius-sm); }
.yt img, .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.yt-play { position: absolute; inset: 0; display: grid; place-items: center; }
.yt-play svg { width: 68px; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5)); transition: transform 0.2s; }
.yt-bg { fill: #212121; fill-opacity: 0.85; transition: fill 0.2s, fill-opacity 0.2s; }
.yt:hover .yt-bg, .yt:focus-visible .yt-bg { fill: #f00; fill-opacity: 1; }
.yt:hover .yt-play svg { transform: scale(1.08); }
.video-note { color: var(--muted); font-size: 0.9rem; margin-top: 12px; }
.shorts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .shorts { grid-template-columns: repeat(4, 1fr); } }

/* ---------- prose, support, documents ---------- */
.prose { max-width: 70ch; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.35em; }
.contact-cards { display: grid; gap: 12px; margin-bottom: 40px; }
@media (min-width: 700px) { .contact-cards { grid-template-columns: repeat(2, 1fr); } }
.contact-card {
  display: grid; gap: 4px; padding: 18px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow-wrap: anywhere;
}
a.contact-card:hover { color: var(--text); border-color: var(--accent); }
.contact-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.contact-value { font-weight: 700; font-size: 1.08rem; }
.contact-hint { color: var(--muted); font-size: 0.88rem; }

.doc h1 { font-size: clamp(2rem, 8vw, 3.2rem); }
.prose-doc { max-width: none; }
.prose-doc h2 { font-size: clamp(1.4rem, 5vw, 1.9rem); margin-top: 1.8em; scroll-margin-top: 80px; }
.prose-doc h3 { font-size: 1.25rem; margin-top: 1.4em; scroll-margin-top: 80px; }
.prose-doc h1 .anchor, .prose-doc h2 .anchor, .prose-doc h3 .anchor { margin-left: 0.35em; color: var(--muted); text-decoration: none; opacity: 0; transition: opacity 0.15s; }
.prose-doc h2:hover .anchor, .prose-doc h3:hover .anchor, .prose-doc .anchor:focus { opacity: 1; }
@media (hover: none) { .prose-doc h2 .anchor, .prose-doc h3 .anchor { opacity: 0.5; } }
.prose-doc a { overflow-wrap: anywhere; }
.updated { color: var(--muted); }
.table-scroll { overflow-x: auto; margin: 1.2em 0 1.6em; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.table-scroll table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.93rem; }
.table-scroll th, .table-scroll td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table-scroll th { background: var(--surface-2); font-weight: 700; }
.table-scroll tr:nth-child(even) td { background: rgba(255, 255, 255, 0.025); }
.table-scroll tr:last-child td { border-bottom: 0; }

.notfound { text-align: left; padding-top: 72px; }

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