/* ========================================
   Dusk of the Fifth Sun — Marketing Site
   ======================================== */

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

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  line-height: 1.7;
  color: #e8e0d4;
  background: #0a0908;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
}

a {
  color: #c9a96e;
  text-decoration: none;
}

a:hover {
  color: #e0c48a;
}

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Hero --- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(
    170deg,
    #1a0e08 0%,
    #2a1510 25%,
    #1c1018 50%,
    #0d0a12 75%,
    #0a0908 100%
  );
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(180, 100, 30, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(120, 60, 20, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
}

/* --- 3D Book --- */

.book {
  display: inline-block;
  position: relative;
  width: min(380px, 55vw);
  height: min(570px, 82.5vw);
  margin-bottom: 2rem;
  perspective: 1400px;
  cursor: pointer;
  text-decoration: none;
}

.book-cover {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  transform-style: preserve-3d;
  z-index: 2;
  border-radius: 2px 6px 6px 2px;
  overflow: hidden;
  box-shadow:
    6px 6px 18px rgba(0, 0, 0, 0.4),
    2px 2px 6px rgba(0, 0, 0, 0.3);
}

.book-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Spine edge */
.book-cover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to right, #1a1614, #2a2420, #1a1614);
  z-index: 3;
}

/* Page edges (right side) */
.book::before {
  content: '';
  position: absolute;
  top: 6px;
  right: -5px;
  width: 10px;
  height: calc(100% - 12px);
  background: repeating-linear-gradient(
    to bottom,
    #d4ccc0 0px,
    #c8c0b4 1px,
    #d4ccc0 2px
  );
  border-radius: 0 3px 3px 0;
  z-index: 1;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.3);
}

/* Page edges (bottom) */
.book::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 10px;
  width: calc(100% - 16px);
  height: 10px;
  background: repeating-linear-gradient(
    to right,
    #d4ccc0 0px,
    #c8c0b4 1px,
    #d4ccc0 2px
  );
  border-radius: 0 0 3px 3px;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Inner page revealed on hover */
.book-page {
  position: absolute;
  inset: 0;
  background: #f4efe6;
  border-radius: 2px 6px 6px 2px;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2.25rem;
}

.book-page-content {
  text-align: left;
}

.book-page-content p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #3a3530;
  margin-bottom: 0.75rem;
}

.book-page-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #1a1614;
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
}

p.book-page-cta {
  margin-top: 1.25rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a7050;
}

/* Hover: open the cover */
.book:hover .book-cover {
  transform: rotateY(-160deg);
  box-shadow:
    -4px 6px 18px rgba(0, 0, 0, 0.3),
    -1px 2px 6px rgba(0, 0, 0, 0.2);
}

.hero-label {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #c9a96e;
  margin-bottom: 2.5rem;
}

.hero-genre {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8a7e72;
  margin-top: 0.75rem;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  color: #6a5e52;
  animation: drift 2.5s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(8px); opacity: 0.8; }
}

/* --- Logline --- */

.logline {
  padding: 5rem 0;
  background: #0d0b0a;
  border-top: 1px solid rgba(201, 169, 110, 0.1);
  border-bottom: 1px solid rgba(201, 169, 110, 0.1);
}

.logline p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.6;
  text-align: center;
  color: #c9a96e;
  max-width: 640px;
  margin: 0 auto;
}

/* --- About --- */

.about {
  padding: 6rem 0;
  background: #0a0908;
}

.about h2 {
  font-size: 2rem;
  color: #f0e6d6;
  margin-bottom: 2.5rem;
  text-align: center;
}

.about-body p {
  margin-bottom: 1.25rem;
  color: #c8c0b4;
}

.about-body p:last-child {
  margin-bottom: 0;
}


/* --- Excerpt --- */

.excerpt {
  padding: 6rem 0;
  background: linear-gradient(180deg, #0f0c0a 0%, #0a0908 100%);
  border-top: 1px solid rgba(201, 169, 110, 0.08);
}

.excerpt h2 {
  font-size: 2rem;
  color: #f0e6d6;
  margin-bottom: 2.5rem;
  text-align: center;
}

.excerpt-body {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid rgba(201, 169, 110, 0.25);
  border-radius: 0 4px 4px 0;
}

.excerpt-body p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.8;
  color: #d4ccc0;
  margin-bottom: 1rem;
}

.excerpt-body p:last-child {
  margin-bottom: 0;
}

.excerpt-body em {
  font-style: italic;
}

/* --- Characters --- */

.characters {
  padding: 6rem 0;
  background: #0a0908;
  border-top: 1px solid rgba(201, 169, 110, 0.08);
}

.characters h2 {
  font-size: 2rem;
  color: #f0e6d6;
  margin-bottom: 3rem;
  text-align: center;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.character-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border: 1px solid rgba(201, 169, 110, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.character-card:hover {
  border-color: rgba(201, 169, 110, 0.25);
  background: rgba(255, 255, 255, 0.03);
}

.character-portrait {
  margin-bottom: 1.25rem;
}

.character-portrait img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 2px solid rgba(201, 169, 110, 0.2);
  filter: sepia(15%) brightness(0.9);
  transition: filter 0.3s ease, border-color 0.3s ease;
}

.character-card:hover .character-portrait img {
  filter: sepia(5%) brightness(1);
  border-color: rgba(201, 169, 110, 0.4);
}

.character-icon {
  color: #c9a96e;
  margin-bottom: 1.25rem;
  opacity: 0.5;
}

.character-card h3 {
  font-size: 1.5rem;
  color: #f0e6d6;
  margin-bottom: 0.25rem;
}

.character-role {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #c9a96e;
  margin-bottom: 1rem;
}

.character-card p:last-child {
  font-size: 0.85rem;
  color: #a89e90;
  line-height: 1.6;
}

/* --- Themes --- */

.themes {
  padding: 6rem 0;
  background: linear-gradient(180deg, #0d0b0a 0%, #0a0908 100%);
  border-top: 1px solid rgba(201, 169, 110, 0.08);
}

.themes h2 {
  font-size: 2rem;
  color: #f0e6d6;
  margin-bottom: 3rem;
  text-align: center;
}

.themes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.theme-item {
  padding: 1.5rem;
  border-left: 2px solid rgba(201, 169, 110, 0.2);
}

.theme-item h3 {
  font-size: 1.1rem;
  color: #e0d4c4;
  margin-bottom: 0.5rem;
}

.theme-item p {
  font-size: 0.85rem;
  color: #a89e90;
  font-style: italic;
}

/* --- Comps --- */

.comps {
  padding: 5rem 0;
  background: #0a0908;
  border-top: 1px solid rgba(201, 169, 110, 0.08);
}

.comps h2 {
  font-size: 2rem;
  color: #f0e6d6;
  margin-bottom: 2.5rem;
  text-align: center;
}

.comp-list {
  list-style: none;
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.comp-list li {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  color: #b0a898;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(201, 169, 110, 0.08);
}

.comp-list li:last-child {
  border-bottom: none;
}

.comp-list strong {
  color: #e0d4c4;
  font-weight: 600;
}

/* --- CTA --- */

.cta {
  padding: 6rem 0;
  background: linear-gradient(180deg, #0f0c0a 0%, #1a1410 50%, #0f0c0a 100%);
  border-top: 1px solid rgba(201, 169, 110, 0.1);
  text-align: center;
}

.cta h2 {
  font-size: 2.2rem;
  color: #f0e6d6;
  margin-bottom: 1rem;
}

.cta > .container > p {
  font-size: 0.95rem;
  color: #a89e90;
  margin-bottom: 2rem;
}

.cta-form {
  display: flex;
  gap: 0.75rem;
  max-width: 440px;
  margin: 0 auto 1rem;
}

.cta-form input[type="email"] {
  flex: 1;
  padding: 0.8rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 300;
  color: #e8e0d4;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s ease;
}

.cta-form input[type="email"]::placeholder {
  color: #6a5e52;
}

.cta-form input[type="email"]:focus {
  border-color: #c9a96e;
}

.cta-form button {
  padding: 0.8rem 1.8rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0a0908;
  background: #c9a96e;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cta-form button:hover {
  background: #e0c48a;
}

.cta-note {
  font-size: 0.7rem;
  color: #6a5e52;
}

/* --- Footer --- */

.footer {
  padding: 4rem 0;
  background: #0a0908;
  border-top: 1px solid rgba(201, 169, 110, 0.08);
  text-align: center;
}

.footer-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #8a7e72;
  margin-bottom: 0.25rem;
}

.footer-author {
  font-size: 0.8rem;
  color: #6a5e52;
  margin-bottom: 1.5rem;
}

.footer-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  color: rgba(201, 169, 110, 0.4);
}

/* --- Responsive --- */

@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  .book {
    width: min(300px, 70vw);
    height: min(450px, 105vw);
  }

  .character-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

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

  .cta-form {
    flex-direction: column;
  }

  .cta-form button {
    width: 100%;
  }

  .excerpt-body {
    padding: 1.5rem;
  }
}
