/* Daggerfall Online: public website (home, rules, privacy), same style as the Keycloak sign-in page */
@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@600;800&family=IM+Fell+English:ital@0;1&family=Source+Sans+3:wght@400;600&display=swap");

:root {
  --night: #0d0b09;
  --stone: #1d1914;
  --stone-light: #2b251d;
  --border: rgba(201, 162, 74, 0.35);
  --gold: #c9a24a;
  --gold-light: #e8cf8a;
  --parchment: #e9dcc0;
  --text: #d8ccb2;
  --text-muted: #a99d85;
  --blood: #8e1c17;
  --max-width: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--night);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(201, 162, 74, 0.14) 0%, rgba(13, 11, 9, 0) 55%),
    radial-gradient(ellipse at 50% 120%, rgba(142, 28, 23, 0.18) 0%, rgba(13, 11, 9, 0) 60%);
  background-attachment: fixed;
  color: var(--text);
  font: 400 17px/1.65 "Source Sans 3", system-ui, sans-serif;
}

a { color: var(--gold-light); }
a:hover { color: #fff; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ------------------------------------------------------------------ header */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 11, 9, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}
/* game images (320x200, scaled up): sharp pixels */
.px { image-rendering: pixelated; image-rendering: crisp-edges; }

.brand {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
  color: var(--gold);
  font: 800 15px/1 "Cinzel", Georgia, serif;
  letter-spacing: 0.2em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand img { display: block; width: 136px; height: auto; }
/* link back to the Echo Nexus portal (all the games), always visible */
.portal-link {
  font: 700 13px/1 system-ui, sans-serif;
  color: var(--night);
  background: var(--gold);
  padding: 8px 11px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.portal-link:hover { background: var(--gold-light); }
.brand span { padding-bottom: 3px; }
nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav a {
  color: var(--text);
  font: 600 13px/1 "Cinzel", Georgia, serif;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  padding: 6px 0;
}
nav a:hover, nav a[aria-current="page"] { color: var(--gold-light); }

/* ------------------------------------------------------------------ home */
.hero {
  position: relative;
  padding: 72px 0 72px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(90deg, rgba(13, 11, 9, 0.96) 0%, rgba(13, 11, 9, 0.82) 55%, rgba(13, 11, 9, 0.7) 100%),
    url("img/night.png") center / cover no-repeat;
  image-rendering: pixelated;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  align-items: center;
  gap: 48px;
}
.hero-text { text-align: center; }
.hero h1 {
  margin: 0;
  color: var(--gold);
  font: 800 clamp(22px, 3.4vw, 32px)/1 "Cinzel", Georgia, serif;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 #000;
}
.hero h1 .logo-large {
  display: block;
  width: min(100%, 544px);
  height: auto;
  margin: 0 auto 10px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.7));
}
.hero h1 span { display: block; padding-left: 0.5em; }
.hero .ornament {
  margin: 14px 0 22px;
  color: var(--gold);
  letter-spacing: 0.5em;
}
.cover-art {
  margin: 0;
  padding: 8px;
  background: linear-gradient(180deg, var(--stone-light), var(--stone));
  border: 2px solid var(--gold);
  outline: 1px solid var(--border);
  outline-offset: 5px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75);
  transform: rotate(1.5deg);
}
.cover-art img { display: block; width: 100%; height: auto; }
.hero .tagline {
  max-width: 640px;
  margin: 0 auto 32px;
  color: var(--parchment);
  font: italic 400 clamp(19px, 2.6vw, 23px)/1.5 "IM Fell English", Georgia, serif;
}
.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.button {
  display: inline-block;
  padding: 13px 26px;
  border: 1px solid #5c4515;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 50%, #8f6d26 100%);
  color: var(--night);
  font: 800 14px/1 "Cinzel", Georgia, serif;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 3px 0 #3d2e0e, 0 6px 14px rgba(0, 0, 0, 0.5);
}
.button:hover { color: var(--night); filter: brightness(1.1); }
.button.secondary {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold-light);
  box-shadow: none;
}
.button.secondary:hover { color: #fff; background: rgba(201, 162, 74, 0.1); }
.button[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
.small-print { color: var(--text-muted); font-size: 14px; margin-top: 18px; }

/* ------------------------------------------------------------------ sections */
.section { padding: 72px 0; border-bottom: 1px solid var(--border); }
.section:last-of-type { border-bottom: none; }
h2 {
  margin: 0 0 8px;
  color: var(--gold-light);
  font: 600 clamp(26px, 4vw, 34px)/1.2 "Cinzel", Georgia, serif;
  letter-spacing: 0.04em;
}
.intro { margin: 0 0 36px; color: var(--text-muted); max-width: 700px; }
h3 {
  margin: 0 0 8px;
  color: var(--parchment);
  font: 600 18px/1.3 "Cinzel", Georgia, serif;
  letter-spacing: 0.03em;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card {
  padding: 22px;
  background: linear-gradient(180deg, var(--stone-light) 0%, var(--stone) 100%);
  border: 1px solid var(--border);
  border-radius: 3px;
}
.card p { margin: 0; }
.tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  color: var(--gold);
  font: 600 11px/1.6 "Cinzel", Georgia, serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* map of the Iliac Bay */
.world-map {
  margin: 0 0 28px;
  border: 2px solid var(--gold);
  outline: 1px solid var(--border);
  outline-offset: 5px;
  background: var(--stone);
}
.world-map img { display: block; width: 100%; height: auto; }
.world-map figcaption {
  padding: 10px 16px;
  color: var(--parchment);
  font: italic 400 17px/1.4 "IM Fell English", Georgia, serif;
  text-align: center;
}

/* sections with a game backdrop, heavily darkened */
.decor { background-position: center; background-size: cover; background-repeat: no-repeat; image-rendering: pixelated; }
.decor-dungeon {
  background-image: linear-gradient(rgba(13, 11, 9, 0.9), rgba(13, 11, 9, 0.94)), url("img/dungeon.png");
}
.decor-night {
  background-image: linear-gradient(rgba(13, 11, 9, 0.86), rgba(13, 11, 9, 0.93)), url("img/night.png");
}

/* ------------------------------------------------------------------ text pages (rules, privacy) */
.page { max-width: 780px; margin: 0 auto; padding: 64px 20px 80px; }
.page h1 {
  margin: 0;
  color: var(--gold);
  font: 800 clamp(32px, 6vw, 46px)/1.1 "Cinzel", Georgia, serif;
  letter-spacing: 0.05em;
}
.page .subtitle {
  margin: 6px 0 28px;
  color: var(--parchment);
  font: italic 400 21px/1.4 "IM Fell English", Georgia, serif;
}
.page h2 { margin-top: 40px; font-size: 22px; }
.page .date { color: var(--text-muted); font-size: 15px; }
.page li { margin-bottom: 8px; }
.page strong { color: var(--parchment); }

/* ------------------------------------------------------------------ footer */
footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(rgba(13, 11, 9, 0.88), rgba(13, 11, 9, 0.88)), url("img/stone-tile.png") repeat;
  background-size: auto, 144px auto;
  image-rendering: pixelated;
  padding: 28px 0 40px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}
footer p { margin: 4px 0; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .cover-art { width: min(78%, 300px); margin: 0 auto; }
}

@media (max-width: 640px) {
  header .container { justify-content: center; padding-top: 10px; padding-bottom: 10px; }
  .hero { padding: 64px 0 56px; }
  .section { padding: 52px 0; }
}

/* ------------------------------------------------------------------ screenshots, download */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.gallery figure {
  margin: 0;
  background: var(--stone);
  border: 1px solid var(--border);
}
.gallery img { display: block; width: 100%; height: auto; }
.gallery figcaption { padding: 10px 14px; color: var(--parchment); font: italic 400 16px/1.4 "IM Fell English", Georgia, serif; }
.download { margin-top: 36px; text-align: center; }
