:root {
  --poster-url: none;
  --bg-base: #0e1117;
  --bg-tint: #2a3a3f;
  --ink: #f6f3ea;
  --ink-muted: #d8d3c4;
  --surface: rgba(10, 14, 20, 0.44);
  --surface-strong: rgba(10, 14, 20, 0.68);
  --line: rgba(246, 243, 234, 0.28);
  --accent: #d7c88e;
  --focus: #f6d75d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 10%, #24333b 0%, var(--bg-base) 52%);
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.bg-video,
.bg-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bg-fallback {
  background-image:
    radial-gradient(circle at 80% 20%, rgba(215, 200, 142, 0.2) 0, transparent 40%),
    linear-gradient(140deg, rgba(42, 58, 63, 0.86), rgba(14, 17, 23, 0.9)),
    var(--poster-url);
  background-size: cover, cover, cover;
  background-position: center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(14, 17, 23, 0.35), rgba(14, 17, 23, 0.72)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.016) 0,
      rgba(255, 255, 255, 0.016) 1px,
      transparent 1px,
      transparent 4px
    );
}

.bg-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 16, 0.5);
  opacity: 0;
  transition: opacity 180ms ease-out;
}

.loop-fade .bg-overlay::after {
  opacity: 0.32;
  transition: opacity 110ms ease-in;
}

.page {
  width: min(740px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.5rem 0 3.5rem;
}

.hero {
  min-height: 70vh;
  display: grid;
  align-content: end;
  gap: 1rem;
  animation: reveal 0.8s ease;
}

.kicker {
  margin: 0;
  color: var(--ink-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1,
h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1.03;
  margin: 0;
}

h1 {
  font-size: clamp(2.7rem, 8vw, 6.4rem);
  max-width: 14ch;
  text-wrap: balance;
}

.link-list a,
.panel a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.link-list a:hover,
.panel a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.panel {
  margin-top: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.15rem 1.2rem;
  backdrop-filter: blur(3px);
  animation: reveal 0.9s ease;
  text-align: center;
}

.panel h2 {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  margin-bottom: 0.45rem;
}

.panel p {
  margin: 0;
  max-width: 70ch;
}

#contact .contact-lines {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
}

#contact .contact-row {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  white-space: nowrap;
}

#contact .contact-row a {
  display: inline-block;
}

.link-list {
  list-style: none;
  display: grid;
  gap: 0.75rem 1rem;
  margin: 0.65rem 0 0;
  padding: 0;
  justify-items: center;
}

#music .link-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#some .link-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.link-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  border-bottom-color: transparent;
}

.link-icon {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
  flex: 0 0 auto;
}

.audio-toggle,
.sound-start {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.65rem 0.95rem;
  font: inherit;
  color: var(--ink);
  background: var(--surface-strong);
  cursor: pointer;
}

.sound-start {
  right: 1rem;
  bottom: 4.3rem;
  border-color: var(--accent);
}

.audio-toggle:hover,
.sound-start:hover {
  border-color: var(--accent);
}

.hidden {
  display: none;
}

.video-fallback .bg-video,
.video-reduced .bg-video {
  opacity: 0;
}

.video-fallback .bg-fallback,
.video-reduced .bg-fallback {
  opacity: 1;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

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

@media (max-width: 700px) {
  .page {
    width: calc(100% - 1rem);
    padding-top: 3.1rem;
  }

  .hero {
    min-height: 63vh;
  }

  .panel {
    padding: 1rem;
  }

  #music .link-list,
  #some .link-list {
    grid-template-columns: 1fr;
    gap: 0.8rem 1rem;
  }

  #contact .contact-row {
    display: block;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    max-width: 30ch;
  }

  #contact .contact-row a {
    display: block;
    margin-top: 0.15rem;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .sound-start {
    bottom: 4.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .panel {
    animation: none;
  }
}
