/* Word Scene: Lanternleaf, static pages (index, support, privacy, terms).
   Colours follow the game UI (app/lib/ui/style.dart); fonts are the game's own
   Lora and Cinzel (SIL OFL, licences in fonts/), served locally so the pages
   load nothing from third parties. */

@font-face {
  font-family: "Lora";
  src: url("fonts/Lora.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Cinzel";
  src: url("fonts/Cinzel.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #e9dcc0;
  --paper: #f6eedc;
  --ink: #2b211a;
  --muted: #6e5a48;
  --accent: #8a3a30;
  --accent-dark: #6a2a24;
  --glow: #d8a93a;
  --rule: #d2be94;
  --brass: #b08a48;
  --shadow: 0 1px 2px rgba(48, 28, 16, 0.12), 0 8px 24px rgba(48, 28, 16, 0.08);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --caps: "Cinzel", "Trajan Pro", Georgia, serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1814;
    --paper: #28211b;
    --ink: #eee4cf;
    --muted: #b9a78f;
    --accent: #e0b25a;
    --accent-dark: #f0c877;
    --glow: #d8a93a;
    --rule: #4a3d30;
    --brass: #c29d5c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-dark);
}

a:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 8px;
  background: var(--paper);
  padding: 4px 8px;
  z-index: 2;
}

/* Header and footer */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.site-header .inner,
.site-footer .inner,
main {
  max-width: 46rem;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.site-header .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 20px;
  padding-top: 14px;
  padding-bottom: 12px;
}

.brand {
  font-family: var(--caps);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}

.brand span {
  color: var(--accent);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-family: var(--caps);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-header nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom: 2px solid var(--glow);
}

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 56px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .inner {
  padding-top: 20px;
  padding-bottom: 32px;
}

.site-footer p {
  margin: 0.3em 0;
}

/* Text */

main {
  padding-top: 32px;
}

h1,
h2,
h3 {
  font-family: var(--caps);
  color: var(--accent);
  line-height: 1.25;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  margin: 0 0 0.3em;
}

h2 {
  font-size: 1.3rem;
  margin: 2em 0 0.5em;
  padding-top: 0.6em;
  border-top: 1px solid var(--rule);
}

h3 {
  font-size: 1.05rem;
  margin: 1.6em 0 0.3em;
  color: var(--ink);
}

p,
ul,
ol,
dl {
  margin: 0 0 1em;
}

ul,
ol {
  padding-left: 1.3em;
}

li {
  margin: 0.3em 0;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

strong {
  font-weight: 700;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}

/* Cards and tables */

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: var(--shadow);
  margin: 0 0 1.2em;
}

.card > :last-child {
  margin-bottom: 0;
}

.card h2:first-child,
.card h3:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.2em;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
}

th {
  font-family: var(--caps);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}

/* FAQ */

details {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  margin: 0 0 10px;
  padding: 0 16px;
}

summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 700;
  list-style-position: outside;
  margin-left: 1em;
}

details[open] summary {
  border-bottom: 1px solid var(--rule);
  margin-bottom: 10px;
}

details > :last-child {
  margin-bottom: 14px;
}

/* Home page */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.hero .art {
  max-height: 60vh;
  object-fit: cover;
  object-position: center 55%;
}

@media (min-width: 720px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 36px;
  }

  .hero .art {
    max-height: none;
  }
}

.tagline {
  font-family: var(--caps);
  color: var(--brass);
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  margin: 0 0 0.4em;
}

.status {
  display: inline-block;
  font-family: var(--caps);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border: 1px solid var(--brass);
  border-radius: 999px;
  color: var(--brass);
}

figure {
  margin: 0 0 1.2em;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 0;
  list-style: none;
  font-family: var(--caps);
  letter-spacing: 0.04em;
}

/* Worlds to discover (home page) */

.worlds {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 0;
  margin: 0 0 1.2em;
  list-style: none;
}

@media (min-width: 560px) {
  .worlds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .worlds .first {
    grid-column: 1 / -1;
  }
}

.world {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.world img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.world > div {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.world h3 {
  margin: 0;
  color: var(--accent);
}

.world p {
  margin: 0;
  font-size: 0.95rem;
}

.badge {
  align-self: flex-start;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--caps);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border: 1px solid var(--brass);
  border-radius: 999px;
  color: var(--brass);
}

.badge.locked {
  color: var(--muted);
  border-color: var(--rule);
}
