:root {
  --bg: #0a0a0b;
  --tile: #141416;
  --tile-hover: #1a1a1d;
  --border: #262629;
  --text: #f5f5f5;
  --muted: #8a8a90;
  --faint: #56565c;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: 100%;
  max-width: 940px;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  margin-bottom: 40px;
}

.hero__title {
  font-size: clamp(2.75rem, 8vw, 5rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.hero__title span {
  display: block;
}

.hero__subtitle {
  margin-top: 14px;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

/* Row 1: two large tiles (span 3) — Row 2: three small tiles (span 2) */
.tile--lg {
  grid-column: span 3;
  aspect-ratio: 3 / 2;
}

.tile--sm {
  grid-column: span 2;
  aspect-ratio: 1 / 1;
}

/* ---------- Tile ---------- */
.tile {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 16px;
  background: var(--tile);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  isolation: isolate;
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

.tile:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: var(--tile-hover);
  transform: translateY(-2px);
}

/* ---------- Dithered hover wash ---------- */
.tile__dither {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--accent);
  opacity: 0;
  transition: opacity 0.35s ease;
  /* Ordered-dither checkerboard: 3px pixels reading as a 50% dither texture,
     faded from the bottom edge upward so the wash dissolves into the tile. */
  -webkit-mask-image:
    repeating-conic-gradient(#000 0% 25%, transparent 0% 50%),
    linear-gradient(to top, #000 0%, transparent 92%);
  mask-image:
    repeating-conic-gradient(#000 0% 25%, transparent 0% 50%),
    linear-gradient(to top, #000 0%, transparent 92%);
  -webkit-mask-size: 6px 6px, 100% 100%;
  mask-size: 6px 6px, 100% 100%;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.tile:hover .tile__dither {
  opacity: 0.5;
}

/* ---------- Tile bits ---------- */
.tile__label {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.tile__logo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: transform 0.3s ease, color 0.3s ease;
}

.tile__logo svg {
  width: 46px;
  height: 46px;
}

.tile--lg .tile__logo svg {
  width: 58px;
  height: 58px;
}

.tile:hover .tile__logo {
  transform: scale(1.06);
}

.tile__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.tile--lg .tile__name {
  font-size: 17px;
}

/* ---------- Empty / coming-soon tiles ---------- */
.tile--empty {
  cursor: default;
  border-style: dashed;
}

.tile--empty .tile__label {
  color: var(--faint);
}

.tile--empty:hover {
  transform: none;
  border-color: var(--border);
  background: var(--tile);
}

.tile--empty:hover .tile__dither {
  opacity: 0.16;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body {
    padding: 32px 18px;
    align-items: flex-start;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .tile--lg,
  .tile--sm {
    grid-column: span 1;
    aspect-ratio: 1 / 1;
  }

  /* First tile spans the full width so the remaining four pair up evenly */
  .grid > .tile:first-child {
    grid-column: span 2;
    aspect-ratio: 3 / 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tile,
  .tile__dither,
  .tile__logo {
    transition: none;
  }
}
