/* Dune Blast website: one stylesheet, no external requests. It dresses the pages like the game's
   "Midnight Dunes": a deep navy night over the desert, frosted glass panels with a thin light
   rim, gold for the main action and Rubik, the game's UI font, for titles and text. Palette:
   lib/ui/theme.dart. */

@font-face {
  font-family: "Rubik";
  src: url("../fonts/Rubik-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/Rubik-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/Rubik-800.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night-top: #040a2c;
  --night-mid: #0b163c;
  --night-bottom: #232a62;
  --horizon: #6c6ca1;
  --glass: rgb(255 255 255 / 8%);
  --glass-strong: rgb(255 255 255 / 12%);
  --rim: rgb(255 255 255 / 18%);
  --inset: rgb(0 0 16 / 24%);
  --text: #ffffff;
  --muted: rgb(255 255 255 / 72%);
  --gold: #f6b83a;
  --gold-deep: #c98618;
  --gold-light: #ffcf62;
  --navy-text: #0e1638;
  --sky: #8fd8ff;
  --teal: #1ecfa5;
  --red: #ff4f5e;
  --link: var(--sky);
  --link-hover: var(--gold-light);
  --focus: var(--gold);
  --shadow: 0 18px 40px rgb(2 5 24 / 55%);
  --font-display: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* The grid every page lines up on: the header, the hero and the document share its edges. */
  --page: 64rem;
  --sidebar: 15rem;
  --gutter: 1.5rem;
  --measure: 46rem;
  --radius: 22px;
}

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

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--night-mid);
  background-image:
    radial-gradient(70rem 26rem at 50% 108%, rgb(108 108 161 / 55%), rgb(108 108 161 / 0%)),
    linear-gradient(180deg, var(--night-top) 0%, var(--night-mid) 55%, var(--night-bottom) 100%);
  background-attachment: fixed, fixed;
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-body);
  overflow-wrap: break-word;
}

main { flex: 1 0 auto; }
main:focus { outline: none; }

img, svg { max-width: 100%; }

a {
  color: var(--link);
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}
a:hover { color: var(--link-hover); }

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

code {
  padding: .05em .35em;
  background: var(--inset);
  border: 1px solid var(--rim);
  border-radius: 6px;
  font: .875em/1.4 var(--font-mono);
}

.wrap {
  width: min(100% - 2rem, var(--page));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: .6rem 1rem;
  border-radius: 12px;
  background: var(--gold);
  color: var(--navy-text);
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

mark.todo {
  background: var(--red);
  color: var(--navy-text);
  padding: .05em .35em;
  font-weight: 800;
}

/* Local builds only: what is still a placeholder. */
.preview-banner {
  padding: .6rem 1rem;
  background: repeating-linear-gradient(-45deg, var(--red) 0 18px, #e8404e 18px 36px);
  color: var(--navy-text);
  font-size: .9375rem;
  line-height: 1.45;
  text-align: center;
}
.preview-banner p,
.preview-banner ul { display: inline; margin: 0; padding: 0; }
.preview-banner li { display: inline; }
.preview-banner li + li::before { content: " · "; }
.preview-banner strong { font-family: var(--font-display); font-weight: 800; }

/* Header and hero ------------------------------------------------------- */

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  padding-block: 1rem .5rem;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }

/* The game's logo, its letters filled with sand. */
.brand-logo { display: block; width: 150px; height: auto; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.site-nav a {
  display: inline-block;
  padding: .4rem .95rem;
  border: 1px solid var(--rim);
  border-radius: 999px;
  background: var(--glass);
  color: var(--text);
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
}
.site-nav a:hover { background: var(--glass-strong); color: var(--text); }
.site-nav a[aria-current="page"] {
  background: var(--gold);
  border-color: var(--gold-light);
  color: var(--navy-text);
  box-shadow: inset 0 -3px 0 var(--gold-deep);
}

@media (max-width: 30rem) {
  .brand-logo { width: 116px; }
  .site-nav a { padding: .32rem .7rem; font-size: .875rem; }
}

.hero { padding-block: 1.75rem 1.5rem; }

.hero h1 {
  margin: .35rem 0 .9rem;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3.25rem);
  line-height: 1.1;
  text-shadow: 0 4px 0 var(--gold-deep), 0 10px 22px rgb(2 5 24 / 60%);
}

.eyebrow {
  margin: 0;
  color: var(--sky);
  font-weight: 800;
  font-size: .875rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-lead {
  margin: 0;
  max-width: 40rem;
  font-size: 1.1875rem;
  font-weight: 600;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  padding: .3rem .9rem;
  border: 1px solid var(--rim);
  border-radius: 999px;
  background: var(--glass);
  color: var(--text);
  font-size: .9375rem;
  font-weight: 600;
}

/* Home ------------------------------------------------------------------ */

.home-hero {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  padding-block: 1.5rem 2rem;
  text-align: center;
}

.home-title { margin: 0; line-height: 0; }
.home-logo { display: block; width: min(560px, 100%); height: auto; margin-inline: auto; }

.store-block { display: grid; gap: .9rem; justify-items: center; }

.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .75rem;
}

/* The official artwork as it comes: no frame of our own. */
.store-badge { display: inline-block; line-height: 0; }
.store-badge img { display: block; height: 48px; width: auto; }
.store-badge--soon { opacity: .55; }

.store-status {
  margin: 0;
  color: var(--gold-light);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: .02em;
}

.trademarks {
  max-width: 36rem;
  margin: 0 auto;
  padding-block: 2.5rem 3rem;
  color: var(--muted);
  font-size: .75rem;
  text-align: center;
}

/* Panels: the game's frosted glass ---------------------------------------- */

.panel,
.summary,
.toc,
.prose {
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--rim);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.panel { padding: 1.1rem 1.25rem 1.25rem; }

/* Buttons: gold, like the game's main action ------------------------------ */

.button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.4rem .75rem;
  border: 1px solid var(--gold-light);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--navy-text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: .02em;
  text-decoration: none;
  box-shadow: inset 0 -5px 0 var(--gold-deep), 0 8px 20px rgb(2 5 24 / 45%);
}
.button:hover { color: var(--navy-text); filter: brightness(1.05); }
.button:active { transform: translateY(2px); box-shadow: inset 0 -3px 0 var(--gold-deep), 0 4px 12px rgb(2 5 24 / 45%); }

/* Documents (legal pages, support) ------------------------------------- */

.doc {
  display: grid;
  gap: 1.25rem;
  padding-block: .5rem 4rem;
}

.doc > * { min-width: 0; }

.doc--single > * { max-width: var(--measure); }

@media (min-width: 64rem) {
  .doc--toc {
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    column-gap: var(--gutter);
    align-items: start;
  }
  .doc--toc .summary,
  .doc--toc .prose { grid-column: 2; }
  .doc--toc .toc {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow: auto;
  }
}

/* The panel titles: a gold label, like the game's tags. */
.summary h2,
.toc h2 {
  display: inline-block;
  margin: 0 0 .75rem;
  padding: .3rem .85rem .25rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy-text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: .02em;
}

.summary { padding: 1.1rem 1.5rem 1.35rem; }
.summary ul { margin: 0; padding-left: 1.2rem; }
.summary li + li { margin-top: .35rem; }
.summary p { margin: 0; }
.summary p + p { margin-top: .5rem; }

.toc {
  padding: 1rem 1.1rem 1.1rem;
  font-size: .9375rem;
  line-height: 1.45;
}
.toc h2 { font-size: .9375rem; }

.toc-list { margin: 0; padding-left: 1.3rem; }
.toc-list li { margin: .3rem 0; }
.toc-list a { text-decoration: none; }
.toc-list a:hover { text-decoration: underline; }

.prose { padding: clamp(1.25rem, .9rem + 1.6vw, 2.25rem); }

.prose h2 {
  margin: 2.5rem 0 .75rem;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.35rem, 1.2rem + .7vw, 1.7rem);
  line-height: 1.25;
  scroll-margin-top: 1rem;
}
.prose > h2:first-child { margin-top: 0; }

.prose h3 {
  margin: 1.75rem 0 .5rem;
  color: var(--sky);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.35;
  scroll-margin-top: 1rem;
}

.prose p,
.prose ul,
.prose ol,
.prose dl { margin: 0 0 1rem; }
.prose > :last-child { margin-bottom: 0; }

.prose ul,
.prose ol { padding-left: 1.4rem; }

.prose li + li { margin-top: .35rem; }

.prose strong { font-weight: 800; }

.table-wrap {
  margin: 0 0 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--rim);
  border-radius: 14px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
  line-height: 1.5;
}

.prose th,
.prose td {
  padding: .65rem .8rem;
  border-bottom: 1px solid var(--rim);
  text-align: left;
  vertical-align: top;
}

.prose thead th { background: var(--inset); color: var(--sky); font-weight: 800; }
.prose tbody tr:last-child > * { border-bottom: 0; }
.prose tbody th { font-weight: 800; }

.callout {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  border-left: 5px solid var(--gold);
  border-radius: 10px;
  background: var(--inset);
}
.callout > :last-child { margin-bottom: 0; }

.steps {
  list-style: none;
  counter-reset: step;
  padding-left: 0 !important;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  min-height: 2rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: .05rem;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: inset 0 -3px 0 var(--gold-deep);
  color: var(--navy-text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .95rem;
  line-height: 1;
}

.contact-card {
  display: grid;
  gap: .75rem;
  justify-items: start;
}
.contact-card h2 { margin-bottom: 0; }
.contact-card .email { font-size: 1.25rem; font-weight: 800; }

/* Third-party notices */

.notice-list {
  list-style: none;
  padding: 0 !important;
  display: grid;
  gap: .75rem;
}
.notice-list li + li { margin-top: 0; }

.notice {
  padding: .85rem 1rem;
  border: 1px solid var(--rim);
  border-radius: 14px;
  background: var(--inset);
}
.notice h3 { margin: 0 0 .25rem !important; color: var(--text) !important; font-size: 1.0625rem; }
.notice p { margin: 0 !important; color: var(--muted); font-size: .9375rem; overflow-wrap: anywhere; }
.notice-detail { color: var(--muted); font-weight: 600; font-size: .9375rem; }

.license h3 { margin-top: 2rem; }

.license-text {
  max-height: 28rem;
  margin: 0 0 1rem;
  padding: 1rem;
  overflow: auto;
  border: 1px solid var(--rim);
  border-radius: 12px;
  background: var(--inset);
  color: var(--muted);
  font: .8125rem/1.5 var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

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

.site-footer {
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--rim);
  background: rgb(4 10 44 / 55%);
  color: var(--muted);
  font-size: .9375rem;
}

.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--gold-light); }

.footer-links {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.25rem;
}
.footer-links a {
  font-weight: 600;
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }
.footer-links a[aria-current="page"] { color: var(--gold); }

.footer-contact,
.footer-note,
.footer-copy { margin: .3rem 0; }

.page-index .site-footer { text-align: center; }
.page-index .footer-links { justify-content: center; }

/* Motion and print ------------------------------------------------------ */

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

@media print {
  body { background: #ffffff; color: #000000; }
  .site-header, .skip-link, .toc, .site-footer nav, .preview-banner { display: none !important; }
  .hero { padding: 0; }
  .hero h1, .eyebrow, .prose h2, .prose h3 { color: #000000; text-shadow: none; }
  .chip, .summary, .prose, .panel { background: none; color: #000000; border: 0; box-shadow: none; padding: 0; }
  .doc--toc { display: block; }
  .license-text { max-height: none; overflow: visible; background: none; color: #000000; }
  a { color: #000000; }
}

/* Cookie banner for Google Analytics (static/js/consent.js, prod builds): Accept and
   Reject look the same; nothing loads until one is pressed. */
.consent-banner {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .75rem 1.25rem;
  max-width: 46rem;
  margin: 0 auto;
  padding: .9rem 1.1rem;
  border: 1px solid var(--rim);
  border-radius: var(--radius);
  background: var(--night-mid);
  box-shadow: var(--shadow);
}
.consent-text { margin: 0; flex: 1 1 18rem; font-size: .9375rem; }
.consent-actions { display: flex; gap: .6rem; }
.consent-button {
  min-width: 6.5rem;
  padding: .5rem 1rem;
  border: 1px solid var(--gold-light);
  border-radius: 12px;
  background: var(--gold);
  color: var(--navy-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.consent-button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
