/* ============================================================
   CHANGSHA FRAMES — gallery (immersive series)
   Reference "warm paper" layout; animation hooks unchanged.
   ============================================================ */

.g-main { position: relative; z-index: 2; }

/* ---------- scroll progress (JS-driven) ---------- */
.g-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 2500; pointer-events: none;
}
.g-progress i {
  display: block; height: 100%;
  background: var(--orange);
  transform-origin: left; transform: scaleX(0);
}

/* ---------- top bar ---------- */
.g-topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  padding: 22px 48px;
  background: var(--cream);
  position: sticky; top: 0; z-index: 100;
  transition: padding .3s ease, box-shadow .3s ease;
}
.g-topbar.scrolled {
  padding: 12px 48px;
  box-shadow: 0 2px 0 var(--sand);
}
.g-brand { font-size: 15px; font-weight: 900; letter-spacing: 4px; text-transform: uppercase; }
.g-brand span { color: var(--orange); }
.g-links { display: flex; align-items: center; }
.g-links a {
  position: relative;
  font-size: 12px; font-weight: bold; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin-left: 36px;
  transition: color .25s ease;
}
.g-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 2px; background: var(--orange);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.g-links a:hover { color: var(--ink); }
.g-links a:hover::after { transform: scaleX(1); }
.g-cta { white-space: nowrap; }

/* ---------- hero ---------- */
.g-hero {
  position: relative;
  height: 88vh; min-height: 600px;
  overflow: hidden;
}
.g-hero-bg { width: 100%; height: 100%; object-fit: cover; }
.g-hero-shade { position: absolute; inset: 0; background: rgba(43, 33, 24, .45); }
.g-hero-text {
  position: absolute; left: 60px; bottom: 90px;
  width: 620px; max-width: calc(100% - 120px);
  z-index: 5;
}
.g-kicker { color: var(--orange); margin-bottom: 22px; }
.g-hero-title {
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 900; line-height: 1.1;
  color: var(--cream-2);
  text-shadow: 0 4px 26px rgba(43, 33, 24, .4);
}
.g-hero-title em { font-style: normal; color: var(--orange); }
.g-sub {
  margin-top: 26px;
  font-size: 16px; color: var(--cream-3); line-height: 1.9;
}
.g-hero-scroll {
  position: absolute; right: 48px; bottom: 28px; z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: #FFE9C8; font-size: 11px; font-weight: bold;
  letter-spacing: .3em; text-transform: uppercase;
}
.g-hero-scroll i {
  width: 2px; height: 48px; background: rgba(255, 233, 200, .35);
  position: relative; overflow: hidden; display: block;
}
.g-hero-scroll i::after {
  content: ""; position: absolute; left: 0; top: -40%;
  width: 100%; height: 40%; background: var(--orange);
  animation: scroll-drop 1.8s var(--ease-out) infinite;
}
@keyframes scroll-drop { 0% { top: -40%; } 60%, 100% { top: 110%; } }

/* marquee divider */
.g-marquee {
  background: var(--sand);
  padding: 12px 0;
  font-weight: 900; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
}
.g-marquee .marquee-track { gap: 34px; }
.g-marquee span { color: var(--ink); }
.g-marquee b { color: var(--rust); }

/* ---------- about + stats ---------- */
.g-about {
  max-width: 1280px; margin: 0 auto;
  padding: 120px 48px 90px 48px;
  display: flex; gap: 80px;
}
.g-about-left { width: 55%; }
.g-about-left h2 {
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 900; line-height: 1.25;
  margin: 22px 0 36px 0;
}
.g-body { font-size: 15px; color: var(--muted); margin-bottom: 24px; max-width: 480px; }
.g-stats { width: 45%; display: flex; flex-wrap: wrap; }
.g-stat {
  width: 50%;
  padding: 30px 0 30px 30px;
  position: relative;
}
.g-stat:nth-child(odd) { border-right: 1px solid var(--sand); }
.g-stat:nth-child(1), .g-stat:nth-child(2) { border-bottom: 1px solid var(--sand); }
.g-stat b {
  display: block;
  font-size: clamp(42px, 4.5vw, 56px);
  font-weight: 900; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.g-stat b.popped { color: var(--orange); }
.g-stat span {
  font-size: 11px; font-weight: bold; letter-spacing: 3px;
  color: var(--muted); text-transform: uppercase;
}

/* ---------- series sections ---------- */
.g-series { max-width: 1280px; margin: 0 auto; padding: 100px 48px 90px 48px; }
.g-series-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 40px;
  margin: 22px 0 54px 0;
}
.g-series-head h2 { font-size: clamp(34px, 4.2vw, 52px); font-weight: 900; }
.g-side-note { color: var(--muted); font-size: 14px; text-align: right; }

.g-grid2 { display: flex; flex-wrap: wrap; gap: 28px; }
.g-grid2 .g-photo, .g-grid2 .g-portrait { width: 48%; flex: 1 1 45%; }
.g-grid2 .g-portrait:nth-child(even) { margin-top: 56px; }
.g-grid3 { display: flex; gap: 28px; }
.g-grid3 .g-portrait { width: 33%; flex: 1; }
.g-grid3 .g-detail:nth-child(2) { margin-top: 40px; }
.g-grid3 .g-detail:nth-child(3) { margin-top: 80px; }

.g-photo, .g-portrait { position: relative; }
.g-frame {
  position: relative;
  border-radius: 20px; overflow: hidden;
  background: var(--sand);
  transition: transform .35s ease, box-shadow .35s ease;
}
.g-frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.g-r169 { aspect-ratio: 16 / 9; }
.g-r32  { aspect-ratio: 3 / 2; }
.g-r21  { aspect-ratio: 2 / 1; }
.g-r43  { aspect-ratio: 4 / 3; }
.g-photo:hover .g-frame, .g-portrait:hover .g-frame {
  transform: translateY(-8px);
  box-shadow: 0 18px 36px rgba(43, 33, 24, .18);
}
.g-photo:hover .g-frame img, .g-portrait:hover .g-frame img { transform: scale(1.06); }
.g-photo:focus-visible, .g-portrait:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; border-radius: 20px; }

.g-photo figcaption, .g-portrait figcaption { margin-top: 18px; position: relative; }
.g-loc {
  display: block;
  font-size: 11px; font-weight: bold; letter-spacing: 3px; text-transform: uppercase;
  color: var(--rust);
}
.g-name { display: block; font-size: clamp(22px, 2.4vw, 30px); font-weight: 900; margin: 4px 0 2px 0; }
.g-year {
  position: absolute; right: 0; bottom: 4px;
  font-size: 12px; font-weight: bold; color: var(--muted);
}
.g-story { font-size: 14px; color: var(--muted); max-width: 460px; margin-top: 10px; }

/* ---------- quote ---------- */
.g-quote {
  max-width: 1184px; margin: 0 auto;
  padding: 110px 48px;
  display: flex; gap: 60px; align-items: center;
}
.g-quote-rule {
  width: 200px; flex: 0 0 auto;
  border-top: 2px solid var(--rust);
}
.g-quote-text { font-size: clamp(22px, 2.8vw, 34px); font-style: italic; line-height: 1.6; }
.g-quote-note {
  margin-top: 30px;
  font-size: 11px; font-weight: bold; letter-spacing: 3px; text-transform: uppercase;
  color: var(--muted);
}

/* ---------- statement (video break) ---------- */
.g-statement {
  position: relative;
  height: 70vh; min-height: 480px;
  overflow: hidden; margin-top: 40px;
  display: flex; align-items: center; justify-content: center;
}
.g-statement-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.g-statement .g-hero-shade { background: rgba(43, 33, 24, .5); }
.g-statement-text { position: relative; z-index: 5; text-align: center; }
.g-statement-text .mono-tag { color: var(--orange); }
.g-statement-text h2 {
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 900; line-height: 1.15;
  color: var(--cream-2);
  text-shadow: 0 4px 26px rgba(43, 33, 24, .45);
  margin: 18px 0;
}
.g-statement-text h2 em { font-style: normal; color: var(--orange); }
.g-statement-text .g-sub { color: var(--cream-3); }

/* ---------- lightbox (pure CSS :target) ---------- */
.g-lightbox {
  position: fixed; inset: 0; z-index: 2800;
  background: rgba(23, 19, 16, .94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}
.g-lightbox:target { opacity: 1; visibility: visible; }
.g-lightbox img {
  max-width: 88vw; max-height: 78vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  transform: scale(.92);
  transition: transform .35s ease;
}
.g-lightbox:target img { transform: scale(1); }
.g-lb-cap {
  position: absolute; bottom: 34px; left: 0; right: 0;
  text-align: center;
  font-size: 13px; font-weight: bold; letter-spacing: 2px;
  color: var(--d-muted);
  opacity: 0; transition: opacity .35s ease .1s;
}
.g-lightbox:target .g-lb-cap { opacity: 1; }
.g-lb-close {
  position: absolute; top: 26px; right: 34px;
  background: var(--cream); color: var(--ink);
  border: none; border-radius: 999px;
  font-family: inherit; font-size: 13px; font-weight: bold;
  padding: 10px 22px; cursor: pointer;
  transition: transform .25s ease, background-color .25s ease;
}
.g-lb-close:hover { transform: translateY(-2px); background: var(--orange); color: #fff; }

/* ---------- footer ---------- */
.g-footer {
  background: var(--sand);
  margin-top: 100px;
  padding: 70px 48px 30px 48px;
  position: relative; overflow: hidden;
}
.g-foot-grid {
  max-width: 1280px; margin: 0 auto 50px auto;
  display: flex; gap: 60px;
  position: relative; z-index: 2;
}
.g-foot-grid > div { width: 25%; }
.g-foot-grid h4 { font-size: 16px; font-weight: 900; margin-bottom: 16px; }
.g-foot-grid p { font-size: 13px; color: var(--muted); line-height: 2; }
.g-foot-grid a { color: var(--muted); transition: color .25s ease; }
.g-foot-grid a:hover { color: var(--ink); }
.g-foot-watermark {
  font-size: clamp(90px, 17vw, 230px);
  font-weight: 900; line-height: .9; text-align: center;
  color: rgba(43, 33, 24, .06);
  user-select: none; pointer-events: none;
}
.g-copy {
  max-width: 1280px; margin: 24px auto 0 auto;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  border-top: 2px dashed var(--sand-2);
  padding-top: 26px;
  font-size: 12px; color: var(--muted);
  position: relative; z-index: 2;
}
.g-copy a { font-weight: bold; color: var(--rust); transition: color .25s ease; }
.g-copy a:hover { color: var(--orange); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .g-grid3 { flex-wrap: wrap; }
  .g-grid3 .g-portrait { width: 48%; flex: 1 1 45%; }
  .g-grid3 .g-detail:nth-child(2), .g-grid3 .g-detail:nth-child(3) { margin-top: 0; }
}

@media (max-width: 900px) {
  .g-topbar { padding: 16px 20px; }
  .g-topbar.scrolled { padding: 12px 20px; }
  .g-links { display: none; }
  .g-brand { font-size: 13px; letter-spacing: 2px; }
  .g-hero { min-height: 520px; }
  .g-hero-text { left: 24px; right: 24px; width: auto; max-width: none; bottom: 70px; }
  .g-sub { font-size: 14px; }
  .g-hero-scroll { display: none; }
  .g-about { flex-direction: column; padding: 70px 20px; gap: 40px; }
  .g-about-left, .g-stats { width: 100%; }
  .g-stat { padding: 22px 0 22px 22px; }
  .g-series { padding: 60px 20px; }
  .g-series-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .g-side-note { text-align: left; }
  .g-grid2 .g-photo, .g-grid2 .g-portrait { width: 100%; flex: 1 1 100%; }
  .g-grid2 .g-portrait:nth-child(even) { margin-top: 0; }
  .g-grid3 { flex-direction: column; }
  .g-grid3 .g-portrait { width: 100%; }
  .g-year { position: static; display: block; margin-top: 2px; }
  .g-quote { flex-direction: column; padding: 70px 20px; gap: 30px; align-items: flex-start; }
  .g-quote-rule { width: 120px; }
  .g-statement { min-height: 420px; }
  .g-footer { margin-top: 60px; padding: 50px 20px 24px 20px; }
  .g-foot-grid { flex-direction: column; gap: 36px; margin-bottom: 30px; }
  .g-foot-grid > div { width: 100%; }
  .g-lightbox img { max-width: 94vw; max-height: 70vh; }
  .g-lb-close { top: 16px; right: 16px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .g-hero-scroll i::after { animation: none !important; }
}

/* ---------- pure CSS: no-JS replacements ---------- */

/* frames are now plain anchors */
.g-frame { display: block; text-decoration: none; color: inherit; cursor: pointer; }

/* scroll progress via scroll-driven animations */
@supports (animation-timeline: scroll()) {
  .g-progress i {
    animation: g-prog linear both;
    animation-timeline: scroll(root);
  }
  @keyframes g-prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* hero intro choreography after the CSS loader (2.5s) */
.g-topbar { animation: fade-down .7s ease 2.55s both; }
.g-hero-text { animation: fade-up .9s ease 2.7s both; }
.g-hero-scroll { animation: fade-up .9s ease 3s both; }

@media (prefers-reduced-motion: reduce) {
  .g-topbar, .g-hero-text, .g-hero-scroll { animation: none !important; }
}
