:root {
  --page-bg: #f4f4f2;
  --section-bg: #10161a;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.52);
  --line: rgba(255, 255, 255, 0.32);
  --side-padding: clamp(76px, 7.3vw, 140px);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
}

img {
  display: block;
  max-width: 100%;
}

body.gallery-lock {
  overflow: hidden;
}

.showcase {
  position: relative;
  width: calc(100% - 80px);
  max-width: 1920px;
  min-height: 760px;
  margin: 28px auto;
  overflow: hidden;
  background: var(--section-bg);
  border-radius: 6px;
}

.showcase-bg {
  position: absolute;
  inset: 0;
  background:url(../images/background.avif) center / cover no-repeat;
}

.showcase-inner {
  position: relative;
  z-index: 1;
  min-height: 760px;
  padding: 42px var(--side-padding);
}

.showcase-layout {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 676px;
  padding: 62px 0 82px;
}

.showcase-head {
  position: relative;
  z-index: 3;
  flex: 0 0 32.5%;
  margin: 0 2.86% 0 4.87%;
  padding-top: 0;
}

.eyebrow {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 18px;
  line-height: 1.2;
}

.showcase-head h1 {
  max-width: 430px;
  margin: 0 0 42px;
  font-size: clamp(40px, 3vw, 52px);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.showcase-desc {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 18px;
  line-height: 1.45;
}

.desktop-hint {
  position: absolute;
  left: 0;
  bottom: 8px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.desktop-hint span {
  display: inline-block;
  margin-left: 18px;
  font-size: 22px;
  line-height: 1;
  vertical-align: -2px;
}

.feature-area {
  width: calc(100% - 38.17%);
  min-width: 0;
  overflow: hidden;
}

.feature-swiper {
  overflow: visible;
  padding-right: 40px;
  padding-bottom: 10px;
}

.feature-slide {
  width: calc((100% - 20px) / 2);
}

.feature-card {
  position: relative;
  width: 100%;
  aspect-ratio: 0.914 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: #222;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.36) 0%, transparent 24%, transparent 66%, rgba(0, 0, 0, 0.16) 100%);
}

.feature-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.feature-card:hover img {
  transform: scale(1.018);
}

.feature-card h2 {
  position: absolute;
  z-index: 2;
  top: 28px;
  left: 30px;
  right: 30px;
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.gallery-open {
  position: absolute;
  z-index: 3;
  right: 30px;
  bottom: 30px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(5px);
  transition: background 0.25s ease, transform 0.25s ease;
}

.gallery-open:hover,
.gallery-open:focus-visible {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
  outline: none;
}

.gallery-open span,
.gallery-open span::after {
  display: block;
  width: 17px;
  height: 1px;
  background: #fff;
}

.gallery-open span::after {
  content: "";
  transform: rotate(90deg);
}

.feature-pagination {
  position: absolute;
  z-index: 5;
  left: 4.87%;
  bottom: 70px;
  display: flex;
  gap: 22px;
  width: 32.5%;
  pointer-events: auto;
}

.feature-pagination .swiper-pagination-bullet {
  width: auto;
  height: auto;
  margin: 0 !important;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 14px;
  opacity: 0.48;
}

.feature-pagination .swiper-pagination-bullet-active {
  opacity: 1;
}

/* Gallery modal */
.gallery-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: none;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.gallery-modal.is-open {
  display: block;
}

.gallery-modal.is-visible {
  opacity: 1;
}

.gallery-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  cursor: default;
}

.gallery-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gallery-swiper {
  width: 100%;
  overflow: visible;
}

.gallery-slide {
  width: min(740px, 43vw);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.gallery-slide-inner {
  width: 100%;
}

.gallery-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #111;
}

.gallery-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  opacity: 1;
  transition: opacity 0.35s ease;
}

.gallery-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-copy {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding-top: 22px;
  color: #fff;
  opacity: 0.2;
  transition: opacity 0.35s ease;
}

.gallery-copy h3 {
  flex: 0 0 auto;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.gallery-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.55;
}

.gallery-slide.swiper-slide-active .gallery-media::after {
  opacity: 0;
}

.gallery-slide.swiper-slide-active .gallery-copy {
  opacity: 1;
}

.gallery-slide.swiper-slide-prev {
  translate: -20px 0;
}

.gallery-slide.swiper-slide-next {
  translate: 20px 0;
}

.gallery-close {
  position: fixed;
  z-index: 10;
  top: 44px;
  right: 48px;
  width: 52px;
  height: 52px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.gallery-close span {
  position: absolute;
  top: 25px;
  left: 4px;
  width: 44px;
  height: 1px;
  background: #fff;
}

.gallery-close span:first-child {
  transform: rotate(45deg);
}

.gallery-close span:last-child {
  transform: rotate(-45deg);
}

.gallery-nav {
  position: fixed;
  z-index: 10;
  top: 50%;
  width: 68px;
  height: 68px;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.gallery-prev {
  left: clamp(32px, 6vw, 120px);
}

.gallery-next {
  right: clamp(32px, 6vw, 120px);
}

.gallery-nav span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border-top: 1px solid #fff;
  border-right: 1px solid #fff;
}

.gallery-prev span {
  transform: translate(-32%, -50%) rotate(-135deg);
}

.gallery-next span {
  transform: translate(-68%, -50%) rotate(45deg);
}

.gallery-nav.swiper-button-disabled {
  opacity: 0;
  pointer-events: none;
}

.gallery-counter {
  position: fixed;
  z-index: 10;
  right: 48px;
  bottom: 32px;
  display: none;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 13px;
}

.counter-line {
  width: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
}

@media (max-width: 1359px) {
  :root {
    --side-padding: 76px;
  }

  .showcase-head h1 {
    font-size: 42px;
  }

  .showcase-desc {
    font-size: 16px;
  }
}

@media (max-width: 1023px) {
  body {
    background: #fff;
  }

  .showcase {
    width: 100%;
    min-height: auto;
    margin: 0;
    border-radius: 0;
  }

  .showcase-bg {
    background: url(../images/background.avif) center / cover no-repeat;
  }

  .showcase-inner {
    min-height: auto;
    padding: 20px;
  }

  .showcase-layout {
    display: flex;
    flex-direction: column;
    min-height: auto;
    padding: 0 0 40px;
  }

  .showcase-head {
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
    padding: 40px 0 0;
  }

  .eyebrow {
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 20px;
  }

  .showcase-head h1 {
    max-width: none;
    margin-bottom: 30px;
    font-size: 32px;
    line-height: 35.2px;
    letter-spacing: -0.02em;
  }

  .showcase-desc {
    max-width: none;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    line-height: 20.8px;
  }

  .desktop-hint {
    display: none;
  }

  .feature-area {
    width: 100%;
    margin: 0;
    padding-top: 40px;
    overflow: visible;
  }

  .feature-swiper {
    margin: 0 -20px;
    padding: 0 11px 36px;
    overflow: hidden;
  }

  .feature-slide {
    width: 259px;
    height: 380px;
  }

  .feature-card {
    height: 380px;
    aspect-ratio: auto;
    border-radius: 8px;
  }

  .feature-card h2 {
    top: 20px;
    left: 20px;
    right: 20px;
    font-size: 16px;
    line-height: 19.2px;
  }

  .gallery-open {
    right: 20px;
    bottom: 20px;
    width: 32px;
    height: 32px;
  }

  .gallery-open span,
  .gallery-open span::after {
    width: 14px;
  }

  .feature-pagination {
    position: static;
    order: 4;
    display: flex;
    gap: 20px;
    width: 259px;
    margin-top: -22px;
    margin-left: 11px;
    padding: 0;
  }

  .feature-pagination .swiper-pagination-bullet {
    font-size: 16px;
  }

  /* Mobile gallery: compact card-like centered carousel */
  .gallery-backdrop {
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
  }

  .gallery-backdrop::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 400px;
    background: linear-gradient(180deg, #111 25%, rgba(17, 17, 17, 0.62) 60%, transparent 100%);
    opacity: 0.7;
  }

  .gallery-dialog {
    align-items: center;
  }

  .gallery-slide {
    width: min(335px, calc(100vw - 40px));
    transform: scale(0.89552);
    transition: transform 0.3s ease;
  }

  .gallery-slide.swiper-slide-active {
    transform: scale(1);
  }

  .gallery-slide.swiper-slide-prev {
    translate: 7px 0;
  }

  .gallery-slide.swiper-slide-next {
    translate: -7px 0;
  }

  .gallery-slide-inner {
    overflow: hidden;
    border-radius: 8px;
  }

  .gallery-media {
    aspect-ratio: 335 / 230;
  }

  .gallery-media::after {
    display: none;
  }

  .gallery-copy {
    display: block;
    min-height: 215px;
    padding: 28px 20px 31px;
    background: #fff;
    color: #111;
    opacity: 1;
  }

  .gallery-copy h3 {
    font-size: 20px;
    line-height: 1.2;
  }

  .gallery-copy p {
    margin-top: 12px;
    color: #555;
    font-size: 14px;
    line-height: 1.45;
  }

  .gallery-nav {
    display: none;
  }

  .gallery-close {
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
  }

  .gallery-close span {
    top: 20px;
    left: 5px;
    width: 32px;
  }

  .gallery-counter {
    display: flex;
    right: 20px;
    bottom: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
