/* Seed of Illyria — Thalyn Game Dev
   Warm story-forward indie: deep night / warm stone / soft gold-cyan */

:root {
  --night: #0c1018;
  --night-deep: #080b11;
  --dusk: #151b28;
  --panel: #1a2232;
  --panel-edge: #2a3548;
  --stone: #c4b5a0;
  --stone-soft: #a89880;
  --cream: #e8dfd0;
  --cream-dim: #b8ad9a;
  --gold: #d4a84b;
  --gold-soft: #c9a055;
  --cyan: #5eb8b0;
  --cyan-glow: #7ecfc7;
  --vein: linear-gradient(135deg, #d4a84b 0%, #5eb8b0 100%);
  --danger-mute: #8a5a5a;
  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;
  --max: 42rem;
  --wide: 56rem;
  --radius: 6px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(94, 184, 176, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(212, 168, 75, 0.06), transparent 50%),
    linear-gradient(180deg, var(--night-deep) 0%, var(--night) 40%, #101520 100%);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--cyan-glow);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.15s ease, opacity 0.15s ease;
}

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

a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* —— Header / Nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 11, 17, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(94, 184, 176, 0.15);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.85rem 1.25rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand:hover {
  color: inherit;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  background: var(--vein);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-soft);
}

.nav-toggle {
  display: none;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
}

.nav-toggle:hover {
  border-color: var(--cyan);
  color: var(--cyan-glow);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.1rem;
  align-items: center;
}

.site-nav a {
  color: var(--cream-dim);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--cream);
  background: rgba(94, 184, 176, 0.08);
}

.site-nav a[aria-current="page"] {
  color: var(--night-deep);
  background: var(--vein);
  font-weight: 600;
  border-color: transparent;
}

.site-nav a[aria-current="page"]:hover {
  color: var(--night-deep);
}

.nav-press {
  margin-left: 0.35rem;
  opacity: 0.75;
  font-size: 0.82rem !important;
}

/* —— Main —— */
.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}

.page-hero {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(212, 168, 75, 0.2);
}

.page-hero h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--cream);
}

.page-hero .lede {
  margin: 0.5rem 0 0;
  color: var(--stone);
  font-size: 1.05rem;
  max-width: var(--max);
}

.content {
  max-width: var(--max);
}

.content--wide {
  max-width: var(--wide);
}

.content h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  margin: 2.25rem 0 0.85rem;
  color: var(--gold-soft);
  letter-spacing: 0.01em;
}

.content h2:first-child {
  margin-top: 0;
}

.content h3 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  margin: 1.75rem 0 0.55rem;
  color: var(--cyan-glow);
}

.content h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.35rem 0 0.4rem;
  color: var(--stone);
}

.content p {
  margin: 0 0 1rem;
  max-width: 65ch;
}

.content ul,
.content ol {
  margin: 0 0 1.15rem;
  padding-left: 1.25rem;
  max-width: 65ch;
}

.content li {
  margin-bottom: 0.45rem;
}

.content li::marker {
  color: var(--cyan);
}

.content hr {
  border: none;
  height: 1px;
  margin: 2rem 0;
  background: linear-gradient(90deg, transparent, rgba(94, 184, 176, 0.35), rgba(212, 168, 75, 0.35), transparent);
}

.content strong {
  color: var(--cream);
  font-weight: 600;
}

.content em {
  color: var(--stone);
  font-style: italic;
}

.content blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--cyan);
  background: rgba(26, 34, 50, 0.6);
  color: var(--stone);
  max-width: 65ch;
}

/* Tables (press fact sheet) */
.content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  overflow: hidden;
}

.content th,
.content td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--panel-edge);
  vertical-align: top;
}

.content th {
  width: 28%;
  color: var(--gold-soft);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.2);
}

.content tr:last-child th,
.content tr:last-child td {
  border-bottom: none;
}

/* —— Home hero specials —— */
.home-hero {
  margin-bottom: 2rem;
  padding: 1.75rem 1.5rem;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(94, 184, 176, 0.12), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(212, 168, 75, 0.1), transparent 50%),
    var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 10px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--vein);
}

.home-headline {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--cream);
  max-width: 22ch;
}

.home-subhead {
  margin: 0;
  font-size: 1.15rem;
  color: var(--stone);
  max-width: 42ch;
  line-height: 1.5;
}

.home-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.45rem;
}

/* Soft CTAs */
.cta-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  max-width: none;
}

.cta-list li {
  margin: 0;
}

.cta {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--panel-edge);
  background: rgba(26, 34, 50, 0.85);
  color: var(--cream-dim);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.cta:hover {
  border-color: var(--cyan);
  color: var(--cream);
  background: rgba(94, 184, 176, 0.1);
}

.cta--muted {
  opacity: 0.7;
  border-style: dashed;
  cursor: default;
}

.cta--muted:hover {
  border-color: var(--panel-edge);
  color: var(--cream-dim);
  background: rgba(26, 34, 50, 0.85);
}

.cta--primary {
  border-color: rgba(212, 168, 75, 0.45);
  color: var(--gold);
}

.cta--primary:hover {
  border-color: var(--gold);
  color: var(--cream);
}

.tagline {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--stone-soft);
  font-style: italic;
}

/* Character / place cards feel */
.content h3 + p {
  margin-top: 0.35rem;
}

/* Codex sections */
.section-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid rgba(94, 184, 176, 0.12);
  background: var(--night-deep);
  padding: 1.5rem 1.25rem 2rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.88rem;
  color: var(--stone-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
}

.footer-links a {
  color: var(--cream-dim);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--cyan-glow);
}

.footer-note {
  width: 100%;
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--stone-soft);
  opacity: 0.85;
}

/* —— Top banner (rune valley) + drifting glyphs —— */
.banner {
  --rise: 300px;
  position: relative;
  height: clamp(170px, 24vw, 300px);
  overflow: hidden;
  isolation: isolate;
  /* fade the whole banner (art + glyphs) into the page's own navy gradient */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 50%, rgba(0, 0, 0, 0.55) 75%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 50%, rgba(0, 0, 0, 0.55) 75%, transparent 100%);
}

.banner--home {
  --rise: 560px;
  height: clamp(300px, 46vw, 580px);
}

.banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
  z-index: -2;
}

/* dark shading only: top edge under the header + soft vignette */
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 11, 17, 0.55) 0%, rgba(8, 11, 17, 0.1) 25%, rgba(8, 11, 17, 0.2) 100%),
    radial-gradient(ellipse 90% 80% at 50% 45%, transparent 55%, rgba(8, 11, 17, 0.6) 100%);
}

.glyph-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.glyph {
  position: absolute;
  left: var(--x);
  bottom: -40px;
  width: var(--s);
  height: var(--s);
  opacity: 0;
  animation: glyph-drift var(--d) linear var(--delay) infinite;
  will-change: transform, opacity;
}

@keyframes glyph-drift {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0;
  }
  18% {
    opacity: var(--o);
  }
  50% {
    transform: translate3d(var(--dx), calc(var(--rise) * -0.5), 0);
  }
  78% {
    opacity: var(--o);
  }
  100% {
    transform: translate3d(0, calc(var(--rise) * -1), 0);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .glyph {
    display: none;
  }
}

/* page title sits over the banner fade */
.site-main {
  position: relative;
  z-index: 2;
}

.banner + .site-main {
  margin-top: -4.5rem;
}

/* Home: logo art is the centerpiece, overlapping the banner */
.banner--home + .site-main--home {
  margin-top: calc(-1 * clamp(210px, 34vw, 430px));
}

.home-logo {
  margin: 0 auto 2.25rem;
  max-width: 460px;
}

.home-logo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(212, 168, 75, 0.22);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.7), 0 0 0 6px rgba(8, 11, 17, 0.55);
}

/* —— Content figures —— */
.fig,
.symbol-fig {
  margin: 1.75rem 0 2rem;
}

.fig img,
.symbol-fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--panel-edge);
  box-shadow: var(--shadow);
  background: var(--night-deep);
}

.fig figcaption,
.symbol-fig figcaption {
  margin-top: 0.55rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold-soft);
}

.fig--lead {
  max-width: 30rem;
  margin: 0 auto 2.25rem;
}

.fig--sylara {
  max-width: 22rem;
  margin: 2.25rem auto 2.5rem;
}

.symbol-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  max-width: 36rem;
  margin: 1.5rem auto 2.25rem;
}

.symbol-pair .symbol-fig {
  margin: 0;
}

/* banner / wide shots may run past the text column to the header's width */
.content .fig--banner,
.content .fig--wide {
  width: min(53.5rem, calc(100vw - 2.5rem));
  max-width: none;
}

.fig--banner img {
  aspect-ratio: 1600 / 430;
  object-fit: cover;
}

@media (max-width: 560px) {
  .symbol-pair {
    grid-template-columns: 1fr;
    max-width: 19rem;
    gap: 1.25rem;
  }

  .home-logo {
    max-width: 88%;
  }
}

/* Mobile nav */
@media (max-width: 760px) {
  .nav-toggle {
    display: inline-block;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 0.35rem 0 0.5rem;
    gap: 0.15rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--panel-edge);
    background: var(--panel);
  }

  .nav-press {
    margin-left: 0;
  }

  .header-inner {
    padding-bottom: 0.65rem;
  }

  .content table {
    display: block;
    overflow-x: auto;
  }
}

@media (min-width: 761px) {
  .site-nav {
    display: flex !important;
  }
}

/* Print: keep readable */
@media print {
  body {
    background: #fff;
    color: #111;
  }
  .site-header,
  .site-footer,
  .nav-toggle {
    position: static;
    background: none;
    box-shadow: none;
  }
  a {
    color: #064;
  }
}
