:root {
  --paper: #fffefa;
  --ink: #303743;
  --muted: #707887;
  --line: #dfe4ea;
  --blue: #4779d8;
  --blue-soft: #f1f6ff;
  --green: #759d3f;
  --green-soft: #f5f9ec;
  --yellow: #f4c94b;
  --coral: #ef765d;
  --shadow: 0 18px 42px rgba(52, 64, 81, .13);
  --sans: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
button, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  height: 60px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 44px;
  padding: 0 clamp(24px, 3.2vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 254, 250, .94);
  backdrop-filter: blur(14px);
}
.site-mark { display: block; width: 28px; height: 28px; overflow: hidden; border-radius: 50%; border: 2px solid var(--yellow); }
.site-mark img { width: 100%; height: 100%; object-fit: cover; }
.main-nav { display: flex; align-self: stretch; gap: 38px; }
.main-nav a { position: relative; display: flex; align-items: center; color: #454b56; font-size: 14px; font-weight: 600; }
.main-nav a::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; content: ""; background: transparent; }
.main-nav a:first-child.active::after { background: var(--blue); }
.main-nav a:nth-child(2).active::after { background: var(--green); }
.main-nav a:nth-child(2).active ~ a::after { background: transparent; }
.about-link { font-size: 13px; font-weight: 600; }
.menu-button { display: none; border: 0; color: var(--ink); background: transparent; }
.mobile-menu { display: none; }

.hero {
  width: min(1500px, 100%);
  min-height: 510px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(520px, 1.55fr) minmax(280px, .85fr);
  align-items: center;
  gap: clamp(20px, 2.5vw, 42px);
  padding: 42px clamp(28px, 3.4vw, 58px) 0;
  overflow: hidden;
}
.hero-copy { align-self: center; padding-bottom: 28px; }
.hero-copy h1 { margin: 0 0 24px; font-size: clamp(58px, 6vw, 94px); line-height: .96; font-weight: 800; letter-spacing: -.08em; }
.hero-copy p { margin: 0 0 58px; color: #505866; font-size: 17px; line-height: 1.9; }
.text-action { display: inline-block; padding: 0 0 9px; border-bottom: 2px solid currentColor; font-size: 14px; font-weight: 700; }
.action-blue { color: var(--blue); }
.action-green { color: var(--green); }

.hero-photo {
  position: relative;
  width: 100%;
  height: 430px;
  padding: 10px;
  border: 0;
  background: #fff;
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
  transition: transform .35s ease, box-shadow .35s ease;
}
.hero-photo:hover { transform: rotate(-.4deg) translateY(-5px); box-shadow: 0 23px 55px rgba(52, 64, 81, .18); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo span { position: absolute; right: 18px; bottom: 16px; padding: 5px 8px; color: #fff; background: rgba(47, 55, 67, .7); font-size: 11px; }

.hero-character {
  position: relative;
  height: 390px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 42px;
  border: 3px solid #b8d778;
  background: #fff;
  box-shadow: 0 16px 38px rgba(88, 112, 46, .12);
  transform: rotate(2deg);
}
.hero-character img { width: 100%; min-height: 0; flex: 1 1 auto; object-fit: contain; }
.hero-character .text-action { position: absolute; right: 18px; bottom: 18px; }

.album-strip { padding: 26px clamp(24px, 3.2vw, 48px) 32px; }
.photo-strip { background: var(--blue-soft); }
.character-strip { display: grid; grid-template-columns: 270px 1fr; gap: 42px; align-items: center; padding-top: 28px; padding-bottom: 28px; background: var(--green-soft); }
.strip-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.strip-heading > div { border-left: 4px solid var(--blue); padding-left: 13px; }
.strip-heading.compact > div { border-left-color: var(--green); }
.strip-heading h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.strip-heading > a { color: var(--blue); font-size: 13px; font-weight: 700; }
.strip-gallery { display: grid; gap: 10px; }
.photo-preview { grid-template-columns: 1.15fr .55fr 1.25fr 1fr .7fr 1.15fr; height: 158px; }
.character-preview { grid-template-columns: .65fr 1.2fr .8fr .8fr .72fr .9fr; height: 152px; }
.strip-gallery button { position: relative; min-width: 0; padding: 0; overflow: hidden; border: 1px solid rgba(75, 88, 106, .12); background: #fff; }
.strip-gallery button::after { position: absolute; right: 8px; bottom: 8px; content: "查看"; padding: 3px 6px; color: #4b596c; background: rgba(255, 255, 255, .84); font-size: 10px; font-weight: 700; opacity: 0; transition: opacity .25s ease; }
.strip-gallery button:hover::after { opacity: 1; }
.strip-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.strip-gallery button:hover img { transform: scale(1.035); }
.character-preview img { object-fit: contain; }
.character-preview-item.wide img { object-fit: cover; }
.character-strip-copy p { margin: -7px 0 30px; color: #6c7566; font-size: 12px; line-height: 1.8; }

.full-gallery { scroll-margin-top: 70px; padding: 116px clamp(24px, 5vw, 84px) 130px; }
.photography-section { background: #fff; }
.character-section { background: #fbfcf6; }
.gallery-heading { width: min(1320px, 100%); margin: 0 auto 44px; display: flex; align-items: flex-end; justify-content: space-between; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.gallery-heading p { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.gallery-heading h2 { margin: 0; font-size: clamp(36px, 4vw, 62px); line-height: 1.1; letter-spacing: -.05em; }
.gallery-heading > span { padding-bottom: 4px; color: var(--muted); font-size: 12px; }

.photo-grid { width: min(1320px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-flow: dense; grid-auto-rows: 92px; gap: 13px; }
.gallery-item { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 0; background: #eef1f4; text-align: left; }
.gallery-item:focus-visible, .preview-item:focus-visible, .character-preview-item:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.photo-item { grid-column: span 4; grid-row: span 3; }
.photo-item.featured { grid-column: span 7; grid-row: span 4; }
.photo-item.portrait { grid-row: span 5; }
.photo-item.wide { grid-column: span 6; grid-row: span 3; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.photo-item:hover img { transform: scale(1.025); }
.photo-item span { position: absolute; right: 12px; bottom: 10px; padding: 5px 8px; color: #fff; background: rgba(44, 52, 63, .72); font-size: 11px; }

.character-grid { width: min(1320px, 100%); margin: 0 auto; columns: 5; column-gap: 14px; }
.character-item { margin: 0 0 14px; break-inside: avoid; border: 1px solid #e3e8d8; background: #fff; }
.character-item img { display: block; width: 100%; height: auto; min-height: 170px; object-fit: contain; transition: transform .35s ease; }
.character-item:hover img { transform: scale(1.025); }
.character-item span { position: absolute; right: 8px; bottom: 8px; min-width: 24px; padding: 4px 6px; color: #597533; background: rgba(248, 252, 241, .9); font-size: 10px; font-weight: 700; text-align: center; }
.copyright-note { width: min(1320px, 100%); margin: 24px auto 0; padding-top: 18px; border-top: 1px solid #e2e7d8; color: #7a8174; font-size: 11px; line-height: 1.8; }

.about-section { display: grid; grid-template-columns: .7fr 1.6fr auto; gap: 50px; align-items: start; padding: 72px clamp(24px, 5vw, 84px); border-top: 1px solid var(--line); background: #fffaf0; }
.about-section h2 { margin: 0; font-size: 24px; }
.about-section p { max-width: 620px; margin: 0; color: #626a76; font-size: 14px; line-height: 2; }
.about-section a { color: var(--coral); border-bottom: 1px solid currentColor; padding-bottom: 5px; font-size: 13px; font-weight: 700; }
.site-footer { display: flex; justify-content: space-between; padding: 22px clamp(24px, 5vw, 84px); border-top: 1px solid var(--line); color: #7b818b; background: var(--paper); font-size: 11px; }

.lightbox { width: min(1180px, calc(100% - 32px)); height: min(88vh, 860px); max-width: none; max-height: none; padding: 0; overflow: hidden; border: 1px solid #d9dee5; background: #fff; box-shadow: 0 30px 90px rgba(30, 38, 48, .28); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox::backdrop { background: rgba(46, 53, 63, .62); backdrop-filter: blur(5px); }
.lightbox-close { justify-self: end; margin: 15px 17px 0; padding: 6px 10px; border: 1px solid var(--line); color: var(--ink); background: #fff; font-size: 12px; }
.lightbox figure { min-height: 0; display: grid; grid-template-columns: 1fr 240px; gap: 32px; align-items: center; margin: 0; padding: 10px 52px 22px; }
.lightbox figure img { display: block; max-width: 100%; max-height: calc(88vh - 145px); justify-self: center; object-fit: contain; }
.lightbox figcaption { border-left: 3px solid var(--yellow); padding-left: 18px; }
.lightbox figcaption p { margin: 0 0 10px; color: var(--muted); font-size: 11px; }
.lightbox figcaption h2 { margin: 0; font-size: 28px; }
.lightbox-controls { display: flex; justify-content: space-between; padding: 13px 18px; border-top: 1px solid var(--line); }
.lightbox-controls button { padding: 7px 12px; border: 0; color: var(--blue); background: transparent; font-size: 13px; font-weight: 700; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: .8fr 1.35fr .75fr; min-height: 470px; }
  .hero-photo { height: 365px; }
  .hero-character { height: 330px; }
  .hero-copy h1 { font-size: 66px; }
  .photo-preview { grid-template-columns: 1fr .7fr 1.15fr .9fr .7fr; }
  .photo-preview button:last-child { display: none; }
  .character-grid { columns: 4; }
}

@media (max-width: 760px) {
  .site-header { height: 58px; grid-template-columns: auto 1fr auto; gap: 18px; padding: 0 20px; }
  .main-nav, .about-link { display: none; }
  .menu-button { display: block; justify-self: end; }
  .mobile-menu { position: fixed; z-index: 29; top: 58px; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; gap: 24px; padding: 50px 24px; background: rgba(255, 254, 250, .98); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s ease, visibility .2s ease, transform .2s ease; }
  .mobile-menu.open { opacity: 1; visibility: visible; transform: none; }
  .mobile-menu a { font-size: 26px; font-weight: 700; }

  .hero { min-height: 0; grid-template-columns: 1fr 1fr; gap: 20px; padding: 62px 20px 42px; }
  .hero-copy { grid-column: 1 / -1; padding: 0; }
  .hero-copy h1 { margin-bottom: 18px; font-size: 58px; }
  .hero-copy p { margin-bottom: 30px; font-size: 15px; }
  .hero-photo { grid-column: 1 / -1; height: 255px; padding: 7px; transform: rotate(-1deg); }
  .hero-character { grid-column: 2; grid-row: 3; width: min(48vw, 180px); height: 230px; justify-self: end; margin: -60px 6px 0 0; padding: 14px 10px 40px; transform: rotate(1.5deg); }

  .album-strip { padding-right: 20px; padding-left: 20px; }
  .strip-heading { margin-bottom: 14px; }
  .strip-gallery { display: flex; height: 148px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 5px; }
  .strip-gallery button { flex: 0 0 66vw; scroll-snap-align: start; }
  .photo-preview button:nth-child(2), .photo-preview button:nth-child(5) { flex-basis: 42vw; }
  .character-strip { display: block; }
  .character-strip-copy p { margin-bottom: 18px; }
  .character-strip-copy .text-action { margin-bottom: 27px; }
  .character-preview button { flex-basis: 45vw; }

  .full-gallery { padding: 80px 20px 90px; }
  .gallery-heading { margin-bottom: 24px; }
  .gallery-heading h2 { font-size: 38px; }
  .photo-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 110px; gap: 9px; }
  .photo-item, .photo-item.featured, .photo-item.wide { grid-column: span 1; grid-row: span 2; }
  .photo-item.featured { grid-column: span 2; grid-row: span 3; }
  .photo-item.portrait { grid-row: span 3; }
  .character-grid { columns: 2; column-gap: 9px; }
  .character-item { margin-bottom: 9px; }
  .about-section { grid-template-columns: 1fr; gap: 22px; padding: 54px 20px; }
  .site-footer { padding: 20px; }

  .lightbox { width: calc(100% - 16px); height: 92vh; }
  .lightbox figure { grid-template-columns: 1fr; gap: 16px; padding: 8px 18px 16px; }
  .lightbox figure img { max-height: calc(92vh - 210px); }
  .lightbox figcaption { border-left: 0; border-top: 3px solid var(--yellow); padding: 12px 0 0; }
}

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