/* Worldheart site. Colours are the game's Palette (scripts/util/palette.gd). */

@font-face {
  font-family: "Rubik";
  src: url("rubik.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --deep-space: #070b1a;
  --nebula: #141b3d;
  --panel: #0e1430;
  --panel-raised: #18214a;
  --panel-border: #26315f;
  --hairline: #34407a;
  --text: #eaf0ff;
  --text-dim: #8c97c4;
  --text-muted: #6a75a8;
  --accent: #4de8ff;
  --on-accent: #04202e;
  --land: #2ee6a6;
  --stardust: #ffd36e;
  --starseeds: #c58bff;
  --danger: #ff3b4e;
  --measure: 40rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  background: var(--deep-space);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(20, 27, 61, 0.9), transparent 70%),
    radial-gradient(1px 1px at 12% 18%, #c9d6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 9%, #c9d6ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 33% 42%, #c9d6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 36%, #c9d6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 64%, #c9d6ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 64% 71%, #c9d6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 47% 88%, #c9d6ff 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 82%, #c9d6ff 50%, transparent 51%),
    var(--deep-space);
  background-size: 100% 100%, 380px 380px, 380px 380px, 380px 380px, 380px 380px,
    380px 380px, 380px 380px, 380px 380px, 380px 380px, auto;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--text); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header bar on inner pages */
.topbar {
  border-bottom: 1px solid var(--panel-border);
  background: rgba(7, 11, 26, 0.8);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
}
.topbar a.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2em;
  font-size: 0.95rem;
}
.topbar img { width: 28px; height: 28px; border-radius: 50%; }

/* Landing hero */
.hero {
  text-align: center;
  padding: 0.5rem 0 1rem;
}
/* The adaptive icon's foreground layer: the planet with its own halo on a transparent field;
   the planet is about 45% of the image, so the negative margins pull the text up to it. */
.planet {
  display: block;
  width: min(100%, 440px);
  height: auto;
  margin: -1.5rem auto -3rem;
  animation: drift 9s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .planet { animation: none; }
}

.wordmark {
  margin: 0;
  font-size: clamp(2.2rem, 10vw, 3.6rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.1;
  /* the tracking adds space after the last letter; pull it back so the word centres */
  margin-right: -0.18em;
}
.subtitle {
  margin: 0.4rem 0 1.5rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.95rem;
}
.lead {
  margin: 0 auto 2rem;
  max-width: 30rem;
  font-size: 1.2rem;
  color: var(--text);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  box-shadow: 0 0 28px rgba(77, 232, 255, 0.3);
}
.cta:hover { color: var(--on-accent); background: #7ef0ff; }
.cta.soon {
  background: var(--panel-raised);
  color: var(--text-dim);
  border: 1px solid var(--hairline);
  box-shadow: none;
  cursor: default;
}

/* Sections */
section { padding: 2.5rem 0 0.5rem; }
h2 {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
h3 { margin: 0 0 0.25rem; font-size: 1.1rem; font-weight: 600; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.75rem;
}
.card {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
}
.card p { margin: 0; color: var(--text-dim); font-size: 1rem; }
.card .dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: 0.1em;
}

.promise {
  list-style: none;
  margin: 0;
  padding: 0;
}
.promise li {
  padding: 0.6rem 0 0.6rem 1.6rem;
  border-bottom: 1px solid var(--panel-border);
  position: relative;
}
.promise li:last-child { border-bottom: 0; }
.promise li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 1.05rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--land);
  box-shadow: 0 0 8px rgba(46, 230, 166, 0.6);
}

details {
  border-bottom: 1px solid var(--panel-border);
  padding: 0.75rem 0;
}
details:last-of-type { border-bottom: 0; }
summary {
  cursor: pointer;
  font-weight: 600;
}
summary::marker { color: var(--accent); }
details p { margin: 0.5rem 0 0; color: var(--text-dim); }

/* Long-form text (privacy) */
.doc { padding: 2rem 0 1rem; }
.doc h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  line-height: 1.2;
}
.doc .meta { color: var(--text-muted); margin: 0 0 1.5rem; font-size: 0.95rem; }
.doc h2 {
  margin-top: 2.25rem;
  font-size: 1.25rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}
.doc p, .doc li { color: #d3dbf5; }
.doc ul { padding-left: 1.25rem; }
.doc li { margin: 0.35rem 0; }
.doc strong { color: var(--text); }

.summary {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
}
.summary ul { margin: 0.25rem 0 0; }

.notice {
  margin: 1.25rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--stardust);
  color: var(--stardust);
  background: rgba(255, 211, 110, 0.08);
  font-size: 0.95rem;
}

/* An owner detail not filled in yet. Remove the class once filled. */
.todo {
  background: rgba(255, 211, 110, 0.15);
  color: var(--stardust);
  border-radius: 4px;
  padding: 0 0.25em;
}

footer {
  margin-top: 3rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--panel-border);
  color: var(--text-muted);
  font-size: 0.9rem;
}
footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-bottom: 0.5rem; }
footer a { color: var(--text-dim); }
