@font-face {
  font-family: "Barlow Condensed";
  src: url("./assets/fonts/barlow-condensed-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0030-0039, U+00A5, U+0041-005A, U+0061-007A;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("./assets/fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0030-0039, U+00A5, U+0041-005A, U+0061-007A;
}

:root {
  --ground: #12110f;
  --ink: #f6f1e7;
  --muted: #cfc3b2;
  --line: rgba(246, 241, 231, 0.16);
  --paper: #f4efe4;
  --paper-ink: #1b1714;
  --paper-muted: #5e564c;
  --paper-line: rgba(27, 23, 20, 0.14);
  --oxide: #c2410c;
  --oxide-deep: #8a2e0f;
  --frame: #090807;
  --font-text: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-num: "Barlow Condensed", Bahnschrift, "Arial Narrow", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

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

html {
  background: #0c0b0a;
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background-color: #07090d;
  background-image:
    linear-gradient(180deg, rgba(8, 10, 14, 0.28) 0%, rgba(8, 10, 14, 0.22) 360px, rgba(8, 10, 14, 0.62) 640px, #07090d 980px),
    url("./assets/hero-map.jpg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid #e07a45;
  outline-offset: 3px;
}

::selection {
  background: #e7c4b0;
  color: var(--paper-ink);
}

.banner {
  height: auto;
}

.banner-inner {
  position: relative;
  width: min(1360px, calc(100% - 64px));
  margin: 0 auto;
  min-height: 52px;
}

.brand-plate {
  display: block;
  width: fit-content;
  margin: 0 0 12px;
  padding: 0;
  background: transparent;
}

.brand-plate img {
  display: block;
  height: 72px;
  width: auto;
  margin: 0;
}

.home-link {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  min-height: 44px;
  padding: 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
}

.page {
  width: min(1360px, calc(100% - 64px));
  margin: 0 auto;
  padding: 8px 0 72px;
}

.hero {
  padding-top: 48px;
  text-align: center;
}

.tagline {
  margin-top: 36px;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: clamp(3.4rem, 7vw, 5.4rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 22px;
  width: 100%;
  margin: 72px auto 0;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  height: 100%;
  text-align: center;
  width: 100%;
  min-width: 0;
  padding: 12px 12px 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 244, 230, 0.06), transparent 36%),
    #241f1c;
  box-shadow:
    0 22px 36px -26px rgba(0, 0, 0, 0.9),
    inset 0 0 0 1px rgba(246, 241, 231, 0.08);
}

.tile:nth-child(1) { box-shadow: inset 0 2px 0 #ff5a32, 0 22px 36px -26px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(246, 241, 231, 0.08); }
.tile:nth-child(2) { box-shadow: inset 0 2px 0 #9b5cff, 0 22px 36px -26px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(246, 241, 231, 0.08); }
.tile:nth-child(3) { box-shadow: inset 0 2px 0 #3dcb8a, 0 22px 36px -26px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(246, 241, 231, 0.08); }
.tile:nth-child(4) { box-shadow: inset 0 2px 0 rgba(246, 241, 231, 0.7), 0 22px 36px -26px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(246, 241, 231, 0.08); }

.cover {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 16px;
  overflow: hidden;
  border-radius: 12px;
  background: #14110f;
  box-shadow: inset 0 0 0 1px rgba(246, 241, 231, 0.06);
}

.cover.cover-logo {
  display: grid;
  place-items: center;
  justify-content: center;
  align-content: center;
  background: #0c0b0a;
}

.mark {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mark img {
  display: block;
  height: 86px;
  width: auto;
}

.mark b {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: clamp(1.85rem, 2.3vw, 2.35rem);
  line-height: 0.85;
  letter-spacing: 0.01em;
  color: #fff;
}

.cover-map img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.price-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cover-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  line-height: 0.85;
}

.cover-price b,
.cover-price .yuan {
  font-family: var(--font-num);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.cover-price b {
  font-size: clamp(1.45rem, 1.7vw, 1.85rem);
}

.cover-price .yuan {
  font-size: 1.15rem;
}

.cover-price .unit {
  margin-left: 4px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

.tile-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-top: auto;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--paper-ink);
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.tile:hover .cover,
.tile:focus-visible .cover {
  box-shadow: inset 0 0 0 1px rgba(246, 241, 231, 0.28);
}

.tile:hover .tile-go,
.tile:focus-visible .tile-go {
  background: var(--oxide);
  color: #fffaf6;
}

.tile-name {
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.35;
}

.tile-meta {
  margin-top: -2px;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--muted);
}

#view-detail {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 48px 0 64px;
}

#view-detail[hidden] {
  display: none;
}

.detail {
  width: min(44rem, 100%);
  margin: 0 auto;
  padding: 36px 36px 32px;
  text-align: center;
  border-radius: 16px;
  background: var(--paper);
  color: var(--paper-ink);
  color-scheme: light;
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.72);
}

.detail h2 {
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.detail-copy {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--paper-line);
  text-align: center;
}

.detail-copy p {
  margin-top: 1.05em;
  font-size: 1.02rem;
  line-height: 1.75;
  text-wrap: pretty;
}

.detail-copy p:first-child {
  margin-top: 0;
}

.detail ::selection {
  background: var(--paper-ink);
  color: var(--paper);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  background: rgba(8, 7, 6, 0.88);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s var(--ease), visibility 0.28s var(--ease);
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  width: min(1040px, 100%);
  overflow: hidden;
  border-radius: 16px;
  background: #1a1816;
  color: var(--ink);
  box-shadow: 0 28px 70px -24px rgba(0, 0, 0, 0.8);
  transform: translateY(12px);
  transition: transform 0.35s var(--ease);
}

.modal-backdrop.is-open .modal-box {
  transform: none;
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  flex-wrap: wrap;
}

.modal-header {
  padding: 14px 16px;
  align-items: flex-start;
}

.modal-title-side {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1 1 16rem;
}

.modal-badge {
  flex: none;
  margin-top: 2px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--paper-ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.modal-title-side h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
}

.modal-control-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-switch-group {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--ground);
}

.switch-tab,
.close-btn {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.switch-tab {
  color: var(--muted);
}

.switch-tab.active {
  background: var(--paper);
  color: var(--paper-ink);
}

.close-btn {
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.close-btn:hover {
  background: var(--oxide);
  color: #fffaf6;
  box-shadow: none;
}

.modal-content-area {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 70dvh;
  background: var(--frame);
}

.modal-content-area:has(.modal-image-viewer.is-visible) {
  aspect-ratio: auto;
  height: min(78dvh, 820px);
}

#modal-video-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: var(--frame);
}

.modal-image-viewer {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--frame);
}

.modal-image-viewer.is-visible {
  display: flex;
}

.modal-image-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.modal-footer {
  padding: 12px 16px 14px;
  font-size: 0.86rem;
  color: var(--muted);
}

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

@media (max-width: 640px) {
  .banner-inner,
  .page {
    width: min(1360px, calc(100% - 32px));
  }

  .page {
    padding-bottom: max(48px, env(safe-area-inset-bottom));
  }

  .brand-plate img {
    height: 72px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .cover {
    aspect-ratio: 16 / 10;
  }

  body {
    background-attachment: scroll;
  }

  .detail {
    padding: 24px 18px 20px;
  }

  .modal-footer span:last-child {
    display: none;
  }
}

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