/* JH Ember — Short Story Site */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,600&family=Josefin+Sans:wght@200;300;400&display=swap');

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

:root {
  --bg: #0e0d0b;
  --surface: #161410;
  --border: #2a2520;
  --text: #e8e0d0;
  --muted: #8a7f70;
  --accent: #c8a96e;
  --accent-dim: #7a6540;
  --danger: #8b3a3a;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Josefin Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── HEADER ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(14,13,11,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-family: var(--sans);
  font-weight: 200;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}
.site-logo span { color: var(--muted); }
.site-nav { display: flex; gap: 2rem; }
.site-nav a {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--accent); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 8rem 4rem 6rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 60%, rgba(200,169,110,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(139,58,58,0.05) 0%, transparent 50%);
  pointer-events: none;
}
.hero-eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 14ch;
  margin-bottom: 2rem;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}
.hero-sub {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 200;
  letter-spacing: 0.15em;
  color: var(--muted);
  max-width: 40ch;
  line-height: 1.8;
}
.hero-rule {
  width: 60px; height: 1px;
  background: var(--accent-dim);
  margin: 2rem 0;
}

/* ── MAIN CONTENT ── */
main { padding-top: 64px; }

/* ── SECTION ── */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 3rem;
}
.section-label {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.section-label::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
  max-width: 200px;
}

/* ── STORY GRID ── */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5px;
  background: var(--border);
  border: 1px solid var(--border);
}
.story-card {
  background: var(--surface);
  padding: 2.5rem;
  text-decoration: none;
  color: inherit;
  display: flex; flex-direction: column;
  transition: background 0.25s;
  position: relative;
}
.story-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s ease;
}
.story-card:hover { background: #1a1815; }
.story-card:hover::before { transform: scaleY(1); }

.card-genre {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin-bottom: 0.75rem;
}
.card-title {
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.card-date {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-top: auto;
  padding-top: 1.5rem;
}

/* ── SERIES BLOCK ── */
.series-block {
  border: 1px solid var(--border);
  margin-bottom: 3rem;
}
.series-header {
  padding: 2rem 2.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: space-between;
}
.series-title {
  font-size: 1.6rem;
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
}
.series-count {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--muted);
  text-transform: uppercase;
}
.series-parts {
  display: flex; flex-direction: column;
}
.series-part {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 2.5rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.series-part:last-child { border-bottom: none; }
.series-part:hover { background: #161410; }
.part-title { font-size: 1rem; font-weight: 400; }
.part-date {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--muted);
}
.part-arrow {
  color: var(--accent-dim);
  margin-left: 1.5rem;
  transition: transform 0.2s;
}
.series-part:hover .part-arrow { transform: translateX(4px); }

/* ── STORY PAGE ── */
.story-page { max-width: 720px; margin: 0 auto; padding: 5rem 2rem 8rem; }
.story-back {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-bottom: 4rem;
  transition: color 0.2s;
}
.story-back:hover { color: var(--accent); }
.story-genre-tag {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.story-title-h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.story-meta {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 4rem;
  display: flex; gap: 2rem; align-items: center;
}
.story-meta::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}
.story-body {
  font-size: 1.15rem;
  line-height: 1.9;
  color: #d8d0c0;
}
.story-body p { margin-bottom: 1.5em; }
.story-body h2, .story-body h3 {
  font-size: 1.3rem;
  font-weight: 500;
  margin: 2.5rem 0 1rem;
  color: var(--text);
}
.story-nav {
  display: flex; justify-content: space-between;
  padding-top: 4rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border);
}
.story-nav a {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.story-nav a:hover { color: var(--accent); }

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 4rem;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.footer-name { color: var(--accent); }

/* ── ABOUT ── */
.about-section { max-width: 640px; }
.about-section p {
  font-size: 1.1rem;
  line-height: 1.85;
  color: #c0b8a8;
  margin-bottom: 1.5rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero { padding: 8rem 2rem 4rem; }
  .section { padding: 3rem 1.5rem; }
  .site-header { padding: 0 1.25rem; }
  .site-footer { flex-direction: column; gap: 1rem; text-align: center; }
  .series-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-eyebrow { animation: fadeUp 0.6s ease both; }
.hero-title   { animation: fadeUp 0.6s 0.15s ease both; }
.hero-rule    { animation: fadeUp 0.6s 0.3s ease both; }
.hero-sub     { animation: fadeUp 0.6s 0.4s ease both; }
