/* ══════════════════════════════════════════════════════════════════════
   group-03 · 归港里·万松巷里 — supplementary component styles
   Hand-crafted to MATCH the team's organic-natural design system.
   Reuses the team's CSS custom properties (--color-*, --radius-*, --tx-*).
   All custom classes are namespaced `g3x-` to avoid collisions.
   ══════════════════════════════════════════════════════════════════════ */

/* ── token fallbacks ──────────────────────────────────────────────────────
   The team defines these design tokens in src/index.css (@theme), but Vite's
   build only emits the custom-properties actually referenced by the SHIPPED
   bundle. --tx-fast / --tx-slow / --tx-dramatic / --color-surface / --radius-sm
   were tree-shaken out of the production CSS, so the values below restore them
   (identical to the team's source) — otherwise our var() refs would resolve to
   transparent backgrounds / invalid transitions. Scoped to :root, harmless if
   the real tokens ever ship. */
:root {
  --color-surface: #fdfcf9;
  --radius-sm: 8px;
  --tx-fast: 200ms;
  --tx-slow: 600ms;
  --tx-dramatic: 900ms;
}

/* Injected sections must carry the team's native .section rhythm. The injector
   wraps content in <section class="lec-sec">; we give it the same vertical
   padding, divider and (importantly) a scroll-margin so nav anchors land below
   the FIXED header instead of under it. The header is flex-wrap and grows tall
   on narrow screens (1 row → up to 4 rows), so the offset is driven by
   --g3x-navh, which lec-group03.js keeps in sync with the live nav height
   (with a static fallback that already covers the wrapped-nav worst case). */
.lec-sec {
  display: block;
  padding: var(--section-gap) 0;
  border-bottom: 1px solid var(--color-border);
  scroll-margin-top: var(--g3x-navh, 80px);
}
@media (max-width: 768px) {
  .lec-sec { padding: 64px 0; scroll-margin-top: var(--g3x-navh, 110px); }
}
@media (max-width: 380px) {
  .lec-sec { scroll-margin-top: var(--g3x-navh, 148px); }
}

/* zoom affordance shared by every zoomable figure ------------------------ */
.g3x-zoom { position: relative; cursor: zoom-in; }
/* width:100% + height:auto lets the width/height attrs reserve aspect-ratio
   space (no CLS) while still scaling responsively. */
.g3x-zoom img { display: block; width: 100%; height: auto; }
.g3x-zoom::after {
  content: "⤢";
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1;
  color: #fff;
  background: rgba(61, 58, 53, 0.42);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transform: translateY(-4px);
  transition: opacity var(--tx-base) ease, transform var(--tx-base) ease, background var(--tx-base) ease;
  pointer-events: none;
  z-index: 2;
}
.g3x-zoom:hover::after { opacity: 1; transform: translateY(0); background: var(--color-accent); }
.g3x-zoom .g3x-zoom-hint {
  position: absolute;
  left: 12px; bottom: 12px;
  font-size: 11px; letter-spacing: .04em;
  color: #fff;
  background: rgba(61, 58, 53, 0.42);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  padding: 4px 10px; border-radius: 999px;
  opacity: 0; transform: translateY(4px);
  transition: opacity var(--tx-base) ease, transform var(--tx-base) ease;
  pointer-events: none; z-index: 2;
}
.g3x-zoom:hover .g3x-zoom-hint { opacity: 1; transform: translateY(0); }

/* generic framed figure (card-grade chrome around a full-bleed image) ----- */
.g3x-frame {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-card);
  box-shadow: 0 2px 12px rgba(93, 86, 76, 0.06);
  transition: box-shadow var(--tx-base) ease, transform var(--tx-base) ease;
}
.g3x-frame:hover { box-shadow: 0 10px 28px rgba(93, 86, 76, 0.12); transform: translateY(-2px); }
.g3x-frame img { width: 100%; height: auto; display: block; }

/* small caption row beneath a figure ------------------------------------- */
.g3x-cap {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  margin-top: 12px;
}
.g3x-cap .g3x-cap-title { font-size: 14px; font-weight: 600; color: var(--color-text); }
.g3x-cap .g3x-cap-sub   { font-size: 12px; color: var(--color-dim); letter-spacing: .02em; }

/* ── A1 · 区位 locale callouts ─────────────────────────────────────────── */
.g3x-locale-card { padding: 24px; }
.g3x-locale-card > .g3x-frame { margin: 0; }
.g3x-tagrow {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px;
}
.g3x-tag {
  font-size: 12px; color: var(--color-accent-2);
  background: rgba(139, 111, 71, 0.08);
  border: 1px solid rgba(139, 111, 71, 0.22);
  padding: 5px 12px; border-radius: 999px;
  transition: background var(--tx-fast) ease, color var(--tx-fast) ease, border-color var(--tx-fast) ease;
}
.g3x-tag.is-sage {
  color: var(--color-accent);
  background: rgba(92, 122, 92, 0.08);
  border-color: rgba(92, 122, 92, 0.24);
}

/* ── A2 · ultra-wide population couplet ────────────────────────────────── */
.g3x-stack { display: grid; gap: 20px; }
.g3x-band { padding: 20px; }
.g3x-band > .g3x-frame { margin: 0; background: #fff; }
.g3x-band .g3x-band-head {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px;
}
.g3x-band .g3x-band-no {
  font-family: var(--font-display);
  font-size: 22px; line-height: 1; color: var(--color-accent);
  opacity: .8;
}
.g3x-band .g3x-band-title { font-size: 15px; font-weight: 600; }
.g3x-band .g3x-band-sub { font-size: 12px; color: var(--color-dim); }

/* ── A3 · needs + pain (asymmetric two-up) ─────────────────────────────── */
.g3x-twoup {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  /* equal-height columns: both cards stretch to the same (tallest) row height.
     left column kept a touch wider so the wide 居民需求 diagram fills its frame
     well and the shared row height stays compact. */
  .g3x-twoup { grid-template-columns: 1.4fr 1fr; align-items: stretch; }
}
.g3x-pad { padding: 24px; }
.g3x-pad h4 {
  font-size: 14px; color: var(--color-accent);
  margin-bottom: 12px; font-weight: 600;
}
.g3x-pad .g3x-sub { font-size: 12px; color: var(--color-dim); margin-bottom: 14px; }

/* Make each card a flex column that fills its grid cell, and let the framed
   figure grow to absorb the leftover height so both cards match in height.
   Images are fully shown (object-fit: contain) — no diagram content is cropped;
   the shorter-aspect image is simply centred within its equal-height frame. */
.g3x-twoup > .card,
.g3x-twoup > .g3x-portrait > .card { height: 100%; display: flex; flex-direction: column; }
.g3x-twoup .g3x-frame { flex: 1 1 auto; display: flex; background: var(--color-card); }
.g3x-twoup .g3x-frame img {
  width: 100%; height: 100%; object-fit: contain; object-position: center;
}
.g3x-portrait > .g3x-frame { max-width: 520px; margin: 0 auto; }

/* ── B · 用地肌理 exploded layers ──────────────────────────────────────── */
.g3x-fabric {
  display: grid; gap: 28px; grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 860px) {
  .g3x-fabric { grid-template-columns: 0.92fr 1.08fr; }
}
.g3x-fabric .g3x-fabric-fig > .g3x-frame { max-width: 460px; margin: 0 auto; background: #fff; }
.g3x-layerlist { display: grid; gap: 14px; }
.g3x-layer {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: border-color var(--tx-base) ease, transform var(--tx-base) ease, box-shadow var(--tx-base) ease;
}
.g3x-layer:hover {
  transform: translateX(3px);
  border-color: rgba(92, 122, 92, 0.4);
  box-shadow: 0 4px 14px rgba(93, 86, 76, 0.07);
}
.g3x-layer .g3x-swatch {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08); margin-top: 1px;
}
.g3x-layer .g3x-layer-t { font-size: 14px; font-weight: 600; color: var(--color-text); }
.g3x-layer .g3x-layer-d { font-size: 12.5px; color: var(--color-dim); line-height: 1.6; }

/* ── C · 体块生成 massing stage + step rail ────────────────────────────── */
.g3x-stage-wrap { position: relative; }
.g3x-steprail {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px;
  counter-reset: g3xstep;
}
.g3x-step {
  flex: 1 1 150px; min-width: 140px;
  display: flex; gap: 11px; align-items: flex-start;
  padding: 13px 15px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: border-color var(--tx-base) ease, box-shadow var(--tx-base) ease, transform var(--tx-base) ease;
}
.g3x-step:hover {
  transform: translateY(-2px);
  border-color: rgba(92, 122, 92, 0.45);
  box-shadow: 0 6px 18px rgba(93, 86, 76, 0.08);
}
.g3x-step .g3x-step-no {
  flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 15px; line-height: 1;
  color: #fff; background: var(--color-accent);
  box-shadow: 0 2px 6px rgba(92, 122, 92, 0.35);
}
.g3x-step:nth-child(even) .g3x-step-no { background: var(--color-accent-2); box-shadow: 0 2px 6px rgba(139,111,71,.35); }
.g3x-step .g3x-step-t { font-size: 13.5px; font-weight: 600; color: var(--color-text); line-height: 1.35; }
.g3x-step .g3x-step-d { font-size: 12px; color: var(--color-dim); line-height: 1.55; margin-top: 2px; }

/* ── D · 设计分析 large stage + filmstrip selector ─────────────────────── */
.g3x-da { display: block; }
.g3x-da-stage {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-card);
  box-shadow: 0 2px 12px rgba(93, 86, 76, 0.06);
  cursor: zoom-in;
}
.g3x-da-stage .g3x-da-imgwrap { position: relative; width: 100%; aspect-ratio: 1415 / 736; }
.g3x-da-stage .g3x-da-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.012);
  transition: opacity var(--tx-slow) cubic-bezier(.25,.46,.45,.94),
              transform var(--tx-slow) cubic-bezier(.25,.46,.45,.94);
}
.g3x-da-stage .g3x-da-img.is-active { opacity: 1; transform: scale(1); }
/* caption ribbon on the stage */
.g3x-da-ribbon {
  position: absolute; left: 0; bottom: 0; right: 0;
  display: flex; align-items: baseline; gap: 12px;
  padding: 30px 24px 18px;
  color: #fff;
  background: linear-gradient(to top, rgba(33, 31, 28, 0.62) 0%, rgba(33,31,28,.18) 55%, transparent 100%);
  pointer-events: none; z-index: 2;
}
.g3x-da-ribbon .g3x-da-rno {
  font-family: var(--font-display); font-size: 26px; line-height: 1;
  color: rgba(255,255,255,.85);
}
.g3x-da-ribbon .g3x-da-rt { font-size: 17px; font-weight: 600; }
.g3x-da-ribbon .g3x-da-rs { font-size: 12px; color: rgba(255,255,255,.8); letter-spacing: .04em; }
.g3x-da-zoomtag {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 34px; height: 34px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff;
  background: rgba(33,31,28,.4);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity var(--tx-base) ease, background var(--tx-base) ease;
}
.g3x-da-stage:hover .g3x-da-zoomtag { opacity: 1; }
.g3x-da-stage:hover .g3x-da-zoomtag:hover { background: var(--color-accent); }

/* filmstrip */
.g3x-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px; margin-top: 16px;
}
@media (max-width: 760px) { .g3x-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .g3x-strip { grid-template-columns: repeat(2, 1fr); } }
.g3x-thumb {
  position: relative; display: block; padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden; cursor: pointer; background: var(--color-card);
  text-align: left;
  transition: border-color var(--tx-base) ease, box-shadow var(--tx-base) ease, transform var(--tx-base) ease;
}
.g3x-thumb img {
  width: 100%; aspect-ratio: 1415 / 736; object-fit: cover; display: block;
  transition: transform var(--tx-slow) ease, filter var(--tx-base) ease, opacity var(--tx-base) ease;
  /* inactive thumbs stay fully COLOURFUL — only slightly dimmed via opacity so the
     active thumb reads as selected without ever looking desaturated/grayscale. */
  filter: saturate(1) brightness(1);
  opacity: .72;
}
.g3x-thumb:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(93,86,76,.1); }
.g3x-thumb:hover img { transform: scale(1.05); opacity: 1; }
.g3x-thumb .g3x-thumb-lbl {
  display: block;
  font-size: 11.5px; font-weight: 600; color: var(--color-dim);
  padding: 7px 9px 8px; line-height: 1.25;
  background: var(--color-card);
  transition: color var(--tx-base) ease;
}
.g3x-thumb.is-active {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent), 0 6px 18px rgba(92,122,92,.16);
}
.g3x-thumb.is-active img { opacity: 1; }
.g3x-thumb.is-active .g3x-thumb-lbl { color: var(--color-accent); }
.g3x-thumb .g3x-thumb-no {
  position: absolute; top: 7px; left: 7px;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(33,31,28,.5);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  transition: background var(--tx-base) ease;
}
.g3x-thumb.is-active .g3x-thumb-no { background: var(--color-accent); }

/* ── E · 展板 final panel ──────────────────────────────────────────────── */
.g3x-panel-wrap {
  display: grid; gap: 28px; grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 880px) {
  .g3x-panel-wrap { grid-template-columns: minmax(0, 0.96fr) 1fr; }
}
.g3x-panel-fig {
  position: relative;
  padding: 14px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(93, 86, 76, 0.06);
  transition: box-shadow var(--tx-base) ease, transform var(--tx-base) ease;
}
.g3x-panel-fig:hover { box-shadow: 0 14px 36px rgba(93, 86, 76, 0.16); transform: translateY(-3px); }
.g3x-panel-fig .g3x-panel-inner {
  position: relative; overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  cursor: zoom-in;
  max-width: 420px; margin: 0 auto;
}
.g3x-panel-fig .g3x-panel-inner img { width: 100%; height: auto; display: block; transition: transform var(--tx-slow) ease; }
.g3x-panel-fig:hover .g3x-panel-inner img { transform: scale(1.02); }
.g3x-panel-aside .g3x-eyebrow {
  text-transform: uppercase; font-size: 11px; letter-spacing: 3px;
  color: var(--color-accent-2); margin-bottom: 8px;
}
.g3x-panel-aside h3 {
  font-family: var(--font-serif);
  font-size: 24px; font-weight: 600; line-height: 1.3; margin-bottom: 12px;
}
.g3x-panel-aside p { font-size: 14px; color: var(--color-dim); line-height: 1.85; max-width: 460px; }
.g3x-panel-meta {
  display: flex; flex-wrap: wrap; gap: 26px; margin-top: 22px;
}
.g3x-panel-meta .g3x-pm { }
.g3x-panel-meta .g3x-pm .g3x-pm-v {
  font-family: var(--font-display); font-size: 22px; color: var(--color-text); line-height: 1;
}
.g3x-panel-meta .g3x-pm .g3x-pm-l {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--color-dim); margin-top: 6px;
}
.g3x-panel-cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 26px; padding: 11px 20px;
  font-size: 13px; font-weight: 600; color: #fff;
  background: var(--color-accent); border: none; border-radius: 999px;
  cursor: zoom-in;
  transition: background var(--tx-fast) ease, transform var(--tx-fast) ease, box-shadow var(--tx-fast) ease;
  box-shadow: 0 4px 14px rgba(92, 122, 92, 0.28);
}
.g3x-panel-cta:hover { background: #51704f; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(92, 122, 92, 0.34); }
.g3x-panel-cta svg { width: 15px; height: 15px; }

/* removed per request: 更新策略 / 场地规划 section */
#strategy{display:none!important}
nav a[href="#strategy"]{display:none!important}

/* zoning rework: 现状图 ←slider→ 规划图 */
#zoning label{display:none!important}
#zoning .lec-zctrl{display:flex;align-items:center;justify-content:flex-start;gap:14px;margin-top:14px;font-size:13px;color:var(--color-dim,var(--dim,#777))}
#zoning .lec-zctrl .lec-zend{font-weight:600;white-space:nowrap;color:var(--color-text,var(--text,#222))}
#zoning .lec-zctrl .lec-zslider{width:280px;max-width:72%;accent-color:var(--color-accent,var(--accent,#c0564e))}
