/* Moonhue website. Tokens are the app's "Midnight" theme (moonhue_game/ui/theme/tokens.gd). */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/cormorant-garamond-600.woff2?v=ede04ccc4e") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito.woff2?v=97c8b28eca") format("woff2");
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --bg: #0B0D1A;
  --sky-top: #070815;
  --sky-bottom: #151A3A;
  --surface: #12162C;
  --surface-2: #1A1F3D;
  --surface-3: #262C55;
  --line: #2A3160;
  --ink: #F2EEE3;
  --muted: #A6ABC8;
  --gold: #E9C46A;
  --gold-pressed: #D1AA4F;
  --on-gold: #1B1608;
  --focus: #9FB6FF;
  --success: #7ED3B0;

  --gold-soft: #F4CF7E;
  --lantern: radial-gradient(closest-side, rgba(244, 207, 126, 0.35), rgba(244, 207, 126, 0));

  --r-sm: 12px;
  --r-lg: 24px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);

  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --ui: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background: var(--bg);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  position: relative;
  isolation: isolate; /* keeps the starfield (z-index: -1) above the body background */
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(var(--sky-top), var(--bg) 640px);
  color: var(--ink);
  font: 600 1rem/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* A sparse starfield behind everything, in the spirit of the app's starfield tile. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 900px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.7;
  background:
    radial-gradient(1.5px 1.5px at 8% 12%, #fff, transparent),
    radial-gradient(1px 1px at 22% 38%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 37% 8%, #F4CF7E, transparent),
    radial-gradient(1px 1px at 48% 30%, #fff, transparent),
    radial-gradient(1px 1px at 63% 16%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 74% 42%, #8CCFE6, transparent),
    radial-gradient(1px 1px at 86% 10%, #fff, transparent),
    radial-gradient(1px 1px at 93% 34%, #fff, transparent),
    radial-gradient(1px 1px at 14% 62%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 56% 58%, #F49BB2, transparent),
    radial-gradient(1px 1px at 82% 70%, #fff, transparent),
    radial-gradient(1px 1px at 31% 82%, #fff, transparent);
  -webkit-mask-image: linear-gradient(#000 40%, transparent);
  mask-image: linear-gradient(#000 40%, transparent);
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--gold); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }

h1, h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 11vw, 5rem); line-height: 1; }
h2 { font-size: clamp(2.125rem, 7vw, 3.25rem); line-height: 1.05; }
h3 { font-size: 1.125rem; line-height: 1.3; font-weight: 800; }

.gold { color: var(--gold); }

.icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
}
@media (min-width: 760px) { .wrap { padding-inline: 32px; } }

.muted { color: var(--muted); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Header & footer ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 26, 0.78);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(42, 49, 96, 0.6);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font: 600 1.625rem/1 var(--display);
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  display: none;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
}
.nav a:not(.btn):hover, .nav a[aria-current] { color: var(--ink); }
@media (min-width: 820px) { .nav a:not(.btn) { display: inline-block; } }

.site-footer {
  margin-top: 40px;
  padding-block: 40px calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer .wrap { display: grid; gap: 20px; }
.site-footer .brand { justify-self: start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 0; list-style: none; }
.footer-links a { display: inline-block; padding-block: 6px; color: var(--ink); font-weight: 700; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-links a[aria-current] { color: var(--gold); }
.site-footer p { max-width: 64ch; }

/* ---------- Buttons, tags, cards ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--on-gold);
  font: 800 0.9375rem/1 var(--ui);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(233, 196, 106, 0.35);
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--gold-soft); }
.btn:active { background: var(--gold-pressed); transform: scale(0.98); }
.btn .icon { width: 20px; height: 20px; stroke-width: 2; }
.btn-lg { min-height: 56px; padding-inline: 28px; font-size: 1rem; }

.store-badge { display: inline-block; border-radius: 10px; line-height: 0; }
.store-badge img { width: 168px; height: 56px; }

.eyebrow {
  color: var(--gold);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
}
.tag-gold { background: rgba(233, 196, 106, 0.16); color: var(--gold); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

/* ---------- Sections ---------- */

.section { padding-block: 64px; }
@media (min-width: 960px) { .section { padding-block: 104px; } }

.section-head { display: grid; gap: 14px; max-width: 42rem; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.125rem; }

.tinted {
  background: linear-gradient(transparent, rgba(21, 26, 58, 0.7) 20%, rgba(21, 26, 58, 0.7) 80%, transparent);
}

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

.hero { position: relative; padding-block: 40px 64px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
.hero-copy { display: grid; gap: 20px; justify-items: start; }
.hero .lead { max-width: 34rem; color: var(--muted); font-size: 1.1875rem; line-height: 1.55; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 4px; }
.cta-note { color: var(--muted); font-size: 0.9375rem; }

.ticks { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; list-style: none; color: var(--muted); font-size: 0.9375rem; }
.ticks li { display: inline-flex; align-items: center; gap: 6px; }
.ticks .icon { width: 18px; height: 18px; color: var(--success); stroke-width: 2.4; }

.hero-art { position: relative; display: grid; place-items: center; padding-top: 28px; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: -10% 0 5%;
  background: var(--lantern);
  pointer-events: none;
}
.hero-art .moon {
  position: absolute;
  top: 0;
  right: 6%;
  width: clamp(72px, 18vw, 120px);
  filter: drop-shadow(0 0 24px rgba(244, 207, 126, 0.45));
}
.hero-art .cards { position: relative; width: min(100%, 560px); filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.5)); }

@media (min-width: 960px) {
  .hero { padding-block: 72px 104px; }
  .hero .wrap { grid-template-columns: 1fr 1.05fr; gap: 56px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-art .moon { animation: float 7s ease-in-out infinite; }
}
@keyframes float { 50% { transform: translateY(-8px); } }

/* ---------- Steps & features ---------- */

.steps { display: grid; gap: 14px; padding: 0; list-style: none; }
.steps li { display: grid; gap: 12px; align-content: start; padding: 24px; }
.steps p { color: var(--muted); }
.step-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--gold);
  font: 600 1.5rem/1 var(--display);
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.features { display: grid; gap: 14px; padding: 0; list-style: none; }
.features li { display: grid; gap: 8px; align-content: start; padding: 24px; }
.features .icon {
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  padding: 10px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--gold);
}
.features p { color: var(--muted); font-size: 0.9375rem; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Gallery ---------- */

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 0; list-style: none; }
.gallery figure { display: grid; gap: 10px; }
.gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow);
}
.gallery figcaption { display: grid; gap: 2px; font-size: 0.875rem; line-height: 1.35; }
.gallery figcaption b { font-weight: 800; }
.gallery figcaption > span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); }
@media (min-width: 560px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .gallery { grid-template-columns: repeat(5, 1fr); gap: 20px; } }


/* ---------- Plans ---------- */

.plans { display: grid; gap: 14px; }
.plan { display: grid; gap: 16px; align-content: start; padding: 28px; }
.plan h3 { font: 600 2rem/1.05 var(--display); }
.plan ul { display: grid; gap: 10px; padding: 0; list-style: none; }
.plan li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.plan li .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--success); stroke-width: 2.4; }
.plan-premium {
  position: relative;
  border-color: rgba(233, 196, 106, 0.55);
  background: radial-gradient(90% 60% at 100% 0%, rgba(233, 196, 106, 0.12), transparent 70%), var(--surface);
  box-shadow: 0 0 16px rgba(233, 196, 106, 0.18);
}
.plan-premium li .icon { color: var(--gold); }
.prices { display: grid; gap: 10px; }
.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.price b { font-size: 1.125rem; font-weight: 900; }
.price span { color: var(--muted); font-size: 0.875rem; }
.plan .fine { color: var(--muted); font-size: 0.875rem; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }

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

.faq { display: grid; gap: 10px; max-width: 48rem; }
.faq details { padding: 0 20px; border-radius: var(--r-sm); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding-block: 14px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -1px); }
.faq details > div { display: grid; gap: 10px; padding-bottom: 20px; color: var(--muted); }
.faq details > div strong { color: var(--ink); }
.faq-more { margin-top: 24px; }

/* ---------- Download ---------- */

.download {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 56px 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(244, 207, 126, 0.18), transparent 70%),
    linear-gradient(var(--sky-bottom), var(--bg));
  text-align: center;
}
.download p { max-width: 32rem; color: var(--muted); }
.download .app-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 0 48px rgba(244, 207, 126, 0.25), var(--shadow); }

/* ---------- Legal & support pages ---------- */

.page-head { padding-block: 40px 8px; }
.page-head .wrap { display: grid; gap: 14px; max-width: 48rem; margin-inline: 0; }
.page-head p { color: var(--muted); font-size: 1.125rem; }
@media (min-width: 960px) { .page-head { padding-top: 72px; } }

.page-body { padding-block: 24px 40px; }
.page-body .wrap { max-width: 48rem; margin-inline: 0; }
@media (min-width: 1120px) {
  .page-head .wrap, .page-body .wrap { margin-inline: auto; }
}

.prose { display: grid; gap: 16px; font-size: 1.0625rem; line-height: 1.65; }
.prose h2 { margin-top: 28px; font-size: clamp(1.75rem, 5vw, 2.125rem); line-height: 1.1; }
.prose ul, .prose ol { display: grid; gap: 8px; padding-left: 1.25em; }
.prose li::marker { color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 800; }
.prose .note { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.prose .note-gold { border-color: rgba(233, 196, 106, 0.45); background: rgba(233, 196, 106, 0.08); }

.toc { padding: 18px 20px; }
.toc ol { display: grid; gap: 6px; margin-top: 8px; padding-left: 1.25em; font-size: 0.9375rem; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.table-scroll table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
.table-scroll th, .table-scroll td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-scroll th { background: var(--surface-2); font-weight: 800; }
.table-scroll tr:last-child td { border-bottom: 0; }

/* Phones: each row becomes a small card, with the column name above each value. */
@media (max-width: 639px) {
  .table-scroll table { min-width: 0; }
  .table-scroll thead { display: none; }
  .table-scroll tr, .table-scroll td { display: block; }
  .table-scroll tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table-scroll tr:last-child { border-bottom: 0; }
  .table-scroll td { padding: 0; border: 0; }
  .table-scroll td:first-child { font-size: 1rem; font-weight: 800; }
  .table-scroll td[data-label] { margin-top: 8px; }
  .table-scroll td[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}

.contact-card { display: grid; gap: 12px; padding: 24px; }
.contact-card .contact-title { margin: 0; }
.contact-card .btn { justify-self: start; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

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

.not-found { display: grid; place-items: center; gap: 16px; min-height: 60vh; padding-block: 64px; text-align: center; }
.not-found img { width: 96px; filter: drop-shadow(0 0 24px rgba(244, 207, 126, 0.4)); }
.not-found p { color: var(--muted); }
