/* Shared responsive layout and mobile navigation. */
:root {
  --mobile-header-height: 76px;
}

html,
body {
  max-width: 100%;
}

body {
  overflow-x: clip;
}

main,
header,
footer,
section,
article,
div,
form {
  min-width: 0;
}

img,
picture,
video,
canvas,
svg,
iframe {
  max-width: 100%;
}

img,
video {
  height: auto;
}

p,
h1,
h2,
h3,
h4,
blockquote,
a,
button,
label {
  overflow-wrap: break-word;
}

strong,
b,
.cart-row h4 {
  overflow-wrap: anywhere;
}

section[id] {
  scroll-margin-top: 96px;
}

.menu-toggle,
.mobile-menu {
  display: none;
}

.button,
.add-cart,
.open-cart,
.cart-close,
.cart-close-shop,
.order-success-close,
.variant-select,
.form-grid input,
.form-grid textarea {
  min-height: 44px;
}

.spotify-top-five,
.spotify-top-five iframe,
.hero-art,
.record-stage {
  min-width: 0;
  max-width: 100%;
}

.cart-dialog {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.qty button {
  min-width: 44px;
  min-height: 44px;
}

/* Keep release labels and links clear of the cover artwork. */
#utgivelser .release-cover {
  align-self: center;
}

#utgivelser .release-badge {
  position: static;
  align-self: flex-start;
  margin-bottom: 12px;
  max-width: 100%;
  line-height: 1.4;
}

#utgivelser .release-copy h3 {
  line-height: 1.15;
}

#utgivelser .release-version {
  display: block;
  margin-top: 7px;
  color: #d7d0dc;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.5;
}

#utgivelser .release-spotify a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #78f3a4;
  font-size: .88rem;
  line-height: 1.4;
}

#utgivelser .release-copy a:focus-visible {
  outline: 2px solid #78f3a4;
  outline-offset: 4px;
}

.cart-fab.release-content-visible {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 1180px) {
  .merch-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1600px) {
  .hero {
    padding-left: max(5vw, 72px);
    padding-right: max(5vw, 72px);
  }
}

@media (max-width: 1180px) and (min-width: 961px) {
  .nav-links {
    gap: clamp(18px, 2.4vw, 28px);
  }

  .hero {
    column-gap: 36px;
  }
}

@media (min-width: 961px) {
  .hero h1 {
    font-size: clamp(4.2rem, 7vw, 6.7rem);
  }
}

@media (max-width: 960px) {
  .nav-shell {
    position: fixed;
    z-index: 40;
    background: rgba(9, 8, 13, .94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .nav {
    height: var(--mobile-header-height);
  }

  .nav-links,
  .desktop-nav-cta {
    display: none;
  }

  .menu-toggle {
    position: relative;
    z-index: 43;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 8px;
    background: rgba(255, 255, 255, .04);
    color: #fff;
    cursor: pointer;
  }

  .menu-toggle:focus-visible {
    outline: 3px solid var(--pink2);
    outline-offset: 3px;
  }

  .menu-toggle-lines {
    position: relative;
    width: 23px;
    height: 18px;
  }

  .menu-toggle-lines > span {
    position: absolute;
    left: 0;
    width: 23px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transform-origin: center;
    transition: top .2s ease, transform .2s ease, opacity .15s ease;
  }

  .menu-toggle-lines > span:nth-child(1) { top: 1px; }
  .menu-toggle-lines > span:nth-child(2) { top: 8px; }
  .menu-toggle-lines > span:nth-child(3) { top: 15px; }

  .menu-open .menu-toggle-lines > span:nth-child(1) {
    top: 8px;
    transform: rotate(45deg);
  }

  .menu-open .menu-toggle-lines > span:nth-child(2) {
    opacity: 0;
  }

  .menu-open .menu-toggle-lines > span:nth-child(3) {
    top: 8px;
    transform: rotate(-45deg);
  }

  .mobile-menu {
    position: fixed;
    inset: var(--mobile-header-height) 0 0;
    z-index: 39;
    display: block;
    background: rgba(3, 2, 5, .62);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: visibility .24s ease, opacity .24s ease;
  }

  body.mobile-menu-open .mobile-menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-backdrop {
    position: absolute;
    inset: 0 min(82vw, 360px) 0 0;
    width: auto;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: default;
  }

  .mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(82vw, 360px);
    max-height: calc(100dvh - var(--mobile-header-height));
    overflow-y: auto;
    padding: 22px 20px max(28px, env(safe-area-inset-bottom));
    border-left: 1px solid rgba(255, 42, 145, .36);
    border-bottom: 1px solid rgba(255, 42, 145, .28);
    border-radius: 0 0 0 18px;
    background: linear-gradient(145deg, rgba(255, 42, 145, .1), #100d15 34%);
    box-shadow: -22px 28px 70px rgba(0, 0, 0, .5);
    transform: translateX(24px);
    transition: transform .24s ease;
  }

  body.mobile-menu-open .mobile-menu-panel {
    transform: translateX(0);
  }

  .mobile-menu-label {
    margin: 0 0 10px;
    color: var(--pink2);
    font: 800 .72rem "Montserrat", sans-serif;
    letter-spacing: .18em;
    text-transform: uppercase;
  }

  .mobile-menu-links {
    display: grid;
  }

  .mobile-menu-links a {
    display: flex;
    align-items: center;
    min-height: 54px;
    border-bottom: 1px solid var(--line);
    color: #f7f2f8;
    font: 800 1.05rem "Montserrat", sans-serif;
  }

  .mobile-menu-links a::after {
    content: "→";
    margin-left: auto;
    color: var(--pink);
  }

  .mobile-menu-spotify {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    margin-top: 22px;
    border: 1px solid rgba(30, 215, 96, .55);
    border-radius: 100px;
    font-weight: 800;
  }

  .mobile-menu-spotify svg {
    width: 21px;
    fill: #1ed760;
  }

  body.mobile-menu-open {
    overflow: hidden;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--mobile-header-height) + 60px);
  }

  .section {
    padding-left: clamp(22px, 4.5vw, 34px);
    padding-right: clamp(22px, 4.5vw, 34px);
  }

  footer {
    padding-left: clamp(22px, 4.5vw, 34px);
    padding-right: clamp(22px, 4.5vw, 34px);
    gap: 24px;
  }
}

@media (max-width: 820px) {
  .merch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  footer {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }

  footer p {
    margin: 0;
  }
}

@media (max-width: 560px) {
  :root {
    --mobile-header-height: 72px;
  }

  .nav {
    padding-inline: 16px;
  }

  .brand-logo {
    width: min(148px, 48vw);
    height: 54px;
  }

  .hero {
    padding: calc(var(--mobile-header-height) + 38px) 20px 58px;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 12vw, 3.35rem);
    letter-spacing: -.06em;
  }

  .hero-actions {
    margin: 28px 0 36px;
  }

  .hero-art {
    height: clamp(320px, 92vw, 385px);
    margin-top: 2px;
  }

  .record-stage {
    width: min(76vw, 330px);
  }

  .soundwave {
    right: 1%;
  }

  .section {
    padding: 76px 20px;
  }

  .section h2 {
    font-size: clamp(2.3rem, 12vw, 2.8rem);
  }

  .release-section-heading,
  .section-heading,
  .merch-heading {
    margin-bottom: 32px;
  }

  #utgivelser .release-card {
    grid-template-columns: 1fr;
  }

  #utgivelser .release-copy {
    padding: 20px;
  }

  #utgivelser .release-copy h3 {
    font-size: 1.4rem;
  }

  #utgivelser .release-artists {
    font-size: .88rem;
  }

  .spotify-top-five iframe {
    width: 100%;
  }

  .side-project {
    max-width: 100%;
  }

  .uten-profile-story-section {
    padding-top: 0;
    padding-bottom: 78px;
  }

  .cart-dialog {
    width: calc(100% - 16px);
    max-width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    margin: auto;
  }

  .cart-topbar h2 {
    font-size: clamp(1.85rem, 9vw, 2.5rem);
  }

  .vipps-box strong {
    font-size: 1.25rem;
    line-height: 1.25;
  }

  .cart-fab {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    min-height: 46px;
  }
}

@media (max-width: 520px) {
  .merch-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .merch-card {
    padding: 11px 11px 18px;
  }

  .merch-meta {
    display: flex;
  }

  .merch-meta h3 {
    font-size: 1.05rem;
  }

  .merch-meta strong {
    display: inline;
    margin-top: 0;
    font-size: 1rem;
  }

  .merch-card > p {
    display: block;
    font-size: .88rem;
  }

  .variant-label {
    font-size: .75rem;
  }

  .variant-select,
  .add-cart {
    font-size: .88rem;
  }
}

@media (max-width: 390px) {
  .nav {
    padding-inline: 14px;
  }

  .brand-logo {
    width: 138px;
  }

  .hero,
  .section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero h1 {
    font-size: clamp(2.45rem, 11.6vw, 2.8rem);
  }

  .eyebrow {
    letter-spacing: .16em;
  }

  .mobile-menu-panel {
    width: min(84vw, 330px);
  }

  .mobile-menu-backdrop {
    right: min(84vw, 330px);
  }

  .cart-panel {
    padding: 16px;
  }

  .cart-total {
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-toggle-lines > span,
  .mobile-menu,
  .mobile-menu-panel {
    transition: none;
  }
}
