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

:root {
  --ink: #2b1d12;
  --parchment: #f3e7cf;
  --parchment-deep: #e6d3ae;
  --gold: #c99a3c;
  --gold-light: #e8c879;
  --night: #1b1612;
  --steel: #8e959b;
  --link: #8a3b1f;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Alegreya", Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  color: var(--ink);
  background: var(--night);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }
a:hover { color: #b0502a; }

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

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background:
    linear-gradient(to bottom, rgba(27, 22, 18, 0.05) 0%, rgba(27, 22, 18, 0) 35%, rgba(27, 22, 18, 0.55) 75%, rgba(27, 22, 18, 0.9) 100%),
    url("/assets/title_bg.jpg") center 62% / cover no-repeat;
  text-align: center;
  padding: max(6vh, 2.5rem) 1.25rem 1.5rem;
}

.hero-logo {
  width: min(560px, 88vw);
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}

.hero-copy {
  max-width: 34rem;
  color: var(--parchment);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  margin-top: auto;
}

.coming-soon {
  display: inline-block;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-light);
  border-top: 1px solid rgba(232, 200, 121, 0.6);
  border-bottom: 1px solid rgba(232, 200, 121, 0.6);
  padding: 0.35rem 0.4rem 0.35rem 0.72rem;
  margin: 0 0 1rem;
}

.hero-copy p {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  margin: 0 0 0.5rem;
}

.site-footer {
  width: 100%;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: rgba(243, 231, 207, 0.75);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.site-footer nav a {
  color: var(--parchment);
  text-decoration: none;
  margin: 0 0.6rem;
  white-space: nowrap;
}

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

.site-footer .maker { margin-top: 0.4rem; }

/* ---------- Text pages ---------- */

.page {
  min-height: 100vh;
  background: var(--night);
  padding: 1.5rem 1rem 3rem;
}

.page-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.page-header img {
  width: min(320px, 70vw);
  height: auto;
}

.sheet {
  max-width: 44rem;
  margin: 0 auto;
  background: linear-gradient(var(--parchment), var(--parchment-deep));
  border: 1px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.sheet h1, .sheet h2 { font-family: "Cinzel", Georgia, serif; font-weight: 700; }

.sheet h1 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  margin: 0 0 0.25rem;
  line-height: 1.2;
}

.sheet .updated {
  font-size: 0.9rem;
  color: #6b5640;
  margin: 0 0 1.5rem;
}

.sheet h2 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.5rem;
  border-bottom: 1px solid rgba(201, 154, 60, 0.6);
  padding-bottom: 0.2rem;
}

.sheet ul { padding-left: 1.25rem; }
.sheet li { margin-bottom: 0.35rem; }

.page .site-footer { text-align: center; color: rgba(243, 231, 207, 0.7); }

/* Wide screens: show the portrait painting as a centred column, as the game does on desktop */
@media (min-aspect-ratio: 3/4) {
  body.home::before {
    content: "";
    position: fixed;
    inset: -40px;
    background: url("/assets/title_bg.jpg") center 60% / cover no-repeat;
    filter: blur(22px) brightness(0.45);
    z-index: -1;
  }
  body.home { background: var(--night); }
  body.home .hero {
    width: min(100vw, calc(100dvh * 0.5582));
    margin: 0 auto;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
    background-position: center center;
  }
  body.home .hero-logo { width: 88%; }
}
