/* ============================================================
   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;
}
.story-summary {
  font-size: 0.75rem;
  color: #666;
  max-width: 600px;
  margin: -2.5rem auto 0.25rem;
  line-height: 1.4;
}

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

/* ---- Placeholder Images ----------------------------------- */

.placeholder-image {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Creepster', cursive;
  color: rgba(255, 255, 255, 0.12);
  letter-spacing: 0.08em;
  background: var(--color-accent, #2a2a2a);
}

.hero-image.placeholder-image {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

.chapter-image.placeholder-image {
  font-size: clamp(1rem, 3vw, 1.5rem);
}

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

/* ---- Top Bar ---------------------------------------------- */

.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.top-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.25rem;
}

.top-bar-logo {
  font-family: 'Creepster', cursive;
  font-weight: 400;
  font-size: 1.6rem;
  color: #c9b037;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: color 0.2s;
}

.top-bar-logo:hover,
.top-bar-logo:focus-visible {
  color: #dbc44a;
  text-decoration: none;
}

.top-bar-link {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color 0.2s;
}

.top-bar-link:hover,
.top-bar-link:focus-visible {
  color: #c9b037;
  text-decoration: none;
}

/* ---- Homepage Hero ---------------------------------------- */

.homepage-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: #111;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.homepage-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.homepage-hero-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.homepage-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.4) 0%,
    rgba(10, 10, 10, 0.6) 50%,
    #111 100%
  );
}

.homepage-hero-content {
  position: relative;
  z-index: 1;
  padding: 6rem 1.25rem 5rem;
}

.homepage-hero .site-logo {
  font-family: 'Creepster', cursive;
  font-weight: 400;
  font-size: clamp(3.5rem, 14vw, 7.5rem);
  color: #c9b037;
  line-height: 1;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.7), 0 0 60px rgba(0, 0, 0, 0.9);
}

.homepage-hero .site-tagline {
  font-size: 0.9rem;
  font-weight: 600;
  color: #c0b898;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.homepage-hero .header-desc {
  margin-top: 1.25rem;
  font-size: 1.05rem;
  color: #bbb;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

@media (min-width: 720px) {
  .homepage-hero-content {
    padding: 8rem 1.25rem 7rem;
  }
}

.stories-grid {
  padding: 2rem 1.25rem 3rem;
  max-width: 1100px;
  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: repeat(2, 1fr);
  }
}

@media (min-width: 860px) {
  .grid {
    grid-template-columns: repeat(3, 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: 1 / 1;
  object-fit: cover;
  object-position: top center;
  background: #2a2a2a;
}

.story-card-thumb-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Creepster', cursive;
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 1rem;
  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;
}

/* ---- More Creatures (cross-links) ----------------------- */

.more-creatures {
  padding: 3rem 1.25rem;
  max-width: 720px;
  margin: 0 auto;
}

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

.more-creatures-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

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

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

.more-creatures-grid a {
  display: block;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  color: #bbb;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.more-creatures-grid a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #c9b037;
  text-decoration: none;
}

/* ---- Legal / Info Pages ----------------------------------- */

.legal-page {
  padding: 3rem 0 4rem;
}

.legal-page h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  margin-bottom: 1.5rem;
}

.legal-page h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-page p {
  color: #bbb;
}

.legal-page ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1.25rem;
}

.legal-page ul li {
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
  color: #bbb;
  line-height: 1.6;
}

.legal-page ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-primary, #c9b037);
}

.legal-updated {
  font-size: 0.85rem;
  color: #666;
  margin-top: -1rem;
  margin-bottom: 2rem;
}

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

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

/* ---- Cookie Consent Banner -------------------------------- */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1a1a1a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.cookie-banner p {
  font-size: 0.82rem;
  color: #999;
  margin: 0;
}

.cookie-banner a {
  color: #c9b037;
}

.cookie-btn {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #111;
  background: #c9b037;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.cookie-btn:hover {
  background: #dbc44a;
}

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

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

  .chapter {
    padding: 4rem 0;
  }

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