:root {
  color-scheme: dark;
  --ink: #05080d;
  --panel: rgba(7, 11, 17, 0.84);
  --panel-strong: rgba(5, 8, 12, 0.94);
  --ivory: #f3ecdc;
  --ivory-muted: rgba(243, 236, 220, 0.72);
  --gold: #e5b34b;
  --gold-pale: #ffe19a;
  --gold-line: rgba(229, 179, 75, 0.46);
  --line: rgba(235, 224, 199, 0.17);
  --page-width: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--ink);
  color: var(--ivory);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 280px;
  min-height: 100%;
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  min-width: 280px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--ink);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  background: #090d13;
  color: var(--ivory);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.marketing-home {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
}

.marketing-home::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    url("/marketing/chess-cubed-hero.webp") center 43% / cover no-repeat,
    #05080d;
  filter: saturate(0.9) contrast(1.06);
  transform: scale(1.01);
}

.marketing-home::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 34%, rgba(4, 9, 15, 0.05) 0%, rgba(4, 8, 13, 0.32) 42%, rgba(2, 4, 8, 0.78) 100%),
    linear-gradient(180deg, rgba(1, 3, 6, 0.76) 0%, rgba(2, 5, 9, 0.18) 34%, rgba(2, 4, 7, 0.86) 100%);
}

.site-frame {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
}

.site-header,
.site-footer {
  width: min(var(--page-width), calc(100% - clamp(28px, 5vw, 80px)));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: max(10px, env(safe-area-inset-top));
  border-bottom: 1px solid rgba(255, 225, 154, 0.14);
}

.mini-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}

.mini-brand img {
  width: 25px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 208, 91, 0.28));
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
}

.site-nav a,
.footer-links a {
  color: rgba(243, 236, 220, 0.68);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--gold-pale);
}

.home-main {
  display: grid;
  width: 100%;
  align-items: center;
  padding: clamp(22px, 3.2vh, 44px) clamp(14px, 4vw, 48px);
}

.hero {
  width: min(var(--page-width), 100%);
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold-pale);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.66rem, 1.1vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-shadow: 0 2px 14px #000;
}

.hero-title {
  width: min(420px, 64vw);
  margin: 0 auto;
  line-height: 0;
  filter: drop-shadow(0 18px 35px rgba(0, 0, 0, 0.64));
}

.hero-title img {
  display: block;
  width: 100%;
  height: clamp(155px, 27vh, 275px);
  object-fit: contain;
}

.hero-copy {
  max-width: 590px;
  margin: clamp(-12px, -1.5vh, -5px) auto clamp(23px, 3.4vh, 38px);
  color: rgba(243, 236, 220, 0.8);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.94rem, 1.5vw, 1.12rem);
  line-height: 1.45;
  text-shadow: 0 2px 12px #000;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(12px, 1.6vw, 20px);
}

.platform-card {
  position: relative;
  display: flex;
  min-height: 235px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 22px clamp(16px, 2vw, 25px) 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 38%),
    var(--panel);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(13px);
}

.platform-card::before,
.platform-card::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.platform-card::before {
  inset: 5px;
  border: 1px solid rgba(225, 178, 76, 0.1);
  border-radius: 3px;
}

.platform-card::after {
  top: 0;
  left: 50%;
  width: 58%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 220, 137, 0.72), transparent);
  transform: translateX(-50%);
}

.platform-web {
  z-index: 2;
  border-color: rgba(229, 179, 75, 0.65);
  background:
    linear-gradient(150deg, rgba(229, 179, 75, 0.09), rgba(229, 179, 75, 0) 42%),
    var(--panel-strong);
  color: var(--ivory);
  text-decoration: none;
  box-shadow:
    0 0 0 1px rgba(229, 179, 75, 0.12),
    0 24px 60px rgba(0, 0, 0, 0.56),
    0 0 34px rgba(229, 179, 75, 0.09);
  transform: translateY(-9px);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.platform-web:hover,
.platform-web:focus-visible,
.platform-download:hover,
.platform-download:focus-visible {
  border-color: var(--gold-pale);
  box-shadow:
    0 0 0 1px rgba(255, 225, 154, 0.22),
    0 27px 68px rgba(0, 0, 0, 0.65),
    0 0 45px rgba(229, 179, 75, 0.16);
  outline: none;
  transform: translateY(-13px);
}

.platform-download {
  color: var(--ivory);
  text-decoration: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.platform-download:hover,
.platform-download:focus-visible {
  outline: none;
  transform: translateY(-4px);
}

.featured-label {
  position: absolute;
  top: 10px;
  right: 12px;
  color: var(--gold-pale);
  font-size: 0.57rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.platform-icon {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  margin-bottom: 6px;
  border: 1px solid rgba(229, 179, 75, 0.36);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 179, 75, 0.12), rgba(5, 8, 12, 0.62) 68%);
  box-shadow: inset 0 0 18px rgba(229, 179, 75, 0.08);
}

.platform-icon img {
  width: 31px;
  height: 41px;
  object-fit: contain;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.7));
}

.platform-web .platform-icon img {
  width: 28px;
  height: 43px;
}

.platform-name {
  display: block;
  margin: 0 0 4px;
  color: var(--gold-pale);
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.2em;
  line-height: 1.2;
  text-transform: uppercase;
}

.platform-card h2,
.platform-heading {
  display: block;
  margin: 0;
  color: #fff8e8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.22rem, 2vw, 1.55rem);
  font-weight: 500;
  letter-spacing: 0.025em;
  line-height: 1.1;
}

.platform-description {
  display: block;
  max-width: 300px;
  margin: 8px auto 14px;
  color: var(--ivory-muted);
  font-size: clamp(0.75rem, 1.05vw, 0.86rem);
  line-height: 1.4;
}

.platform-action {
  display: flex;
  width: min(250px, 100%);
  min-height: 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  margin-top: auto;
  padding: 7px 18px;
  border: 1px solid #dca842;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(229, 179, 75, 0.2), rgba(103, 68, 12, 0.18)),
    rgba(15, 12, 7, 0.88);
  box-shadow:
    inset 0 0 0 1px rgba(255, 225, 154, 0.08),
    0 6px 18px rgba(0, 0, 0, 0.35);
  color: #fff0c3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.1;
  text-transform: uppercase;
}

.platform-action small {
  color: rgba(255, 240, 195, 0.62);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.platform-action-muted {
  border-color: rgba(235, 224, 199, 0.18);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(243, 236, 220, 0.62);
  box-shadow: none;
}

.site-footer {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 225, 154, 0.11);
}

.site-footer p {
  margin: 0;
  color: rgba(243, 236, 220, 0.48);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  font-size: 0.65rem;
}

.legal-page {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  background: #04070b;
}

.legal-page::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background: url("/marketing/chess-cubed-hero.webp") center 30% / cover no-repeat;
  filter: saturate(0.55);
  opacity: 0.2;
}

.legal-page::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(180deg, rgba(3, 6, 10, 0.78), rgba(3, 5, 8, 0.97) 56%, #030508);
}

.legal-header {
  display: flex;
  width: min(900px, calc(100% - 32px));
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-inline: auto;
  border-bottom: 1px solid rgba(255, 225, 154, 0.14);
}

.legal-header .site-nav {
  gap: 18px;
}

.legal-main {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(38px, 7vw, 78px) 0 72px;
}

.legal-main-narrow {
  display: grid;
  min-height: calc(100svh - 68px);
  place-items: center;
  padding-block: 42px;
}

.legal-card {
  padding: clamp(25px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 40%),
    rgba(5, 8, 12, 0.9);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
}

.legal-kicker {
  margin: 0 0 10px;
  color: var(--gold-pale);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.legal-main h1 {
  margin: 0;
  color: #fff8e8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 7vw, 4.1rem);
  font-weight: 500;
  line-height: 0.98;
}

.legal-main .effective-date {
  margin: 13px 0 34px;
  color: rgba(243, 236, 220, 0.58);
  font-size: 0.84rem;
  font-weight: 700;
}

.legal-main section {
  padding: 25px 0;
  border-top: 1px solid var(--line);
}

.legal-main h2 {
  margin: 0 0 11px;
  color: #fff3ce;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.22rem;
  font-weight: 500;
}

.legal-main p,
.legal-main li {
  color: rgba(243, 236, 220, 0.76);
  font-size: 0.96rem;
  line-height: 1.68;
}

.legal-main p {
  margin: 0 0 12px;
}

.legal-main ul {
  margin: 0;
  padding-left: 1.25rem;
}

.legal-main li + li {
  margin-top: 8px;
}

.legal-main strong {
  color: #fff4d2;
}

.legal-main a {
  color: var(--gold-pale);
  text-underline-offset: 3px;
}

.support-card {
  width: min(680px, 100%);
  text-align: center;
}

.support-piece {
  width: 52px;
  height: 74px;
  margin-bottom: 18px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(229, 179, 75, 0.28));
}

.support-card h1 {
  margin-bottom: 20px;
}

.support-card > p:not(.legal-kicker) {
  max-width: 520px;
  margin: 0 auto;
  color: rgba(243, 236, 220, 0.76);
  font-size: clamp(0.98rem, 2vw, 1.12rem);
}

.support-email {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  margin-top: 30px;
  padding: 12px clamp(18px, 4vw, 32px);
  border: 1px solid var(--gold);
  border-radius: 3px;
  background: rgba(229, 179, 75, 0.09);
  color: #fff0bd !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.88rem, 3.5vw, 1.08rem);
  font-weight: 700;
  letter-spacing: 0.045em;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.support-email:hover,
.support-email:focus-visible {
  border-color: var(--gold-pale);
  background: rgba(229, 179, 75, 0.16);
  outline: none;
  transform: translateY(-2px);
}

@media (max-width: 760px) {
  .site-header,
  .site-footer {
    width: calc(100% - 28px);
  }

  .site-header {
    min-height: 58px;
  }

  .mini-brand {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  .mini-brand img {
    width: 20px;
    height: 28px;
  }

  .site-nav {
    gap: 15px;
  }

  .site-nav a {
    font-size: 0.65rem;
  }

  .home-main {
    padding: 12px 14px 16px;
  }

  .eyebrow {
    letter-spacing: 0.19em;
  }

  .hero-title {
    width: min(300px, 72vw);
  }

  .hero-title img {
    height: clamp(118px, 17vh, 150px);
  }

  .hero-copy {
    max-width: 330px;
    margin-bottom: 14px;
    font-size: 0.9rem;
  }

  .platform-grid {
    width: min(440px, 100%);
    grid-template-columns: 1fr;
    margin-inline: auto;
    gap: 11px;
  }

  .platform-card {
    display: grid;
    min-height: 122px;
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
    column-gap: 12px;
    align-items: center;
    padding: 12px 14px;
    text-align: left;
  }

  .platform-web {
    transform: none;
  }

  .platform-web:hover,
  .platform-web:focus-visible,
  .platform-download:hover,
  .platform-download:focus-visible {
    transform: translateY(-2px);
  }

  .platform-icon {
    grid-row: 1 / 4;
    width: 50px;
    height: 50px;
    margin: 0;
  }

  .platform-name,
  .platform-card h2,
  .platform-heading,
  .platform-description {
    grid-column: 2;
    max-width: none;
    margin-inline: 0;
    text-align: left;
  }

  .platform-name {
    margin-bottom: 2px;
  }

  .platform-card h2,
  .platform-heading {
    font-size: 1.2rem;
  }

  .platform-description {
    margin: 4px 0 8px;
    font-size: 0.76rem;
  }

  .platform-action {
    width: 100%;
    min-height: 36px;
    grid-column: 1 / -1;
    margin-top: 2px;
    font-size: 0.78rem;
  }

  .featured-label {
    top: 8px;
    right: 10px;
    font-size: 0.5rem;
  }

  .site-footer {
    min-height: 50px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding-block: 7px max(7px, env(safe-area-inset-bottom));
  }

  .footer-links {
    gap: 18px;
  }
}

@media (min-width: 761px) and (max-height: 800px) {
  .site-header {
    min-height: 58px;
  }

  .home-main {
    padding-block: 14px 18px;
  }

  .hero-title img {
    height: 184px;
  }

  .hero-copy {
    margin-bottom: 22px;
  }

  .platform-card {
    min-height: 205px;
    padding-top: 17px;
  }

  .platform-icon {
    width: 46px;
    height: 46px;
  }

  .platform-icon img {
    height: 37px;
  }

  .site-footer {
    min-height: 46px;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .site-header {
    min-height: 48px;
  }

  .home-main {
    padding-block: 8px 12px;
  }

  .eyebrow,
  .hero-copy {
    display: none;
  }

  .hero-title {
    width: 180px;
  }

  .hero-title img {
    height: 112px;
  }

  .platform-card {
    min-height: 148px;
    padding: 12px;
  }

  .platform-icon {
    width: 40px;
    height: 40px;
  }

  .platform-icon img {
    height: 31px;
  }

  .platform-description {
    margin-block: 4px 8px;
  }

  .platform-action {
    min-height: 37px;
  }

  .site-footer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
