:root {
  --bg: #09080d;
  --ink: #f6f0e6;
  --muted: #b7ab9a;
  --gold: #f0c36a;
  --hex-w: min(176px, 16vw, calc((100dvh - 200px) / 2.05));
  --hex-h: calc(var(--hex-w) * 1.145);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 214, 150, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 214, 150, 0.045) 1px, transparent 1px);
  background-size: 72px 42px, 72px 42px;
  background-position: center top;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.55) 100%);
}

.glow {
  position: fixed;
  width: 46vw;
  height: 46vw;
  max-width: 640px;
  max-height: 640px;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  opacity: 0.55;
}

.glow-a { top: -18vw; left: -10vw; background: radial-gradient(circle, rgba(240, 195, 106, 0.42), transparent 68%); }
.glow-b { top: -8vw; right: -16vw; background: radial-gradient(circle, rgba(255, 70, 98, 0.32), transparent 68%); }
.glow-c { bottom: -20vw; left: 30vw; background: radial-gradient(circle, rgba(70, 140, 255, 0.22), transparent 68%); }

.top, main, footer, .install { position: relative; z-index: 1; }

.top {
  flex: 0 0 auto;
  padding: 14px 16px 0;
  text-align: center;
}

.brand {
  margin: 0;
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: clamp(34px, 5.4vh, 64px);
  line-height: 0.9;
  letter-spacing: -1px;
  font-weight: 700;
}

.brand span { color: #e23d4a; }

.tag {
  display: inline-block;
  margin: 8px 0 0;
  padding: 4px 14px;
  border: 1px solid rgba(240, 195, 106, 0.7);
  background: linear-gradient(180deg, rgba(240, 195, 106, 0.2), rgba(240, 195, 106, 0.05));
  color: var(--gold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

.install {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: min(720px, calc(100% - 28px));
  flex: 0 0 auto;
  margin: 8px auto 0;
  padding: 6px 10px;
  border: 1px solid rgba(240, 195, 106, 0.35);
  border-radius: 14px;
  background: rgba(16, 14, 20, 0.82);
}

.install[hidden] { display: none; }

.install p { margin: 0; color: var(--muted); font-size: 14px; }

.install button, .apk {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

#btn-install, .apk {
  color: #1a1208;
  background: linear-gradient(180deg, #ffe1a4, var(--gold));
}

#btn-install-x {
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(246, 240, 230, 0.25);
}

main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.board { padding: 0 12px; }

.row {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.row.offset { margin-top: calc(var(--hex-h) * -0.23); }

.hex {
  position: relative;
  display: block;
  width: var(--hex-w);
  height: var(--hex-h);
  color: var(--ink);
  text-decoration: none;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.45));
  transition: transform 0.18s ease, filter 0.18s ease;
}

.hex::before,
.hex-face {
  position: absolute;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.hex::before {
  inset: 0;
  background: linear-gradient(160deg, #fff 0%, var(--accent) 28%, #3a2a18 100%);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.hex-face {
  inset: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10% 8% 12%;
  text-align: center;
  background:
    radial-gradient(80% 60% at 50% 12%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 70%),
    linear-gradient(180deg, #241e28, #100e14 72%);
}

.hex img {
  width: 38%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  background: #111;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 70%, white), 0 10px 18px rgba(0, 0, 0, 0.45);
}

.hex strong {
  font-size: clamp(13px, 1.7vh, 17px);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.hex em {
  font-style: normal;
  font-size: clamp(9px, 1.15vh, 11px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 55%, var(--ink));
}

.hex:hover, .hex:focus-visible {
  transform: translateY(-10px) scale(1.045);
  z-index: 3;
  filter: drop-shadow(0 18px 16px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 22px var(--accent));
  outline: none;
}

.hex:active { transform: translateY(-2px) scale(0.99); }

footer {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 0 16px 10px;
  text-align: center;
}

.apk { display: inline-block; margin-top: 0; padding: 8px 14px; }
.apk[hidden] { display: none; }

.ios, .fine {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.ios[hidden] { display: none; }

.fine { max-width: 520px; margin: 4px auto 0; font-size: 12px; }

@media (max-width: 760px) {
  body { height: auto; min-height: 100dvh; overflow: auto; }
  .row, .row.offset {
    flex-wrap: wrap;
    width: min(100%, 390px);
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    gap: 10px;
  }
  .row.offset { margin-top: 10px; }
  .hex {
    width: calc(50% - 6px);
    height: auto;
    aspect-ratio: 214 / 246;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hex { transition: none; }
}
