/* ========================================
   Euphony Productions — Gritty Theme
   ======================================== */

/* — Reset & Base — */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: #0d0a09;
  --bg-card: #1a1412;
  --bg-card-hover: #231b17;
  --text-primary: #f0e6de;
  --text-muted: #9a8a7c;
  --accent-red: #c62828;
  --accent-red-light: #e53935;
  --accent-red-dark: #8e0000;
  --accent-warm: #bf8034;
  --accent-warm-light: #d4a55a;
  --border-color: #2e221a;
  --border-light: #3d2e22;
  --shadow-glow: rgba(198, 40, 40, 0.15);
  --font-display: 'Oswald', sans-serif;
  --font-body: 'Merriweather', Georgia, serif;
  --font-sans: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* — Noise / Grain Overlay — */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* — Typography — */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--accent-red);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent-red);
  margin-top: 0.5rem;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--text-muted);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  max-width: 600px;
}

/* — Layout — */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

/* — Navigation — */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(13, 10, 9, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease;
}

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

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.nav-logo span {
  color: var(--accent-red);
}

.nav-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
}

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

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-red);
  transition: width 0.3s ease;
}

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

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: 0.3s;
}

/* — Hero Section — */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35) contrast(1.1) saturate(0.8);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13, 10, 9, 0.4) 0%,
    rgba(13, 10, 9, 0.2) 40%,
    rgba(13, 10, 9, 0.6) 70%,
    rgba(13, 10, 9, 1) 100%
  );
}

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

.hero-logo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 2rem;
  display: block;
  filter: drop-shadow(0 0 30px rgba(191, 128, 52, 0.3));
}

.hero-content h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 40px rgba(198, 40, 40, 0.3);
}

.hero-content h1 span {
  color: var(--accent-red);
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.02em;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* — Buttons — */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-red-light);
  color: #fff;
  box-shadow: 0 0 20px var(--shadow-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  border-color: var(--accent-red);
  color: var(--accent-red-light);
}

.btn-sm {
  padding: 0.6rem 1.4rem;
  font-size: 0.8rem;
}

/* — Cards — */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.card-body {
  padding: 1.5rem;
}

.card-body h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.card-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* — About Section — */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05);
}

.about-text h2 {
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

/* — Featured Project Section — */
.featured-project {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.featured-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 500px;
}

.featured-image {
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-image .book-cover {
  padding: 3rem;
  text-align: center;
}

.featured-image .book-cover h2 {
  font-size: 3rem;
  color: var(--accent-red);
  margin-bottom: 0.5rem;
}

.featured-image .book-cover p {
  color: var(--text-muted);
  font-style: italic;
}

.featured-details {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-details .label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-red);
  margin-bottom: 0.75rem;
}

.featured-details h3 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.featured-details .meta {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.featured-details p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.featured-details .btn {
  align-self: flex-start;
}

/* — Stats bar — */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.stat-item {
  background: var(--bg-card);
  padding: 2rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--accent-red);
  display: block;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* — Purchase cards grid — */
.purchase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.purchase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.purchase-card:hover {
  border-color: var(--accent-red);
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(198, 40, 40, 0.1);
}

.purchase-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.purchase-card h4 {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  text-transform: none;
  letter-spacing: 0;
}

.purchase-card .desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.purchase-card .btn {
  width: 100%;
  justify-content: center;
  font-size: 0.8rem;
  padding: 0.6rem 1rem;
}

/* — Audio Player — */
.audio-player {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-red);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  flex-shrink: 0;
}

.play-btn:hover {
  background: var(--accent-red-light);
}

.play-btn svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.player-track {
  flex: 1;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.4rem;
  cursor: pointer;
}

.progress-fill {
  height: 100%;
  background: var(--accent-red);
  border-radius: 3px;
  transition: width 0.3s linear;
  width: 0%;
}

.player-time {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* — Audiobook Details Table — */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 3rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 0.3rem 0;
}

.detail-label {
  color: var(--text-muted);
}

.detail-value {
  color: var(--text-primary);
}

/* — Synopsis Section — */
.synopsis p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.synopsis p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3rem;
  float: left;
  line-height: 1;
  margin-right: 0.5rem;
  color: var(--accent-red);
}

/* — Footer — */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 2rem;
  background: var(--bg-dark);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-logo span {
  color: var(--accent-red);
}

.footer-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.4rem;
}

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-copy {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent-red-light);
}

/* Social icon links */
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.social-link:hover {
  color: var(--accent-red-light);
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* — Divider line — */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border-color);
  margin: 3rem 0;
}

/* — Responsive — */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(13, 10, 9, 0.98);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

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

  .featured-inner {
    grid-template-columns: 1fr;
  }

  .featured-image .book-cover {
    padding: 2rem;
  }

  .featured-details {
    padding: 2rem;
  }

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

  .stats-bar {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .audio-player {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 3rem 0;
  }

  .stats-bar {
    grid-template-columns: 1fr;
  }

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