/* ============================================================
   AtTheTable — official website styles
   Design source of truth: the AtTheTable iOS app (HubGames).
   Dark navy base, restrained gold ambient light, glass surfaces.
   ============================================================ */

:root {
  --bg: #070809;
  --bg-top: #0a0e18;
  --surface: #0e121c;
  --surface-2: #141a26;
  --card: rgba(20, 26, 38, 0.62);
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);
  --text: #f8f9fb;
  --text-2: #a8b0c2;
  --text-3: rgba(168, 176, 194, 0.55);
  --accent: #ebd080;
  --accent-fg: #12151e;
  --gold-mark: #cfaf7a;
  --radius: 24px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Inter", system-ui, sans-serif;
  --gutter: 24px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Scroll lock while the mobile menu is open.
   overflow:hidden on the root disables position:sticky, so the header
   is pinned with fixed positioning while the lock is active — the
   menu panel hangs below it and stays visible at any scroll depth. */

html.scroll-locked {
  overflow: hidden;
}

html.scroll-locked .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

/* ---- Ambient atmosphere (CSS-only, static + very slow breathe) ---- */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(
      900px circle at 50% -18%,
      rgba(235, 208, 128, 0.12),
      transparent 62%
    ),
    radial-gradient(
      700px circle at 18% 92%,
      rgba(235, 208, 128, 0.06),
      transparent 60%
    ),
    radial-gradient(
      1100px circle at 105% 35%,
      rgba(20, 26, 38, 0.85),
      transparent 70%
    ),
    linear-gradient(180deg, var(--bg-top), var(--bg) 55%);
  animation: breathe 16s ease-in-out infinite alternate;
}

@keyframes breathe {
  from {
    opacity: 0.78;
  }
  to {
    opacity: 1;
  }
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  body::before {
    animation: none;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---- Horizontal gutter ----
   Every section content container shares the same safe horizontal
   padding. Sections themselves stay full-width (for backgrounds);
   the inner .container carries the padding-inline. */

@media (max-width: 430px) {
  :root {
    --gutter: 20px;
  }
}

@media (max-width: 360px) {
  :root {
    --gutter: 16px;
  }
}

/* ---- Layout ---- */

.container {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 10px 16px;
  border-radius: 0 0 12px 0;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

/* ---- Language flash prevention ----
   lang-init.js sets .lang-boot on <html> only when the saved
   language is Russian. Translated nodes stay invisible until
   i18n.js applies the Russian text and removes the class.
   Layout space is preserved (visibility, not display). */

html.lang-boot [data-i18n] {
  visibility: hidden;
}

/* ---- Header / navigation ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 8, 9, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.brand img {
  width: 28px;
  height: 28px;
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}

.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 2px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
}

.nav-links a[aria-current="page"] {
  color: var(--accent);
}

/* ---- Language switcher ---- */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  padding: 11px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.lang-switch button:hover:not([aria-pressed="true"]),
.lang-switch button:focus-visible:not([aria-pressed="true"]) {
  color: var(--text);
}

.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-fg);
}

/* ---- Mobile navigation toggle (hamburger) ---- */

.nav-toggle {
  display: none;
  appearance: none;
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transform: translateX(-50%);
  transition: transform 0.22s ease, opacity 0.18s ease, top 0.22s ease;
}

.nav-toggle .bars {
  top: 50%;
  margin-top: -1px;
}

.nav-toggle .bars::before {
  top: -5px;
}

.nav-toggle .bars::after {
  top: 5px;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.07);
}

.site-nav.is-open .nav-toggle .bars {
  background: transparent;
}

.site-nav.is-open .nav-toggle .bars::before {
  top: 0;
  transform: translateX(-50%) rotate(45deg);
}

.site-nav.is-open .nav-toggle .bars::after {
  top: 0;
  transform: translateX(-50%) rotate(-45deg);
}

@media (max-width: 700px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    flex-wrap: nowrap;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 51;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: rgba(14, 18, 28, 0.97);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    backdrop-filter: blur(12px) saturate(1.2);
    border-bottom: 1px solid var(--border-strong);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .site-nav.is-open .nav-links {
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 58px;
    padding: 0;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child a {
    border-bottom: 0;
  }

  .nav-links a:hover {
    color: var(--accent);
  }

  .lang-switch {
    margin-left: auto;
  }

  .lang-switch button {
    padding: 8px 10px;
    font-size: 0.62rem;
  }
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 18px;
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    background-color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: 0 10px 40px rgba(235, 208, 128, 0.16);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 48px rgba(235, 208, 128, 0.26);
}

.btn-primary:active {
  transform: translateY(0) scale(0.97);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}

.btn:focus-visible,
.nav-toggle:focus-visible,
.nav-links a:focus-visible,
.brand:focus-visible,
.card-link:focus-visible,
.footer-nav a:focus-visible,
.legal a:focus-visible,
.lang-switch button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---- Hero ---- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: clamp(56px, 10vw, 88px) clamp(40px, 8vw, 64px);
}

.hero-mark {
  width: 76px;
  height: 76px;
  margin-bottom: 24px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.75rem, 8vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.04;
}

.hero .tagline {
  margin: 0 0 18px;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.hero p {
  margin: 0 auto clamp(24px, 7vw, 32px);
  max-width: 560px;
  color: var(--text-2);
  font-size: clamp(0.95rem, 4vw, 1.02rem);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero .actions {
  margin-bottom: 18px;
}

.hero .caption {
  margin: 0;
  color: var(--text-3);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ---- Section headings ---- */

.kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-title {
  margin: 0 0 14px;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-lead {
  margin: 0;
  color: var(--text-2);
  max-width: 620px;
}

/* ---- Games grid ---- */

.games {
  padding-block: clamp(48px, 10vw, 64px) clamp(32px, 6vw, 40px);
  scroll-margin-top: 84px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: clamp(24px, 6vw, 36px);
}

@media (max-width: 560px) {
  .games-grid {
    grid-template-columns: 1fr;
  }
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    340px circle at 90% 8%,
    var(--card-glow, rgba(235, 208, 128, 0.1)),
    transparent 65%
  );
}

.game-card > * {
  position: relative;
}

.game-chip {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--chip-border, rgba(255, 255, 255, 0.1));
  background: rgba(255, 255, 255, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.game-chip::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--card-accent, var(--accent));
  opacity: 0.85;
}

.game-card h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.game-card .game-tag {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--card-accent, var(--accent));
}

.game-card .game-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.55;
}

.game-meta {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  flex-wrap: wrap;
}

.game-meta span {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px;
}

/* Per-game accents (from HubGames/src/theme/colors.ts) */

.game-card[data-accent="crocodile"] {
  --card-accent: #5dd48a;
  --card-glow: rgba(93, 212, 138, 0.11);
  --chip-border: rgba(93, 212, 138, 0.22);
}
.game-card[data-accent="alias"] {
  --card-accent: #9c84ff;
  --card-glow: rgba(156, 132, 255, 0.12);
  --chip-border: rgba(156, 132, 255, 0.22);
}
.game-card[data-accent="mafia"] {
  --card-accent: #c24050;
  --card-glow: rgba(194, 64, 80, 0.12);
  --chip-border: rgba(194, 64, 80, 0.22);
}
.game-card[data-accent="spy"] {
  --card-accent: #4682b4;
  --card-glow: rgba(70, 130, 180, 0.12);
  --chip-border: rgba(70, 130, 180, 0.22);
}
.game-card[data-accent="never-have-i-ever"] {
  --card-accent: #b19cd9;
  --card-glow: rgba(177, 156, 217, 0.12);
  --chip-border: rgba(177, 156, 217, 0.22);
}
.game-card[data-accent="truth-or-dare"] {
  --card-accent: #ff7d6b;
  --card-glow: rgba(255, 125, 107, 0.12);
  --chip-border: rgba(255, 125, 107, 0.22);
}
.game-card[data-accent="most-likely-to"] {
  --card-accent: #ffb347;
  --card-glow: rgba(255, 179, 71, 0.12);
  --chip-border: rgba(255, 179, 71, 0.22);
}
.game-card[data-accent="would-you-rather"] {
  --card-accent: #ff8c69;
  --card-glow: rgba(255, 140, 105, 0.12);
  --chip-border: rgba(255, 140, 105, 0.22);
}
.game-card[data-accent="heads-up"] {
  --card-accent: #f5a623;
  --card-glow: rgba(245, 166, 35, 0.13);
  --chip-border: rgba(245, 166, 35, 0.24);
}

/* ---- About strip ---- */

.about {
  padding-block: clamp(48px, 10vw, 64px) clamp(32px, 6vw, 40px);
}

.about-panel {
  border-radius: 28px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 36px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}

.about-panel h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.about-panel p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.55;
}

/* ---- Closing CTA strip ---- */

.cta-strip {
  text-align: center;
  padding-block: clamp(56px, 12vw, 72px)
    calc(clamp(64px, 14vw, 96px) + env(safe-area-inset-bottom));
}

.cta-strip h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cta-strip p {
  margin: 0 auto 30px;
  max-width: 480px;
  color: var(--text-2);
}

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0 calc(52px + env(safe-area-inset-bottom));
  background: rgba(10, 14, 24, 0.5);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}

.footer-brand img {
  width: 26px;
  height: 26px;
}

.footer-nav {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-copy {
  margin: 0;
  color: var(--text-3);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

/* ---- Legal pages (privacy / terms) ---- */

.legal {
  max-width: 720px;
  margin-inline: auto;
  padding: 56px max(var(--gutter), env(safe-area-inset-left))
    calc(88px + env(safe-area-inset-bottom));
}

.legal h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.1;
}

.legal .legal-meta {
  margin: 0 0 44px;
  color: var(--text-3);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.legal section {
  margin-bottom: 36px;
}

.legal h2 {
  margin: 0 0 12px;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.legal p {
  margin: 0 0 14px;
  font-size: 0.97rem;
  line-height: 1.75;
  color: var(--text-2);
}

.legal p strong {
  color: var(--text);
  font-weight: 600;
}

.legal ul {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.legal ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 0.97rem;
  line-height: 1.7;
  color: var(--text-2);
}

.legal ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}

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

.legal a:hover {
  color: var(--gold-mark);
}

.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  color: var(--gold-mark);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
}

/* ---- Support page ---- */

.support {
  max-width: 720px;
  margin-inline: auto;
  padding: 64px max(var(--gutter), env(safe-area-inset-left))
    calc(96px + env(safe-area-inset-bottom));
}

.support h1 {
  margin: 0 0 18px;
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.028em;
}

.support .support-lead {
  margin: 0 0 40px;
  color: var(--text-2);
  font-size: 1.02rem;
  max-width: 560px;
}

.support-card {
  border-radius: 28px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 34px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  margin-bottom: 28px;
}

.support-card h2 {
  margin: 0 0 16px;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.support-card p {
  margin: 0 0 14px;
  color: var(--text-2);
  font-size: 0.97rem;
  line-height: 1.7;
}

.support-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.support-card ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 0.97rem;
  line-height: 1.7;
  color: var(--text-2);
}

.support-card ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}

.support-card .support-email {
  color: var(--text);
  font-weight: 600;
}

.support-card a.support-email {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.support-actions {
  margin-top: 24px;
}

.support-note {
  color: var(--text-3);
  font-size: 0.82rem;
  line-height: 1.6;
}

.support-note strong {
  color: var(--text-2);
  font-weight: 600;
}

/* ---- 404 ---- */

.notfound {
  text-align: center;
  padding-block: clamp(72px, 18vw, 110px)
    calc(clamp(88px, 22vw, 140px) + env(safe-area-inset-bottom));
}

.notfound .code {
  margin: 0 0 16px;
  color: var(--text-3);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.notfound h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.028em;
}

.notfound p {
  margin: 0 auto 34px;
  max-width: 420px;
  color: var(--text-2);
}

/* ---- Responsive tweaks ---- */

/* Full-viewport hero on desktop and large tablets only.
   On phones the hero flows naturally with its content. */
@media (min-width: 641px) {
  .hero {
    justify-content: center;
    min-height: calc(100svh - 64px);
  }
}

@media (max-width: 640px) {
  .hero {
    padding-block: clamp(44px, 12vw, 64px) clamp(36px, 10vw, 48px);
  }
  .hero-mark {
    width: 60px;
    height: 60px;
    margin-bottom: 18px;
  }
  .hero h1 {
    font-size: clamp(2.3rem, 11vw, 2.75rem);
  }
  .about-panel {
    padding: 28px;
  }
  .support-card {
    padding: 26px;
  }
  .site-nav {
    min-height: 58px;
    padding-top: 4px;
  }
}

@media (max-width: 400px) {
  .legal,
  .support {
    padding-top: 44px;
  }
  .game-card {
    padding: 18px;
  }
  .about-panel {
    padding: 24px 20px;
  }
}

@media (max-width: 360px) {
  .legal h1,
  .support h1 {
    font-size: 1.6rem;
  }
}

.legal h1 {
  overflow-wrap: anywhere;
}

/* Long URLs and emails must never push content past the viewport. */

.legal p,
.legal a,
.support-card p,
.support-card a {
  overflow-wrap: break-word;
}

/* ---- Landscape phones ---- */

@media (orientation: landscape) and (max-height: 480px) {
  .hero {
    justify-content: center;
    min-height: auto;
    padding-block: 28px 24px;
  }
  .hero-mark {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
  }
  .hero h1 {
    font-size: clamp(1.7rem, 6vw, 2.2rem);
  }
  .hero p {
    margin-bottom: 18px;
  }
  .site-nav {
    min-height: 52px;
  }
}
