@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/IBMPlexMono-Light.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/IBMPlexMono-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/IBMPlexMono-Medium.ttf") format("truetype");
}

:root {
  --bg: #fff;
  --fg: #000;
  --mid: #343434;
  --muted: #6e6e6e;
  --faint: #bbbbbb;
  --line: #00000014;
  --nav-h: 4rem;
  --gap: 1rem;
  --pad: 1rem;
  --cols: 3;
  --font: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --mini-h: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border: none;
  outline: none;
  margin: 0;
  padding: 0;
}

html,
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  font-variant-numeric: normal;
  font-feature-settings: "zero" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
}

button,
input,
a {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  appearance: none;
  -webkit-appearance: none;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
  user-select: none;
  -webkit-user-select: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ——— NAV ——— */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  width: 100%;
  height: var(--nav-h);
  max-height: var(--nav-h);
  background: var(--bg);
  padding: 0.75rem var(--pad);
}

.nav-spacer {
  height: var(--nav-h);
}

.nav-left,
.nav-right {
  position: absolute;
  top: 0;
  display: flex;
  align-items: center;
  height: 100%;
  z-index: 2;
  gap: 1rem;
}

.nav-left {
  left: var(--pad);
}

.nav-right {
  right: var(--pad);
}

.nav-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  height: 100%;
}

.brand {
  font-size: 0.8125rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  font-weight: 400;
  transition: opacity 0.3s ease;
}
.brand:hover {
  opacity: 0.7;
}

.filter-btn {
  cursor: pointer;
  color: var(--mid);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  flex: none;
  transition: opacity 0.3s ease;
  background: none;
}

.filter-btn.is-off {
  opacity: 0.2;
}

.filter-btn:hover {
  opacity: 0.7;
}

.filter-btn.is-off:hover {
  opacity: 0.45;
}

.nav-text-btn,
.tiktok-link {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.nav-text-btn:hover,
.tiktok-link:hover {
  opacity: 0.7;
}

/* hamburger — two 2×16px bars, like the current yeezy nav */
.burger {
  position: relative;
  width: 1.5rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.burger-line {
  position: absolute;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--fg);
  transition: transform 0.3s ease, width 0.3s ease, opacity 0.3s ease;
}

/* default = plus, matching current yeezy.com */
.burger-line:last-child,
.burger[data-state="closed"] .burger-line:last-child {
  transform: rotate(90deg);
}

.burger[data-state="open"] .burger-line:first-child {
  transform: rotate(45deg);
}
.burger[data-state="open"] .burger-line:last-child {
  transform: rotate(-45deg);
}

/* back chevron */
.burger[data-state="back"] .burger-line:first-child {
  width: 10px;
  transform: translate(-3px, 3.5px) rotate(45deg);
}
.burger[data-state="back"] .burger-line:last-child {
  width: 10px;
  transform: translate(-3px, -3.5px) rotate(-45deg);
}

/* ——— SEARCH ——— */
.search-bar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  z-index: 98;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 var(--pad) 0.85rem;
  background: var(--bg);
}

.search-bar[hidden] {
  display: none;
}

.search-bar input {
  flex: 1;
  border: none;
  border-bottom: 1px solid var(--fg);
  background: transparent;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0;
  color: var(--fg);
  border-radius: 0;
}

.search-bar input::placeholder {
  color: var(--faint);
  text-transform: uppercase;
}

.search-bar input::-webkit-search-decoration,
.search-bar input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

/* ——— GRID ——— */
.app {
  padding: 0 var(--pad) calc(3rem + var(--mini-h) + env(safe-area-inset-bottom, 0px));
  min-height: calc(100dvh - var(--nav-h));
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--gap);
  width: 100%;
  justify-content: center;
  justify-items: center;
  padding-bottom: 2rem;
  position: relative;
}

.product-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(500px, 100%);
  text-align: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  background: none;
}

.product-image {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: scale(1);
  transition: transform 0.3s ease;
}

@media (hover: hover) {
  .product-item:hover .product-image {
    transform: scale(1.02);
  }
}

.image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.image-container img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-label {
  z-index: 1;
  width: 100%;
  margin-top: 0.55rem;
  font-size: 1rem;
  text-align: center;
  font-family: var(--font);
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.product-meta {
  margin-top: 0.15rem;
  margin-bottom: 0.5rem;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  width: 100%;
}

.ph-tag {
  color: var(--faint);
}

/* ——— BEAT PAGE ——— */
.beat-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0 2rem;
  animation: fade-in 0.28s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.beat-art {
  width: min(340px, 58vw);
  aspect-ratio: 1 / 1;
  margin: 0.15rem auto 0.85rem;
}

.beat-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.beat-code {
  font-size: 0.875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.beat-title {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  text-align: center;
}

.beat-info {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1.15rem;
  text-align: center;
}

.player {
  width: min(420px, 92%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}

.wave {
  width: 100%;
  height: 48px;
  cursor: pointer;
  display: block;
}

.scrub-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
}

.play-btn {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  position: relative;
  display: grid;
  place-items: center;
}

/* CSS triangle play / pause bars — original, not a copied icon */
.play-btn[data-state="paused"]::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent var(--fg);
  margin-left: 2px;
}

.play-btn[data-state="playing"]::before,
.play-btn[data-state="playing"]::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 2px;
  height: 12px;
  background: var(--fg);
  transform: translateY(-50%);
}
.play-btn[data-state="playing"]::before { left: 9px; }
.play-btn[data-state="playing"]::after { right: 9px; }

.scrub {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 1px;
  background: #000;
  border-radius: 0;
  cursor: pointer;
}

.scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 8px;
  height: 8px;
  background: var(--fg);
  border-radius: 0;
  cursor: pointer;
}

.scrub::-moz-range-thumb {
  width: 8px;
  height: 8px;
  background: var(--fg);
  border: none;
  border-radius: 0;
  cursor: pointer;
}

.scrub::-moz-range-track {
  height: 1px;
  background: #000;
  border: none;
}

.time {
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  min-width: 4.6rem;
  text-align: right;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  width: min(420px, 92%);
}
.cta .download {
  min-width: 0;
  flex: 1;
}

.cta-label {
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.download {
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  padding: 0.85rem 1.25rem;
  min-width: 14rem;
  text-align: center;
  transition: opacity 0.3s ease, background 0.3s ease, color 0.3s ease;
  border: 1px solid var(--fg);
}

@media (hover: hover) {
  .download:hover {
    background: var(--fg);
    color: var(--bg);
  }
}

.download-row {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.terms {
  max-width: 22rem;
  text-align: center;
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  line-height: 1.7;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 1rem 1rem;
}

.ph-note {
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.85rem;
}

/* ——— ABOUT ——— */
.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 12vh 1.5rem 4rem;
  text-align: center;
  animation: fade-in 0.28s ease;
  gap: 0;
}

.about h1 {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.about p {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  line-height: 2;
  text-transform: uppercase;
  color: var(--mid);
  max-width: 22rem;
  margin-bottom: 0;
}

.about p + p {
  margin-top: 1.75rem;
}

.about a {
  color: var(--fg);
  text-decoration: none;
  letter-spacing: inherit;
  transition: opacity 0.3s ease;
}

.about a:hover {
  opacity: 0.7;
}

/* ——— MINI PLAYER (cart-bar analogue) ——— */
.mini {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: calc(3.5rem + env(safe-area-inset-bottom, 0px));
  padding: 0 1rem env(safe-area-inset-bottom, 0px);
  background: var(--bg);
  box-shadow: 0 -1px 0 var(--line);
}

.mini[hidden] {
  display: none;
}

.mini-cover-btn {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
}

.mini-cover-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  flex: 1 1 8rem;
  text-align: left;
  cursor: pointer;
}

#mini-code {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#mini-title {
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.mini-scrub {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 2 1 10rem;
  min-width: 0;
}

.mini-scrub input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 1px;
  background: #000;
  cursor: pointer;
  min-width: 0;
}

.mini-scrub input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 8px;
  height: 8px;
  background: var(--fg);
  border-radius: 0;
  cursor: pointer;
}

.mini-scrub input[type="range"]::-moz-range-thumb {
  width: 8px;
  height: 8px;
  background: var(--fg);
  border: none;
  border-radius: 0;
}

#mini-time {
  font-size: 0.5625rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  min-width: 2.2rem;
  font-variant-numeric: tabular-nums;
}

.mini-close {
  flex: none;
}

/* ——— MENU ——— */
.menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.22s ease;
}

.menu[hidden] {
  display: none;
}

.menu-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

.menu-links a {
  font-size: 0.875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  transition: opacity 0.3s ease;
}

.menu-links a:hover {
  opacity: 0.7;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 20vh 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 3rem 0 1rem;
}

.footer a {
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.footer a:hover {
  opacity: 0.7;
}

/* few-item catalog: large centered tiles, not a sparse 6-col leftover */
.product-grid[data-count="1"] {
  --cols: 1;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 1.5rem;
}
.product-grid[data-count="2"] {
  --cols: 2;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 1.5rem;
  gap: 2rem;
}
@media (max-width: 600px) {
  .product-grid[data-count="2"] {
    --cols: 2;
    gap: 1rem;
    max-width: 100%;
    padding-top: 0.75rem;
  }
}

/* ——— BREAKPOINTS ——— */
@media (max-width: 767px) {
  .filter-btn {
    font-size: 0.625rem;
  }
  .nav-center {
    gap: 0.65rem;
  }
  .nav-text-btn,
  .tiktok-link {
    font-size: 0.5625rem;
  }
  .tiktok-link {
    display: none;
  }
  .product-label {
    font-size: 0.8125rem;
  }
  .product-meta {
    font-size: 0.5625rem;
  }
  .nav-right {
    gap: 0.65rem;
  }
  .mini-scrub {
    display: none;
  }
  .beat-art {
    width: min(420px, 78vw);
    margin-top: 0.15rem;
    margin-bottom: 0.85rem;
  }
}

@media (min-width: 600px) {
  :root { --cols: 3; }
}

@media (min-width: 900px) {
  :root { --cols: 4; }
}

@media (min-width: 1280px) {
  :root { --cols: 6; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

body.has-mini {
  --mini-h: 3.5rem;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .app,
body.menu-open .mini,
body.menu-open .search-bar {
  visibility: hidden;
}
