/* Unit Eleven Games — studio site styles.
   No external fonts, scripts or trackers: the studio page makes the same promise
   the games do, and it loads instantly. Type is the system face (SF Pro on Apple
   devices); the only display lettering is the custom logotype, served as SVG. */

:root {
  --night: #0b0d12;         /* midnight */
  --surface: #121620;
  --surface-2: #1a1f2b;     /* graphite */
  --line: rgba(213, 219, 227, 0.10);
  --text: #eef1f5;          /* frost */
  --muted: #9aa5b5;
  --accent: #3aa8f0;        /* crystal */
  --accent-deep: #1d4f9e;   /* sapphire */
  --accent-text: #6cc4f7;
  --ice: #a8f1ff;
  --lagoon: #34c3ba;
  --signal: #ff6b6b;
  --on-accent: #06121f;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --glow: radial-gradient(55% 60% at 70% 30%, rgba(58, 168, 240, 0.20), transparent 70%);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --night: #eef1f5;       /* frost */
    --surface: #ffffff;
    --surface-2: #e3e8ee;
    --line: rgba(15, 34, 66, 0.12);
    --text: #0f2242;        /* navy */
    --muted: #4f5d73;
    --accent: #1d4f9e;
    --accent-deep: #0f2242;
    --accent-text: #1d4f9e;
    --lagoon: #1f8f88;
    --signal: #c93636;
    --on-accent: #ffffff;
    --shadow: 0 18px 44px rgba(15, 34, 66, 0.12);
    --glow: radial-gradient(55% 60% at 70% 30%, rgba(52, 195, 186, 0.20), transparent 70%);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
        "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--text); }

img, svg { display: block; max-width: 100%; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 740px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--accent); color: #ffffff; padding: 8px 12px; border-radius: 8px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--night) 85%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px; flex-wrap: wrap;
}

.brand {
  display: inline-flex; align-items: center; gap: 11px;
  text-decoration: none; color: var(--text);
}
.brand img { height: 40px; width: auto; }

.site-header nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-header nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 7px 12px; border-radius: 999px;
}
.site-header nav a:hover { color: var(--text); background: var(--surface-2); }
.site-header nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

/* ---------- type ---------- */

h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif; line-height: 1.08; letter-spacing: -0.022em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.3rem, 6vw, 4.1rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 750; }
p { margin: 0 0 1em; }

.eyebrow {
  display: inline-block; margin-bottom: 14px;
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--accent-text);
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 38em; }
.muted { color: var(--muted); }

/* ---------- sections ---------- */

section { padding: 76px 0; }
section + section { border-top: 1px solid var(--line); }

.hero { position: relative; padding: 96px 0 84px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--glow); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 .accent { color: var(--accent-text); }
.hero-mark { justify-self: center; width: min(440px, 80vw); filter: drop-shadow(0 30px 50px rgba(0,0,0,.35)); }
.hero-mark img { width: 100%; height: auto; }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 750; text-decoration: none; font-size: 1rem;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep)); color: #ffffff;
  box-shadow: 0 8px 24px rgba(58, 168, 240, 0.28);
}
.btn:hover { color: #ffffff; filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--surface-2); }

/* ---------- game card ---------- */

.game {
  display: grid; grid-template-columns: 180px 1fr; gap: 36px; align-items: center;
  padding: 36px; border-radius: 28px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.game .icon { width: 180px; height: 180px; border-radius: 40px; overflow: hidden; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.game .icon img { width: 100%; height: 100%; }
.game h3 { font-size: 1.9rem; margin-bottom: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }
.chip {
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted);
}
.chip.live { color: var(--accent-text); }
.links { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 650; font-size: 0.95rem; }

.next {
  margin-top: 20px; padding: 22px 26px; border-radius: 20px;
  border: 1.5px dashed var(--line); color: var(--muted);
  display: flex; align-items: center; gap: 14px;
}
.next img { height: 34px; width: auto; }

/* ---------- principles ---------- */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 32px; }
.card {
  padding: 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
}
.card .num {
  font-weight: 800; font-size: 0.8rem; letter-spacing: 0.2em; color: var(--accent-text); margin-bottom: 10px; display: block;
}
.card p { color: var(--muted); margin: 0; }

/* ---------- company facts ---------- */

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
dl.kv { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 12px 24px; }
dl.kv dt { color: var(--muted); font-weight: 600; }
dl.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.facts > *, .split > *, .hero .wrap > * { min-width: 0; }
.btn { max-width: 100%; overflow-wrap: anywhere; }

.placeholder {
  background: rgba(255, 107, 107, 0.14); color: var(--signal);
  border-radius: 6px; padding: 0 6px; font-weight: 700;
}

/* ---------- prose pages ---------- */

.prose { padding: 64px 0 84px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.prose h2 { font-size: 1.35rem; margin-top: 2em; }
.prose p, .prose li { color: var(--text); }
.prose .updated { color: var(--muted); font-size: 0.95rem; }

/* ---------- brand book ---------- */

.book-hero { padding: 88px 0 72px; position: relative; overflow: hidden; background: #07090d; color: #eef1f5; }
.book-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(45% 60% at 50% 38%, rgba(58,168,240,.24), transparent 70%); }
.book-hero .wrap { position: relative; text-align: center; }
.book-hero img.lockup { width: min(560px, 86vw); margin: 0 auto 40px; }
.book-hero .lead { margin: 0 auto; color: #9aa5b5; }
.book-hero .eyebrow { color: #6cc4f7; }
.book-hero .btn-row { justify-content: center; }
.book-hero .btn.ghost { color: #eef1f5; box-shadow: inset 0 0 0 1.5px rgba(213,219,227,.2); }

.toc { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 34px; }
.toc a { font-size: .85rem; font-weight: 650; color: #9aa5b5; text-decoration: none; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.06); }
.toc a:hover { color: #eef1f5; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.figure { border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.figure img { width: 100%; height: auto; }
.figure figcaption, .caption { padding: 14px 18px; font-size: .9rem; color: var(--muted); }

.logo-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 28px; }
.logo-tile { border-radius: 20px; border: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.logo-tile .stage { height: 220px; display: grid; place-items: center; padding: 28px; }
.logo-tile .stage img { max-height: 100%; max-width: 100%; }
.logo-tile .stage.dark { background: #0b0d12; }
.logo-tile .stage.frost { background: #eef1f5; }
.logo-tile .stage.crystal { background: linear-gradient(135deg, #3aa8f0, #1d4f9e); }
.logo-tile .stage.photo { background: linear-gradient(135deg, #34c3ba, #0f2242); }
.logo-tile .cap { padding: 13px 16px; font-size: .9rem; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.logo-tile .cap b { font-weight: 700; }
.logo-tile .cap span { color: var(--muted); }

.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.rule { border-radius: 20px; border: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.rule .stage { height: 150px; display: grid; place-items: center; background: #0b0d12; overflow: hidden; position: relative; }
.rule .stage img { height: 70px; width: auto; }
.rule .stage::after { content: "✕"; position: absolute; top: 10px; right: 12px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; background: #ff6b6b; color: #fff; }
.rule p { margin: 0; padding: 12px 16px; font-size: .92rem; color: var(--muted); }
.rule .stretch img { transform: scaleX(1.5); }
.rule .recolor img { filter: hue-rotate(150deg) saturate(1.6); }
.rule .rotate img { transform: rotate(-14deg); }
.rule .effects img { filter: drop-shadow(0 0 10px #ff4fd8) drop-shadow(4px 6px 0 #ffcc52); }
.rule .busy { background: repeating-linear-gradient(45deg, #34c3ba 0 14px, #eef1f5 14px 28px); }
.rule .retype { font: 800 44px/1 Impact, "Arial Black", sans-serif; color: #d5dbe3; letter-spacing: .02em; }
.rule .retype::after { }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 28px; }
.swatch { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.swatch .chipc { height: 110px; }
.swatch .meta { padding: 12px 14px; font-size: .84rem; line-height: 1.5; }
.swatch .meta b { display: block; font-size: 1rem; }
.swatch code { color: var(--muted); font-size: .82rem; }
.ratio { display: flex; height: 44px; border-radius: 14px; overflow: hidden; margin-top: 22px; border: 1px solid var(--line); }
.ratio div { display: grid; place-items: center; font-size: .78rem; font-weight: 700; }

.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.type-spec { padding: 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.type-spec .role { font-size: .74rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--accent-text); }
.type-spec .sample-display { font: 800 3.1rem/1 -apple-system, "SF Pro Display", Inter, sans-serif; letter-spacing: -.03em; margin: 14px 0 10px; }
.type-spec .sample-text { font-size: 1.05rem; margin: 14px 0 10px; }
.type-spec .logotype { margin: 18px 0 12px; }
.type-spec .logotype img { height: 54px; width: auto; }
.type-spec p.muted { margin: 0; font-size: .92rem; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 28px; }
.gallery figure { margin: 0; }
.gallery figure.wide { grid-column: 1 / -1; }
.gallery img { border-radius: 18px; width: 100%; height: auto; border: 1px solid var(--line); }
.gallery figcaption { font-size: .9rem; color: var(--muted); padding: 10px 4px 0; }
.gallery figcaption b { color: var(--text); }

.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 24px; }
.downloads a { display: block; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); font-weight: 650; }
.downloads a span { display: block; font-weight: 500; font-size: .86rem; color: var(--muted); }
.downloads a:hover { border-color: var(--accent); }

@media (max-width: 820px) {
  .split, .type-grid, .gallery { grid-template-columns: 1fr; }
  .rules { grid-template-columns: 1fr 1fr; }
}

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 44px 0 56px; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
.site-footer h4 { color: var(--text); margin: 0 0 10px; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 22px; font-size: 0.84rem; }

/* ---------- small screens ---------- */

@media (max-width: 820px) {
  .hero { padding: 56px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .hero-mark { order: -1; width: min(300px, 78vw); justify-self: start; }
  .game { grid-template-columns: 1fr; padding: 24px; gap: 20px; }
  .game .icon { width: 112px; height: 112px; border-radius: 26px; }
  .grid-3, .facts { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .wrap > :first-child { grid-column: 1 / -1; }
  section { padding: 56px 0; }
}

@media (max-width: 520px) {
  .site-header .wrap { padding-top: 10px; padding-bottom: 10px; }
  .site-header nav a { padding: 6px 9px; font-size: 0.9rem; }
}
