/* ========================================
   MAKEA MARTTI — Dark Brutalist Theme
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700;900&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&display=swap');

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

:root {
  --bg-primary: #161614;
  --bg-secondary: #111110;
  --bg-card: #1a1a17;
  --text-primary: #e8e4dc;
  --text-secondary: #9a9590;
  --text-muted: #5a5550;
  --accent: #c4935a;
  --accent-dim: #8a6a3f;
  --border: #2a2a25;
  --border-light: #3a3a33;
  --font-body: 'Inter', sans-serif;
  --font-display: 'Playfair Display', serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  background-image: url('../assets/tausta-tekstuuri.jpeg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  background-blend-mode: overlay;
}

a { color: var(--accent); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--text-primary); }

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

/* --- Header / Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(22, 22, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

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

.nav-logo {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.3s;
}

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

.nav-logo--hidden {
  opacity: 0;
  pointer-events: none;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
}

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

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

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

/* Language switcher */
.lang-switch {
  display: flex;
  gap: 0.25rem;
  margin-left: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.lang-switch button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
}

.lang-switch button.active {
  background: var(--accent-dim);
  color: var(--text-primary);
}

.lang-switch button:hover:not(.active) {
  color: var(--text-primary);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

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

.mobile-menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Hero Section --- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: 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.6) contrast(1.1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(22, 22, 20, 0.3) 0%,
    rgba(22, 22, 20, 0.1) 40%,
    rgba(22, 22, 20, 0.6) 80%,
    rgba(22, 22, 20, 1) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  text-shadow: 0 0 60px rgba(0,0,0,0.8);
}

.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.hero-social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.hero-social a {
  color: var(--text-secondary);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid var(--text-muted);
  padding: 0.5rem 1rem;
  transition: all 0.3s;
  background: rgba(22, 22, 20, 0.5);
}

.hero-social a:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: rgba(196, 147, 90, 0.15);
}

/* --- Page Header (non-home pages) --- */
.page-header {
  padding-top: 120px;
  padding-bottom: 60px;
  text-align: center;
  position: relative;
}

.page-header::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--accent);
  margin: 2rem auto 0;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --- Content Sections --- */
.content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.content-narrow {
  max-width: 800px;
  margin: 0 auto;
}

.section-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 3rem 0;
}

/* --- Band Members --- */
.members-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.member-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border: 1px solid var(--border);
  background: rgba(22, 22, 20, 0.7);
  transition: border-color 0.3s;
}

.member-card:hover {
  border-color: var(--accent-dim);
}

.member-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.member-role {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* --- Music Page --- */
.album-section {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
  margin: 3rem 0;
}

.album-cover-wrapper {
  position: sticky;
  top: 100px;
}

/* Album flip card */
.album-flip-card {
  perspective: 1000px;
  width: 100%;
  aspect-ratio: 1;
  cursor: pointer;
}

.album-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

@media (hover: hover) {
  .album-flip-card:not(.js-controlled):hover .album-flip-inner {
    transform: rotateY(180deg);
  }
}

.album-flip-front,
.album-flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.album-flip-back {
  transform: rotateY(180deg);
}

.album-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.album-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 1.5rem;
}

.album-artist {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.listen-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.listen-links a {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  transition: all 0.3s;
}

.listen-links a:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.vinyl-notice {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  letter-spacing: 0.03em;
}

.tracklist {
  list-style: none;
}

.tracklist li {
  border-bottom: 1px solid var(--border);
}

.tracklist li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  color: inherit;
  text-decoration: none;
  transition: background 0.2s, padding 0.2s;
}

.tracklist li a:hover {
  background: rgba(196, 147, 90, 0.05);
  padding-left: 0.5rem;
}

.track-number {
  color: var(--text-muted);
  font-size: 0.8rem;
  width: 2rem;
  font-variant-numeric: tabular-nums;
}

.track-name {
  flex: 1;
  font-size: 0.95rem;
}

.track-duration {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

/* --- Gallery --- */
.gallery-grid {
  column-count: 3;
  column-gap: 1rem;
  margin-top: 3rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  display: block;
  filter: grayscale(30%) brightness(0.9);
  transition: all 0.5s;
  border: 1px solid var(--border);
}

.gallery-item:hover img {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.02);
}

.gallery-item .photo-credit {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 1rem 0.8rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.4s;
}

.gallery-item:hover .photo-credit {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 2rem;
  cursor: pointer;
  font-family: var(--font-body);
  line-height: 1;
}

/* --- Folklore Page --- */
.folklore-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--accent);
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
  padding: 2rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  line-height: 1.8;
}

.folklore-section {
  margin-bottom: 4rem;
}

.folklore-section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.folklore-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.9;
  margin-bottom: 1rem;
}

.folklore-text strong {
  color: var(--text-primary);
}

.folklore-attribution {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1rem;
}

.folklore-side-quote {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent-dim);
  font-size: 1.1rem;
  padding: 1.5rem;
  border-left: 2px solid var(--accent-dim);
  margin: 2rem 0;
  background: rgba(196, 147, 90, 0.03);
}

.glossary-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.glossary-item {
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: rgba(22, 22, 20, 0.6);
}

.glossary-term {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.glossary-def {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* --- Folklore images --- */
.folklore-image {
  margin: 2rem 0;
  border: 1px solid var(--border);
}

.folklore-image img {
  width: 100%;
  filter: grayscale(20%);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
  background: rgba(22, 22, 20, 0.9);
}

.footer-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0 1rem;
}

.footer-social a {
  color: var(--text-secondary);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid var(--border-light);
  padding: 0.5rem 1rem;
  transition: all 0.3s;
}

.footer-social a:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: rgba(196, 147, 90, 0.15);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.footer-email {
  margin-top: 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.footer-email a {
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer-email a:hover {
  color: var(--text-secondary);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .album-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .album-cover-wrapper {
    position: static;
    max-width: 400px;
    margin: 0 auto;
  }

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

  .gallery-grid {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  body {
    --bg-primary: #0a0a08;
    background-color: var(--bg-primary);
    background-image: none;
  }

  .mobile-menu-toggle { display: block; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    transition: right 0.3s ease;
    border-left: 1px solid var(--border);
  }

  .nav-links.open { right: 0; }

  .lang-switch {
    margin-left: 0;
    margin-top: 1rem;
  }

  .hero-social {
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .hero-social a {
    font-size: 0.65rem;
    padding: 0.4rem 0.7rem;
  }

  .hero-overlay {
    background: linear-gradient(
      to bottom,
      rgba(10, 10, 8, 0.4) 0%,
      rgba(10, 10, 8, 0.15) 40%,
      rgba(10, 10, 8, 0.7) 80%,
      rgba(10, 10, 8, 1) 100%
    );
  }

  .content-section { padding: 3rem 1.5rem; }

  .gallery-grid { column-count: 1; }

  .page-header {
    padding-top: 100px;
    padding-bottom: 40px;
  }
}

/* --- Album promo --- */
.album-promo {
  max-width: 420px;
  margin: 4rem auto;
  text-align: center;
}

.album-promo-cover {
  max-width: 320px;
  margin: 0 auto 2rem;
}

.album-promo-cover img {
  width: 100%;
  border: 1px solid var(--border);
  opacity: 0.85;
  transition: opacity 0.4s ease;
}

.album-promo-cover img:hover {
  opacity: 1;
}

.album-promo-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
}

/* --- Crow decoration --- */
.crow-decoration {
  position: relative;
  max-width: 500px;
  margin: 4rem auto;
  opacity: 0.4;
  filter: grayscale(100%) contrast(1.2);
  cursor: pointer;
  transition: opacity 0.4s;
}

.crow-decoration:hover {
  opacity: 0.65;
}

.crow-decoration img {
  mask-image: radial-gradient(ellipse 70% 70% at center, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at center, black 40%, transparent 100%);
}

/* --- Crow audio modal --- */
.crow-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 8, 0.88);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.crow-modal-overlay.open {
  display: flex;
}

.crow-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 2.5rem 2.5rem 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
}

.crow-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 1.1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.crow-modal-close:hover {
  color: var(--text-primary);
}

.crow-modal-series {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.crow-modal-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 1.6rem;
}

.crow-modal-link {
  display: inline-block;
  margin-bottom: 1.6rem;
  padding: 0.65rem 1.4rem;
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  transition: background 0.2s, color 0.2s;
}

.crow-modal-link:hover {
  background: var(--accent-dim);
  color: var(--text-primary);
}

.crow-modal-credit {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Scroll reveal animations --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Lyric Pages --- */
.lyric-header {
  padding-top: 120px;
  padding-bottom: 2rem;
  text-align: center;
}

.lyric-back {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2rem;
  transition: color 0.3s;
}

.lyric-back:hover {
  color: var(--accent);
}

.lyric-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.lyric-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.lyric-album {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 2rem;
}

/* Audio player */
.lyric-player {
  max-width: 420px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  text-align: center;
}

.lyric-player audio {
  display: none;
}

.custom-player {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: rgba(20, 20, 17, 0.8);
  backdrop-filter: blur(8px);
}

.player-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  transition: color 0.2s;
}

.player-btn:hover {
  color: var(--accent);
}

.player-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.player-progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.player-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  min-width: 2.8rem;
}

.player-time--current {
  text-align: right;
}

.player-track {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.player-track-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

/* Lyrics body */
.lyrics-body {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  text-align: center;
}

.lyrics-verse {
  margin-bottom: 2.5rem;
}

.lyrics-line {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 2;
  font-style: italic;
}

.lyrics-line--repeat {
  color: var(--accent-dim);
}

.lyric-divider {
  width: 40px;
  height: 1px;
  background: var(--border);
  margin: 3rem auto;
}

/* Track navigation */
.track-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
  border-top: 1px solid var(--border);
}

.track-nav a {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
}

.track-nav a:hover {
  color: var(--accent);
}

.track-nav-spacer {
  width: 100px;
}
