/* ========================================
   FONTS
   ======================================== */

@font-face {
  font-family: 'Cinzel Decorative';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/cinzel-decorative-bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cinzel-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/cinzel-semibold.woff2') format('woff2');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-italic.woff') format('woff');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-semibold.woff2') format('woff2');
}

/* ========================================
   CUSTOM PROPERTIES
   ======================================== */

:root {
  --color-forest-deep: #0c1f17;
  --color-forest-dark: #132e22;
  --color-forest-mid: #1a3f2f;
  --color-teal: #2d6b5a;
  --color-teal-light: #5aaa8a;
  --color-gold: #c8a84e;
  --color-gold-light: #f0d878;
  --color-gold-dim: #8a7030;
  --color-text-light: #e8f0ea;
  --color-text-muted: #a8c4b4;

  --font-display: 'Cinzel Decorative', 'Georgia', serif;
  --font-heading: 'Cinzel', 'Georgia', serif;
  --font-body: 'Cormorant Garamond', 'Georgia', serif;

  --max-width: 1100px;
}

/* ========================================
   RESET & BASE
   ======================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--color-text-light);
  background-color: var(--color-forest-deep);
  overflow-x: hidden;
}

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

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-gold-light);
}

h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.8rem;
  color: var(--color-gold);
  margin-bottom: 1.2rem;
  letter-spacing: 0.03em;
}

/* ========================================
   SECTION DIVIDER (ornament)
   ======================================== */

.section-divider {
  width: 150px;
  height: auto;
  margin: 0 auto 3rem;
  opacity: 0.65;
  background: none;
}

.section-divider::after {
  content: '';
  display: block;
  width: 100%;
  padding-bottom: 75%;
  background: url('../img/vignette.png') center / contain no-repeat;
}

/* ========================================
   FADE-IN ANIMATION
   ======================================== */

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   HERO
   ======================================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0 -5px;
  background: url('../img/hero-bg.jpg') center center / cover no-repeat;
  animation: hero-breathe 25s ease-in-out infinite,
             hero-sway 35s ease-in-out infinite;
}

@keyframes hero-breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}

@keyframes hero-sway {
  0%, 100% { transform: translateX(-5px); }
  50%      { transform: translateX(5px); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 31, 23, 0.3) 0%,
    rgba(12, 31, 23, 0.45) 45%,
    rgba(12, 31, 23, 0.2) 70%,
    rgba(12, 31, 23, 0.7) 100%
  );
  z-index: 1;
}

.hero__fireflies {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 3;
  padding: 2rem 1.5rem;
  padding-bottom: 0;
  margin-bottom: 150px;
}

.hero__author {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero__title {
  margin-bottom: 1rem;
  line-height: 0;
  display: flex;
  justify-content: center;
}

.hero__title-img {
  width: clamp(260px, 55vw, 500px);
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 25px rgba(200, 168, 78, 0.4))
          drop-shadow(0 0 60px rgba(200, 168, 78, 0.15));
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: 1.3rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
  font-style: italic;
}

.hero__date {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-gold-light);
  letter-spacing: 0.05em;
}

/* Hero characters */
.hero__characters {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: clamp(220px, 45vw, 420px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 0 30px rgba(12, 31, 23, 0.6));
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.hero__scroll-arrow {
  display: block;
  width: 16px;
  height: 16px;
  border-right: 2px solid var(--color-gold);
  border-bottom: 2px solid var(--color-gold);
  transform: rotate(45deg);
  animation: bounce 2s ease-in-out infinite;
  opacity: 0.7;
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.7; }
  50% { transform: rotate(45deg) translate(5px, 5px); opacity: 1; }
}

/* ========================================
   FIREFLY PARTICLES
   ======================================== */

.firefly {
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--color-gold-light);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--color-gold), 0 0 24px rgba(200, 168, 78, 0.5), 0 0 40px rgba(240, 216, 120, 0.2);
  animation: firefly-float var(--duration) ease-in-out infinite,
             firefly-glow 3s ease-in-out infinite alternate;
  opacity: 0;
}

@keyframes firefly-float {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  50% {
    transform: translate(var(--dx), var(--dy));
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translate(calc(var(--dx) * -0.5), calc(var(--dy) * 1.5));
    opacity: 0;
  }
}

@keyframes firefly-glow {
  0% { box-shadow: 0 0 10px var(--color-gold), 0 0 20px rgba(200, 168, 78, 0.3), 0 0 35px rgba(200, 168, 78, 0.1); }
  100% { box-shadow: 0 0 18px var(--color-gold-light), 0 0 35px rgba(240, 216, 120, 0.5), 0 0 55px rgba(240, 216, 120, 0.2); }
}

/* ========================================
   HERO BEE (Sumsebrums)
   ======================================== */

.hero__bee {
  position: absolute;
  z-index: 3;
  font-size: 28px;
  pointer-events: auto;
  cursor: default;
  opacity: 0;
  transition: none;
}

.hero__bee--flying {
  animation: bee-fly var(--bee-duration) linear forwards,
             bee-float 5s ease-in-out infinite;
}

.hero__bee--looping {
  animation: bee-fly var(--bee-duration) linear forwards,
             bee-loop var(--bee-duration) ease-in-out forwards;
}

@keyframes bee-fly {
  0%   { opacity: 0; }
  3%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes bee-float {
  0%, 100% { transform: scaleX(var(--bee-dir, -1)) translateY(0) rotate(-4deg); }
  50%      { transform: scaleX(var(--bee-dir, -1)) translateY(-45px) rotate(4deg); }
}

@keyframes bee-loop {
  0%   { transform: scaleX(var(--bee-dir, -1)) translateY(0) rotate(-4deg); }
  10%  { transform: scaleX(var(--bee-dir, -1)) translateY(-30px) rotate(4deg); }
  20%  { transform: scaleX(var(--bee-dir, -1)) translateY(0) rotate(-4deg); }
  30%  { transform: scaleX(var(--bee-dir, -1)) translateY(-35px) rotate(4deg); }
  /* Looping */
  42%  { transform: scaleX(var(--bee-dir, -1)) translateY(-20px) rotate(0deg); }
  48%  { transform: scaleX(var(--bee-dir, -1)) translateY(-60px) rotate(180deg); }
  54%  { transform: scaleX(var(--bee-dir, -1)) translateY(-20px) rotate(360deg); }
  /* Weiter normal (aufbauend auf 360°) */
  65%  { transform: scaleX(var(--bee-dir, -1)) translateY(-40px) rotate(364deg); }
  78%  { transform: scaleX(var(--bee-dir, -1)) translateY(0) rotate(356deg); }
  90%  { transform: scaleX(var(--bee-dir, -1)) translateY(-25px) rotate(364deg); }
  100% { transform: scaleX(var(--bee-dir, -1)) translateY(0) rotate(356deg); }
}

@media (max-width: 599px) {
  .hero__bee {
    font-size: 22px;
  }
}

/* ========================================
   BUCH (Über das Buch)
   ======================================== */

.buch {
  padding: 5rem 1.5rem;
  background-color: var(--color-forest-deep);
}

.buch__container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

.buch__cover img {
  width: 280px;
  border-radius: 4px;
  box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.5);
  transform: perspective(800px) rotateY(-5deg);
  transition: transform 0.5s ease;
}

.buch__cover img:hover {
  transform: perspective(800px) rotateY(0deg);
}

.buch__text p {
  margin-bottom: 1rem;
  color: var(--color-text-light);
}

.buch__quote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  border-left: 3px solid var(--color-gold);
  background: rgba(200, 168, 78, 0.05);
  border-radius: 0 8px 8px 0;
}

.buch__quote p {
  font-style: italic;
  font-size: 1.15rem;
  color: var(--color-gold-light);
  margin-bottom: 0;
}

.buch__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.buch__badge {
  display: inline-block;
  margin-top: 1.2rem;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--color-teal);
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-teal-light);
  letter-spacing: 0.03em;
}

/* ========================================
   TROPES
   ======================================== */

.tropes {
  padding: 5rem 1.5rem;
  background-color: var(--color-forest-dark);
  text-align: center;
}

.tropes__heading {
  margin-bottom: 2.5rem;
}

.tropes__grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

.tropes__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(45, 107, 90, 0.15);
  border: 1px solid rgba(45, 107, 90, 0.3);
  border-radius: 8px;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.tropes__item:hover {
  border-color: var(--color-gold-dim);
  background: rgba(200, 168, 78, 0.08);
}

.tropes__icon {
  font-size: 1.6rem;
  color: var(--color-gold);
  flex-shrink: 0;
  width: 2.5rem;
  text-align: center;
  filter: grayscale(1) sepia(1) saturate(2) brightness(0.9) hue-rotate(5deg);
  transition: filter 0.4s ease;
}

.tropes__item:hover .tropes__icon {
  filter: none;
}

.tropes__label {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-text-light);
}

/* ========================================
   WELT (Die Welt von Assanthia)
   ======================================== */

.welt {
  position: relative;
  padding: 6rem 1.5rem;
  background: url('../img/promo-wald.jpg') center center / cover no-repeat fixed;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welt__overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 31, 23, 0.8);
}

.welt__content {
  position: relative;
  z-index: 1;
  max-width: 750px;
  text-align: center;
}

.welt__content h2 {
  font-size: 2rem;
}

.welt__content p {
  margin-bottom: 1rem;
}

/* ========================================
   AUTORIN
   ======================================== */

.autorin {
  padding: 5rem 1.5rem;
  background-color: var(--color-forest-deep);
}

.autorin__container {
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
}

.autorin__container p {
  margin-bottom: 1rem;
}

.autorin__link {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-gold-dim);
  padding-bottom: 2px;
}

.autorin__link:hover {
  border-bottom-color: var(--color-gold-light);
}

/* ========================================
   CTA
   ======================================== */

.cta {
  padding: 5rem 1.5rem;
  background-color: var(--color-forest-dark);
}

.cta__container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  text-align: center;
}

.cta__image img {
  width: 260px;
  border-radius: 8px;
  box-shadow: 8px 8px 25px rgba(0, 0, 0, 0.4);
}

.cta__text h2 {
  font-size: 2rem;
}

.cta__date {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-gold-light);
  margin-bottom: 1rem;
}

.cta__text p {
  margin-bottom: 1.5rem;
  color: var(--color-text-muted);
}

.cta__button {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-forest-deep);
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  border-radius: 4px;
  letter-spacing: 0.05em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(200, 168, 78, 0.3);
}

.cta__button:hover {
  color: var(--color-forest-deep);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(200, 168, 78, 0.5);
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  padding: 2rem 1.5rem;
  background-color: var(--color-forest-deep);
  border-top: 1px solid rgba(45, 107, 90, 0.2);
}

.footer__container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer__copyright {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer__links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.footer__links a {
  color: var(--color-text-muted);
}

.footer__links a:hover {
  color: var(--color-gold);
}

/* ========================================
   RESPONSIVE: TABLET (600px+)
   ======================================== */

@media (min-width: 600px) {
  .buch__container {
    flex-direction: row;
    align-items: flex-start;
  }

  .buch__cover {
    flex-shrink: 0;
    width: 40%;
  }

  .buch__cover img {
    width: 100%;
  }

  .buch__text {
    flex: 1;
  }

  .tropes__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta__container {
    flex-direction: row;
    text-align: left;
  }

  .cta__image {
    flex-shrink: 0;
  }
}

/* ========================================
   RESPONSIVE: DESKTOP (900px+)
   ======================================== */

@media (min-width: 900px) {
  .hero__content {
    margin-bottom: auto;
    margin-top: 8vh;
  }

  h2 {
    font-size: 2.2rem;
  }

  .buch__cover img {
    transform: perspective(800px) rotateY(-8deg);
    box-shadow: 15px 15px 40px rgba(0, 0, 0, 0.5);
  }

  .buch__cover img:hover {
    transform: perspective(800px) rotateY(-2deg);
  }

  .tropes__grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .tropes__item {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
  }

  .tropes__icon {
    font-size: 2rem;
  }

  .welt__content h2 {
    font-size: 2.5rem;
  }

  .cta__image img {
    width: 320px;
  }

  .footer__container {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ========================================
   DISABLE PARALLAX ON MOBILE
   ======================================== */

@media (max-width: 899px) {
  .welt {
    background-attachment: scroll;
  }
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__scroll-arrow {
    animation: none;
  }

  .firefly,
  .hero__bee {
    display: none;
  }

  .hero::before {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}
