/* =============================================
   TALES BY RALUCA — Ghost Theme Stylesheet
   ============================================= */

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

:root {
  --parchment: #f2ede3;
  --parchment-dark: #e8e0d0;
  --parchment-card: #ede7d9;
  --ink: #1a1510;
  --ink-light: #3a3028;
  --crimson: #7a1a1a;
  --crimson-light: #8b2222;
  --gold: #b8962e;
  --gold-light: #c9a84c;
  --gold-muted: #9e8040;
  --text-body: #3d3428;
  --text-muted: #7a6e5f;
  --border: #d4c9b0;
  --dark-bg: #1a1510;
  --dark-surface: #231e17;
  --dark-text: #e8dfc8;
  --dark-text-muted: #a09070;
  /* Ghost custom font support */
  --gh-font-heading: 'Cinzel', serif;
  --gh-font-body: 'Cormorant Garamond', Georgia, serif;
}

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

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

body {
  background-color: var(--parchment);
  color: var(--text-body);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.display-name {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.05;
}

.display-name .first {
  color: var(--ink);
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  display: block;
}

.display-name .last {
  color: var(--crimson);
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  display: block;
}

.tagline {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 540px;
  margin: 1rem auto 0;
}

/* ---- DECORATIVE ---- */
.sparkles {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.sparkle {
  color: var(--gold);
  font-size: 1.2rem;
  display: inline-block;
}

.sparkle::before { content: '✦'; }

.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: -0.5rem 0;
}

.ornament-divider::before,
.ornament-divider::after {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  background: var(--gold-muted);
  opacity: 0.6;
}

.ornament-divider .diamond {
  color: var(--gold);
  font-size: 0.75rem;
}

.ornament-divider .diamond::before { content: '✦'; }

.section-label {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: 0.75rem;
}

/* ---- LAYOUT ---- */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ---- NAVIGATION ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--parchment);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  max-width: 1160px;
  margin: 0 auto;
}

.site-logo {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-muted);
  text-decoration: none;
}

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

.nav-links ul {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8rem;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links li {
  display: inline-block;
  white-space: nowrap;
}

.nav-links ul a,
.nav-links a {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links ul a:hover,
.nav-links a:hover,
.nav-links ul a.active,
.nav-links a.active {
  color: var(--ink);
}

.nav-subscribe a {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.5rem 1.25rem;
  transition: all 0.2s;
}

.nav-subscribe a:hover {
  border-color: var(--gold-muted);
  color: var(--gold-muted);
}

/* ---- HERO ---- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  position: relative;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.hero-cta {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-muted);
  text-decoration: none;
  border: 1px solid var(--gold-muted);
  padding: 0.9rem 2.25rem;
  transition: all 0.25s;
  margin-top: 0.5rem;
}

.hero-cta:hover {
  background: var(--gold-muted);
  color: var(--parchment);
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-muted);
  opacity: 0.7;
}

.scroll-hint::after {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: var(--gold-muted);
  opacity: 0.5;
}

/* ---- STORIES SECTION ---- */
.stories-section {
  padding: 3rem 0;
}

.section-header {
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0;
}

.section-divider {
  width: 40px;
  height: 1px;
  background: var(--crimson);
  opacity: 0.6;
  margin: 1.25rem 0 2rem;
}

.section-intro {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.65;
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.story-card {
  background: var(--parchment-card);
  border: 1px solid var(--border);
  padding: 2.25rem 2rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.story-card:hover {
  border-color: var(--gold-muted);
  box-shadow: 0 4px 24px rgba(184, 150, 46, 0.08);
}

.story-genre {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 0.75rem;
}

.story-title {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
  text-decoration: none;
  display: block;
}

.story-excerpt {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.card-sparkles {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.card-sparkle { color: var(--gold); font-size: 0.75rem; }
.card-sparkle::before { content: '✦'; }

.story-link {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--crimson);
  text-decoration: none;
  transition: color 0.2s;
}

.story-link:hover { color: var(--crimson-light); }
.story-link::after { content: ' →'; }

/* ---- ABOUT SECTION ---- */
.about-section {
  padding: 3rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: start;
}

.about-image {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  display: block;
}

.about-text .section-label {
  margin-bottom: 0.5rem;
}

.about-text h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1.25rem;
}

.about-lead {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-light);
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

.about-body {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

/* ---- BOOKS PAGE ---- */
.books-page {
  background: var(--dark-bg);
  color: var(--dark-text);
}

.books-page .site-nav {
  background: var(--dark-bg);
  border-bottom-color: rgba(255,255,255,0.08);
}

.books-page .site-logo { color: var(--gold-muted); }
.books-page .nav-links a { color: var(--dark-text-muted); }
.books-page .nav-links a:hover,
.books-page .nav-links a.active { color: var(--dark-text); }
.books-page .nav-subscribe a {
  border-color: rgba(255,255,255,0.15);
  color: var(--dark-text-muted);
}
.books-page .nav-subscribe a:hover {
  border-color: var(--gold-muted);
  color: var(--gold-muted);
}

.book-hero {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5rem;
  align-items: center;
  min-height: calc(100vh - 70px);
  padding: 5rem 0;
}

.book-cover-wrap {
  display: flex;
  justify-content: center;
}

.book-cover {
  width: 100%;
  max-width: 380px;
  display: block;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 4px 20px rgba(0,0,0,0.4);
}

.book-meta .section-label {
  color: var(--gold-muted);
}

.book-meta h1 {
  color: var(--dark-text);
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.25rem;
}

.book-divider {
  width: 40px;
  height: 1px;
  background: var(--gold-muted);
  opacity: 0.6;
  margin-bottom: 2rem;
}

.book-description {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--dark-text-muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.book-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 2rem;
  margin-bottom: 2.5rem;
}

.detail-label {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-muted);
  padding-top: 0.1rem;
}

.detail-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--dark-text-muted);
}

.book-cta {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-muted);
  text-decoration: none;
  border: 1px solid var(--gold-muted);
  padding: 0.9rem 2.25rem;
  transition: all 0.25s;
}

.book-cta:hover {
  background: var(--gold-muted);
  color: var(--dark-bg);
}

.post-feature-image {
  max-width: 760px;
  margin: 0 auto 3rem;
}

.post-feature-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---- SINGLE POST ---- */
.post-page {
  padding: 5rem 0;
}

.post-header {
  max-width: 760px;
  margin: 0 auto 3rem;
  text-align: center;
}

.post-genre {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 1rem;
}

.post-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1.5rem;
}

.post-content {
  max-width: 680px;
  margin: 0 auto;
  font-family: 'IM Fell English', serif;
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--text-body);
}

.post-content p { margin-bottom: 1.5rem; }
.post-content h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.post-content h3 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }
.post-content blockquote {
  border-left: 2px solid var(--crimson);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-muted);
}

.about-heading {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.about-content {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.about-content p:first-child {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-light);
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

.about-content p { margin-bottom: 1.25rem; }

/* ---- GHOST EDITOR CARD SUPPORT (required by GScan) ---- */

.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: 1.5rem calc(50% - 50vw);
  transform: translateX(calc(50vw - 50%));
}

.kg-width-full {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.kg-image { display: block; max-width: 100%; height: auto; }
.kg-image-card { margin: 1.5rem 0; }
.kg-image-card figcaption {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

.kg-gallery-container { display: flex; flex-direction: column; }
.kg-gallery-row { display: flex; flex-direction: row; justify-content: center; gap: 4px; margin-bottom: 4px; }
.kg-gallery-image img { display: block; width: 100%; height: 100%; object-fit: cover; }

.kg-embed-card { margin: 1.5rem 0; }
.fluid-width-video-wrapper { position: relative; overflow: hidden; padding-top: 56.25%; }
.fluid-width-video-wrapper iframe,
.fluid-width-video-wrapper object,
.fluid-width-video-wrapper embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

.kg-bookmark-card { margin: 1.5rem 0; }
.kg-bookmark-container {
  display: flex; text-decoration: none;
  border: 1px solid var(--border); padding: 1rem;
  background: var(--parchment-card);
}
.kg-bookmark-title { font-family: 'Cinzel', serif; font-size: 0.9rem; color: var(--ink); margin-bottom: 0.25rem; }
.kg-bookmark-description { font-size: 0.85rem; color: var(--text-muted); }
.kg-bookmark-thumbnail img { max-width: 140px; object-fit: cover; margin-left: 1rem; }

/* ---- BOOKS PAGE ---- */
.books-page-wrap {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  padding: 5rem 2rem;
}

.books-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5rem;
  align-items: center;
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
}

.book-cover-col {
  display: flex;
  justify-content: center;
}

.book-cover {
  width: 100%;
  max-width: 380px;
  display: block;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 4px 20px rgba(0,0,0,0.4);
}

.book-info-col .section-label {
  color: var(--gold-muted);
}

.book-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--dark-text);
  margin-bottom: 1.25rem;
}

.book-divider {
  width: 40px;
  height: 1px;
  background: var(--gold-muted);
  opacity: 0.6;
  margin-bottom: 2rem;
}

.book-description {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--dark-text-muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.book-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 2rem;
  margin-bottom: 2.5rem;
  align-items: baseline;
}

.detail-label {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-muted);
}

.detail-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--dark-text-muted);
}

.book-cta {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-muted);
  text-decoration: none;
  border: 1px solid var(--gold-muted);
  padding: 0.9rem 2.25rem;
  transition: all 0.25s;
}

.book-cta:hover {
  background: var(--gold-muted);
  color: var(--dark-bg);
}

@media (max-width: 768px) {
  .books-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .book-cover { max-width: 260px; }
}

.book-page-content {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--dark-text-muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.book-page-content p { margin-bottom: 1.25rem; }

/* ---- FOOTER ---- */
.site-footer {
  margin-top: auto;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.dark-footer {
  background: var(--dark-bg);
  border-top-color: rgba(255,255,255,0.08);
}

.footer-logo {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: 0.5rem;
}

.footer-copy {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.dark-footer .footer-copy { color: var(--dark-text-muted); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-inner { flex-wrap: wrap; gap: 1rem; }
  .nav-links { gap: 1.5rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-image { max-width: 100%; aspect-ratio: 4/3; }
  .book-hero { grid-template-columns: 1fr; gap: 3rem; min-height: auto; }
  .stories-grid { grid-template-columns: 1fr; }
}

/* ---- MOBILE ---- */
@media (max-width: 768px) {
  .nav-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
  }

  .site-logo {
    width: 100%;
    text-align: center;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .nav-links ul {
    gap: 2rem;
    justify-content: center;
    flex-wrap: nowrap;
  }

  .nav-subscribe {
    order: 2;
    width: 100%;
    text-align: center;
  }

  .hero {
    padding: 2rem 1.5rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-image {
    max-width: 280px;
    width: 100%;
    aspect-ratio: unset;
    object-fit: unset;
    margin: 0 auto;
    display: block;
  }

  .about-section {
    padding: 2rem 0;
  }

  .stories-section {
    padding: 2rem 0;
  }

  .stories-grid {
    grid-template-columns: 1fr;
  }

  .books-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 1.5rem;
  }

  .book-cover {
    max-width: 240px;
    margin: 0 auto;
    display: block;
  }

  .book-entry,
  .book-entry:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .book-entry:nth-child(even) .book-entry-cover,
  .book-entry:nth-child(even) .book-entry-info {
    order: unset;
  }

  .about-grid > div:first-child {
    display: flex;
    justify-content: center;
  }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-content > * {
  animation: fadeUp 0.8s ease forwards;
  opacity: 0;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.25s; }
.hero-content > *:nth-child(3) { animation-delay: 0.4s; }
.hero-content > *:nth-child(4) { animation-delay: 0.55s; }
.hero-content > *:nth-child(5) { animation-delay: 0.7s; }
