/* =============================================================================
   ELDIR ONLINE — STYLESHEET
   Dark fantasy / weathered manuscript aesthetic
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Spectral:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Cinzel:wght@400;500;600;700&display=swap');

:root {
  /* Color palette — parchment, ink, candlelight */
  --bg-deep: #0a0908;
  --bg-mid:  #15110d;
  --bg-warm: #1d1812;
  --ink:     #e8dfc9;
  --ink-dim: #a89b7e;
  --ink-faint: #6b5d44;
  --gold:    #c9a04e;
  --gold-bright: #e7bf6b;
  --crimson: #8c2a1f;
  --moss:    #4a5a3a;
  --rule:    #3a2f22;

  /* Status colors */
  --status-amber: #d4a534;
  --status-green: #6b8c5a;
  --status-crimson: #8c2a1f;

  /* Typography */
  --font-display: 'Cinzel', 'Trajan Pro', serif;
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-body:    'Spectral', 'Iowan Old Style', serif;

  /* Spacing */
  --content-width: 64rem;
  --narrow-width: 42rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at top, rgba(201, 160, 78, 0.04), transparent 50%),
    radial-gradient(ellipse at bottom, rgba(140, 42, 31, 0.03), transparent 50%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

/* Subtle grain overlay for atmosphere */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* Typography ============================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1.2;
}

.display-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
}

p, li {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink-dim);
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Layout primitives ======================================================= */

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  width: 100%;
  max-width: var(--narrow-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header ================================================================== */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 9, 8, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0;
}

header.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
}

.logo img {
  height: 3rem;
  width: auto;
  display: block;
}

.logo:hover img {
  opacity: 0.85;
}

.logo:hover {
  color: var(--gold);
}

nav.site-nav {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

nav.site-nav a {
  color: var(--ink-dim);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

nav.site-nav a:hover,
nav.site-nav a.active {
  color: var(--gold);
}

/* Hero ==================================================================== */

.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 6rem 0 4rem;
  background-image: url('/hero-bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(10, 9, 8, 0.95) 0%,
      rgba(10, 9, 8, 0.7) 15%,
      rgba(10, 9, 8, 0.55) 30%,
      rgba(10, 9, 8, 0.85) 75%,
      rgba(10, 9, 8, 1) 100%),
    radial-gradient(circle at 30% 40%, rgba(201, 160, 78, 0.12), transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(140, 42, 31, 0.08), transparent 40%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 48rem;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  display: inline-block;
  width: 2.5rem;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

.hero-eyebrow::before { display: none; }

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400;
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

.hero h1 .accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

.hero p.subhead {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-style: italic;
  font-weight: 400;
  color: var(--ink-dim);
  margin-bottom: 2.5rem;
  max-width: 36rem;
  line-height: 1.5;
}

.button-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid;
  transition: all 0.2s;
  cursor: pointer;
  background: transparent;
}

.btn-primary {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 160, 78, 0.05);
}

.btn-primary:hover {
  background: var(--gold);
  color: var(--bg-deep);
}

.btn-ghost {
  border-color: var(--ink-faint);
  color: var(--ink-dim);
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* Section dividers / ornaments ============================================ */

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 5rem 0 4rem;
  color: var(--gold);
  opacity: 0.7;
}

.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--rule), transparent);
  max-width: 12rem;
}

.ornament svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

/* Section heading ========================================================= */

.section-eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.section-title .accent {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}

/* Features ================================================================ */

section.features {
  padding: 6rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 3rem;
  margin-top: 4rem;
}

.feature {
  position: relative;
  padding-left: 2rem;
  border-left: 1px solid var(--rule);
}

.feature h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.6rem;
  color: var(--ink);
  margin-bottom: 1rem;
}

.feature h3::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  width: 1px;
  height: 2rem;
  background: var(--gold);
}

.feature p {
  font-size: 1rem;
  line-height: 1.7;
}

/* Long-form content (about, news detail) ================================== */

section.long-form {
  padding: 6rem 0;
}

.long-form-section {
  margin-bottom: 4rem;
}

.long-form-section h2 {
  font-size: 2rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.long-form-section h2::before {
  content: '§';
  display: inline-block;
  margin-right: 0.75rem;
  color: var(--gold);
  font-style: normal;
  font-family: var(--font-display);
}

.long-form-section p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  color: var(--ink-dim);
}

.long-form-section p:first-letter {
  /* Drop cap-ish first line emphasis */
  font-weight: 400;
}

/* News list =============================================================== */

.news-list {
  list-style: none;
}

.news-item {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0;
}

.news-item:last-child {
  border-bottom: 1px solid var(--rule);
}

.news-meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}

.news-date {
  color: var(--gold);
}

.news-item h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.news-item .summary {
  font-size: 1.1rem;
  color: var(--ink-dim);
  line-height: 1.6;
}

.news-item .body {
  font-size: 1rem;
  color: var(--ink-dim);
  margin-top: 1rem;
  line-height: 1.7;
}

/* Playtest banner ========================================================= */

section.playtest-banner {
  padding: 6rem 0;
  background:
    linear-gradient(to bottom, rgba(201, 160, 78, 0.04), rgba(140, 42, 31, 0.03)),
    var(--bg-mid);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  border: 1px solid;
  margin-bottom: 1.5rem;
}

.status-pill .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-amber  { color: var(--status-amber); border-color: var(--status-amber); }
.status-green  { color: var(--status-green); border-color: var(--status-green); }
.status-crimson { color: var(--status-crimson); border-color: var(--status-crimson); }

.playtest-banner h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

.playtest-banner p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-dim);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}

/* Footer ================================================================== */

footer.site-footer {
  border-top: 1px solid var(--rule);
  padding: 4rem 0 2rem;
  background: var(--bg-deep);
}

footer.site-footer .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 640px) {
  footer.site-footer .container {
    grid-template-columns: 1fr;
  }
}

.footer-block h4 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.25rem;
}

.footer-block ul {
  list-style: none;
}

.footer-block li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.footer-block a {
  color: var(--ink-dim);
}

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

.social-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.social-row a {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink-dim);
  transition: all 0.2s;
}

.social-row a:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.social-row svg {
  width: 1.1rem;
  height: 1.1rem;
}

.copyright {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-faint);
  font-family: var(--font-display);
  letter-spacing: 0.15em;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

/* Mobile nav ============================================================== */

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle svg { width: 1.5rem; height: 1.5rem; }

@media (max-width: 720px) {
  .menu-toggle { display: block; }

  nav.site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-mid);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    display: none;
  }

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

  .button-row { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; text-align: center; }
}

/* Animations ============================================================== */

.fade-in {
  opacity: 0;
  transform: translateY(1rem);
  animation: fadeUp 0.8s ease-out forwards;
}

.fade-in-delay-1 { animation-delay: 0.15s; }
.fade-in-delay-2 { animation-delay: 0.3s; }
.fade-in-delay-3 { animation-delay: 0.45s; }
.fade-in-delay-4 { animation-delay: 0.6s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
