﻿/* ==========================================================================
   dnzlegacy - The Book Garden: Nature & Literary Hero Section
   ========================================================================== */

:root {
  --color-forest: #07120d;
  --color-ivory: #fcfaf3;
  --color-gold: #dfbe6c;
  --color-gold-light: #fae28c;
  --color-gold-deep: #b38428;

  --font-logo: "Bodoni Moda", Georgia, serif;
  --font-quote: "Cormorant Garamond", Georgia, serif;
  --font-author: "Cinzel", "Cormorant Garamond", Georgia, serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--color-forest);
  color: var(--color-ivory);
  font-family: var(--font-quote);
  overflow-x: hidden;
  overflow-y: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Hero Viewport Layout (Original book-garden-concept.png preserved)
   ========================================================================== */

.hero {
  position: relative;
  width: 100vw;
  min-height: clamp(115px, 15vh, 145px);
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background:
    radial-gradient(ellipse 90% 60% at 50% 25%, rgba(7, 18, 13, 0.3) 0%, rgba(7, 18, 13, 0) 100%),
    linear-gradient(180deg, rgba(7, 18, 13, 0.4) 0%, rgba(7, 18, 13, 0.1) 45%, rgba(7, 18, 13, 0) 100%),
    url("./book-garden-concept.png") center bottom / cover no-repeat,
    var(--color-forest);
}

/* Subtle ambient mist layer */
.hero::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.18;
  background:
    radial-gradient(ellipse at 25% 85%, #58734e 0%, transparent 35%),
    radial-gradient(ellipse at 80% 15%, #465b3c 0%, transparent 30%);
  filter: blur(10px);
  animation: ambientMist 20s ease-in-out infinite alternate;
}

@keyframes ambientMist {
  0%   { transform: scale(1) translate3d(0, 0, 0); opacity: 0.16; }
  100% { transform: scale(1.03) translate3d(1%, -1%, 0); opacity: 0.22; }
}

/* Three.js Canvas */
#butterfly-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

/* ==========================================================================
   Hero Content Container
   ========================================================================== */

.hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  width: 100%;
  max-width: 860px;
  padding: 0 24px;
  margin-top: clamp(28px, 6.5vh, 72px);
  pointer-events: auto;
  user-select: none;
}

/* ==========================================================================
   1. Logo — dnzlegacy (Bodoni Moda Italic 600 + SVG ornaments)
   ========================================================================== */

.logo-wrapper {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(10px, 1.8vh, 20px);
  animation: fadeInLogo 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Two-leaf botanical SVG ornament anchored above 'ga' area */
.logo-leaf-container {
  position: absolute;
  /* Sit above the logo wordmark */
  bottom: calc(100% - 8px);
  /* 'g' starts ~63% across the wordmark 'dnzlegacy' */
  left: 63%;
  transform: translateX(-50%);
  width: clamp(46px, 5.5vw, 80px);
  z-index: 4;
  pointer-events: none;
}

.logo-leaf-ornament {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.7));
  animation: leafFloat 6s ease-in-out infinite alternate;
}

@keyframes leafFloat {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(1px, -2px, 0) rotate(1.5deg); }
}

/* Logo Wordmark — Bodoni Moda Italic 600 */
.hero-logo {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-img {
  width: clamp(260px, 38vw, 460px);
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 16px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 35px rgba(214, 180, 106, 0.35));
  user-select: none;
  pointer-events: none;
}

/* Gold curved underline swoosh SVG */
.logo-underline {
  display: block;
  width: clamp(240px, 34vw, 450px);
  height: auto;
  margin-top: clamp(-4px, -0.4vw, -2px);
  filter: drop-shadow(0 1px 6px rgba(200, 150, 20, 0.4));
  pointer-events: none;
}

/* ==========================================================================
   2. Inspirational Quote Section
   ========================================================================== */

.quote-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 680px;
  padding: 0;
  animation: fadeInQuote 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

/* Top decor: -- " -- */
.quote-header-decor {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  gap: 14px;
  margin-bottom: clamp(6px, 1vh, 10px);
  color: var(--color-gold);
}

.decor-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-gold) 60%, transparent);
  opacity: 0.75;
}

.decor-line--left {
  background: linear-gradient(to right, transparent, var(--color-gold));
}

.decor-line--right {
  background: linear-gradient(to left, transparent, var(--color-gold));
}

/* Large decorative quotation marks */
.quote-mark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1;
  display: block;
  text-shadow: 0 0 20px rgba(220, 179, 92, 0.5);
}

.quote-mark--open {
  font-size: clamp(32px, 3.5vw, 46px);
  display: inline;
}

.quote-mark--close {
  font-size: clamp(32px, 3.5vw, 46px);
  margin-bottom: clamp(4px, 0.8vh, 8px);
}

/* Quote Body — Cormorant Garamond Medium Italic */
.quote-body {
  font-family: var(--font-quote);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(18px, 2.3vw, 26px);
  color: var(--color-ivory);
  line-height: 1.72;
  letter-spacing: 0.01em;
  text-align: center;
  max-width: 580px;
  padding: 0 8px;
  margin-bottom: clamp(6px, 1vh, 10px);
  text-shadow: 0 2px 16px rgba(2, 8, 5, 0.9), 0 0 30px rgba(2, 8, 5, 0.7);
  opacity: 1;
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1), transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 4.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: text;
}

/* Quote Footer: symmetrical bottom divider with quote-mark */
.quote-footer-decor {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  gap: 14px;
  margin-top: clamp(6px, 1vh, 10px);
  margin-bottom: clamp(8px, 1.2vh, 14px);
  color: var(--color-gold);
}

/* Uppercase Author Attribution */
.quote-author {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-author);
  font-size: clamp(12px, 1.1vw, 14px);
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--color-gold);
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
  opacity: 1;
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: text;
}

.author-diamond {
  font-size: 8px;
  color: var(--color-gold-light);
  opacity: 0.85;
  transform: translateY(-1px);
}

/* Quote Transition States */
.quote-content--fading-out {
  opacity: 0 !important;
  transform: translate3d(0, -6px, 0) !important;
}

.quote-content--fading-in-init {
  opacity: 0 !important;
  transform: translate3d(0, 6px, 0) !important;
}

/* ==========================================================================
   Entrance Animations
   ========================================================================== */

@keyframes fadeInLogo {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes fadeInQuote {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 820px) {
  .hero-content {
    margin-top: clamp(24px, 5vh, 50px);
    padding: 0 20px;
  }

  .hero-logo {
    font-size: clamp(52px, 9vw, 78px);
  }

  .logo-underline {
    width: clamp(200px, 50vw, 320px);
  }

  .quote-body {
    font-size: clamp(17px, 2.4vw, 21px);
    max-width: 500px;
    min-height: 4.8em;
  }

  .quote-header-decor,
  .quote-footer-decor {
    max-width: 340px;
  }
}

@media (max-width: 480px) {
  .hero-content {
    margin-top: clamp(16px, 4vh, 36px);
    padding: 0 16px;
  }

  .hero-logo {
    font-size: clamp(42px, 12.5vw, 60px);
  }

  .logo-leaf-container {
    width: clamp(36px, 9vw, 54px);
    left: 62%;
  }

  .logo-underline {
    width: clamp(165px, 55vw, 230px);
  }

  .quote-body {
    font-size: 17px;
    max-width: 340px;
    line-height: 1.68;
    min-height: 5.4em;
    padding: 0 4px;
  }

  .quote-header-decor,
  .quote-footer-decor {
    max-width: 280px;
    gap: 10px;
  }

  .quote-mark--open,
  .quote-mark--close {
    font-size: 28px;
  }

  .quote-author {
    font-size: 11px;
    letter-spacing: 0.22em;
    gap: 8px;
  }
}

/* ==========================================================================
   Accessibility: Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.001ms !important;
  }

  .hero::before {
    animation: none !important;
  }

  .quote-body,
  .quote-author {
    transition: opacity 0.3s ease !important;
    transform: none !important;
  }

  .quote-content--fading-out,
  .quote-content--fading-in-init {
    opacity: 0 !important;
    transform: none !important;
  }
}
