/* Graycells site: a clean, product-first look. One stylesheet, system fonts, no external assets. */
:root {
  --bg: #ffffff;
  --band: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --link: #0066cc;
  --rule: #d2d2d7;
  --nav: rgba(251, 251, 253, 0.8);
  --tile-dark: #000000;
  --tile-dark-text: #f5f5f7;
  --radius: 22px;
  --guzhi: #8a2b1f;
  --guzhi-accent: #e8871e;
  --uhloud: #6d28d9;
  --layers: #2f6bd0;
  --ballpark: #2a7047;
  --sincewhen: #7a3b78;
  --duenorth: #b83a22;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --band: #161617;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --link: #2997ff;
    --rule: #424245;
    --nav: rgba(22, 22, 23, 0.8);
    --tile-dark: #1d1d1f;
    --guzhi: #f0a36b;
    --uhloud: #b69cff;
    --layers: #8fb3f0;
    --ballpark: #5cc48a;
    --sincewhen: #e39bdf;
    --duenorth: #f0533a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* Top bar */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--nav);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent);
}
.nav .inner {
  max-width: 1024px; margin: 0 auto; padding: 0 22px;
  height: 48px; display: flex; align-items: center; gap: 28px;
}
.nav .brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 19px; color: var(--text); letter-spacing: -0.02em; margin-right: auto; }
.nav .brand:hover { text-decoration: none; }
.nav a.item { color: var(--text); opacity: 0.8; font-size: 13px; letter-spacing: -0.01em; }
.nav a.item:hover { opacity: 1; text-decoration: none; }
@media (max-width: 600px) {
  .nav .inner { gap: 16px; }
  .nav a.item.wide { display: none; }
}

/* Hero */
.hero { text-align: center; padding: 88px 22px 64px; }
.hero h1 {
  font-size: clamp(48px, 9vw, 96px); line-height: 1.05; font-weight: 700;
  letter-spacing: -0.015em; margin: 0 0 16px;
}
.hero p.lede {
  font-size: clamp(21px, 2.6vw, 28px); line-height: 1.25; font-weight: 400;
  color: var(--muted); max-width: 760px; margin: 0 auto; letter-spacing: 0.004em;
}
.hero .icon { width: 128px; height: 128px; border-radius: 28px; margin: 0 auto 24px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }

/* Links with chevrons */
.links { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; margin-top: 22px; font-size: 19px; }
.chev::after { content: " ›"; }

/* Full-width tiles */
.tiles { display: grid; gap: 12px; padding: 12px; max-width: 1400px; margin: 0 auto; }
.tile {
  background: var(--band); border-radius: var(--radius);
  text-align: center; padding: 64px 28px 56px; overflow: hidden;
}
.tile.dark { background: var(--tile-dark); color: var(--tile-dark-text); }
.tile h2 { font-size: clamp(36px, 5.5vw, 56px); line-height: 1.07; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.005em; }
.tile p.sub { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.25; margin: 0 auto; max-width: 640px; color: var(--muted); }
.tile.dark p.sub { color: #a1a1a6; }
.tile .icons { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; margin-top: 36px; }
.tile .icons img { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 10px 26px rgba(0,0,0,0.35); }
@media (max-width: 480px) {
  .tile .icons { gap: 14px; }
  .tile .icons img { width: 68px; height: 68px; border-radius: 16px; }
}
.badge {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 4px 12px; margin-bottom: 16px;
}
.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }

/* Product tiles on Games */
.product .appicon { width: 112px; height: 112px; border-radius: 26px; margin: 0 auto 22px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.2); }
.product h2 { font-size: clamp(34px, 4.5vw, 48px); }
.product.guzhi h2 { color: var(--guzhi); }
.product.uhloud h2 { color: var(--uhloud); }
.product.layers h2 { color: var(--layers); }
.product.ballpark h2 { color: var(--ballpark); }
.product.sincewhen h2 { color: var(--sincewhen); }
.product.duenorth h2 { color: var(--duenorth); }

/* Where a game runs: iPhone app or in the browser */
.platform { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.platform svg { width: 14px; height: 14px; flex: none; }

/* Small iPhone mark on a home-page game icon */
.tile .icons a, .tile .icons span.soon { position: relative; display: block; }
.tile .icons .mark { position: absolute; right: -6px; bottom: -6px; width: 28px; height: 28px;
  border-radius: 50%; background: var(--bg); color: var(--text); border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.tile .icons .mark svg { width: 14px; height: 14px; }
/* Game name label on hover or focus */
.tile .icons [data-name]::after {
  content: attr(data-name); position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 2;
  transform: translate(-50%, 4px); white-space: nowrap; pointer-events: none;
  font-size: 13px; font-weight: 600; line-height: 1; padding: 7px 10px; border-radius: 8px;
  background: var(--text); color: var(--bg); box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0; transition: opacity .15s, transform .15s;
}
.tile .icons [data-name]:hover::after, .tile .icons [data-name]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .tile .icons [data-name]::after { transition: none; } }
@media (max-width: 480px) {
  .tile .icons .mark { width: 22px; height: 22px; right: -4px; bottom: -4px; }
  .tile .icons .mark svg { width: 11px; height: 11px; }
}

/* Screenshot */
.shot { max-width: 1100px; margin: 8px auto 0; padding: 0 22px; }
.shot img { border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,0.22); }
.shot .cap { text-align: center; color: var(--muted); font-size: 14px; margin-top: 14px; }

/* Reading sections */
.section { max-width: 760px; margin: 0 auto; padding: 64px 22px; }
.section.band { max-width: none; background: var(--band); }
.section.band > .in { max-width: 760px; margin: 0 auto; }
.section h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; margin: 0 0 20px; font-weight: 700; }
.section h3 { font-size: 21px; margin: 32px 0 8px; }
.section p { margin: 0 0 14px; }

/* FAQ */
details { border-bottom: 1px solid var(--rule); padding: 18px 0; }
details:first-of-type { border-top: 1px solid var(--rule); }
summary { cursor: pointer; font-weight: 600; font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 24px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin: 12px 0 0; color: var(--muted); }

/* Contact */
.contact { text-align: center; }
.contact .big { font-size: clamp(21px, 2.6vw, 28px); }

/* Long-form (privacy) */
.doc { max-width: 700px; margin: 0 auto; padding: 24px 22px 72px; }
.doc h2 { font-size: 24px; margin: 40px 0 10px; }
.doc .card { background: var(--band); border-radius: 18px; padding: 22px 26px; margin-top: 40px; }
.doc .card h2 { margin-top: 0; }

/* Footer */
.footer { background: var(--band); color: var(--muted); font-size: 12px; line-height: 1.5; }
.footer .inner { max-width: 1024px; margin: 0 auto; padding: 22px; }
.footer .row { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  border-top: 1px solid var(--rule); padding-top: 14px; margin-top: 14px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }

/* A grid nested in the tiles grid (the two "Coming soon" tiles) spans the full width like its siblings. */
.tiles .tiles { width: 100%; max-width: none; margin: 0; }

/* Trailer overlay (Games page) */
dialog.trailer { padding: 0; border: 0; background: #000; width: min(1100px, calc(100vw - 32px)); max-width: none;
  border-radius: 14px; overflow: visible; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
dialog.trailer::backdrop { background: rgba(0,0,0,0.78); }
dialog.trailer video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; background: #000; }
dialog.trailer .close { position: absolute; top: -44px; right: 0; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,0.16); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
dialog.trailer .close:hover, dialog.trailer .close:focus-visible { background: rgba(255,255,255,0.3); }
