/* ── 싼마이 Brand Central (16×9 목업 비율, --ui-scale) ── */
.brand-overlay {
  position: absolute;
  top: var(--top-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  display: none;
  flex-direction: column;
  background: #0a0c10;
  color: #fff;
  overflow: hidden;
}

.brand-overlay--open {
  display: flex;
}

.brand-central {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

/* 중앙 영역 5.5 / 9 — 히어로 전체 + 우측 글래스 패널 */
.brand-central__main {
  flex: 0 0 var(--brand-main-h);
  height: var(--brand-main-h);
  max-height: var(--brand-main-h);
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.brand-hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-color: #111;
}

.brand-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--brand-panel-w);
  max-width: var(--brand-panel-w);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(28 * var(--ui-scale) * 1px) calc(24 * var(--ui-scale) * 1px);
  background: rgba(12, 14, 20, 0.38);
  backdrop-filter: blur(calc(18 * var(--ui-scale) * 1px));
  -webkit-backdrop-filter: blur(calc(18 * var(--ui-scale) * 1px));
  border-left: calc(1 * var(--ui-scale) * 1px) solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.brand-panel__name {
  width: 100%;
  margin: calc(40 * var(--ui-scale) * 1px) 0 0;
  font-size: calc(40 * var(--ui-scale) * 1px);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 calc(2 * var(--ui-scale) * 1px) calc(12 * var(--ui-scale) * 1px) rgba(0, 0, 0, 0.55);
}

.brand-panel__meta {
  position: absolute;
  left: 50%;
  top: 62%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-size: calc(17.6 * var(--ui-scale) * 1px);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 calc(2 * var(--ui-scale) * 1px) calc(10 * var(--ui-scale) * 1px) rgba(0, 0, 0, 0.5);
}

.brand-central__main--hidden {
  display: none;
}

.brand-subview {
  flex: 0 0 var(--brand-main-h);
  height: var(--brand-main-h);
  max-height: var(--brand-main-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(36 * var(--ui-scale) * 1px) calc(48 * var(--ui-scale) * 1px);
  background: #0a0c10;
  overflow-y: auto;
}

.brand-subview--hidden {
  display: none;
}

.brand-subview__back {
  align-self: flex-start;
  margin-bottom: calc(24 * var(--ui-scale) * 1px);
  padding: calc(8 * var(--ui-scale) * 1px) calc(14 * var(--ui-scale) * 1px);
  background: rgba(255, 255, 255, 0.08);
  border: calc(1 * var(--ui-scale) * 1px) solid rgba(255, 255, 255, 0.2);
  border-radius: calc(4 * var(--ui-scale) * 1px);
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: calc(13.6 * var(--ui-scale) * 1px);
  cursor: pointer;
  transition: background 0.2s;
}

.brand-subview__back:hover {
  background: rgba(255, 255, 255, 0.14);
}

.brand-subview__title {
  margin: 0 0 calc(20 * var(--ui-scale) * 1px);
  font-size: calc(28 * var(--ui-scale) * 1px);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
}

.brand-subview__body {
  max-width: calc(640 * var(--ui-scale) * 1px);
  margin: 0;
  font-size: calc(15.2 * var(--ui-scale) * 1px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.brand-subview__body--story {
  max-width: min(920px, 100%);
  width: 100%;
  text-align: left;
  color: rgba(255, 255, 255, 0.88);
}

.brand-story {
  display: flex;
  flex-direction: column;
  gap: calc(18 * var(--ui-scale) * 1px);
  animation: brand-story-in 0.55s ease both;
}

@keyframes brand-story-in {
  from {
    opacity: 0;
    transform: translateY(calc(12 * var(--ui-scale) * 1px));
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.brand-story__kicker {
  margin: 0;
  font-size: calc(12 * var(--ui-scale) * 1px);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(200, 220, 255, 0.72);
}

.brand-story__headline {
  margin: 0;
  font-size: calc(34 * var(--ui-scale) * 1px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.22;
  color: #fff;
}

.brand-story__lead {
  margin: 0;
  max-width: 42em;
  font-size: calc(15.5 * var(--ui-scale) * 1px);
  line-height: 1.75;
  color: rgba(240, 244, 255, 0.78);
}

.brand-story__mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(12 * var(--ui-scale) * 1px);
  margin-top: calc(8 * var(--ui-scale) * 1px);
}

.brand-story__card {
  position: relative;
  min-height: calc(148 * var(--ui-scale) * 1px);
  padding: calc(18 * var(--ui-scale) * 1px) calc(16 * var(--ui-scale) * 1px)
    calc(16 * var(--ui-scale) * 1px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: calc(12 * var(--ui-scale) * 1px);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 55%, transparent 100%),
    rgba(10, 14, 24, 0.55);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.brand-story__card::before {
  content: '';
  position: absolute;
  inset: auto -20% -40% auto;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(120, 170, 255, 0.18), transparent 68%);
  pointer-events: none;
}

.brand-story__card:hover {
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(calc(-2 * var(--ui-scale) * 1px));
}

.brand-story__card-label {
  display: block;
  margin-bottom: calc(14 * var(--ui-scale) * 1px);
  font-size: calc(12 * var(--ui-scale) * 1px);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(180, 205, 255, 0.7);
}

.brand-story__card-title {
  position: relative;
  margin: 0 0 calc(8 * var(--ui-scale) * 1px);
  font-size: calc(18 * var(--ui-scale) * 1px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand-story__card-text {
  position: relative;
  margin: 0;
  font-size: calc(13.5 * var(--ui-scale) * 1px);
  line-height: 1.55;
  color: rgba(230, 236, 255, 0.72);
}

.brand-story__footnote {
  margin: calc(4 * var(--ui-scale) * 1px) 0 0;
  font-size: calc(12.5 * var(--ui-scale) * 1px);
  letter-spacing: 0.02em;
  color: rgba(200, 210, 230, 0.55);
}

@media (max-aspect-ratio: 3 / 4), (max-width: 720px) {
  .brand-story__headline {
    font-size: max(22px, calc(26 * var(--ui-scale) * 1px));
  }

  .brand-story__mosaic {
    grid-template-columns: 1fr;
  }

  .brand-story__card {
    min-height: 0;
  }
}

.brand-subview__action {
  margin-top: calc(28 * var(--ui-scale) * 1px);
  padding: calc(10 * var(--ui-scale) * 1px) calc(28 * var(--ui-scale) * 1px);
  background: rgba(255, 255, 255, 0.12);
  border: calc(1 * var(--ui-scale) * 1px) solid rgba(255, 255, 255, 0.45);
  border-radius: calc(4 * var(--ui-scale) * 1px);
  color: #fff;
  font-family: inherit;
  font-size: calc(14.4 * var(--ui-scale) * 1px);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.brand-subview__action:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
}

/* 하단 네비 2.85 / 9 */
.brand-sections {
  position: relative;
  z-index: 5;
  flex: 0 0 var(--brand-nav-h);
  height: var(--brand-nav-h);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: calc(48 * var(--ui-scale) * 1px);
  padding: calc(14 * var(--ui-scale) * 1px) calc(24 * var(--ui-scale) * 1px) 0;
  background: rgba(0, 0, 0, 0.85);
  border-top: calc(1 * var(--ui-scale) * 1px) solid rgba(255, 255, 255, 0.1);
  pointer-events: auto;
}

/* 하단 버튼 고정 2.6×1.6 (1920×1080 기준) */
.brand-section {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: calc(12 * var(--ui-scale) * 1px);
  width: var(--brand-section-btn-w);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  pointer-events: auto;
  transition: color 0.2s;
}

.brand-section:hover {
  color: rgba(255, 255, 255, 0.85);
}

.brand-section--active {
  color: #fff;
}

.brand-section--active .brand-section__thumb {
  border-color: rgba(255, 255, 255, 0.95);
}

.brand-section__label {
  flex: 0 0 auto;
  font-size: calc(18.4 * var(--ui-scale) * 1px);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-section__thumb {
  flex: 0 0 auto;
  display: block;
  width: var(--brand-section-btn-w);
  height: var(--brand-section-btn-h);
  background-size: cover;
  background-position: center;
  border: calc(2 * var(--ui-scale) * 1px) solid rgba(255, 255, 255, 0.25);
  transition: border-color 0.2s;
}

/* ── narrow: Brand Central ── */
html[data-mode='narrow'] {
  --brand-main-h: auto;
  --brand-nav-h: auto;
  --brand-panel-w: 100%;
  /* 일반 모드와 동일 비율: 312 × 192 */
  --brand-section-btn-w: min(42vw, calc(312 * var(--ui-scale) * 1px));
  --brand-section-btn-h: calc(var(--brand-section-btn-w) * 192 / 312);
}

html[data-mode='narrow'] .brand-overlay {
  top: var(--top-height);
}

html[data-mode='narrow'] .brand-central {
  overflow: hidden;
}

html[data-mode='narrow'] .brand-central__main {
  flex: 1 1 auto;
  height: auto;
  max-height: none;
  min-height: 0;
}

html[data-mode='narrow'] .brand-panel {
  top: auto;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: 42%;
  align-items: flex-start;
  padding: max(16px, calc(18 * var(--ui-scale) * 1px))
    max(16px, calc(18 * var(--ui-scale) * 1px))
    max(14px, calc(16 * var(--ui-scale) * 1px));
  border-left: none;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 14, 20, 0.62);
}

html[data-mode='narrow'] .brand-panel__name {
  margin: 0;
  font-size: max(22px, calc(28 * var(--ui-scale) * 1px));
  text-align: left;
}

html[data-mode='narrow'] .brand-panel__meta {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  margin-top: max(8px, calc(10 * var(--ui-scale) * 1px));
  font-size: max(13px, calc(14 * var(--ui-scale) * 1px));
  text-align: left;
  white-space: normal;
}

html[data-mode='narrow'] .brand-subview {
  flex: 1 1 auto;
  height: auto;
  max-height: none;
  padding: max(20px, calc(24 * var(--ui-scale) * 1px))
    max(16px, calc(20 * var(--ui-scale) * 1px));
}

html[data-mode='narrow'] .brand-sections {
  flex: 0 0 auto;
  height: auto;
  justify-content: flex-start;
  align-items: stretch;
  gap: max(14px, calc(16 * var(--ui-scale) * 1px));
  padding: max(10px, calc(12 * var(--ui-scale) * 1px))
    max(12px, calc(14 * var(--ui-scale) * 1px))
    max(10px, calc(env(safe-area-inset-bottom, 0px) + 8px));
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

html[data-mode='narrow'] .brand-sections::-webkit-scrollbar {
  display: none;
}

html[data-mode='narrow'] .brand-section {
  gap: max(8px, calc(8 * var(--ui-scale) * 1px));
}

.brand-overlay--scroll {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.brand-central--scroll {
  flex: none;
  min-height: 100%;
  height: auto;
}

.brand-central--scroll[hidden],
.brand-central--legacy[hidden] {
  display: none !important;
}

.brand-scroll {
  display: flex;
  flex-direction: column;
}

/* ── Scroll header ── */
.brand-scroll__header {
  position: relative;
  min-height: var(--brand-main-h);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
}

.brand-scroll__hero {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #111;
}

.brand-scroll__hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(10, 12, 16, 0.55) 0%,
    rgba(10, 12, 16, 0.2) 45%,
    rgba(10, 12, 16, 0.65) 100%
  );
}

.brand-scroll__brand {
  position: relative;
  z-index: 2;
  width: var(--brand-panel-w);
  max-width: var(--brand-panel-w);
  padding: calc(28 * var(--ui-scale) * 1px) calc(24 * var(--ui-scale) * 1px);
  background: rgba(12, 14, 20, 0.38);
  backdrop-filter: blur(calc(18 * var(--ui-scale) * 1px));
  -webkit-backdrop-filter: blur(calc(18 * var(--ui-scale) * 1px));
  border-left: calc(1 * var(--ui-scale) * 1px) solid rgba(255, 255, 255, 0.14);
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.brand-scroll__brand-name {
  margin: 0;
  font-size: calc(40 * var(--ui-scale) * 1px);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 calc(2 * var(--ui-scale) * 1px) calc(12 * var(--ui-scale) * 1px) rgba(0, 0, 0, 0.55);
}

.brand-scroll__brand-meta {
  margin: calc(16 * var(--ui-scale) * 1px) 0 0;
  font-size: calc(17.6 * var(--ui-scale) * 1px);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
}

/* ── Scroll sections ── */
.brand-scroll__section {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: min(var(--brand-main-h), 72vh);
  padding: calc(40 * var(--ui-scale) * 1px) calc(32 * var(--ui-scale) * 1px);
  border-top: calc(1 * var(--ui-scale) * 1px) solid rgba(255, 255, 255, 0.08);
  background: #0a0c10;
}

.brand-scroll__section--members {
  min-height: auto;
  padding-bottom: calc(56 * var(--ui-scale) * 1px);
}

.brand-scroll__heading {
  margin: 0 0 calc(24 * var(--ui-scale) * 1px);
  font-size: calc(14 * var(--ui-scale) * 1px);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(200, 220, 255, 0.65);
}

.brand-scroll__title {
  margin: 0 0 calc(16 * var(--ui-scale) * 1px);
  max-width: calc(720 * var(--ui-scale) * 1px);
  font-size: calc(28 * var(--ui-scale) * 1px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  text-align: center;
  color: #fff;
}

.brand-scroll__body {
  margin: 0;
  max-width: calc(640 * var(--ui-scale) * 1px);
  font-size: calc(15.2 * var(--ui-scale) * 1px);
  line-height: 1.75;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
}

.brand-scroll__cta {
  margin-top: calc(28 * var(--ui-scale) * 1px);
  padding: calc(10 * var(--ui-scale) * 1px) calc(28 * var(--ui-scale) * 1px);
  background: rgba(255, 255, 255, 0.1);
  border: calc(1 * var(--ui-scale) * 1px) solid rgba(255, 255, 255, 0.45);
  border-radius: calc(4 * var(--ui-scale) * 1px);
  color: #fff;
  font-family: inherit;
  font-size: calc(14.4 * var(--ui-scale) * 1px);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.brand-scroll__cta:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #fff;
}

/* ── Rotator ── */
.brand-rotator {
  position: relative;
  width: min(100%, calc(520 * var(--ui-scale) * 1px));
  height: calc(320 * var(--ui-scale) * 1px);
}

.brand-rotator__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.85s ease;
  pointer-events: none;
}

.brand-rotator__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.brand-rotator__empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  font-size: calc(14 * var(--ui-scale) * 1px);
}

.brand-history-tile,
.brand-product-tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: calc(1 * var(--ui-scale) * 1px) solid rgba(255, 255, 255, 0.14);
  border-radius: calc(10 * var(--ui-scale) * 1px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.brand-history-tile__image,
.brand-product-tile__image {
  flex: 1 1 auto;
  min-height: calc(180 * var(--ui-scale) * 1px);
  background-size: cover;
  background-position: center;
}

.brand-history-tile__body,
.brand-product-tile__body {
  flex: 0 0 auto;
  padding: calc(16 * var(--ui-scale) * 1px) calc(18 * var(--ui-scale) * 1px);
}

.brand-history-tile__year {
  display: block;
  margin-bottom: calc(6 * var(--ui-scale) * 1px);
  font-size: calc(12 * var(--ui-scale) * 1px);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(180, 205, 255, 0.75);
}

.brand-history-tile__title,
.brand-product-tile__name {
  margin: 0 0 calc(6 * var(--ui-scale) * 1px);
  font-size: calc(18 * var(--ui-scale) * 1px);
  font-weight: 700;
  color: #fff;
}

.brand-history-tile__desc,
.brand-product-tile__blurb {
  margin: 0;
  font-size: calc(13.5 * var(--ui-scale) * 1px);
  line-height: 1.55;
  color: rgba(230, 236, 255, 0.72);
}

/* ── Members ── */
.brand-members {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(calc(220 * var(--ui-scale) * 1px), 1fr));
  gap: calc(16 * var(--ui-scale) * 1px);
  width: min(100%, calc(920 * var(--ui-scale) * 1px));
}

.brand-member {
  display: flex;
  gap: calc(14 * var(--ui-scale) * 1px);
  padding: calc(14 * var(--ui-scale) * 1px);
  border: calc(1 * var(--ui-scale) * 1px) solid rgba(255, 255, 255, 0.12);
  border-radius: calc(10 * var(--ui-scale) * 1px);
  background: rgba(255, 255, 255, 0.04);
}

.brand-member__photo {
  flex: 0 0 calc(56 * var(--ui-scale) * 1px);
  width: calc(56 * var(--ui-scale) * 1px);
  height: calc(56 * var(--ui-scale) * 1px);
  border-radius: 50%;
  object-fit: cover;
  border: calc(2 * var(--ui-scale) * 1px) solid rgba(255, 255, 255, 0.2);
}

.brand-member__info {
  min-width: 0;
  flex: 1;
}

.brand-member__name {
  margin: 0 0 calc(4 * var(--ui-scale) * 1px);
  font-size: calc(15 * var(--ui-scale) * 1px);
  font-weight: 700;
  color: #fff;
}

.brand-member__role {
  margin: 0 0 calc(6 * var(--ui-scale) * 1px);
  font-size: calc(12.5 * var(--ui-scale) * 1px);
  color: rgba(180, 205, 255, 0.8);
}

.brand-member__status {
  margin: 0;
  font-size: calc(12 * var(--ui-scale) * 1px);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

html[data-mode='narrow'] .brand-scroll__header {
  min-height: 42vh;
  align-items: flex-end;
}

html[data-mode='narrow'] .brand-scroll__brand {
  width: 100%;
  max-width: none;
  border-left: none;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: max(16px, calc(18 * var(--ui-scale) * 1px));
}

html[data-mode='narrow'] .brand-scroll__brand-name {
  font-size: max(22px, calc(28 * var(--ui-scale) * 1px));
}

html[data-mode='narrow'] .brand-scroll__section {
  padding: max(24px, calc(28 * var(--ui-scale) * 1px)) max(16px, calc(20 * var(--ui-scale) * 1px));
  min-height: auto;
}

html[data-mode='narrow'] .brand-rotator {
  height: max(260px, calc(280 * var(--ui-scale) * 1px));
}

html[data-mode='narrow'] .brand-members {
  grid-template-columns: 1fr;
}

