/* ============================================
   锦衣若梦 — 国风高定企业门户
   assets/style.css
   ============================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --crimson: #E8344D;
  --crimson-dark: #C41E3A;
  --crimson-light: #FF5A6E;
  --gold: #D4A843;
  --gold-light: #E8C26A;
  --gold-dark: #B08828;
  --coral: #FF6B6B;
  --mint: #4ECDC4;
  --lavender: #A78BFA;
  --ink: #2D2D2D;
  --ink-light: #555555;
  --paper: #FAF7F2;
  --paper-dark: #F0EBE3;
  --dai: #2C3E50;
  --white: #FFFFFF;
  --overlay: rgba(26, 26, 26, 0.85);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.10);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
  --radius: 4px;
  --radius-lg: 12px;
  --serif: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --max-w: 1200px;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --gradient-hero: linear-gradient(135deg, #1a0a0e 0%, #2d1118 30%, #1a0a0e 100%);
  --gradient-section: linear-gradient(180deg, #FAF7F2 0%, #F5EFE6 100%);
  --gradient-card: linear-gradient(135deg, #fff 0%, #FAF7F2 100%);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }

::selection { background: var(--crimson); color: #fff; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--paper-dark); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--crimson), var(--coral)); border-radius: 3px; }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition);
}
.nav.scrolled {
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 1px 20px rgba(0,0,0,0.06);
  padding: 0.7rem 2rem;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--crimson), var(--coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.15em;
  opacity: 0;
  transform: translateY(-10px);
  transition: all var(--transition);
}
.nav.scrolled .nav__brand { opacity: 1; transform: translateY(0); }

.nav__logo-img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.nav__links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav__links a {
  font-size: 0.9rem;
  color: var(--ink-light);
  letter-spacing: 0.08em;
  position: relative;
  padding-bottom: 4px;
  font-weight: 500;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--crimson), var(--coral));
  border-radius: 1px;
  transition: all var(--transition);
  transform: translateX(-50%);
}
.nav__links a:hover { color: var(--crimson); }
.nav__links a:hover::after { width: 100%; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.nav__burger span {
  width: 24px; height: 2px;
  background: var(--ink);
  transition: all var(--transition);
}
.nav__burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav__burger.active span:nth-child(2) { opacity: 0; }
.nav__burger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1a0a0e 0%, #2d1118 30%, #1a0a0e 100%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('./images/hero-bg.jpg') center/cover no-repeat;
  opacity: 0.55;
  animation: heroZoom 20s ease-in-out infinite alternate;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(26,10,14,0.3) 0%,
    rgba(26,10,14,0.5) 50%,
    rgba(26,10,14,0.85) 100%);
}

@keyframes heroZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.hero__inner {
  position: relative;
  z-index: 2;
  color: var(--paper);
  padding: 2rem;
  max-width: 800px;
}

.hero__seal {
  width: 80px; height: 80px;
  margin: 0 auto 1.5rem;
  opacity: 0;
  animation: fadeInScale 1.2s 0.3s forwards;
}

.hero__title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.3em;
  margin-bottom: 1rem;
  text-indent: 0.3em;
}
.hero__title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  animation: titleReveal 0.8s forwards;
}
.hero__title span:nth-child(1) { animation-delay: 0.5s; }
.hero__title span:nth-child(2) { animation-delay: 0.7s; }
.hero__title span:nth-child(3) { animation-delay: 0.9s; }
.hero__title span:nth-child(4) { animation-delay: 1.1s; }

@keyframes titleReveal {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
  to { opacity: 1; }
}

.hero__tagline {
  font-family: var(--serif);
  font-size: clamp(0.95rem, 2.5vw, 1.25rem);
  letter-spacing: 0.35em;
  color: var(--gold-light);
  margin-bottom: 2rem;
  text-indent: 0.35em;
  opacity: 0;
  animation: fadeInUp 1s 1.5s forwards;
}

.hero__tagline::before, .hero__tagline::after {
  content: '◆';
  display: inline-block;
  margin: 0 1rem;
  font-size: 0.6em;
  color: var(--coral);
  vertical-align: middle;
}

.hero__divider {
  width: 1px; height: 50px;
  background: linear-gradient(to bottom, transparent, var(--gold), transparent);
  margin: 0 auto 2rem;
  opacity: 0;
  animation: fadeInUp 1s 1.8s forwards;
}

.hero__subtitle {
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  color: rgba(250,247,242,0.75);
  max-width: 520px;
  margin: 0 auto;
  line-height: 2.2;
  opacity: 0;
  animation: fadeInUp 1s 2s forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  opacity: 0;
  animation: fadeInUp 1s 2.5s forwards;
}
.hero__scroll-arrow {
  display: block;
  width: 20px; height: 20px;
  margin: 0.5rem auto 0;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  transform: rotate(45deg);
  animation: scrollBounce 2s infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(3px, 3px); }
}

/* ============================================
   SECTION COMMON
   ============================================ */
.section {
  padding: 7rem 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.section__header {
  text-align: center;
  margin-bottom: 4rem;
}
.section__label {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--gold-dark);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.section__title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--ink);
  letter-spacing: 0.12em;
  font-weight: 800;
  margin-bottom: 0.8rem;
}
.section__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--crimson), var(--coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section__line {
  width: 50px; height: 3px;
  background: linear-gradient(90deg, var(--crimson), var(--coral), var(--gold));
  border-radius: 2px;
  margin: 0 auto;
}

/* ============================================
   ABOUT / BRAND STORY
   ============================================ */
.about {
  background: var(--white);
}
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about__text h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--ink);
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
}
.about__text p {
  color: var(--ink-light);
  line-height: 2.2;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.about__text .accent {
  color: var(--crimson);
  font-family: var(--serif);
  font-weight: 600;
}
.about__image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/5;
}
.about__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease;
}
.about__image:hover img { transform: scale(1.05); }
.about__image::before {
  content: '';
  position: absolute;
  top: -10px; left: -10px;
  right: -10px; bottom: -10px;
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  z-index: -1;
}

/* ============================================
   STATS
   ============================================ */
.stats {
  background: linear-gradient(135deg, #E8344D 0%, #FF6B6B 50%, #D4A843 100%);
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}
.stats::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60"><circle cx="30" cy="30" r="1" fill="rgba(255,255,255,0.15)"/></svg>');
}
.stats__grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stats__item {
  color: #fff;
  position: relative;
  z-index: 1;
}
.stats__num {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.15);
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stats__label {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  opacity: 0.9;
}

/* ============================================
   SERVICES
   ============================================ */
.services {
  background: var(--paper);
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.service-card {
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: all var(--transition);
  border: 1px solid rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--crimson), var(--coral), var(--gold));
  transform: scaleX(0);
  border-radius: 4px 4px 0 0;
  transition: transform var(--transition);
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(232,52,77,0.12);
  border-color: rgba(232,52,77,0.15);
}
.service-card:hover::before { transform: scaleX(1); }

.service-card__icon {
  width: 56px; height: 56px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-card__icon svg {
  width: 100%; height: 100%;
  stroke: var(--crimson);
  transition: stroke var(--transition);
}
.service-card:hover .service-card__icon svg { stroke: var(--coral); }

.service-card__title {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 0.8rem;
  letter-spacing: 0.1em;
}
.service-card__desc {
  font-size: 0.85rem;
  color: var(--ink-light);
  line-height: 1.8;
}

/* ============================================
   CRAFTSMANSHIP / PROCESS
   ============================================ */
.craft {
  background: var(--white);
}
.craft__timeline {
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  position: relative;
}
.craft__step {
  flex: 1;
  min-width: 180px;
  text-align: center;
  padding: 0 1rem;
  position: relative;
}
.craft__step::after {
  content: '';
  position: absolute;
  top: 28px; right: -50%;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--gold) 50%, transparent 50%);
  background-size: 8px 1px;
  z-index: 0;
}
.craft__step:last-child::after { display: none; }

.craft__num {
  width: 56px; height: 56px;
  margin: 0 auto 1.5rem;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--crimson);
  background: var(--white);
  position: relative;
  z-index: 1;
  transition: all var(--transition);
}
.craft__step:hover .craft__num {
  background: var(--crimson);
  color: var(--gold-light);
  border-color: var(--crimson);
  transform: scale(1.1);
}
.craft__step h4 {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}
.craft__step p {
  font-size: 0.8rem;
  color: var(--ink-light);
  line-height: 1.8;
}

/* ============================================
   SHOWCASE
   ============================================ */
.showcase {
  background: var(--paper);
}
.showcase__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.showcase__item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.showcase__item:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.showcase__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.showcase__item:hover img { transform: scale(1.08); }
.showcase__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,10,10,0.8) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.showcase__item:hover .showcase__overlay { opacity: 1; }
.showcase__overlay span {
  font-family: var(--serif);
  color: var(--gold-light);
  font-size: 1rem;
  letter-spacing: 0.15em;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  background: linear-gradient(135deg, #1a0a0e 0%, #2d1118 40%, #3a1520 100%);
  color: var(--paper);
  text-align: center;
  padding: 6rem 2rem;
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(232,52,77,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.contact::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -10%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(212,168,67,0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.contact .section__title { color: var(--paper); }
.contact .section__label { color: var(--gold); }
.contact__text {
  max-width: 500px;
  margin: 0 auto 3rem;
  color: rgba(245,240,232,0.7);
  line-height: 2;
  font-size: 0.95rem;
}
.contact__btn {
  display: inline-block;
  padding: 1rem 3rem;
  border: 2px solid var(--gold);
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  transition: all var(--transition);
  cursor: pointer;
  background: transparent;
  border-radius: 4px;
  position: relative;
  z-index: 1;
}
.contact__btn:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--crimson-dark);
  border-color: var(--gold-light);
  box-shadow: 0 0 40px rgba(212,168,67,0.4);
  transform: translateY(-2px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--ink);
  color: rgba(245,240,232,0.6);
  padding: 3rem 2rem 2rem;
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}
.footer__brand {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}
.footer__divider {
  width: 60px; height: 1px;
  background: var(--gold-dark);
  margin: 1.5rem auto;
}
.footer__icp {
  font-size: 0.8rem;
  line-height: 2.2;
}
.footer__icp a { color: rgba(245,240,232,0.6); transition: color var(--transition); }
.footer__icp a:hover { color: var(--gold); }
.footer__icp .gov-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}
.footer__icp .gov-badge img {
  width: 20px; height: 20px;
  display: inline-block;
}
.footer__copyright {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: rgba(245,240,232,0.4);
}

/* ============================================
   BACK TO TOP
   ============================================ */
.backtop {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--crimson), var(--coral));
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(232,52,77,0.4);
  z-index: 999;
}
.backtop.visible { opacity: 1; visibility: visible; }
.backtop:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(232,52,77,0.5);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}
.fade-up:nth-child(2) { transition-delay: 0.05s; }
.fade-up:nth-child(3) { transition-delay: 0.1s; }
.fade-up:nth-child(4) { transition-delay: 0.15s; }
.fade-up:nth-child(5) { transition-delay: 0.05s; }
.fade-up:nth-child(6) { transition-delay: 0.1s; }
.fade-up:nth-child(7) { transition-delay: 0.15s; }
.fade-up:nth-child(8) { transition-delay: 0.05s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .nav__links {
    position: fixed;
    top: 0; right: -100%;
    width: 70%; max-width: 320px;
    height: 100vh;
    background: var(--paper);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    box-shadow: var(--shadow-lg);
    transition: right 0.5s ease;
  }
  .nav__links.open { right: 0; }
  .nav__links a { font-size: 1.1rem; }
  .nav__burger { display: flex; }

  .about__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .craft__timeline { flex-direction: column; gap: 2.5rem; }
  .craft__step::after { display: none; }
  .showcase__grid { grid-template-columns: 1fr 1fr; }

  .section { padding: 4rem 1.5rem; }
}

@media (max-width: 480px) {
  .nav { padding: 0.8rem 1rem; }
  .nav__brand span { font-size: 1rem; }
  .nav__logo-img { width: 28px; height: 28px; }
  .hero__inner { padding: 1.5rem; }
  .stats__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .services__grid { grid-template-columns: 1fr; }
  .showcase__grid { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
  .section { padding: 3rem 1rem; }
  .contact__btn { padding: 0.8rem 2rem; font-size: 0.8rem; }
  .footer__icp { font-size: 0.7rem; }
}
/* Scoped preview upgrades: horizontal galleries, mobile fit, image lightbox. */
.showcase__grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 24vw);
  grid-template-columns: none;
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.35rem 0 1.35rem;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: var(--crimson) rgba(0,0,0,0.08);
}

.showcase__grid::after {
  content: "";
  width: 1px;
}

.showcase__item {
  scroll-snap-align: start;
  cursor: zoom-in;
}

.showcase__item:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.showcase__item img {
  object-fit: cover;
}

.showcase__overlay {
  pointer-events: none;
}

.jyrm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  background: rgba(25, 20, 18, 0.78);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.jyrm-lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.jyrm-lightbox__figure {
  display: grid;
  justify-items: center;
  min-width: 0;
  margin: 0;
  transform: translateY(18px) scale(0.96);
  transition: transform 0.32s cubic-bezier(.2,.8,.2,1);
}

.jyrm-lightbox.open .jyrm-lightbox__figure {
  transform: translateY(0) scale(1);
}

.jyrm-lightbox__image {
  max-width: min(100%, 960px);
  max-height: calc(100svh - 138px);
  border-radius: 6px;
  object-fit: contain;
  box-shadow: 0 26px 80px rgba(0,0,0,0.42);
}

.jyrm-lightbox__caption {
  width: min(100%, 960px);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  color: var(--paper);
}

.jyrm-lightbox__group {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.jyrm-lightbox__title {
  font-size: clamp(1.1rem, 2.4vw, 1.8rem);
  text-align: right;
}

.jyrm-lightbox__close,
.jyrm-lightbox__nav {
  border: 0;
  color: var(--paper);
  background: rgba(255,255,255,0.14);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.jyrm-lightbox__close:hover,
.jyrm-lightbox__nav:hover {
  background: rgba(255,255,255,0.24);
  transform: translateY(-1px);
}

.jyrm-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}

.jyrm-lightbox__nav {
  width: 52px;
  height: 72px;
  justify-self: center;
  border-radius: 999px;
  font-size: 2.7rem;
  line-height: 1;
}

@media (max-width: 900px) {
  .showcase__grid {
    grid-auto-columns: minmax(240px, 42vw);
  }
}

@media (max-width: 480px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .showcase {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .showcase__grid {
    grid-auto-columns: 84vw;
    gap: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    scroll-padding-inline: 1rem;
  }

  .showcase__item {
    aspect-ratio: 2 / 3;
  }

  .showcase__overlay span {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .jyrm-lightbox {
    grid-template-columns: 1fr;
    padding: 4.6rem 0.75rem 1rem;
  }

  .jyrm-lightbox__image {
    max-height: calc(100svh - 164px);
  }

  .jyrm-lightbox__caption {
    display: grid;
    justify-items: start;
    gap: 0.35rem;
  }

  .jyrm-lightbox__title {
    text-align: left;
  }

  .jyrm-lightbox__nav {
    position: absolute;
    top: 50%;
    width: 42px;
    height: 58px;
    font-size: 2.2rem;
  }

  .jyrm-lightbox__nav--prev { left: 0.45rem; }
  .jyrm-lightbox__nav--next { right: 0.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  .jyrm-lightbox,
  .jyrm-lightbox__figure,
  .showcase__item,
  .showcase__item img {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

.showcase__overlay span {
  display: none;
}

.showcase__overlay::after {
  content: '点击查看大图';
  color: #fff;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}
