/*
  Five in Row – shared styles for the marketing, support and privacy pages.
  Colors, surfaces and type mirror Theme.swift / Textures.swift in the app.
*/

:root {
  color-scheme: dark;

  /* Backdrop */
  --bg-top: #100b2e;
  --bg-mid: #0a071e;
  --bg-bottom: #050410;

  /* Brand neons */
  --cyan: #3dccff;
  --pink: #ff429e;
  --violet: #9e5cff;
  --blue: #387aff;
  --gold: #ffcc4d;
  --green: #4df29e;
  --orange: #ff9438;

  /* Text */
  --text: #ffffff;
  --text-dim: #bdbfed;
  --text-faint: #8082bd;

  /* Surfaces */
  --glass-top: rgba(255, 255, 255, 0.10);
  --glass-bottom: rgba(255, 255, 255, 0.04);
  --glass-stroke: rgba(255, 255, 255, 0.16);
  --card-top: rgba(27, 23, 64, 0.96);
  --card-bottom: rgba(14, 12, 38, 0.96);

  --radius: 22px;
  --gutter: 20px;
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */

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

html {
  background: var(--bg-bottom);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  min-height: 100vh;
  /* Transparent so the fixed .backdrop shows through; html carries the base color */
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Animated backdrop: gradient + drifting aurora + dust, like BaseScene */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-bottom) 100%);
}

.backdrop::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(44vmax 44vmax at 22% 22%, rgba(158, 92, 255, 0.40), transparent 70%),
    radial-gradient(38vmax 38vmax at 88% 48%, rgba(56, 122, 255, 0.28), transparent 70%),
    radial-gradient(42vmax 34vmax at 58% 92%, rgba(255, 66, 158, 0.22), transparent 70%),
    radial-gradient(28vmax 28vmax at 8% 72%, rgba(61, 204, 255, 0.16), transparent 70%);
  animation: aurora 48s ease-in-out infinite alternate;
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1.4px 1.4px at 37px 61px, rgba(255, 255, 255, 0.55), transparent 100%),
    radial-gradient(1px 1px at 171px 19px, rgba(255, 255, 255, 0.45), transparent 100%),
    radial-gradient(1.2px 1.2px at 113px 203px, rgba(189, 191, 237, 0.5), transparent 100%),
    radial-gradient(1px 1px at 251px 139px, rgba(255, 255, 255, 0.35), transparent 100%),
    radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.55) 100%);
  background-size: 263px 263px, 211px 211px, 307px 307px, 283px 283px, 100% 100%;
}

@keyframes aurora {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 2%, 0) scale(1.06); }
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 8px;
}

strong {
  color: var(--text);
  font-weight: 700;
}

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--card-top);
  color: var(--text);
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container.narrow {
  max-width: 800px;
}

.section {
  padding: 72px 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}

.section-head h2 {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-top: 10px;
}

.section-head p {
  margin: 14px 0 0;
  font-size: 18px;
}

/* Small kerned caps, like the app's section titles */
.eyebrow {
  display: inline-block;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 480px) and (max-width: 719px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 7, 30, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 17px;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 0 16px rgba(61, 204, 255, 0.35);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 12px;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--text);
  background: linear-gradient(180deg, rgba(61, 204, 255, 0.22), rgba(61, 204, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(61, 204, 255, 0.55);
}

@media (max-width: 520px) {
  .brand span { display: none; }
  .nav a { padding: 8px 10px; font-size: 14px; }
}

/* ---------- Surfaces ---------- */

.glass {
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  border: 1px solid var(--glass-stroke);
  border-radius: var(--radius);
}

.card {
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
  border: 1px solid var(--glass-stroke);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

/* Tinted panel: --tint is an "r, g, b" triplet */
.tinted {
  --tint: 61, 204, 255;
  background: linear-gradient(180deg, rgba(var(--tint), 0.20), rgba(var(--tint), 0.09));
  border: 1.5px solid rgba(var(--tint), 0.85);
  border-radius: var(--radius);
  box-shadow: 0 0 22px rgba(var(--tint), 0.30);
}

.tint-cyan { --tint: 61, 204, 255; --accent: var(--cyan); }
.tint-pink { --tint: 255, 66, 158; --accent: var(--pink); }
.tint-violet { --tint: 158, 92, 255; --accent: var(--violet); }
.tint-blue { --tint: 56, 122, 255; --accent: var(--blue); }
.tint-gold { --tint: 255, 204, 77; --accent: var(--gold); }
.tint-green { --tint: 77, 242, 158; --accent: var(--green); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

.btn:active {
  transform: scale(0.97);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* Blue → violet with top sheen, like the PLAY button */
.btn-primary {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0) 50%),
    linear-gradient(180deg, #3a97ff, var(--violet));
  box-shadow: 0 0 26px rgba(56, 122, 255, 0.55);
}

.btn-primary:hover {
  box-shadow: 0 0 34px rgba(56, 122, 255, 0.75);
}

.btn-large {
  min-height: 64px;
  padding: 0 34px;
  border-radius: 24px;
  font-size: 20px;
  letter-spacing: 0.04em;
}

.btn-gold {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0) 50%),
    linear-gradient(180deg, var(--gold), #ff775c);
  box-shadow: 0 0 26px rgba(255, 148, 56, 0.5);
  color: #2a1406;
}

.btn-glass {
  border: 1px solid var(--glass-stroke);
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
}

/* ---------- Stones ---------- */

.stone {
  --size: 28px;
  --base: var(--cyan);
  --light: #77dbff;
  --dark: #2b8fb3;
  --rim: #a8e8ff;
  --glow: rgba(61, 204, 255, 0.7);
  display: inline-block;
  width: var(--size);
  height: var(--size);
  flex: none;
  border-radius: 50%;
  border: calc(var(--size) * 0.07) solid var(--rim);
  background:
    radial-gradient(circle, #fff 0 17%, rgba(255, 255, 255, 0.55) 24%, rgba(255, 255, 255, 0) 36%),
    radial-gradient(circle at 50% 42%, var(--light) 0%, var(--base) 62%, var(--dark) 100%);
  box-shadow: 0 0 calc(var(--size) * 0.6) var(--glow);
}

.stone.pink {
  --base: var(--pink);
  --light: #ff7bbb;
  --dark: #b32e6f;
  --rim: #ffaad3;
  --glow: rgba(255, 66, 158, 0.7);
}

/* Five cyan stones joined by a light beam */
.five {
  position: relative;
  display: inline-flex;
  gap: 10px;
  padding: 6px;
}

.five::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(168, 232, 255, 0), #e6f8ff 15%, #e6f8ff 85%, rgba(168, 232, 255, 0));
  box-shadow: 0 0 14px 3px rgba(61, 204, 255, 0.75);
}

.five .stone {
  position: relative;
  --size: 24px;
}

/* ---------- Icons ---------- */

.icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: currentColor;
}

.icon-chip {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  color: var(--accent, var(--cyan));
  background: linear-gradient(180deg, rgba(var(--tint, 61, 204, 255), 0.24), rgba(var(--tint, 61, 204, 255), 0.10));
  border: 1px solid rgba(var(--tint, 61, 204, 255), 0.55);
  box-shadow: 0 0 18px rgba(var(--tint, 61, 204, 255), 0.25);
}

/* ---------- Page heading (support / privacy) ---------- */

.page-head {
  text-align: center;
  padding: 56px 0 36px;
}

.page-head h1 {
  margin: 12px 0 18px;
  font-size: clamp(40px, 9vw, 64px);
  font-weight: 900;
  letter-spacing: -0.01em;
}

.page-head .lead {
  max-width: 600px;
  margin: 22px auto 0;
  font-size: 18px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--cyan), var(--violet) 55%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(158, 92, 255, 0.45));
}

.gold-text {
  background: linear-gradient(90deg, var(--gold), var(--orange) 55%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(255, 148, 56, 0.45));
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-stroke);
}

/* ---------- Long-form documents ---------- */

.doc {
  padding: 8px 32px 32px;
}

.doc section {
  padding-top: 28px;
}

.doc section + section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 28px;
}

.doc h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 14px;
}

.doc h2 .num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  color: var(--cyan);
  background: rgba(61, 204, 255, 0.12);
  border: 1px solid rgba(61, 204, 255, 0.5);
}

.doc ul {
  margin: 0 0 1em;
  padding-left: 0;
  list-style: none;
}

.doc li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
}

.doc li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(61, 204, 255, 0.8);
}

.doc p:last-child,
.doc ul:last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .doc { padding: 4px 20px 24px; }
  .doc h2 { font-size: 19px; }
}

/* ---------- Highlights grid ---------- */

.highlight {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
}

.highlight h3 {
  font-size: 16px;
  font-weight: 800;
  margin: 2px 0 4px;
}

.highlight p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-faint);
}

/* ---------- FAQ ---------- */

.faq-group + .faq-group {
  margin-top: 44px;
}

.faq-group > h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 4px 16px;
  font-size: 22px;
  font-weight: 800;
}

.faq {
  margin-bottom: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  width: 10px;
  height: 10px;
  flex: none;
  margin-right: 4px;
  border-right: 2.5px solid var(--text-faint);
  border-bottom: 2.5px solid var(--text-faint);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
}

.faq[open] {
  border-color: rgba(61, 204, 255, 0.6);
  box-shadow: 0 0 22px rgba(61, 204, 255, 0.16);
}

.faq[open] summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
  border-color: var(--cyan);
}

.faq .answer {
  padding: 0 20px 18px;
}

.faq .answer p:last-child,
.faq .answer ul:last-child {
  margin-bottom: 0;
}

.faq .answer ul {
  margin: 0 0 1em;
  padding-left: 20px;
}

.faq .answer li {
  margin-bottom: 6px;
}

.path {
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

/* In-game style call-out: dark plate, stroke and glow in the mover's color */
.callout {
  --tint: 61, 204, 255;
  display: inline-block;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(var(--tint), 0.8);
  background: rgba(10, 8, 31, 0.86);
  color: var(--text);
  color: color-mix(in srgb, rgb(var(--tint)) 28%, white);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.12em;
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(var(--tint), 0.45);
}

.callout.tint-pink {
  --tint: 255, 66, 158;
}

.callouts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Contact card ---------- */

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px;
}

.contact h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.contact p {
  margin: 0;
  max-width: 460px;
}

.contact .btn {
  flex: none;
}

@media (max-width: 600px) {
  .contact { padding: 22px 20px; }
  .contact .btn { width: 100%; }
}

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

.site-footer {
  margin-top: 72px;
  padding: 36px 0 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  color: var(--text-faint);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.footer-links a {
  color: var(--text-dim);
  font-weight: 600;
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .backdrop::before { animation: none; }
  .btn, .faq, .faq summary::after { transition: none; }
}
