:root {
  color-scheme: dark;
  --bg: #000;
  --panel: #0a0a0a;
  --text: #f4f4f2;
  --muted: #a0a0a0;
  --faint: #7d7d7d;
  --hair: rgba(255, 255, 255, 0.1);
  --accent: #f7bb49;
  --accent-ink: #1d1503;
  --games: #50c8cd;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #2a2a2a transparent; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16.5px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba(247, 187, 73, 0.32); }
a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* Header: stays on top and frosts over the page once you scroll (script adds .scrolled). */
.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid transparent; transition: background-color 0.3s, border-color 0.3s; }
.site-header.scrolled {
  background: rgba(0, 0, 0, 0.75); border-bottom-color: var(--hair);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }

/* Wordmark: "til" + tile "o" + brand word, one line, one size. */
.logo { display: inline-flex; align-items: baseline; padding: 10px 0; text-decoration: none; color: var(--text); font-size: 28px; line-height: 1; letter-spacing: -0.02em; }
.logo .til { font-weight: 800; }
.logo .o {
  display: inline-block; width: 0.58em; height: 0.58em; margin: 0 0.05em 0 0.04em;
  border: 0.14em solid var(--accent); border-radius: 0.19em; transform: translateY(0.02em);
}
.logo .sub { font-weight: 500; color: var(--accent); margin-left: 0.24em; }
.logo.small { font-size: 21px; padding: 12px 0; }
nav { display: flex; align-items: center; gap: 4px; font-size: 14.5px; font-weight: 550; }
nav a { color: var(--muted); text-decoration: none; display: inline-block; padding: 12px 12px; transition: color 0.2s; }
nav a:hover { color: var(--text); }
nav .nav-cta { margin-left: 8px; padding: 11px 16px; border-radius: 10px; color: var(--text); border: 1px solid rgba(255, 255, 255, 0.18); transition: border-color 0.2s, background-color 0.2s; }
nav .nav-cta:hover { border-color: rgba(255, 255, 255, 0.34); background: rgba(255, 255, 255, 0.05); }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; min-height: min(78vh, 740px); padding: 32px 0 64px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 12.5px; font-weight: 650; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
.hero h1 { font-size: clamp(40px, 5.8vw, 70px); font-weight: 750; line-height: 1.04; letter-spacing: -0.04em; margin: 22px 0; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 19px; line-height: 1.6; color: var(--muted); margin: 0 0 34px; max-width: 30em; }
/* One gentle fade-in on load (the script adds .anim, then .on). */
.anim .hero-copy { opacity: 0; transform: translateY(12px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.anim .hero-copy.on { opacity: 1; transform: none; }

/* Hero tiles: a flat grid of rounded squares that fades into the black at its edges.
   The script now and then lights a dark tile softly, like a key being pressed. */
.tile-art { display: grid; place-items: center; }
.grid {
  --t: clamp(30px, 3.7vw, 54px);
  display: grid; grid-template-columns: repeat(7, var(--t)); grid-auto-rows: var(--t); gap: calc(var(--t) * 0.2); padding: calc(var(--t) * 0.6);
  -webkit-mask-image: radial-gradient(ellipse 58% 62% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 62% at 50% 50%, #000 62%, transparent 100%);
}
.grid i {
  border-radius: calc(var(--t) * 0.24); background: #0f0f0f; border: 1px solid #1f1f1f;
  transition: background-color 1.4s ease, border-color 1.4s ease, box-shadow 1.4s ease, transform 1.4s var(--ease);
}
.grid i.g { background: var(--accent); border-color: transparent; box-shadow: 0 0 calc(var(--t) * 0.7) rgba(247, 187, 73, 0.3); }
.grid i.c { background: var(--games); border-color: transparent; box-shadow: 0 0 calc(var(--t) * 0.7) rgba(80, 200, 205, 0.3); }
.grid i.lit { background: rgba(247, 187, 73, 0.24); border-color: rgba(247, 187, 73, 0.5); box-shadow: 0 0 calc(var(--t) * 0.5) rgba(247, 187, 73, 0.16); transform: scale(0.93); }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 12px;
  font-weight: 650; font-size: 16px; text-decoration: none; transition: background-color 0.2s, border-color 0.2s;
}
.btn.primary { color: var(--accent-ink); background: var(--accent); }
.btn.primary:hover { background: #ffc962; }
.btn.ghost { color: var(--text); border: 1px solid rgba(255, 255, 255, 0.18); }
.btn.ghost:hover { border-color: rgba(255, 255, 255, 0.34); background: rgba(255, 255, 255, 0.05); }
.btn .arr { display: inline-block; transition: transform 0.2s var(--ease); }
.btn:hover .arr { transform: translate(2px, -2px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Sections: a hairline over each title */
section { padding: 96px 0 0; scroll-margin-top: 84px; }
h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; margin: 0 0 28px; padding-top: 28px; border-top: 1px solid var(--hair); }

.panel { background: var(--panel); border: 1px solid var(--hair); border-radius: 18px; }
.tiles { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
.tile { padding: 30px; }
/* Small ring mark, the logo's "o" */
.mark { display: block; width: 22px; height: 22px; border: 5px solid var(--accent); border-radius: 7px; margin-bottom: 22px; }
.mark.games { border-color: var(--games); }
.tile h3 { margin: 0 0 8px; font-size: 20px; font-weight: 650; letter-spacing: -0.015em; }
.tile p { margin: 0 0 6px; color: var(--muted); }
.tile a { display: inline-flex; gap: 8px; padding: 11px 0; font-weight: 650; text-decoration: none; }
.tile a.games { color: var(--games); }

/* Company details as a spec sheet with hairline rows */
.details { padding: 6px 30px; }
dl { display: grid; grid-template-columns: 240px 1fr; margin: 0; }
dt, dd { margin: 0; padding: 17px 0; border-top: 1px solid var(--hair); line-height: 27px; }
dl > dt:first-of-type, dl > dt:first-of-type + dd { border-top: 0; }
dt { color: var(--faint); font-size: 14.5px; }
/* Stand-alone links get a 44px tall tap area without spreading the rows. */
dd a { display: inline-block; padding: 11px 0; margin: -11px 0; }

.site-footer { margin-top: 128px; border-top: 1px solid var(--hair); }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 24px; padding-bottom: 44px; color: var(--faint); font-size: 14px; }
.foot p { margin: 0; }

/* Text pages (404) */
.doc { max-width: 700px; padding: 40px 0 8px; }
.doc h1 { font-size: 40px; letter-spacing: -0.03em; margin: 0 0 8px; }

@media (prefers-reduced-motion: reduce) {
  .grid i { transition: none; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 8px; padding: 8px 0 32px; }
  .tile-art { order: -1; }
  .grid { --t: min(46px, calc((100vw - 40px) / 9.6)); }
  .tiles { grid-template-columns: 1fr; }
  section { padding-top: 64px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .bar { height: 64px; }
  .logo { font-size: 24px; }
  nav a:not(.nav-cta) { display: none; }
  .tile { padding: 24px; }
  .details { padding: 6px 22px; }
  dl { grid-template-columns: 1fr; }
  dt { padding-bottom: 0; }
  dd { border-top: 0; padding-top: 4px; }
}
