/* ===== DESIGN TOKENS ===== */
@font-face {
  font-family: "Grunt Grotesk";
  src: url("fonts/grunt-grotesk-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Grunt Grotesk";
  src: url("fonts/grunt-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-brand: #000000;
  --color-text-primary: #000000;
  --color-bg-main: #FFFFFF;
  --color-text-on-dark: #FFFFFF;
  --text-h1-family: "Grunt Grotesk", sans-serif;
  --text-h1-weight: 700;
  --text-h1-size: 16px;
  --text-h1-line: 18px;
  --text-h1-letter: -1px;
  --text-h2-family: "Grunt Grotesk", sans-serif;
  --text-h2-weight: 300;
  --text-h2-size: 16px;
  --text-h2-line: 18px;
  --text-h2-letter: 0px;
  --text-h3-family: "Grunt Grotesk", sans-serif;
  --text-h3-weight: 700;
  --text-h3-size: 12px;
  --text-h3-line: 16px;
  --text-h3-letter: 0px;
  --text-section-title-lg-family: "Grunt Grotesk", sans-serif;
  --text-section-title-lg-weight: 700;
  --text-section-title-lg-size: 28px;
  --text-body-emphasis-family: "Grunt Grotesk", sans-serif;
  --text-body-emphasis-weight: 300;
  --text-body-emphasis-size: 28px;
  --text-body-emphasis-line: 28px;
  --text-body-emphasis-line-lg: 36px;
  --text-body-emphasis-letter: 0px;
  --text-nav-link-family: "Grunt Grotesk", sans-serif;
  --text-nav-link-weight: 700;
  --text-nav-link-size: 14px;
  --text-nav-link-line: 14px;
  --text-nav-link-letter: 0px;
  --space-0: 0px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --space-16: 64px;
  --space-20: 80px;
}

/* ===== BASE & RESET ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: var(--text-h2-family);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg-main);
  color: var(--color-text-primary);
  width: 100%;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  position: relative;
}

/* ===== TYPOGRAPHY UTILITIES ===== */
h1 {
  font-family: var(--text-h1-family);
  font-weight: var(--text-h1-weight);
  font-size: var(--text-h1-size);
  line-height: var(--text-h1-line);
  letter-spacing: var(--text-h1-letter);
}

.text-h2,
.category-title,
.soundscape-title {
  font-family: var(--text-h2-family);
  font-weight: var(--text-h2-weight);
  font-size: var(--text-h2-size);
  line-height: var(--text-h2-line);
  letter-spacing: var(--text-h2-letter);
}

.text-h3,
.card-title {
  font-family: var(--text-h3-family);
  font-weight: var(--text-h3-weight);
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line);
  letter-spacing: var(--text-h3-letter);
  color: var(--color-text-on-dark);
}

.text-section-title,
.about-title {
  font-family: var(--text-section-title-lg-family);
  font-weight: var(--text-section-title-lg-weight);
  font-size: var(--text-section-title-lg-size);
  line-height: var(--text-body-emphasis-line-lg);
}

.text-body-emphasis,
.about-content p {
  font-family: var(--text-body-emphasis-family);
  font-weight: var(--text-body-emphasis-weight);
  font-size: var(--text-body-emphasis-size);
  line-height: var(--text-body-emphasis-line-lg);
  letter-spacing: var(--text-body-emphasis-letter);
}

.text-nav-link,
.nav-primary-centered a,
.social-nav a span,
.footer-main a span,
.link-category-cta span,
.soundscape-overlay .link-social-spotify span {
  font-family: var(--text-nav-link-family);
  font-weight: var(--text-nav-link-weight);
  font-size: var(--text-nav-link-size);
  line-height: var(--text-nav-link-line);
  letter-spacing: var(--text-nav-link-letter);
}

/* ===== LAYOUT UTILITIES ===== */
.flex-center {
  display: flex;
  align-items: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== HEADER ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  background-color: var(--color-bg-main);
  position: relative;
  z-index: 7;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.brand-logo h1 {
  white-space: nowrap;
}

/* Primary Navigation */
.nav-primary-centered {
  display: flex;
  align-items: center;
  gap: calc(var(--space-7) * 2);
}

.nav-primary-centered a {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.nav-primary-centered a:hover {
  opacity: 0.7;
}

.nav-primary-centered a + a::before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: calc(-1 * var(--space-7));
  width: 3px;
  height: 3px;
  background: var(--color-text-primary);
}

/* Social Navigation */
.social-nav {
  display: flex;
  align-items: center;
  gap: var(--space-9);
}

.social-nav a {
  display: flex;
  align-items: center;
  cursor: pointer;
}

/* ===== MAIN CONTENT ===== */
main {
  width: 100%;
}

/* ===== CATEGORY SECTIONS ===== */
.section-category {
  background-color: var(--color-bg-main);
  border-bottom: var(--space-1) solid var(--color-text-primary);
  padding: var(--space-0);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: calc(100vh - 60px);
}

.category-header {
  grid-row: 2;
  order: 2;
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4) var(--space-16) var(--space-4);
}

.subcategory-grid {
  grid-row: 1;
  order: 1;
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
  list-style: none;
}

.category-title {
  flex: 1 0 0;
  color: var(--color-text-primary);
}

.link-category-cta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}

.link-category-cta span {
  position: relative;
  display: inline-block;
}

.link-category-cta span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  bottom: -6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='4' preserveAspectRatio='none'><path d='M0 2 Q5 0, 10 2 T20 2 T30 2 T40 2' stroke='%23000000' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: repeat-x;
  background-size: 20px 4px;
  background-position: 0 0;
}

.link-category-cta:hover span::after,
.link-category-cta:focus span::after {
  opacity: 1;
  animation: wave-run 0.8s linear infinite;
}

/* ===== CARD COMPONENT ===== */
.component-subcategory-card {
  flex: 1 0 0;
  position: relative;
  height: 100%;
  overflow: hidden;
}

.card-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
}

.card-image-primary,
.card-image-secondary {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.card-image-secondary {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.component-subcategory-card:hover .card-image-primary,
.component-subcategory-card.active .card-image-primary {
  opacity: 0;
}

.component-subcategory-card:hover .card-image-secondary,
.component-subcategory-card.active .card-image-secondary {
  opacity: 1;
}

.card-title {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  text-align: center;
  padding: var(--space-2);
  z-index: 3;
  isolation: isolate;
}

.card-title::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(27px);
  -webkit-backdrop-filter: blur(27px);
  z-index: -1;
}

/* Arrow icon in top-right corner on hover */
.component-subcategory-card::after {
  content: "";
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 24px;
  height: 24px;
  opacity: 0;
  transition: opacity 180ms ease;
  z-index: 10;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'><path d='M7 17L17 7M17 7H9M17 7V15' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: 24px 24px;
  background-repeat: no-repeat;
  background-position: center;
}

.component-subcategory-card:hover::after,
.component-subcategory-card.active::after {
  opacity: 1;
}

/* ===== SOUNDSCAPE SECTION ===== */
.section-flawoer-soundscape {
  position: relative;
  width: 100%;
  height: 720px;
  overflow: hidden;
  background-color: var(--color-bg-main);
}

.soundscape-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

.soundscape-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4) var(--space-16) var(--space-4);
  z-index: 4;
}

.soundscape-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(27px);
  mix-blend-mode: soft-light;
}

.soundscape-title {
  color: var(--color-text-on-dark);
  flex: 1 0 0;
  min-width: 0;
  z-index: 5;
  position: relative;
}

.soundscape-overlay .link-social-spotify {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  flex-shrink: 0;
  z-index: 5;
  position: relative;
}

.soundscape-overlay .link-social-spotify img {
  filter: brightness(0) invert(1);
}

.soundscape-overlay .link-social-spotify span {
  color: var(--color-text-on-dark);
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* ===== ABOUT SECTION ===== */
.section-about {
  padding: var(--space-20) var(--space-0);
  background-color: var(--color-bg-main);
}

.about-container {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: var(--space-8);
  max-width: 1440px;
  margin: 0 auto;
}

.about-title {
  grid-column: 1;
  padding: 0 var(--space-4);
  align-self: start;
}

.about-content {
  grid-column: 2 / 4;
  padding: 0 var(--space-4);
  align-self: start;
}

.about-content p {
  margin-bottom: 20px;
}

.about-content p:last-child {
  margin-bottom: var(--space-0);
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--color-bg-main);
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: center;
  gap: var(--space-16);
  padding: var(--space-8);
  border-top: 3px solid var(--color-text-primary);
  border-bottom: 3px solid var(--color-text-primary);
}

.footer-main a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  position: relative;
}

.footer-main a + a::before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: calc(-1 * var(--space-16) / 2);
  width: 3px;
  height: 3px;
  background: var(--color-text-primary);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.footer-copyright-container {
  padding: var(--space-8) var(--space-8) var(--space-4) var(--space-8);
}

.footer-copyright {
  font-family: var(--text-h2-family);
  font-weight: var(--text-h2-weight);
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line);
  letter-spacing: var(--text-h3-letter);
  text-align: left;
}

.footer-logo-container {
  width: 100%;
  padding: 0;
}

.footer-logo {
  width: 100%;
  height: auto;
}

/* ===== WAVE UNDERLINE ANIMATION ===== */
.nav-primary-centered a::after,
.footer-main a span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  bottom: -6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='4' preserveAspectRatio='none'><path d='M0 2 Q5 0, 10 2 T20 2 T30 2 T40 2' stroke='%23000000' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: repeat-x;
  background-size: 20px 4px;
  background-position: 0 0;
}

.soundscape-overlay .link-social-spotify span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  bottom: -6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='4' preserveAspectRatio='none'><path d='M0 2 Q5 0, 10 2 T20 2 T30 2 T40 2' stroke='%23FFFFFF' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: repeat-x;
  background-size: 20px 4px;
  background-position: 0 0;
}

.nav-primary-centered a:hover::after,
.nav-primary-centered a:focus::after,
.footer-main a span:hover::after,
.footer-main a span:focus::after,
.soundscape-overlay .link-social-spotify span:hover::after,
.soundscape-overlay .link-social-spotify span:focus::after {
  opacity: 1;
  animation: wave-run 0.8s linear infinite;
}

@keyframes wave-run {
  0% { background-position: 0 0; }
  100% { background-position: 20px 0; }
}

/* ===== MOBILE STYLES ===== */
@media (max-width: 767px) {
  .section-header {
    padding: var(--space-2);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .brand-logo {
    gap: var(--space-1);
  }

  .nav-primary-centered {
    display: none;
  }

  .social-nav {
    gap: var(--space-9);
    justify-content: flex-end;
  }

  .section-category {
    border-bottom: var(--space-1) solid var(--color-text-primary);
    grid-template-rows: auto auto;
    height: auto;
  }

  .subcategory-grid {
    flex-direction: column;
    min-height: auto;
  }

  .component-subcategory-card {
    flex: 0 0 auto;
    width: 100%;
    height: 450px;
  }

  .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4) var(--space-9) var(--space-4);
  }

  .category-title {
    width: 100%;
  }

  .link-category-cta {
    width: auto;
    white-space: normal;
    flex-wrap: wrap;
  }

  .section-flawoer-soundscape {
    height: 450px;
  }

  .soundscape-overlay {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4) var(--space-9) var(--space-4);
  }

  .soundscape-title {
    font-size: 16px;
    line-height: 18px;
    white-space: normal;
  }

  .soundscape-overlay .link-social-spotify {
    width: 100%;
    justify-content: flex-start;
    white-space: normal;
  }

  .section-about {
    padding: var(--space-10) var(--space-4);
  }

  .about-container {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    align-items: flex-start;
  }

  .about-title {
    grid-column: 1;
    padding: 0;
    font-size: 20px;
    line-height: 28px;
    text-align: left;
  }

  .about-content {
    grid-column: 1;
    padding: 0;
  }

  .about-content p {
    font-size: 20px;
    line-height: 28px;
    margin-bottom: var(--space-4);
  }

  .footer-main {
    flex-direction: column;
    gap: var(--space-8);
    padding: var(--space-10) var(--space-8);
  }

  .footer-main a {
    flex-direction: column;
    gap: var(--space-2);
  }

  .footer-main a img {
    height: 24px;
    width: auto;
  }

  .footer-main a span {
    display: block;
    text-align: center;
  }

  .footer-main a + a::before {
    top: calc(-1 * var(--space-8) / 2);
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-copyright-container {
    padding: var(--space-2) var(--space-4) var(--space-10) var(--space-4);
  }

  .footer-copyright {
    font-size: 12px;
    line-height: 16px;
    text-align: center;
  }
}
