/* Ashen Universe sites: ashenverse.com, ashkergames.com, theashensun.com
   Colours follow the ASHEN Forge brand lock (Ash Black, Forge Charcoal, Bone, Ember Gold,
   Relic Olive). No external requests: Cinzel (headings) is self-hosted from fonts/ (SIL OFL 1.1,
   Latin subset, see fonts/OFL-Cinzel.txt); body text uses the visitor's system sans.
   One stylesheet for all three sites (copied by pack.py together with shared/fonts/). */

@font-face {
  font-family: "Cinzel";
  src: url("fonts/cinzel-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ash: #11100f;
  --charcoal: #24201c;
  --charcoal-2: #2e2924;
  --bone: #eee6d8;
  --bone-dim: #b9b0a2;
  --ember: #c58a42;
  --ember-bright: #e0a45a;
  --olive: #6f7650;
  --olive-text: #c9d19a;   /* olive for text: the brand olive is too dark on charcoal (3.4:1) */
  --line: rgba(238, 230, 216, 0.14);
  --max: 1040px;
  --gutter: 16px;
  --radius: 6px;
  --serif: Cinzel, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: Montserrat, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ash);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--ember-bright); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ember-bright); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: 0.02em; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-top: 2.2em; }
h3 { font-size: 1.15rem; margin-top: 1.6em; }
p { margin: 0 0 1em; max-width: 68ch; }
.lede { font-size: 1.2rem; color: var(--bone); max-width: 60ch; }
.muted { color: var(--bone-dim); }
.small { font-size: 0.9rem; }
blockquote { margin: 1.5em 0; padding: 0.2em 0 0.2em 1.2em; border-left: 3px solid var(--ember); color: var(--bone); font-style: italic; max-width: 60ch; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
code { font-family: Consolas, "SF Mono", Menlo, monospace; font-size: 0.92em; background: var(--charcoal); padding: 0.1em 0.35em; border-radius: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.7rem; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--bone); letter-spacing: 0.08em; text-transform: uppercase; }
.brand:hover { text-decoration: none; color: var(--ember-bright); }
.brand svg, .brand img { width: 30px; height: 30px; }
.nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; font-size: 0.95rem; }
.nav a { color: var(--bone-dim); }
.nav a[aria-current="page"], .nav a:hover { color: var(--bone); }

/* Hero */
.hero { padding: clamp(3rem, 9vw, 7rem) 0 clamp(2rem, 6vw, 4rem); border-bottom: 1px solid var(--line); }
.hero .kicker { font-family: var(--serif); color: var(--ember); letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.85rem; margin-bottom: 1rem; }
.hero h1 { margin-bottom: 0.4em; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; margin: 2rem 0; padding: 0; list-style: none; }
.card { background: var(--charcoal); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.4rem 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; transition: border-color 0.15s, transform 0.15s; }
.card:hover { border-color: var(--ember); transform: translateY(-2px); }
.card .tag { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ember); font-family: var(--serif); }
.card h3 { margin: 0.2em 0 0; }
.card p { margin: 0; color: var(--bone-dim); font-size: 0.97rem; max-width: none; }
.card .more { margin-top: auto; padding-top: 0.8rem; font-size: 0.95rem; }
.card.live .tag { color: var(--olive-text); }
.card.live .tag::before { content: "\25CF\00a0"; color: #8fa05a; }

/* Buttons */
.btn { display: inline-block; padding: 0.75rem 1.4rem; border-radius: var(--radius); font-weight: 600; letter-spacing: 0.02em; border: 1px solid var(--ember); color: var(--bone); background: linear-gradient(180deg, #d7984f, #b37a35); color: #1a1410; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost { background: none; color: var(--bone); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ember); }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.5rem 0; }

/* Sections */
.section { padding: 1rem 0 2rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.figure { margin: 1.5rem 0; }
.figure img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.figure figcaption { font-size: 0.85rem; color: var(--bone-dim); margin-top: 0.5rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.gallery img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.facts li { background: var(--charcoal); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem; }
.facts b { display: block; font-family: var(--serif); color: var(--ember-bright); font-size: 1.05rem; margin-bottom: 0.2rem; }
.status { display: inline-block; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.2em 0.7em; border: 1px solid var(--line); border-radius: 999px; color: var(--bone-dim); }
.status.live { border-color: var(--olive); color: var(--olive-text); }
.status.wip { border-color: var(--ember); color: var(--ember-bright); }

/* Book cover block (Novara has no cover yet: a typographic one) */
.cover { background: linear-gradient(160deg, #2a2420 0%, #141210 60%, #0d0c0b 100%); border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 2 / 3; display: flex; flex-direction: column; justify-content: space-between; padding: 1.6rem; max-width: 340px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.cover .top { font-family: var(--serif); color: var(--ember); letter-spacing: 0.3em; text-transform: uppercase; font-size: 0.75rem; }
.cover .title { font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--bone); }
.cover .sub { font-family: var(--serif); color: var(--bone-dim); letter-spacing: 0.1em; font-size: 0.95rem; margin-top: 0.5rem; }
.cover .author { font-family: var(--serif); color: var(--bone-dim); letter-spacing: 0.15em; text-transform: uppercase; font-size: 0.8rem; }
.cover .glyph { width: 70px; height: 70px; margin: 0 auto; color: var(--ember); }

/* Chapter list */
.chapters { columns: 2; column-gap: 2rem; padding-left: 1.2rem; max-width: 60ch; }
@media (max-width: 600px) { .chapters { columns: 1; } }
.chapters li { break-inside: avoid; margin-bottom: 0.3rem; color: var(--bone-dim); }
.chapters li b { color: var(--bone); font-weight: 500; }

/* Reading sample */
.sample { background: var(--charcoal); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.6rem 1rem; max-width: 70ch; font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif; font-size: 1.05rem; line-height: 1.7; }
.sample p { max-width: none; }
.sample .fade { margin-top: 1rem; color: var(--bone-dim); font-family: var(--sans); font-size: 0.9rem; font-style: italic; }

/* Legal pages */
.legal { max-width: 72ch; }
.legal h2 { margin-top: 1.8em; font-size: 1.3rem; }
.legal .draft { background: #3a2a14; border: 1px solid var(--ember); color: var(--bone); padding: 0.8rem 1rem; border-radius: var(--radius); font-size: 0.95rem; }
.legal .ph { background: #4a2f22; color: #ffd9b3; padding: 0 0.3em; border-radius: 3px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; padding: 2rem 0 2.5rem; color: var(--bone-dim); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
.site-footer a { color: var(--bone-dim); display: inline-block; padding: 0.2rem 0; }   /* >= 24 px tap height */
.site-footer a:hover { color: var(--bone); }
.site-footer .family { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; align-items: center; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .site-header .wrap { min-height: 56px; }
  .card { padding: 1.1rem; }
}

/* The game logo on the Eldmark page (ashenverse/eldmark.html). */
.game-logo { display: block; width: min(150px, 38vw); height: auto; margin: 0 0 14px; }

/* Start page: "Ein Universum, fünf Türen" - five arched doors, each lit in its project's colour.
   The whole door is the link; the light behind it brightens on hover/focus. */
.hero.lead-in { padding-bottom: clamp(1.5rem, 4vw, 2.5rem); border-bottom: 0; }
.tagline { font-family: var(--serif); color: var(--ember-bright); font-size: clamp(1.1rem, 2.4vw, 1.5rem); letter-spacing: 0.04em; margin: -0.1em 0 1.1rem; }
.doors { list-style: none; margin: 0 0 1.2rem; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.door { --glow: var(--ember); flex: 1 1 170px; max-width: 240px; }
.door.novara { --glow: #c58a42; }
.door.lucid { --glow: #aab8d4; }
.door.forge { --glow: #e2733a; }
.door.eldmark { --glow: #86a94e; }
.door.suncrew { --glow: #f2e3bd; }
.door a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.55rem; height: 100%; min-height: 320px;
  padding: 2.4rem 1rem 1.2rem; text-align: center; color: var(--bone); overflow: hidden;
  background: linear-gradient(180deg, #1d1a17 0%, #141210 75%);
  border: 1px solid var(--line); border-radius: 50% 50% var(--radius) var(--radius) / 104px 104px var(--radius) var(--radius);
  transition: border-color 0.2s;
}
.door a::before {   /* the light behind the door */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.55; transition: opacity 0.25s;
  background: radial-gradient(90% 46% at 50% 0%, color-mix(in srgb, var(--glow) 42%, transparent), transparent 72%);
}
.door a:hover, .door a:focus-visible { text-decoration: none; border-color: color-mix(in srgb, var(--glow) 70%, transparent); }
.door a:hover::before, .door a:focus-visible::before { opacity: 1; }
.door a > * { position: relative; }
.door .sign { width: 76px; height: 76px; margin-bottom: 0.4rem; display: grid; place-items: center; }
.door .sign img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.door .sign-ph {   /* placeholder until the project's logo (made with GPT) exists */
  width: 64px; height: 64px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--glow) 60%, transparent);
  display: grid; place-items: center; font-family: var(--serif); font-size: 1.6rem; color: var(--glow);
}
.door h3 { margin: 0; font-size: 1.15rem; letter-spacing: 0.04em; }
.door p { margin: 0; color: var(--bone-dim); font-size: 0.93rem; line-height: 1.5; max-width: none; }
.door .state { margin-top: auto; padding-top: 0.6rem; font-size: 0.85rem; color: var(--glow); }
.door.eldmark .state { color: var(--olive-text); }
.doors-foot { text-align: center; color: var(--bone-dim); margin: 0 auto 1rem; max-width: none; }
@media (max-width: 560px) {
  .door { flex-basis: 150px; }
  .door a { min-height: 300px; padding: 1.9rem 0.7rem 1rem; border-radius: 50% 50% var(--radius) var(--radius) / 78px 78px var(--radius) var(--radius); }
  .door .sign { width: 60px; height: 60px; }
  .door .sign-ph { width: 52px; height: 52px; font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) { .door a, .door a::before { transition: none; } }

/* Eldmark page: one wide screenshot, then a 2x2 gallery; every shot opens in full size. */
.eld-hero { display: grid; grid-template-columns: 1fr auto; gap: 2.5rem; align-items: center; }
.eld-hero .game-logo { width: clamp(150px, 22vw, 240px); margin: 0; }
@media (max-width: 760px) { .eld-hero { grid-template-columns: 1fr; } .eld-hero .game-logo { order: -1; width: 130px; } }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0 0; }
.shots figure { margin: 0; }
.shots .wide { grid-column: 1 / -1; }
.shots a { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; }
.shots a:hover, .shots a:focus-visible { border-color: var(--ember); }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shots figcaption { font-size: 0.88rem; color: var(--bone-dim); margin-top: 0.45rem; }
@media (max-width: 560px) { .shots { grid-template-columns: 1fr; } }
