/* Future 2048 by DanCo Worldwide: shared styles for the home, support and privacy pages.
   Self-hosted only (see public/_headers): system fonts, no external resources.
   Palette mirrors Neon2048/Theme/Theme.swift. */

:root {
  --void: #05060f;
  --deep: #1a1046;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.7);
  --text-faint: rgba(255, 255, 255, 0.48);
  --cyan: #27d9ff;
  --blue: #3d7bff;
  --violet: #8a4dff;
  --magenta: #ff3bd4;
  --coral: #ff4f87;
  --amber: #ffb23b;
  --radius: 22px;
  --max: 1160px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

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

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

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 20;
  padding: 10px 16px; border-radius: 12px;
  background: var(--cyan); color: var(--void); font-weight: 800; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- ambient synthwave background ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(var(--deep), var(--void) 70%);
  overflow: hidden;
  pointer-events: none;
}
.backdrop::before,
.backdrop::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  animation: drift 18s ease-in-out infinite alternate;
}
.backdrop::before {
  width: 60vmax; height: 60vmax;
  left: -20vmax; top: -25vmax;
  background: rgba(39, 217, 255, 0.15);
}
.backdrop::after {
  width: 65vmax; height: 65vmax;
  right: -25vmax; bottom: -30vmax;
  background: rgba(255, 59, 212, 0.17);
  animation-delay: -9s;
}
.grid-floor {
  position: absolute;
  left: -50%; right: -50%; bottom: 0;
  height: 45vh;
  background-image:
    linear-gradient(rgba(255, 59, 212, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 77, 255, 0.24) 1px, transparent 1px);
  background-size: 80px 80px;
  transform: perspective(400px) rotateX(62deg);
  transform-origin: bottom;
  -webkit-mask-image: linear-gradient(transparent, #000 80%);
  mask-image: linear-gradient(transparent, #000 80%);
}
@keyframes drift {
  to { transform: translate(6vmax, 4vmax) scale(1.08); }
}

/* ---------- layout & type ---------- */

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }

section { padding: 96px 0; }

.kicker {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
}

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.02em; font-weight: 850; }
h1 { font-size: clamp(42px, 7vw, 84px); }
h2 { font-size: clamp(32px, 4.6vw, 54px); }
h3 { font-size: 21px; letter-spacing: -0.01em; }

.grad {
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede { font-size: clamp(18px, 2vw, 21px); color: var(--text-dim); max-width: 34em; }

.section-head { text-align: center; margin-bottom: 56px; }
.section-head .kicker { margin-bottom: 16px; }
.section-head .lede { margin: 18px auto 0; }

.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

a:focus-visible, summary:focus-visible, .gallery:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(5, 6, 15, 0.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; font-size: 18px; flex: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-dim); font-size: 15px; font-weight: 600; transition: color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }

/* ---------- buttons & badge ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  transition: transform 0.15s ease, box-shadow 0.25s ease;
}
a.btn:hover { transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* "Coming soon" App Store badge: not a link until the app is live. */
.badge-soon {
  color: var(--void);
  border: 0;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta));
  box-shadow: 0 0 28px rgba(39, 217, 255, 0.3), 0 0 36px rgba(255, 59, 212, 0.25);
  cursor: default;
}
.badge-soon .store-text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.badge-soon .store-text small { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; opacity: 0.8; text-transform: uppercase; }

/* ---------- hero ---------- */

.hero { padding: 80px 0 100px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { margin: 20px 0 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-meta { margin-top: 26px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; color: var(--text-faint); text-transform: uppercase; }

/* ---------- neon board (pure CSS illustration; tile colors from TileStyle) ---------- */

.board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3%;
  width: min(440px, 100%);
  aspect-ratio: 1;
  margin-inline: auto;
  padding: 3.5%;
  border-radius: 26px;
  border: 1.5px solid rgba(39, 217, 255, 0.45);
  background: rgba(10, 15, 36, 0.75);
  box-shadow: 0 0 60px rgba(39, 217, 255, 0.18), 0 0 90px rgba(255, 59, 212, 0.14), 0 40px 80px rgba(0, 0, 0, 0.6);
  container-type: inline-size;
}
.t {
  --a: rgba(255, 255, 255, 0.04);
  --b: rgba(255, 255, 255, 0.02);
  --g: transparent;
  display: grid;
  place-items: center;
  border-radius: 18%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(160deg, var(--a), var(--b));
  box-shadow: 0 0 18px color-mix(in srgb, var(--g) 60%, transparent);
  font-weight: 900;
  font-size: 7.4cqi;
  letter-spacing: -0.02em;
  color: #fff;
}
.t.small { font-size: 6cqi; }
.v2 { --a: #14284a; --b: #0d1a35; --g: rgba(39, 217, 255, 0.35); color: #a8eeff; border-color: rgba(63, 169, 255, 0.6); }
.v4 { --a: #173e6e; --b: #0f2850; --g: rgba(39, 217, 255, 0.45); color: #c6f6ff; border-color: rgba(82, 200, 255, 0.6); }
.v8 { --a: #00c8ff; --b: #0070f0; --g: #00b4ff; }
.v16 { --a: #4a86ff; --b: #3e22f0; --g: #4f5bff; }
.v32 { --a: #8e4dff; --b: #5414cf; --g: #8a4dff; }
.v64 { --a: #d04bff; --b: #8616cf; --g: #c04bff; }
.v128 { --a: #ff4fdb; --b: #d0158f; --g: #ff3bd4; }
.v256 { --a: #ff4f8a; --b: #d01445; --g: #ff4f87; }
.v512 { --a: #ff7a45; --b: #e02e14; --g: #ff6a3b; }
.v1024 { --a: #ffc247; --b: #ff7414; --g: #ffb23b; }

/* ---------- header art banner ---------- */

.banner { padding: 0 0 24px; }
.banner img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 0 60px rgba(138, 77, 255, 0.2);
}

/* ---------- features ---------- */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; list-style: none; }
.feature { padding: 30px 28px; }
.feature .icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  margin-bottom: 20px;
  color: var(--cyan);
  background: rgba(39, 217, 255, 0.1);
  border: 1px solid rgba(39, 217, 255, 0.35);
}
.feature:nth-child(even) .icon { color: var(--magenta); background: rgba(255, 59, 212, 0.1); border-color: rgba(255, 59, 212, 0.35); }
.feature .icon svg { width: 24px; height: 24px; }
.feature p { margin-top: 10px; color: var(--text-dim); font-size: 16px; }

/* ---------- rules ---------- */

.rules { list-style: none; padding: 30px 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 32px; counter-reset: rule; }
.rules li { display: flex; gap: 14px; align-items: flex-start; color: var(--text-dim); font-size: 16px; }
.rules li::before {
  counter-increment: rule;
  content: counter(rule);
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  font-family: var(--mono); font-size: 13px; font-weight: 800;
  color: var(--void);
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(39, 217, 255, 0.5);
}
.rules li:nth-child(even)::before { background: var(--magenta); box-shadow: 0 0 16px rgba(255, 59, 212, 0.5); }
.rules strong { color: var(--text); }
.more { margin-top: 22px; text-align: center; color: var(--text-dim); }
.more a { color: var(--cyan); }

/* ---------- screenshots ---------- */

.gallery {
  display: flex;
  gap: 20px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 16px 24px;
  scroll-padding-inline: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(39, 217, 255, 0.4) transparent;
}
.gallery li { flex: none; scroll-snap-align: start; }
.gallery img {
  width: min(230px, 66vw);
  aspect-ratio: 603 / 1311;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 0 40px rgba(39, 217, 255, 0.12);
}
@media (min-width: 1240px) { .gallery { justify-content: center; } }

/* ---------- CTA ---------- */

.cta-card { padding: 64px 28px; text-align: center; }
.cta-card img { width: 120px; height: 120px; border-radius: 27px; margin: 0 auto 28px; box-shadow: 0 0 50px rgba(39, 217, 255, 0.3), 0 0 70px rgba(255, 59, 212, 0.25); }
.cta-card .lede { margin: 18px auto 32px; }

/* ---------- content pages ---------- */

.page-head { padding: 88px 0 40px; }
.page-head h1 { font-size: clamp(40px, 6vw, 64px); margin-top: 16px; }
.page-head .lede { margin-top: 18px; }
.page-head .updated { margin-top: 14px; }
.prose { padding: 40px; max-width: 820px; margin-bottom: 96px; }
.prose h2 { font-size: 26px; margin: 36px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-dim); font-size: 17px; }
.prose p + p { margin-top: 12px; }
.prose ul, .prose ol { margin: 12px 0 0 22px; display: grid; gap: 8px; }
.prose a { color: var(--cyan); }
.prose strong { color: var(--text); }
.summary { padding: 20px 22px; margin: 18px 0 8px; border-radius: 16px; border: 1px solid rgba(39, 217, 255, 0.3); background: rgba(39, 217, 255, 0.06); }
.updated { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; color: var(--text-faint); text-transform: uppercase; }

.support-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 24px; align-items: start; }
.contact { padding: 32px; position: sticky; top: 96px; }
.contact p { color: var(--text-dim); margin: 12px 0 24px; }
.contact .btn { color: var(--void); border: 0; background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta)); max-width: 100%; }
.faq { display: grid; gap: 12px; }
.faq details { padding: 0 24px; }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 0;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--cyan); font-size: 22px; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-dim); padding-bottom: 22px; margin-top: -6px; }
.faq a { color: var(--cyan); }
.block-head { margin: 72px 0 24px; }
.block-head .kicker { margin-bottom: 12px; }
.pad-bottom { padding-bottom: 96px; }

/* ---------- footer ---------- */

footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--text-faint); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; margin-left: auto; }
footer a { text-decoration: none; color: var(--text-dim); }
footer a:hover { color: var(--text); }
footer .fine-print { flex-basis: 100%; font-size: 12px; }
footer .fine-print a { text-decoration: underline; }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero .wrap, .support-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; text-align: center; }
  .hero .lede { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .contact { position: static; }
}

@media (max-width: 640px) {
  section { padding: 72px 0; }
  .features, .rules { grid-template-columns: 1fr; }
  .rules { padding: 24px 20px; }
  .prose { padding: 24px 20px; }
  .contact { padding: 26px 22px; }
  .faq details { padding: 0 18px; }
  .faq summary { font-size: 17px; }
  footer nav { margin-left: 0; }
}

@media (max-width: 480px) {
  .nav .wrap { gap: 12px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 14px; }
  .nav-links .wide { display: none; }
  .contact .btn { padding-inline: 18px; font-size: 15px; }
}

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