/* ── 1. Fonts ─────────────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Teko:wght@300..700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700&display=swap");

@font-face {
    font-family: Pretendard;
    font-weight: 45 920;
    font-style: normal;
    font-display: swap;
    src: url(/fonts/PretendardVariable.woff2) format("woff2-variations");
}

/* ── 2. Design Tokens ─────────────────────────────────────── */
:root {
    /* colours */
    --c-primary: #101010;
    --c-white: #ffffff;
    --c-black: #000000;
    --c-white-rgb: 255, 255, 255;
    --c-black-rgb: 0, 0, 0;
    --c-primary-rgb: 16, 16, 16;

    /* grays */
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-250: #e8e8e8;
    --gray-300: #e0e0e0;
    --gray-350: #d0d0d0;
    --gray-400: #bcbcbc;
    --gray-500: #a6a5a5;
    --gray-550: #a5a5a5;
    --gray-575: #999999;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-850: #333333;
    --gray-900: #212121;
    --gray-950: #101010;

    /* text */
    --txt-primary: #101010;
    --txt-secondary: #757575;
    --txt-tertiary: #bcbcbc;
    --txt-disabled: #e0e0e0;
    --txt-white: #ffffff;
    --txt-black: #000000;

    /* borders */
    --border-light: #eeeeee;
    --border-medium: #e0e0e0;
    --border-dark: #616161;
    --border-black: #000000;

    /* backgrounds */
    --bg-primary: #ffffff;
    --bg-gray: #f5f5f5;
    --bg-gray-light: #fafafa;
    --bg-heavy: #101010;
    --bg-black: #000000;

    /* opacity helpers */
    --op-25: 0.25;
    --op-40: 0.4;
    --op-95: 0.95;

    /* spacing */
    --sp-xs: 4px;
    --sp-sm: 8px;
    --sp-md: 16px;
    --sp-lg: 24px;
    --sp-xlg: 30px;

    /* header */
    --hdr-h: 70px;
    --hdr-h-lg: 130px;

    /* typography */
    --ff-base:
        Pretendard, "Noto Sans", "Noto Sans JP", "Noto Sans SC", "Noto Sans TC",
        sans-serif;
    --ff-teko: Teko, Pretendard, "Noto Sans", sans-serif;
    --ff-acumin:
        "Barlow Condensed", acumin-pro-condensed, Pretendard, "Noto Sans",
        sans-serif;

    /* radii */
    --r-xs: 4px;
    --r-sm: 8px;

    /* z-index scale */
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-overlay: 400;
    --z-header: 500;
    --z-drawer: 600;
    --z-modal: 700;
    --z-toast: 1000;

    /* transitions */
    --t-fast: 150ms ease-in-out;
    --t-base: 250ms ease-in-out;
    --t-slow: 350ms ease-in-out;

    /* header-specific opacity vars (overridden in dark mode) */
    --hdr-op-fade: 0.25;
}

/* ── 3. Dark-mode token overrides ─────────────────────────── */
[data-theme="dark"] {
    --txt-primary: #ffffff;
    --txt-secondary: #bcbcbc;
    --txt-tertiary: #757575;
    --txt-disabled: #616161;
    --txt-white: #101010;
    --txt-black: #ffffff;
    --border-black: #ffffff;
    --bg-primary: #101010;
    --bg-gray: #212121;
    --bg-gray-light: #101010;
    --bg-heavy: #ffffff;
    --bg-black: #ffffff;
    --c-white-rgb: 16, 16, 16;
    --c-black-rgb: 255, 255, 255;
    --c-primary-rgb: 255, 255, 255;
    --op-25: var(--op-40);
    --hdr-op-fade: 0.4;
}

/* ── 4. Reset ─────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

a,
abbr,
article,
aside,
audio,
b,
blockquote,
body,
canvas,
caption,
cite,
code,
dd,
del,
details,
dfn,
div,
dl,
dt,
em,
embed,
fieldset,
figcaption,
figure,
footer,
form,
h1,
h2,
h3,
h4,
h5,
h6,
header,
hgroup,
html,
i,
iframe,
img,
ins,
kbd,
label,
legend,
li,
mark,
menu,
nav,
object,
ol,
output,
p,
pre,
q,
ruby,
s,
samp,
section,
small,
span,
strike,
strong,
sub,
summary,
sup,
table,
tbody,
td,
tfoot,
th,
thead,
time,
tr,
tt,
u,
ul,
var,
video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
    display: block;
}

body {
    line-height: 1;
}
ol,
ul {
    list-style: none;
}
blockquote,
q {
    quotes: none;
}
blockquote::before,
blockquote::after,
q::before,
q::after {
    content: "";
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
button {
    border: none;
    background: none;
    cursor: pointer;
}
a {
    color: inherit;
    text-decoration: none;
}
img {
    display: block;
    max-width: 100%;
}

/* ── 5. Base ──────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
    color-scheme: light; /* prevent OS dark-mode from flipping */
}

body {
    background-color: var(--bg-primary);
    font-family: var(--ff-base);
    color: var(--txt-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* make body a flex column so footer is always pushed to bottom */
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

/* main content area grows to fill space between header and footer */
body > .bhm-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* scrollbar */
::-webkit-scrollbar {
    width: 5px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 50px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a5a5a5;
}
@media (min-width: 1024px) {
    ::-webkit-scrollbar {
        width: 6px;
    }
}

/* ── 6. Header ────────────────────────────────────────────── */
.bhm-header {
    position: sticky;
    top: 0;
    z-index: 500;
    padding: 0.625rem;
    min-height: var(--hdr-h);
    background: rgba(var(--c-white-rgb), 0);
    transition:
        background-color 0.1s ease,
        opacity 0.1s ease,
        transform 0.3s ease;
}

@media (min-width: 768px) {
    .bhm-header {
        padding: 1.25rem;
        min-height: var(--hdr-h-lg);
    }
    .bhm-header:hover {
        background: rgba(var(--c-white-rgb), 0.95);
    }
}

.bhm-header.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-100%);
}

/* ── 6a. Header inner container ───────────────────────────── */
.bhm-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

@media (min-width: 768px) {
    .bhm-header__inner {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        align-items: start;
    }
}

/* ── 6b. Logo ─────────────────────────────────────────────── */
.bhm-header__logo {
    position: relative;
    /* explicit width so the abs-positioned img has a visible container on mobile */
    width: 8rem;
    height: 3.75rem; /* slightly larger on mobile */
    flex-shrink: 0;
}

.bhm-header__logo a {
    display: block;
    height: 100%;
}

.bhm-header__logo img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: auto;
    max-width: none;
}

/* default (light mode): show black logo, hide white logo */
.bhm-header__logo-light {
    display: block;
} /* bhm-logo.svg — black */
.bhm-header__logo-dark {
    display: none;
} /* bhm-logo-white.svg — white */

/* dark mode: hide black logo, show white logo */
[data-theme="dark"] .bhm-header__logo-light {
    display: none;
}
[data-theme="dark"] .bhm-header__logo-dark {
    display: block;
}

@media (min-width: 768px) {
    .bhm-header__logo {
        height: 4.5625rem; /* 73px */
        width: auto;
        grid-column: 1 / 2;
        grid-row: 1;
    }
}

@media (min-width: 1920px) {
    .bhm-header__logo {
        height: 5.625rem;
        grid-column: 1 / 5;
    }
}

/* ── 6c. Nav (desktop) ────────────────────────────────────── */
.bhm-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    padding: 0.625rem;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: var(--z-drawer);
    transform: translateX(100%);
    background-color: rgba(var(--c-white-rgb), var(--op-95));
    transition: transform 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bhm-nav.is-open {
    transform: translateX(0);
}

@media (min-width: 768px) {
    .bhm-nav {
        position: static;
        width: auto;
        height: auto;
        transform: none;
        background-color: transparent;
        padding: 0;
        overflow: visible;
        grid-column: 4 / 11;
        grid-row: 1;
        display: block;
    }
}

@media (min-width: 1024px) {
    .bhm-nav {
        grid-column: 3 / 12;
    }
}

@media (min-width: 1920px) {
    .bhm-nav {
        grid-column: 6 / 12;
    }
}

/* ── 6d. Menu list ────────────────────────────────────────── */
.bhm-menu {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    width: fit-content;
}

@media (min-width: 768px) {
    .bhm-menu {
        flex-direction: row;
        gap: 1.25rem;
    }

    .bhm-menu > .bhm-menu__item {
        flex: 0 0 auto;
        margin-left: 0;
    }

    /* ABOUT (2nd li, HOME is 1st but hidden) gets extra right padding to push BTS away */
    .bhm-menu > .bhm-menu__item:nth-of-type(2) {
        padding-right: 3rem;
    }
}

@media (min-width: 1024px) {
    .bhm-menu {
        gap: 1.875rem;
    }

    .bhm-menu > .bhm-menu__item:nth-of-type(2) {
        padding-right: 3.4rem;
    }
}

@media (min-width: 1920px) {
    .bhm-menu {
        gap: 3.125rem;
    }

    .bhm-menu > .bhm-menu__item:nth-of-type(2) {
        padding-right: 8rem;
    }
}

/* ── 6e. Menu item ────────────────────────────────────────── */
.bhm-menu__item {
    position: relative;
    z-index: 1;
}

/* ── 6f. Menu link (desktop visible label) ────────────────── */

/* hidden on mobile — the button is used instead */
.bhm-menu__link {
    display: none;
}

@media (min-width: 768px) {
    .bhm-menu__link {
        display: flex;
        align-items: center;
        width: fit-content;
        gap: 0.625rem;
        font-family: var(--ff-teko);
        font-size: 1.5rem;
        font-weight: 400;
        line-height: 0.75;
        text-transform: uppercase;
        white-space: nowrap;
        color: var(--txt-primary);
        opacity: 1;
        transition: opacity var(--t-base);
        cursor: pointer;
    }
}

@media (min-width: 1024px) {
    .bhm-menu__link {
        font-size: 2.25rem;
        line-height: 0.7778;
    }
}

/* ── 6g. Menu button (mobile accordion trigger) ───────────── */
.bhm-menu__btn {
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--txt-primary);
    font-family: var(--ff-teko);
    font-size: 2.25rem;
    font-weight: 400;
    line-height: 0.78;
    text-transform: uppercase;
    background: none;
    border: none;
    cursor: pointer;
    /* mobile default: faded */
    opacity: var(--op-25);
    transition: opacity var(--t-base);
}

/* HOME item — full opacity (current page indicator) */
/* .bhm-menu__item--home .bhm-menu__btn {
    opacity: 1;
} */

/* active/open item — full opacity only, no bold */
.bhm-menu__item.is-open > .bhm-menu__btn {
    opacity: 1;
}

.bhm-menu__item--home .bhm-menu__btn {
    opacity: var(--op-25);
}

body.homepage .bhm-menu__item--home .bhm-menu__btn {
    opacity: 1;
}

@media (min-width: 768px) {
    .bhm-menu__btn {
        display: none;
    }
}

/* HOME item hidden on desktop */
.bhm-menu__item--home {
    display: block;
}
@media (min-width: 768px) {
    .bhm-menu__item--home {
        display: none;
    }
}

/* ── Dark mode toggle (mobile utilities) ─────────────────── */
.bhm-theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--ff-teko);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 0.75;
    text-transform: uppercase;
    color: var(--txt-primary);
}

.bhm-theme-toggle__box {
    display: inline-block;
    width: 0.9375rem;
    height: 0.9375rem;
    background-color: var(--bg-heavy);
    flex-shrink: 0;
}

/* ── 6h. Hover interaction — fade siblings ────────────────── */
/*
  When any item is hovered (.has-hover on the menu):
  - ALL links fade to 0.25
  - The hovered item's link goes back to full opacity
*/
@media (min-width: 768px) {
    .bhm-menu.has-hover .bhm-menu__link {
        opacity: var(--op-25);
    }

    .bhm-menu.has-hover .bhm-menu__item.is-hovered > .bhm-menu__link {
        opacity: 1;
    }

    /* submenu links of the hovered item: faded, hover to full */
    .bhm-menu__item.is-hovered .bhm-submenu__link {
        opacity: var(--op-25);
    }

    .bhm-menu__item.is-hovered .bhm-submenu__link:hover {
        opacity: 1;
    }

    /* active state — current page item stays full opacity, others fade */
    .bhm-menu.has-active .bhm-menu__link {
        opacity: var(--op-25) !important;
    }

    .bhm-menu.has-active .bhm-menu__item.is-active > .bhm-menu__link {
        opacity: 1 !important;
    }

    /* active submenu link stays full opacity */
    .bhm-menu__item.is-active .bhm-submenu__link {
        opacity: var(--op-25);
    }

    .bhm-menu__item.is-active .bhm-submenu__item.is-current .bhm-submenu__link {
        opacity: 1;
    }

    /* when hovering while there's an active item, hover takes over */
    .bhm-menu.has-active.has-hover .bhm-menu__link {
        opacity: var(--op-25) !important;
    }

    .bhm-menu.has-active.has-hover
        .bhm-menu__item.is-hovered
        > .bhm-menu__link {
        opacity: 1 !important;
    }
}

/* ── 6i. Submenu ──────────────────────────────────────────── */
.bhm-submenu {
    max-height: 0;
    overflow: hidden;
    transition:
        max-height 0.4s ease,
        opacity 0.3s ease,
        visibility 0.3s ease;
    margin-left: 0.625rem;
}

/* mobile: accordion open */
.bhm-menu__item.is-open > .bhm-submenu {
    max-height: 25rem;
}

@media (min-width: 768px) {
    .bhm-submenu {
        position: absolute;
        top: 100%;
        left: 0;
        margin-left: 0;
        min-width: 12.5rem;
        max-height: none;
        overflow: visible;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition:
            opacity 0.25s ease,
            visibility 0.25s ease;
        padding: 0;
    }

    /* desktop: show on hover — just fade in, no height animation needed */
    .bhm-menu__item.is-hovered > .bhm-submenu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/* submenu items */
.bhm-submenu__item:first-child {
    padding-top: 0.5rem;
}
.bhm-submenu__item:last-child {
    padding-bottom: 0;
}
.bhm-submenu__item + .bhm-submenu__item {
    margin-top: 0.625rem;
}

@media (min-width: 768px) {
    .bhm-submenu__item:first-child {
        padding-top: 0.75rem;
    }
    .bhm-submenu__item:last-child {
        padding-bottom: 0.5rem;
    }
    .bhm-submenu__item + .bhm-submenu__item {
        margin-top: 0.625rem;
    }
}

/* submenu links */
.bhm-submenu__link {
    display: block;
    padding: 0;
    font-family: var(--ff-teko);
    font-size: 2.25rem;
    font-weight: 400;
    line-height: 0.78;
    text-transform: uppercase;
    color: var(--txt-primary);
    opacity: var(--op-25);
    word-break: keep-all;
    overflow-wrap: break-word;
}

@media (min-width: 768px) {
    .bhm-submenu__link {
        font-size: 1.375rem;
        line-height: 0.75;
        width: fit-content;
        white-space: nowrap;
        transition: opacity var(--t-base);
    }

    .bhm-submenu__link:hover {
        opacity: 1;
    }
}

@media (min-width: 1024px) {
    .bhm-submenu__link {
        font-size: 2.125rem;
        line-height: 0.7778;
    }
}

/* current page link in submenu */
.bhm-submenu__item.is-current .bhm-submenu__link {
    opacity: 1 !important;
}

/* external link arrow */
.bhm-submenu__item.is-external .bhm-submenu__link {
    position: relative;
}

.bhm-submenu__item.is-external .bhm-submenu__link::after {
    content: "";
    display: inline-block;
    width: 1.4375rem;
    height: 1.4375rem;
    background: url(/images/icons/external-link.svg) center / contain no-repeat;
    vertical-align: middle;
    margin-left: 0.25rem;
}

@media (min-width: 768px) {
    .bhm-submenu__item.is-external .bhm-submenu__link {
        padding-right: 1.75rem;
    }

    .bhm-submenu__item.is-external .bhm-submenu__link::after {
        opacity: 0;
        position: absolute;
        right: 0;
        top: 0;
        margin-left: 0;
        transition: opacity var(--t-base);
    }

    .bhm-submenu__item.is-external .bhm-submenu__link:hover::after {
        opacity: 1;
    }
}

/* ── 6j. Dim overlay — extends below header to cover open submenu ── */
/*
  Header hover: .bhm-header:hover sets the header background.
  Nav item hover: JS sets height from header bottom → submenu bottom.
*/
.bhm-header__dim {
    display: none;
}

@media (min-width: 768px) {
    .bhm-header__dim {
        display: block;
        position: fixed;
        top: var(--hdr-h-lg); /* updated on load/resize by JS */
        left: 0;
        width: 100%;
        height: 0;
        background: rgba(var(--c-white-rgb), 0.95);
        transition: height 0.25s ease;
        z-index: 444;
        overflow: visible;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .bhm-header__dim.is-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/* ── 6k. Utility area (lang switcher — desktop only) ──────── */
.bhm-header__utility {
    display: none;
}

@media (min-width: 768px) {
    .bhm-header__utility {
        display: flex;
        justify-content: flex-end;
        align-items: flex-start;
        grid-column: 13 / 13;
        grid-row: 1;
        height: fit-content;
    }
}

/* ── 6l. Utilities bar (mobile — inside nav overlay) ─────── */
.bhm-header__utilities {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    position: relative; /* so lang dropdown positions relative to this */
}

@media (min-width: 768px) {
    .bhm-header__utilities {
        display: none;
    }
}

/* ── 6m. Mobile menu toggle button ───────────────────────── */
.bhm-header__btn-menu {
    padding: 0;
    margin: 0;
    height: fit-content;
    color: var(--txt-primary);
    font-family: var(--ff-teko);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 0.75;
    align-self: flex-start; /* pin to top in flex container */
}

@media (min-width: 768px) {
    .bhm-header__btn-menu {
        display: none;
    }
}

/* ── 6n. Mobile close button (inside nav overlay) ────────── */
.bhm-header__btn-close {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    padding: 0;
    font-family: var(--ff-teko);
    color: var(--txt-primary);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 0.75;
}

@media (min-width: 768px) {
    .bhm-header__btn-close {
        display: none;
    }
}

/* ── 7. Lang Switcher ─────────────────────────────────────── */
/*
  Button shows: ▼ ENG  (triangle flips to ▲ when open)
  Dropdown: KOR / JPN / CHN — faded, full on hover
  Positioned relative so dropdown anchors below the button
*/

.lang-switcher {
    position: relative;
}

/* the trigger button */
.lang-switcher__btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
    font-family: var(--ff-teko);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 0.75;
    text-transform: uppercase;
    color: var(--txt-primary);
    cursor: pointer;
    background: none;
    border: none;
}

@media (min-width: 768px) {
    .lang-switcher__btn {
        font-size: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .lang-switcher__btn {
        font-size: 2.25rem;
        line-height: 0.7778;
    }
}

/* triangle arrow — CSS only, no image needed */
.lang-switcher__arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 0.35rem solid transparent;
    border-right: 0.35rem solid transparent;
    border-top: 0.45rem solid var(--txt-primary);
    transition: transform var(--t-base);
    flex-shrink: 0;
    margin-top: 0.1em; /* optical alignment */
}

/* flip arrow when open */
.lang-switcher.is-open .lang-switcher__arrow {
    transform: rotate(180deg);
}

/* dropdown list */
.lang-switcher__list {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    top: auto;
    right: 0;
    min-width: 100%;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0 0.75rem;
    list-style: none;
    z-index: var(--z-dropdown);
    /* hidden state */
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(0.5rem);
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease;
}

.lang-switcher.is-open .lang-switcher__list {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

@media (min-width: 768px) {
    .lang-switcher__list {
        bottom: auto;
        top: calc(100% + 0.5rem);
        /* desktop opens downward — slide down from ENG */
        transform: translateY(-0.5rem);
    }
    .lang-switcher.is-open .lang-switcher__list {
        transform: translateY(0);
    }
}

/* each language option — staggered fade in */
.lang-switcher__option {
    padding: 0;
    font-family: var(--ff-teko);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 0.75;
    text-transform: uppercase;
    color: var(--txt-primary);
    opacity: 0;
    cursor: pointer;
    background: none;
    border: none;
    text-align: right;
    white-space: nowrap;
    transform: translateY(0.4rem);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        color 0.2s ease;
}

/* stagger each option */
.lang-switcher__list li:nth-child(1) .lang-switcher__option {
    transition-delay: 0.05s;
}
.lang-switcher__list li:nth-child(2) .lang-switcher__option {
    transition-delay: 0.1s;
}
.lang-switcher__list li:nth-child(3) .lang-switcher__option {
    transition-delay: 0.15s;
}

.lang-switcher.is-open .lang-switcher__option {
    opacity: var(--op-25);
    transform: translateY(0);
}

.lang-switcher.is-open .lang-switcher__option:hover {
    opacity: 1;
}

@media (min-width: 1024px) {
    .lang-switcher__option {
        font-size: 2.25rem;
        line-height: 0.7778;
    }
}

/* ============================================================
   Discography page
   ============================================================ */

/* ── Container ────────────────────────────────────────────── */
.bhm-discography-page {
    width: 100%;
    max-width: 100%;
    padding: 0 0.625rem;
    box-sizing: border-box;
    padding-bottom: 6.25rem;
}

@media (min-width: 769px) {
    .bhm-discography-page {
        padding: 0 1.25rem 6.25rem;
    }
}

@media (min-width: 1920px) {
    .bhm-discography-page {
        padding-bottom: 12.5rem;
    }
}

/* ── Sticky header ────────────────────────────────────────── */
.bhm-discography-header {
    --tab-opacity-inactive: 0.25;

    width: calc(100% + 1.25rem);
    margin-left: -0.625rem;
    margin-right: -0.625rem;
    padding: 0.9375rem 0 0.625rem;
    background-color: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
    font-family: var(--ff-teko);
}

@media (min-width: 769px) {
    .bhm-discography-header {
        width: calc(100% + 2.5rem);
        margin-left: -1.25rem;
        margin-right: -1.25rem;
    }
}

/* Dark background when stuck */
.bhm-discography-header.is-sticky {
    background-color: var(--gray-950);
}

.bhm-discography-header.is-sticky .bhm-discography-header__title {
    color: var(--c-white);
}

.bhm-discography-header.is-sticky .bhm-discography-header__tab {
    color: rgba(255, 255, 255, var(--tab-opacity-inactive));
}

.bhm-discography-header.is-sticky .bhm-discography-header__tab.is-selected {
    color: var(--c-white);
}

/* ── Header inner group ───────────────────────────────────── */
.bhm-discography-header__group {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    min-width: 0;
}

/* ── Title ────────────────────────────────────────────────── */
.bhm-discography-header__title {
    text-transform: uppercase;
    color: var(--txt-primary);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 0.75;
    padding-left: 0.625rem;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

/* ── Tabs scroll container ────────────────────────────────── */
.bhm-discography-header__tabs-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    padding-left: 0.625rem;
    padding-right: 0.625rem;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
    position: relative;
}

.bhm-discography-header__tabs-wrap::-webkit-scrollbar {
    display: none;
}

/* Fade-out gradient on right edge when tabs overflow */
.bhm-discography-header__tabs-wrap.show-gradient::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 9%;
    pointer-events: none;
    background: linear-gradient(to right, transparent, var(--bg-primary));
    transition: background 0.3s ease;
}

.bhm-discography-header.is-sticky
    .bhm-discography-header__tabs-wrap.show-gradient::after {
    background: linear-gradient(to right, transparent, var(--gray-950));
}

/* ── Tabs row ─────────────────────────────────────────────── */
.bhm-discography-header__tabs {
    display: flex;
    gap: 0.9375rem;
    white-space: nowrap;
    width: max-content;
    min-width: 100%;
}

/* ── Individual tab link ──────────────────────────────────── */
.bhm-discography-header__tab {
    color: rgba(var(--c-primary-rgb), var(--tab-opacity-inactive));
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 0.75;
    text-decoration: none;
    transition:
        color 0.3s ease,
        opacity 0.3s ease;
}

.bhm-discography-header__tab.is-selected {
    color: var(--txt-primary);
}

/* ── Album grid ───────────────────────────────────────────── */
.bhm-discography-list {
    padding-top: 0.625rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.875rem 0.625rem;
}

/* ── Album item ───────────────────────────────────────────── */
.bhm-discography-item {
    display: flex;
    flex-direction: column;
    gap: 0.3125rem;
    text-decoration: none;
}

.bhm-discography-item__image {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* square */
}

.bhm-discography-item__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bhm-discography-item__name {
    color: var(--txt-primary);
    font-family: var(--ff-acumin);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    text-transform: uppercase;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (min-width: 1024px) {
    .bhm-discography-header__group {
        flex-direction: row;
        align-items: center;
    }

    .bhm-discography-header__title {
        padding-left: 1.25rem;
        min-width: 14.875rem;
        font-size: 2.25rem;
    }

    .bhm-discography-header__tabs-wrap {
        padding-right: 0;
    }

    /* No gradient needed on desktop — tabs don't overflow */
    .bhm-discography-header__tabs-wrap::after {
        content: none !important;
    }

    .bhm-discography-header__tabs {
        gap: 1.25rem;
    }

    .bhm-discography-header__tab {
        font-size: 2.25rem;
        line-height: 0.7778;
    }

    .bhm-discography-list {
        padding-top: 1.25rem;
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem 0.625rem;
    }

    .bhm-discography-item {
        gap: 0.625rem;
    }

    .bhm-discography-item__name {
        font-size: 1.5625rem;
        line-height: 1.2;
    }
}

/* Dark mode token overrides */
[data-theme="dark"] .bhm-discography-header {
    --tab-opacity-inactive: 0.4;
}

/* ── Auth dashboard link (header) ── */
.bhm-header__auth {
    display: flex;
    align-items: flex-start;
}

.bhm-header__auth-link {
    font-family: var(--ff-teko);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 0.75;
    text-transform: uppercase;
    color: var(--txt-primary);
    text-decoration: none;
    opacity: var(--op-25);
    transition: opacity var(--t-base);
    white-space: nowrap;
}

.bhm-header__auth-link:hover {
    opacity: 1;
}

@media (min-width: 768px) {
    .bhm-header__auth-link {
        font-size: 2.25rem;
        line-height: 0.7778;
    }
}

@media (min-width: 768px) {
    .bhm-header__auth {
        grid-column: 12 / 13;
        grid-row: 1;
        justify-content: flex-end;
    }
}

body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden !important;
        position: relative;
        width: 100%;
    }

    .bhm-header.is-hidden {
        overflow-x: hidden;
    }
}
