/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Outfit:wght@300;400;500;600&family=UnifrakturCook:wght@700&display=swap');

/* CSS Variables */
:root {
  --bg-primary: #07111d;
  --bg-secondary: #0d1b2d;
  --bg-tertiary: #13263a;
  --text-primary: #f8f1dc;
  --text-secondary: #b8c7d8;
  --accent-gold: #d6b15f;
  --accent-gold-glow: rgba(214, 177, 95, 0.35);
  --accent-azure: #a9d8ff;
  --accent-azure-glow: rgba(169, 216, 255, 0.28);
  --accent-silver: #dcecff;
  --border-gold: rgba(214, 177, 95, 0.28);
  --border-silver: rgba(220, 236, 255, 0.16);
  --glass-bg: rgba(8, 21, 34, 0.78);
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 12% 18%, rgba(169, 216, 255, 0.12) 0%, transparent 36%),
    radial-gradient(circle at 88% 72%, rgba(214, 177, 95, 0.09) 0%, transparent 38%),
    linear-gradient(135deg, rgba(7, 17, 29, 0.96), rgba(12, 30, 48, 0.98));
}

/* Typography */
h1, h2, h3, .brand-title {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
  font-weight: 300;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-gold);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(7, 17, 29, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-silver);
  padding: 1.25rem 2rem;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-text {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.08em;
  text-shadow: 0 0 14px rgba(220, 236, 255, 0.12);
  transition: var(--transition-smooth);
}

.logo-text span {
  color: var(--accent-silver);
}

.logo-link:hover .logo-text {
  color: var(--accent-gold);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  transition: var(--transition-smooth);
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent-gold);
  transition: var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  padding: 8rem 2rem 4rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-badge {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(169, 216, 255, 0.09), rgba(214, 177, 95, 0.08));
  border: 1px solid var(--border-gold);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-silver);
  box-shadow: 0 0 18px rgba(169, 216, 255, 0.08);
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 3.5rem;
  line-height: 1.05;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.65);
}

.hero-title .title-script {
  font-family: 'UnifrakturCook', 'Old English Text MT', 'Cinzel', serif;
  color: var(--accent-silver);
  letter-spacing: 0.015em;
  text-shadow: 0 0 18px rgba(169, 216, 255, 0.35), 0 4px 18px rgba(0, 0, 0, 0.8);
}

.hero-title small {
  font-family: 'Cinzel', Georgia, serif;
  color: var(--accent-gold);
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-description {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Form Styling */
.signup-form {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 480px;
}

.input-group {
  display: flex;
  gap: 0.5rem;
  background: rgba(8, 21, 34, 0.55);
  border: 1px solid var(--border-silver);
  border-radius: 8px;
  padding: 0.35rem;
  transition: var(--transition-smooth);
}

.input-group:focus-within {
  border-color: var(--accent-gold);
  box-shadow: 0 0 15px var(--accent-gold-glow);
}

.signup-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  padding: 0.6rem 1rem;
}

.signup-input::placeholder {
  color: rgba(160, 170, 184, 0.5);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), #f0d88e);
  color: var(--bg-primary);
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.75rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

.btn-primary:hover {
  background: #f4ecd4;
  box-shadow: 0 4px 20px rgba(244, 236, 212, 0.4);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.form-tip {
  font-size: 0.8rem;
  color: rgba(160, 170, 184, 0.6);
  padding-left: 0.5rem;
}

/* Success State */
.success-msg {
  display: none;
  background: rgba(74, 144, 226, 0.1);
  border: 1px solid var(--border-gold);
  padding: 1.25rem;
  border-radius: 8px;
  color: var(--text-primary);
  align-items: center;
  gap: 1rem;
  animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Visual Frame (Alan Lee Style) */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.art-frame {
  position: relative;
  background: linear-gradient(145deg, rgba(13, 27, 45, 0.96), rgba(7, 17, 29, 0.96));
  border: 1px solid var(--border-gold);
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(212, 175, 55, 0.03);
  transition: var(--transition-smooth);
}

.art-frame:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 20px 45px rgba(0, 0, 0, 0.6),
    0 0 50px rgba(212, 175, 55, 0.06);
}

.art-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid rgba(244, 236, 212, 0.1);
  filter: contrast(1.02) brightness(0.98);
}

.frame-seal {
  position: absolute;
  bottom: -15px;
  right: -15px;
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, var(--accent-silver), var(--accent-gold));
  border: 2px solid var(--text-primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.frame-seal::after {
  content: 'T';
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  color: var(--bg-primary);
  font-size: 1.35rem;
}

/* Features Section */
.features {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, rgba(13, 27, 45, 0.96), rgba(7, 17, 29, 0.98));
  border-top: 1px solid var(--border-silver);
  border-bottom: 1px solid var(--border-silver);
  position: relative;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-title {
  font-size: 2.25rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background-color: var(--accent-gold);
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  background: linear-gradient(160deg, rgba(19, 38, 58, 0.92), rgba(8, 21, 34, 0.96));
  border: 1px solid var(--border-silver);
  padding: 2.5rem 2rem;
  border-radius: 10px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.feature-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.feature-icon-container {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(169, 216, 255, 0.08);
  border: 1px solid var(--border-gold);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--accent-gold);
}

.feature-card h3 {
  font-size: 1.25rem;
}

.feature-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.screenshots,
.details,
.book-one-section {
  padding: 6rem 2rem;
  border-top: 1px solid var(--border-silver);
}

.screenshots {
  background: rgba(7, 17, 29, 0.72);
}

.details,
.book-one-section {
  background: linear-gradient(180deg, rgba(13, 27, 45, 0.62), rgba(7, 17, 29, 0.96));
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.screenshot-card {
  background: linear-gradient(160deg, rgba(19, 38, 58, 0.92), rgba(8, 21, 34, 0.96));
  border: 1px solid var(--border-silver);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 34px rgba(0, 0, 0, 0.34);
}

.screenshot-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-tertiary);
}

.screenshot-card figcaption {
  padding: 0.9rem 1rem;
  color: var(--text-primary);
  font-family: 'Cinzel', Georgia, serif;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.detail-card {
  background: linear-gradient(160deg, rgba(19, 38, 58, 0.82), rgba(8, 21, 34, 0.92));
  border: 1px solid var(--border-silver);
  border-radius: 10px;
  padding: 1.25rem;
}

.detail-card strong {
  display: block;
  color: var(--accent-gold);
  font-family: 'Cinzel', Georgia, serif;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.detail-card span {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Baroque Audio Player Widget */
.audio-preview {
  padding: 4rem 2rem 6rem 2rem;
  position: relative;
}

.audio-container {
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(145deg, rgba(8, 21, 34, 0.88), rgba(13, 27, 45, 0.82));
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.audio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-silver);
  padding-bottom: 1.25rem;
}

.track-info h3 {
  font-size: 1.35rem;
}

.track-info p {
  font-size: 0.85rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.btn-play-toggle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-silver), var(--accent-gold));
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--bg-primary);
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  transition: var(--transition-smooth);
}

.btn-play-toggle:hover {
  background: var(--text-primary);
  transform: scale(1.05);
}

.play-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent var(--bg-primary);
  margin-left: 4px;
}

.pause-icon {
  display: none;
  width: 14px;
  height: 20px;
  border-style: double;
  border-width: 0px 0px 0px 14px;
  border-color: var(--bg-primary);
}

.audio-waves-container {
  flex: 1;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.wave-bar {
  flex: 1;
  height: 4px;
  background-color: rgba(220, 236, 255, 0.2);
  border-radius: 2px;
  transition: height 0.15s ease;
}

/* Animated waveforms */
.playing .wave-bar {
  background-color: var(--accent-silver);
  box-shadow: 0 0 12px rgba(169, 216, 255, 0.35);
  animation: pulseWave 1.2s infinite ease-in-out alternate;
}

@keyframes pulseWave {
  0% { height: 4px; }
  100% { height: 36px; }
}

/* Generate wave bar animation delays */
.playing .wave-bar:nth-child(2n) { animation-delay: 0.1s; }
.playing .wave-bar:nth-child(3n) { animation-delay: 0.25s; }
.playing .wave-bar:nth-child(4n) { animation-delay: 0.4s; }
.playing .wave-bar:nth-child(5n) { animation-delay: 0.15s; }

/* Quote / Stoic Footer Section */
.quote-section {
  padding: 6rem 2rem;
  background: radial-gradient(circle at center, rgba(18, 20, 29, 0.6) 0%, var(--bg-primary) 100%);
  text-align: center;
  border-top: 1px solid var(--border-silver);
}

.quote-container {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.quote-symbol {
  font-family: 'Cinzel', serif;
  font-size: 3.5rem;
  color: var(--border-gold);
  line-height: 1;
}

.quote-text {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.8;
  color: var(--text-primary);
  font-style: italic;
}

.quote-author {
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.lore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.lore-card {
  background: linear-gradient(160deg, rgba(19, 38, 58, 0.74), rgba(8, 21, 34, 0.84));
  border: 1px solid var(--border-silver);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: left;
}

.lore-card strong {
  display: block;
  color: var(--accent-gold);
  font-family: 'Cinzel', Georgia, serif;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.lore-card span {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Footer */
footer {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-silver);
  padding: 4rem 2rem 2rem 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-about {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-socials {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-end;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-silver);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.social-link:hover {
  border-color: var(--border-gold);
  color: var(--accent-gold);
  transform: translateY(-2px);
}

.copyright {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(160, 170, 184, 0.4);
  border-top: 1px solid var(--border-silver);
  padding-top: 2rem;
}

/* Responsive Layouts */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .hero-badge {
    align-self: center;
  }
  
  .signup-form {
    margin-left: auto;
    margin-right: auto;
  }
  
  .features-grid,
  .screenshot-grid,
  .details-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  
  .footer-links, .footer-socials {
    align-items: center;
  }

}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .input-group {
    flex-direction: column;
    padding: 0;
    border: none;
    background: transparent;
  }
  
  .signup-input {
    background: rgba(8, 21, 34, 0.55);
    border: 1px solid var(--border-silver);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
  }
  
  .btn-primary {
    width: 100%;
    padding: 0.9rem;
  }
  
  .audio-controls {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .audio-waves-container {
    width: 100%;
  }
  
  .audio-container {
    padding: 1.5rem;
  }
}
