/* ============================================================
   Lurkling: Global Styles
   Creepster (headings) + Josefin Sans (body)
   Mobile-first, single-column, max-width 720px
   Dark/moody aesthetic. Tim Burton meets Dr. Seuss.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Josefin+Sans:wght@400;600;700&display=swap');

/* ---- Reset & Base ----------------------------------------- */

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: #d4d0c8;
  background-color: var(--color-bg, #1a1a1a);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary, #b8860b);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

a:focus-visible {
  outline: 3px solid var(--color-primary, #b8860b);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Typography ------------------------------------------- */

h1, h2, h3, h4 {
  font-family: 'Creepster', cursive;
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-primary, #b8860b);
}

p {
  margin-bottom: 1.25rem;
}

p:last-child {
  margin-bottom: 0;
}

/* ---- Layout Container ------------------------------------- */

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---- Ad Slot ---------------------------------------------- */

.ad-slot {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  padding: 1.5rem 1rem;
  text-align: center;
  color: #555;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2.5rem auto;
  max-width: 728px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
}

/* ---- Story Nav -------------------------------------------- */

.story-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-primary, #b8860b);
  color: #fff;
  padding: 0.6rem 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.story-nav .container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.story-nav .nav-title {
  font-family: 'Creepster', cursive;
  font-weight: 400;
  font-size: 1.05rem;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}

.story-nav .nav-chapters {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  flex: 1;
}

.story-nav .nav-chapters a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.story-nav .nav-chapters a:hover,
.story-nav .nav-chapters a:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
}

.story-nav .nav-cta {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  white-space: nowrap;
  transition: background 0.15s;
}

.story-nav .nav-cta:hover,
.story-nav .nav-cta:focus-visible {
  background: rgba(255, 255, 255, 0.35);
  text-decoration: none;
}

/* ---- Hero Section ----------------------------------------- */

.hero {
  padding: 3rem 0 2.5rem;
  text-align: center;
  background-color: var(--color-accent, #2a2a2a);
}

.hero-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.hero-eyebrow {
  font-family: 'Creepster', cursive;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-secondary, #708090);
  margin-bottom: 0.6rem;
}

.hero-title {
  font-size: clamp(2.2rem, 7vw, 3.75rem);
  color: var(--color-primary, #b8860b);
  margin-bottom: 1rem;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.hero-tagline {
  font-size: 1.1rem;
  font-weight: 600;
  color: #a0a0a0;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---- Chapter Sections ------------------------------------- */

.chapter {
  padding: 3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chapter:last-of-type {
  border-bottom: none;
}

.chapter-number {
  font-family: 'Creepster', cursive;
  font-weight: 400;
  font-size: 5rem;
  line-height: 1;
  color: var(--color-primary, #b8860b);
  opacity: 0.6;
  margin-bottom: -0.75rem;
  user-select: none;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.chapter-title {
  font-size: 1.6rem;
  color: var(--color-primary, #b8860b);
  margin-bottom: 1.5rem;
}

.chapter-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1.75rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* ---- Field Notes ------------------------------------------ */

.field-notes {
  background-color: var(--color-accent, #2a2a2a);
  padding: 2.5rem 0;
  margin: 2rem 0;
}

.field-notes h2 {
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.field-notes ul {
  list-style: none;
  padding: 0;
}

.field-notes ul li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
  line-height: 1.6;
}

.field-notes ul li:last-child {
  border-bottom: none;
}

.field-notes ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-primary, #b8860b);
}

/* ---- Dig Deeper Section ----------------------------------- */

.dig-deeper {
  padding: 3rem 0;
  text-align: center;
}

.dig-deeper h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.dig-deeper p {
  color: #888;
  max-width: 520px;
  margin: 0 auto 1.75rem;
}

.dig-deeper-btn {
  display: inline-block;
  background-color: var(--color-primary, #b8860b);
  color: #fff;
  font-family: 'Creepster', cursive;
  font-weight: 400;
  font-size: 1rem;
  padding: 0.75rem 2rem;
  border-radius: 30px;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dig-deeper-btn:hover,
.dig-deeper-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  text-decoration: none;
  filter: brightness(1.15);
}

/* ---- Footer ----------------------------------------------- */

.site-footer {
  background-color: #0d0d0d;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.55);
}

.site-footer .footer-tagline {
  display: block;
  margin-top: 0.5rem;
  font-family: 'Creepster', cursive;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.08em;
}

.site-footer .footer-dot {
  margin: 0 0.6em;
  opacity: 0.4;
}

/* ---- Back link -------------------------------------------- */

.back-link-bar {
  padding: 0.75rem 0;
  font-size: 0.85rem;
  background: var(--color-bg, #1a1a1a);
}

.back-link-bar a {
  font-weight: 700;
  color: var(--color-primary, #b8860b);
}

/* ---- Homepage Styles -------------------------------------- */

.homepage {
  background: #111;
}

.homepage-header {
  text-align: center;
  padding: 3.5rem 1.25rem 2.5rem;
  background: linear-gradient(160deg, #1a1a1a 0%, #111 60%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.homepage-header .site-logo {
  font-family: 'Creepster', cursive;
  font-weight: 400;
  font-size: clamp(3.5rem, 12vw, 6.5rem);
  color: #c9b037;
  line-height: 1;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.homepage-header .site-tagline {
  font-size: 0.85rem;
  font-weight: 600;
  color: #706858;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.homepage-header .header-desc {
  margin-top: 1rem;
  font-size: 1rem;
  color: #888;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

.stories-grid {
  padding: 2rem 1.25rem 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.stories-grid h2 {
  font-family: 'Creepster', cursive;
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: #706858;
  margin-bottom: 1.5rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 580px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

.story-card {
  background: #1e1e1e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  cursor: pointer;
}

.story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.story-card:focus-within {
  outline: 3px solid var(--card-color, #c9b037);
  outline-offset: 2px;
}

.story-card-thumb {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  object-position: top center;
  background: #2a2a2a;
}

.story-card-thumb-placeholder {
  width: 100%;
  aspect-ratio: 5 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: #2a2a2a;
  color: #444;
}

.story-card-body {
  padding: 1.1rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.story-card-title {
  font-family: 'Creepster', cursive;
  font-weight: 400;
  font-size: 1.15rem;
  color: #e0dcd4;
  margin-bottom: 0.4rem;
  line-height: 1.25;
}

.story-card-tagline {
  font-size: 0.88rem;
  color: #888;
  line-height: 1.5;
  flex: 1;
  margin-bottom: 1rem;
}

.story-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--card-color, #c9b037);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: gap 0.15s;
}

.story-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.story-card-link:hover {
  gap: 0.5rem;
  text-decoration: none;
}

.homepage-ad {
  max-width: 728px;
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
}

/* ---- Responsive tweaks for story pages ------------------- */

@media (min-width: 720px) {
  .hero {
    padding: 4rem 0 3rem;
  }

  .chapter {
    padding: 4rem 0;
  }

  .chapter-number {
    font-size: 7rem;
  }
}
