:root {
  color-scheme: dark;
  --ink: #f6efe2;
  --muted: #9aa9bd;
  --line: rgba(212, 168, 83, 0.24);
  --panel: rgba(9, 18, 34, 0.86);
  /* Gold is the brand. Taken from the Crownfall crown: warm highlight,
     mid gold, deep shadow. */
  --gold: #e8c47a;
  --gold-deep: #c9992f;
  --gold-dim: rgba(212, 168, 83, 0.18);
  /* The blue gem set in the crown -- accent only, never the primary. */
  --gem: #8fc7ef;
  --cyan: #8fc7ef;
  --violet: #a88cff;
  --danger: #ff8198;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(201, 153, 47, 0.20), transparent 26rem),
    radial-gradient(circle at 86% 26%, rgba(41, 96, 156, 0.20), transparent 30rem),
    radial-gradient(circle at 50% 120%, rgba(201, 153, 47, 0.10), transparent 34rem),
    #050b18;
  font: 16px/1.65 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.48;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.75) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(232,196,122,.55) 0 1px, transparent 1.5px);
  background-position: 0 0, 37px 61px;
  background-size: 107px 107px, 173px 173px;
}

a { color: var(--gold); }
a:hover { color: white; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: .7rem 1rem;
  color: #1a1204;
  background: var(--gold);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 11, 24, 0.88);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(calc(100% - 2rem), var(--max));
  min-height: 72px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .14em;
}

.brand small {
  display: block;
  color: var(--gold);
  font-size: .62rem;
  letter-spacing: .34em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: .9rem;
}

.nav-links a[aria-current="page"],
.nav-links a:hover { color: var(--ink); }

main { overflow: hidden; }

.hero {
  width: min(calc(100% - 2rem), var(--max));
  min-height: 76vh;
  margin: auto;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  padding: 6rem 0;
}

.eyebrow {
  margin: 0 0 .7rem;
  color: var(--gold);
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .75rem;
}

h1, h2, h3 { line-height: 1.08; }

h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(3.2rem, 9vw, 7.6rem);
  letter-spacing: -.065em;
}

.hero h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(96deg, var(--gold-deep), #fbe7bb 46%, var(--gem));
  background-clip: text;
}

.lede {
  max-width: 670px;
  margin: 1.5rem 0 2rem;
  color: #b7cada;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.actions {
  display: flex;
  gap: .9rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: .8rem 1.2rem;
  border: 1px solid rgba(232, 196, 122, .5);
  border-radius: 8px;
  color: #1a1204;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  text-decoration: none;
  font-weight: 900;
}

.button.secondary {
  color: var(--ink);
  background: rgba(12, 24, 44, .78);
  border-color: rgba(232, 196, 122, .32);
}

.orbit {
  position: relative;
  width: min(36vw, 430px);
  aspect-ratio: 1;
  margin: auto;
  border: 1px solid rgba(232, 196, 122, .38);
  border-radius: 50%;
  box-shadow: 0 0 90px rgba(201, 153, 47, .18), inset 0 0 80px rgba(41, 96, 156, .12);
}

.orbit::before,
.orbit::after {
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(232, 196, 122, .26);
  border-radius: 50%;
  content: "";
  transform: rotate(24deg) scaleY(.62);
}

.orbit::after {
  inset: 31%;
  border: 0;
  background:
    radial-gradient(circle at 35% 28%, #c7f3ff, #56b9e8 16%, #19436b 43%, #06101d 72%);
  box-shadow: 0 0 52px rgba(143, 199, 239, .42);
  transform: none;
}

.moon {
  position: absolute;
  top: 10%;
  right: 8%;
  width: 18%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1bb, #d19b37 34%, #5b3510 76%);
  box-shadow: 0 0 25px rgba(242, 184, 75, .45);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: 1.35rem;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
}

.status::before {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  content: "";
}

.section {
  width: min(calc(100% - 2rem), var(--max));
  margin: auto;
  padding: 5rem 0;
}

.section h2,
.legal h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: -.045em;
}

.section-intro {
  max-width: 700px;
  color: var(--muted);
}

.grid {
  margin-top: 2.2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card {
  min-height: 220px;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(13, 26, 47, .88), rgba(7, 15, 29, .74));
}

.card .number {
  color: var(--gold);
  font-weight: 900;
  letter-spacing: .15em;
}

.card h3 { margin: 2.2rem 0 .6rem; font-size: 1.35rem; }
.card p { margin: 0; color: var(--muted); }

.quote {
  padding: 3rem;
  border-left: 3px solid var(--gold-deep);
  background: rgba(201, 153, 47, .09);
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  font-weight: 800;
}

.legal {
  width: min(calc(100% - 2rem), 900px);
  margin: auto;
  padding: 5rem 0 7rem;
}

.legal .updated { color: var(--muted); }

.legal h2 {
  margin-top: 2.4rem;
  color: var(--gold);
  font-size: 1.35rem;
}

.legal p, .legal li { color: #aebfd0; }
.legal strong { color: var(--ink); }

.notice {
  margin: 2rem 0;
  padding: 1.2rem 1.35rem;
  border: 1px solid rgba(242, 184, 75, .35);
  border-radius: 8px;
  background: rgba(103, 73, 15, .15);
  color: #f2dca7;
}

.steps {
  padding-left: 1.2rem;
}

.steps li { margin-bottom: 1rem; }

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 8, 16, .8);
}

.footer-inner {
  width: min(calc(100% - 2rem), var(--max));
  margin: auto;
  padding: 2.4rem 0;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 2rem;
  color: var(--muted);
  font-size: .85rem;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a { color: #b9cddd; }

@media (max-width: 780px) {
  .nav { align-items: flex-start; padding: 1rem 0; }
  .nav-links { justify-content: flex-end; gap: .7rem; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 4.5rem 0; }
  .orbit { width: min(80vw, 380px); }
  .grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: no-preference) {
  .moon { animation: drift 6s ease-in-out infinite; }
  @keyframes drift { 50% { transform: translate(-8px, 9px); } }
}

/* Legal data tables (privacy lawful bases and retention).
   Wide tables scroll inside their own container so the page body never
   scrolls sideways on a phone. */
.table-wrap { overflow-x: auto; margin: 1.4rem 0 2rem; -webkit-overflow-scrolling: touch; }

.data-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: .95rem;
}

.data-table th,
.data-table td {
  text-align: left;
  vertical-align: top;
  padding: .7rem .9rem;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.data-table th {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  border-bottom-color: rgba(255, 255, 255, .22);
}

.data-table td { color: #aebfd0; }
.data-table tbody tr:last-child td { border-bottom: none; }

/* Kyvarr Studios hero mark.
   Deliberately NOT the Crownfall orbit — the studio and the game are
   different brands and must not share a hero visual. A gilded crest of
   nested rotated squares reads as a maker's mark rather than a planet. */
.crest {
  position: relative;
  display: grid;
  place-items: center;
  width: min(34vw, 400px);
  aspect-ratio: 1;
  margin: auto;
}

.crest span {
  position: absolute;
  border: 1px solid rgba(232, 196, 122, .34);
  transform: rotate(45deg);
}

.crest span:nth-child(1) { inset: 0;   border-radius: 6px; }
.crest span:nth-child(2) { inset: 13%; border-color: rgba(232, 196, 122, .22); }
.crest span:nth-child(3) { inset: 26%; border-color: rgba(143, 199, 239, .3); }

.crest::before {
  position: absolute;
  inset: 34%;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #fbe7bb, var(--gold) 34%, var(--gold-deep) 66%, #3b2a08 100%);
  box-shadow: 0 0 70px rgba(201, 153, 47, .42);
}

.crest::after {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: 50%;
  box-shadow: inset 0 0 90px rgba(41, 96, 156, .18);
}

/* Crown mark beside the wordmark in the header. */
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand img { width: 30px; height: 30px; flex: none; }
