/* Emberhall — Warm Keep */
/* System fonts only. CSS-only texture. Respects prefers-reduced-motion. */

:root {
  --bg-charcoal: #151413;
  --bg-stone: #1c1b19;
  --bg-deep: #0f0e0d;
  --text-parchment: #e8e4dc;
  --text-muted: #9c968b;
  --text-ash: #6b665e;
  --accent-ember: #c4764a;
  --accent-copper: #b86f44;
  --accent-copper-dim: #8a5540;
  --glow-ember: rgba(196, 118, 74, 0.18);
  --glow-soft: rgba(196, 118, 74, 0.1);
  --glow-subtle: rgba(196, 118, 74, 0.06);
  --border-subtle: rgba(184, 111, 68, 0.2);
  --border-copper: rgba(184, 111, 68, 0.35);
  --card-bg: #1f1e1c;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --transition-base: 0.2s ease;
  --section-divider: linear-gradient(to right, transparent, rgba(184, 111, 68, 0.2), transparent);
}

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

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

  html {
    scroll-behavior: auto;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-parchment);
  background-color: var(--bg-charcoal);
  /* Layered gradients + CSS-only texture (no external images) */
  background-image:
    /* Top warm wash */
    radial-gradient(ellipse 100% 60% at 50% -10%, var(--glow-subtle), transparent 60%),
    /* Center ambient */
    radial-gradient(ellipse 80% 40% at 50% 40%, rgba(26, 22, 20, 0.5), transparent),
    /* Noise-like dither via fine repeating gradients */
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.03) 2px,
      rgba(0,0,0,0.03) 3px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.02) 2px,
      rgba(0,0,0,0.02) 3px
    ),
    /* Stone base */
    linear-gradient(180deg, var(--bg-stone) 0%, var(--bg-charcoal) 30%, var(--bg-deep) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 1rem 1.25rem;
  background: rgba(21, 20, 19, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
}

.nav-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  transition: color var(--transition-base);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--accent-ember);
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(320px, 70vh, 720px);
  padding: 4rem 2rem 5rem;
  text-align: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(15, 14, 13, 0.35) 0%, rgba(15, 14, 13, 0.75) 100%),
    radial-gradient(ellipse 90% 90% at 50% 50%, transparent 35%, rgba(0, 0, 0, 0.5) 100%),
    linear-gradient(180deg, rgba(196, 118, 74, 0.05) 0%, transparent 40%),
    url("assets/emberhall-hero.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(0.92);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}

.hero-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--text-parchment);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.4),
    0 0 40px var(--glow-ember),
    0 0 80px var(--glow-subtle);
  line-height: 1.15;
}

.hero-subtitle {
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
  color: var(--text-parchment);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Enter the Hall button — styles ready for .hero-cta */
.hero-cta {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.hero-cta:hover,
.hero-cta:focus-visible {
  color: var(--accent-ember);
  border-color: var(--border-copper);
  box-shadow: 0 0 16px var(--glow-soft);
}

/* Doors section anchor for scroll target */
.doors {
  scroll-margin-top: 4rem;
}

/* Doors (panels/cards) — hall doors with bevel, shadow, title + description space */
.doors {
  padding: 2rem 1.25rem 4rem;
  max-width: 56rem;
  margin: 0 auto;
}

.doors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.door {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 128px;
  padding: 1.35rem 1rem;
  /* Bevel / inner depth */
  background:
    linear-gradient(145deg, rgba(255,255,255,0.03) 0%, transparent 50%),
    linear-gradient(325deg, rgba(0,0,0,0.15) 0%, transparent 40%),
    var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 2px 8px rgba(0,0,0,0.25);
  text-decoration: none;
  color: var(--text-parchment);
  overflow: hidden;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.door::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 50% at 50% 100%,
    var(--glow-subtle) 0%,
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.door:hover,
.door:focus-visible {
  transform: translateY(-2px);
  border-color: var(--border-copper);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 0 24px var(--glow-soft),
    0 4px 16px rgba(0,0,0,0.3);
}

.door:hover::before,
.door:focus-visible::before {
  opacity: 1;
}

.door:focus {
  outline: none;
}

.door:focus-visible {
  outline: 2px solid var(--accent-ember);
  outline-offset: 2px;
}

.door-glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 2px;
  background: var(--accent-ember);
  opacity: 0;
  box-shadow: 0 0 10px var(--accent-ember);
  transition: opacity var(--transition-base);
}

.door:hover .door-glow,
.door:focus-visible .door-glow {
  opacity: 0.7;
}

.door-label {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-parchment);
}

.door-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
  text-align: center;
}

/* Sections — rooms with dividers */
.section {
  scroll-margin-top: 5rem;
  padding: 2.5rem 1.25rem;
  max-width: 48rem;
  margin: 0 auto;
}

.section + .section {
  border-top: 1px solid transparent;
  background-image: var(--section-divider);
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 60% 1px;
  padding-top: 2.5rem;
}

.section-card {
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.section-card h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent-copper);
}

.section-card > p:first-of-type {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.section-card p:last-child {
  margin: 0;
}

.section-content {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 2rem 1.25rem;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  background-image: var(--section-divider);
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 40% 1px;
}

.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-ash);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--bg-stone);
  color: var(--text-parchment);
  text-decoration: none;
  font-size: 0.9rem;
  transform: translateY(-100%);
  transition: transform var(--transition-base);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Accessibility */
.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;
}

:focus-visible {
  outline: 2px solid var(--accent-ember);
  outline-offset: 2px;
}

/* Mobile */
@media (max-width: 480px) {
  .hero {
    padding: 3rem 1rem 2.5rem;
  }

  .hero-title {
    letter-spacing: 0.12em;
  }

  .doors-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .door {
    min-height: 100px;
    padding: 1rem 0.75rem;
  }

  .section,
  .section + .section {
    padding: 1.5rem 1rem;
  }

  .section-card {
    padding: 1.5rem;
  }
}
