/* ============================================================
   Hljod Landing Page Styles
   ============================================================ */

/* -- Custom Properties (Design Tokens) ----------------------- */
:root {
  /* Palette */
  --color-bg: #0A0A0A;
  --color-surface: #1C1C1C;
  --color-text: #C8C2B6;
  --color-accent: #D4A574;
  --color-emphasis: #E8E2D4;

  /* Typography */
  --font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-body: 'Lora', Georgia, 'Times New Roman', serif;
  --leading-body: 1.65;
  --leading-tight: 1.2;

  /* Type scale (desktop) */
  --fs-wordmark: 96px;
  --fs-h2: 40px;
  --fs-tagline: 20px;
  --fs-body: 18px;
  --fs-button: 16px;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  /* Layout */
  --max-column: 650px;
  --max-featured: 900px;
  --max-gallery: 1200px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fade: 800ms;
  --duration-hover: 200ms;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--leading-body);
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
.hero__wordmark,
.section__title,
.listen__button,
.listen__cta-button {
  font-family: var(--font-display);
}

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

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--duration-hover) ease;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

/* -- Layout Primitives --------------------------------------- */
.section {
  padding: var(--space-xl) var(--space-md);
  position: relative;
}

.section__title {
  font-size: var(--fs-h2);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: var(--space-md);
  color: var(--color-emphasis);
  text-transform: uppercase;
}

.section__divider {
  width: 120px;
  height: 1px;
  background: var(--color-accent);
  margin: 0 auto var(--space-lg);
}

/* -- Scroll Fade-In (JS-controlled) -------------------------- */
.section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-fade) var(--ease-out),
              transform var(--duration-fade) var(--ease-out);
}

.section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero is always visible (no fade-in) */
.hero {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Section 1: Hero
   ============================================================ */

.hero {
  height: 100vh;
  min-height: 600px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero__background-fallback {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 40%,
    #1a2a2a 0%,
    #0a1418 40%,
    #0a0a0a 100%
  );
  z-index: 0;
}

.hero__canvas {
  z-index: 1;
}

.hero__overlay {
  z-index: 2;
}

.hero__content {
  z-index: 3;
}

.hero__scroll-indicator {
  z-index: 3;
}

.hero__rune {
  width: 200px;
  height: auto;
  margin: 0 auto var(--space-md);
  display: block;
  opacity: 1;
  filter: drop-shadow(0 0 40px rgba(212, 165, 116, 0.25));
  mix-blend-mode: screen;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(10, 10, 10, 0.5) 0%,
    rgba(10, 10, 10, 0.85) 70%,
    rgba(10, 10, 10, 0.95) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 var(--space-md);
}

.hero__wordmark {
  font-size: var(--fs-wordmark);
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--color-emphasis);
  margin-bottom: var(--space-sm);
  line-height: var(--leading-tight);
  text-transform: uppercase;
}

.hero__tagline {
  font-size: var(--fs-tagline);
  font-style: italic;
  color: var(--color-text);
  max-width: 500px;
  margin: 0 auto;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 60px;
  z-index: 1;
}

.hero__scroll-line {
  display: block;
  width: 1px;
  height: 100%;
  background: var(--color-accent);
  margin: 0 auto;
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1.0; }
}

/* ============================================================
   Section 2: About
   ============================================================ */

.about {
  text-align: center;
}

.about__column {
  max-width: var(--max-column);
  margin: 0 auto;
}

.about__column p {
  margin-bottom: var(--space-md);
}

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

.about__cadence {
  font-style: italic;
  color: var(--color-accent);
  margin-top: var(--space-lg) !important;
}

/* ============================================================
   Section 3: Featured Track
   ============================================================ */

.featured {
  background:
    radial-gradient(
      ellipse at center,
      rgba(212, 165, 116, 0.08) 0%,
      transparent 60%
    ),
    var(--color-bg);
}

.featured__inner {
  max-width: var(--max-featured);
  margin: 0 auto;
  text-align: center;
}

.featured__intro {
  max-width: var(--max-column);
  margin: 0 auto var(--space-lg);
}

.featured__video {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.featured__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================
   Section 4: Gallery
   ============================================================ */

.gallery__grid {
  max-width: var(--max-gallery);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.gallery__item {
  --x: 50%;
  --y: 50%;
  --glow-size: 280px;
  --glow-hue: 33;
  --glow-sat: 55%;
  --glow-light: 65%;

  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  background: var(--color-surface);
  border-radius: 14px;
  border: 1px solid rgba(212, 165, 116, 0.12);
  transition: border-color 0.4s ease, transform 0.6s var(--ease-out);
  isolation: isolate;
}

.gallery__item:hover,
.gallery__item:focus-within {
  transform: translateY(-3px);
  border-color: rgba(212, 165, 116, 0.2);
}

.gallery__item picture,
.gallery__item img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
}

.gallery__item img {
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.gallery__item:hover img,
.gallery__item:focus-within img {
  transform: scale(1.05);
}

/* Spotlight fill: follows cursor position inside card */
.gallery__item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    var(--glow-size) var(--glow-size) at var(--x) var(--y),
    hsl(var(--glow-hue) var(--glow-sat) var(--glow-light) / 0.22),
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: screen;
}

/* Border glow: brighter spotlight at border only */
.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    calc(var(--glow-size) * 0.7) calc(var(--glow-size) * 0.7) at var(--x) var(--y),
    hsl(var(--glow-hue) var(--glow-sat) 75% / 1) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 3;
  filter: brightness(1.4);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

.gallery__item:hover::before,
.gallery__item:focus-within::before,
.gallery__item:hover::after,
.gallery__item:focus-within::after {
  opacity: 1;
}

.gallery__caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.85) 0%,
    rgba(10, 10, 10, 0.5) 40%,
    transparent 100%
  );
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 16px;
  opacity: 0;
  transition: opacity var(--duration-hover) ease;
  padding: var(--space-md);
  text-align: center;
  z-index: 4;
}

.gallery__item:hover .gallery__caption,
.gallery__item:focus-within .gallery__caption {
  opacity: 1;
}

/* ============================================================
   Lightbox (overlay for gallery images)
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.95);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.lightbox.is-open {
  display: flex;
}

.lightbox__frame {
  display: flex;
  gap: var(--space-lg);
  max-width: 1200px;
  width: 100%;
  align-items: center;
}

.lightbox__image {
  flex: 1 1 55%;
  max-width: 720px;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox__panel {
  flex: 1 1 45%;
  max-width: 420px;
  color: var(--color-text);
  padding: var(--space-md);
}

.lightbox__title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-emphasis);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
}

.lightbox__subtitle {
  font-family: var(--font-body);
  font-size: 18px;
  font-style: italic;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.lightbox__story {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}

.lightbox__cta {
  display: inline-block;
  padding: 12px 28px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-bg);
  background: var(--color-accent);
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox__cta:hover {
  background: var(--color-emphasis);
  color: var(--color-bg);
  transform: translateY(-2px);
}

.lightbox__cta.is-disabled {
  background: transparent;
  border: 1px solid rgba(212, 165, 116, 0.4);
  color: var(--color-accent);
  pointer-events: none;
  cursor: default;
}

/* Responsive lightbox */
@media (max-width: 900px) {
  .lightbox__frame {
    flex-direction: column;
    gap: var(--space-md);
    overflow-y: auto;
    max-height: 90vh;
    padding: var(--space-md) 0;
  }

  .lightbox__image {
    max-height: 45vh;
    width: 100%;
    max-width: 100%;
  }

  .lightbox__panel {
    max-width: 100%;
    padding: 0 var(--space-md);
  }

  .lightbox__title {
    font-size: 32px;
  }
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  color: var(--color-text);
  font-size: 40px;
  padding: var(--space-sm);
  transition: color var(--duration-hover) ease;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  color: var(--color-accent);
}

.lightbox__close {
  top: var(--space-md);
  right: var(--space-md);
}

.lightbox__prev {
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
}

/* ============================================================
   Section 5: Listen and Connect
   ============================================================ */

.listen {
  text-align: center;
}

.listen__platforms {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

/* -- Border Button (rotating gradient border) ---------------- */
.border-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow: hidden;
  min-width: 170px;
  transition: background 0.4s ease;
  isolation: isolate;
}

.border-button:hover {
  background: rgba(0, 0, 0, 0.6);
}

.border-button__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  filter: blur(2px);
  animation: borderRotate 3.5s linear infinite;
  pointer-events: none;
}

.border-button__inner {
  position: absolute;
  inset: 2px;
  z-index: 1;
  border-radius: inherit;
  background: #0a0a0a;
  pointer-events: none;
}

.border-button__label {
  position: relative;
  z-index: 2;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: var(--fs-button);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: color 0.3s ease;
}

.border-button:hover .border-button__label {
  color: var(--color-emphasis);
}

.border-button:hover .border-button__glow {
  animation-play-state: paused;
  background: radial-gradient(
    75% 181% at 50% 50%,
    var(--color-accent) 0%,
    rgba(212, 165, 116, 0) 100%
  );
}

@keyframes borderRotate {
  0%, 100% {
    background: radial-gradient(
      20.7% 50% at 50% 100%,
      hsl(33 55% 70%) 0%,
      rgba(212, 165, 116, 0) 100%
    );
  }
  25% {
    background: radial-gradient(
      16.6% 43.1% at 0% 50%,
      hsl(33 55% 70%) 0%,
      rgba(212, 165, 116, 0) 100%
    );
  }
  50% {
    background: radial-gradient(
      20.7% 50% at 50% 0%,
      hsl(33 55% 70%) 0%,
      rgba(212, 165, 116, 0) 100%
    );
  }
  75% {
    background: radial-gradient(
      16.2% 41.2% at 100% 50%,
      hsl(33 55% 70%) 0%,
      rgba(212, 165, 116, 0) 100%
    );
  }
}

.listen__secondary {
  margin-bottom: var(--space-lg);
  font-style: italic;
}

.listen__secondary a {
  color: var(--color-accent);
}

.listen__secondary a:hover {
  color: var(--color-emphasis);
}

.listen__separator {
  margin: 0 var(--space-sm);
  color: var(--color-text);
}

.listen__cta-button {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--fs-button);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-bg);
  background: var(--color-accent);
  transition: background var(--duration-hover) ease;
}

.listen__cta-button:hover {
  background: var(--color-emphasis);
  color: var(--color-bg);
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  padding: var(--space-md);
  text-align: center;
  border-top: 1px solid rgba(200, 194, 182, 0.1);
}

.footer__copyright {
  color: var(--color-text);
  opacity: 0.6;
  margin-bottom: var(--space-sm);
  font-size: 14px;
}

.footer__social {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

.footer__social a {
  color: var(--color-text);
  opacity: 0.6;
  font-size: 14px;
  letter-spacing: 0.1em;
}

.footer__social a:hover {
  color: var(--color-accent);
  opacity: 1;
}

/* ============================================================
   Responsive: Tablet (768px - 1023px)
   ============================================================ */

@media (max-width: 1023px) {
  :root {
    --fs-wordmark: 80px;
    --fs-h2: 34px;
    --space-xl: 6rem;
  }

  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .listen__platforms {
    gap: var(--space-sm);
  }

  .border-button {
    min-width: 150px;
  }

  .border-button__label {
    padding: 12px 22px;
  }
}

/* ============================================================
   Responsive: Mobile (< 768px)
   ============================================================ */

@media (max-width: 767px) {
  :root {
    --fs-wordmark: 56px;
    --fs-h2: 28px;
    --fs-tagline: 17px;
    --fs-body: 16px;
    --space-md: 1.5rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
  }

  .section {
    padding: var(--space-xl) var(--space-md);
  }

  .gallery__grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .listen__platforms {
    flex-direction: column;
    align-items: center;
  }

  .border-button {
    width: 100%;
    max-width: 280px;
  }

  .hero__wordmark {
    letter-spacing: 0.15em;
  }

  .hero__rune {
    width: 130px;
  }
}

/* ============================================================
   Accessibility: Reduced Motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .hero__canvas {
    display: none;
  }

  .hero__scroll-line {
    animation: none;
    opacity: 0.5;
  }

  .gallery__item img {
    transition: none;
  }

  .section {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   Accessibility: Focus States
   ============================================================ */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.border-button:focus-visible,
.listen__cta-button:focus-visible {
  outline: 2px solid var(--color-emphasis);
  outline-offset: 4px;
}
