/* ============================================================
   NVIDIA-Style Village Website
   Design System: Black/White/Green(#76b900), Industrial, Sharp
   ============================================================ */

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

:root {
  /* Brand Colors */
  --nv-green: #76b900;
  --nv-green-light: #bff230;
  --nv-black: #000000;
  --nv-near-black: #1a1a1a;
  --nv-white: #ffffff;

  /* Extended Palette */
  --nv-orange: #df6500;
  --nv-yellow: #ef9100;
  --nv-yellow-light: #feeeb2;
  --nv-red: #e52020;
  --nv-blue: #0046a4;

  /* Neutrals */
  --nv-gray-300: #a7a7a7;
  --nv-gray-400: #898989;
  --nv-gray-500: #757575;
  --nv-gray-border: #5e5e5e;

  /* Interactive */
  --nv-link-hover: #3860be;
  --nv-btn-hover: #1eaedb;
  --nv-btn-active: #007fff;

  /* Shadows */
  --nv-shadow: rgba(0, 0, 0, 0.3) 0px 0px 5px 0px;

  /* Typography */
  --nv-font: "NVIDIA-EMEA", "Arial", "Helvetica", sans-serif;
}

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

body {
  font-family: var(--nv-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.50;
  color: var(--nv-black);
  background: var(--nv-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 64px 0;
}

.section-dark {
  background: var(--nv-black);
  color: var(--nv-white);
  position: relative;
}

.section-dark .sec-heading,
.section-dark .sec-sub {
  color: var(--nv-white);
}

.section-light {
  background: var(--nv-white);
  color: var(--nv-black);
}

/* ===== Typography ===== */
.display {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
}

.sec-heading {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.sub-heading {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.75;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.body-large {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.67;
}

.body-text {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.50;
}

.body-small {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.67;
  color: var(--nv-gray-500);
}

.section-dark .body-small {
  color: var(--nv-gray-300);
}

.caption {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.50;
}

.caption-small {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--nv-gray-500);
}

.micro-label {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.50;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-dark .caption-small {
  color: var(--nv-gray-400);
}

/* ===== Section Header ===== */
.sec-head {
  margin-bottom: 48px;
  max-width: 800px;
}

.sec-kicker {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nv-green);
  margin-bottom: 12px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--nv-green);
}

.sec-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
}

.sec-sub {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--nv-gray-500);
}

.section-dark .sec-sub {
  color: var(--nv-gray-300);
}

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nv-black);
  border-bottom: 1px solid var(--nv-near-black);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--nv-white);
  letter-spacing: 0.02em;
}

.nav-brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  background: var(--nv-black);
  border: 1px solid var(--nv-green);
  border-radius: 2px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.nav-links a:hover .nav-icon,
.nav-links a.active .nav-icon {
  opacity: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--nv-white);
  letter-spacing: 0.02em;
  transition: color 0.15s ease, scale 0.1s ease-out;
  position: relative;
  padding: 4px 0;
}

.nav-links a:hover {
  color: var(--nv-link-hover);
}

.nav-links a.active {
  color: var(--nv-green);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--nv-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--nv-green);
  border-radius: 2px;
  color: var(--nv-white);
  font-size: 20px;
  padding: 4px 12px;
  cursor: pointer;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 11px 24px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  background: transparent;
  color: var(--nv-black);
  border: 2px solid var(--nv-green);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, scale 0.1s ease-out;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.section-dark .btn,
.hero .btn,
.page-banner .btn {
  color: var(--nv-white);
}

.btn:hover {
  background: var(--nv-btn-hover);
  color: var(--nv-white);
  border-color: var(--nv-btn-hover);
}

.btn:active {
  background: var(--nv-btn-active);
  color: var(--nv-white);
  border-color: var(--nv-btn-active);
}

.btn-secondary {
  border-width: 2px;
  border-color: var(--nv-white);
  color: var(--nv-white);
}

.btn-secondary:hover {
  background: var(--nv-white);
  color: var(--nv-black);
  border-color: var(--nv-white);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  background: var(--nv-black);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.45;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.8) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  width: 100%;
}

.hero-kicker {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nv-green);
  margin-bottom: 16px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--nv-green);
}

.hero-title {
  font-size: 72px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--nv-white);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.67;
  color: var(--nv-gray-300);
  margin-bottom: 40px;
  max-width: 600px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--nv-gray-400);
  z-index: 2;
}

.hero-scroll::after {
  content: "";
  display: block;
  width: 1px;
  height: 32px;
  background: var(--nv-green);
  margin: 8px auto 0;
}

/* ===== Page Banner ===== */
.page-banner {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  background: var(--nv-black);
  overflow: hidden;
}

.page-banner .hero-bg {
  opacity: 0.35;
}

.page-banner .hero-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.9) 100%);
}

.page-banner-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 48px;
  width: 100%;
}

.page-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--nv-white);
  margin-bottom: 8px;
}

.page-kicker {
  font-size: 16px;
  font-weight: 400;
  color: var(--nv-green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== Stats Band ===== */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 48px 0;
}

.stat {
  text-align: center;
  padding: 24px 16px;
  border: 1px solid var(--nv-gray-border);
  border-radius: 2px;
  background: var(--nv-near-black);
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--nv-green);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--nv-white);
  letter-spacing: 0.05em;
}

.section-light .stats-band {
  border-top: 1px solid var(--nv-gray-border);
  border-bottom: 1px solid var(--nv-gray-border);
  padding: 32px 0;
}

.section-light .stat {
  border: none;
  background: transparent;
  padding: 16px;
}

.section-light .stat-value {
  color: var(--nv-black);
}

.section-light .stat-label {
  color: var(--nv-gray-500);
}

/* ===== Feature Cards ===== */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feat-card {
  background: var(--nv-white);
  border: 1px solid var(--nv-gray-border);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--nv-shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease, scale 0.15s ease-out;
}

.section-dark .feat-card {
  background: var(--nv-near-black);
  border-color: var(--nv-gray-border);
}

.feat-card:hover {
  box-shadow: 0 0 20px rgba(118, 185, 0, 0.2);
  transform: translateY(-2px);
}

.feat-media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

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

.feat-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nv-black);
  background: var(--nv-green);
  padding: 4px 8px;
  border-radius: 1px;
}

.feat-body {
  padding: 24px;
}

.feat-body h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--nv-green);
  padding-bottom: 8px;
  display: inline-block;
}

.section-dark .feat-body h3 {
  color: var(--nv-white);
}

.feat-body p {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.67;
  color: var(--nv-gray-500);
}

.section-dark .feat-body p {
  color: var(--nv-gray-300);
}

/* ===== Village Grid (Image + Text) ===== */
.village-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.village-grid.reverse {
  direction: rtl;
}

.village-grid.reverse > * {
  direction: ltr;
}

.vg-media {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: var(--nv-shadow);
}

.vg-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
}

.vg-body h3 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 24px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--nv-green);
  display: inline-block;
}

.vg-body p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.67;
  margin-bottom: 16px;
  color: var(--nv-gray-500);
}

.section-dark .vg-body p {
  color: var(--nv-gray-300);
}

.vg-spec {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--nv-green);
  border-radius: 2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--nv-green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== People Cards ===== */
.people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.person-card {
  background: var(--nv-white);
  border: 1px solid var(--nv-gray-border);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--nv-shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, scale 0.15s ease-out;
}

.section-dark .person-card {
  background: var(--nv-near-black);
}

.person-card:hover {
  box-shadow: 0 0 20px rgba(118, 185, 0, 0.2);
  transform: translateY(-2px);
}

.section-dark .person-card:hover {
  border-color: var(--nv-green);
  border-style: dashed;
  background: linear-gradient(rgba(118, 185, 0, 0.10), rgba(118, 185, 0, 0.10)), var(--nv-near-black);
  box-shadow: 0 0 20px rgba(118, 185, 0, 0.25);
  transform: translateY(-2px);
}

.person-media {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
}

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

.person-role {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  border-top: 2px solid var(--nv-green);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--nv-green);
  letter-spacing: 0.05em;
}

.person-info {
  padding: 24px;
}

.person-info h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
  color: var(--nv-black);
}

.section-dark .person-info h3 {
  color: var(--nv-white);
}

.person-info .alias {
  font-size: 14px;
  font-weight: 400;
  color: var(--nv-gray-500);
  margin-bottom: 16px;
}

.section-dark .person-info .alias {
  color: var(--nv-gray-400);
}

.person-info .desc {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.67;
  color: var(--nv-gray-500);
  margin-bottom: 16px;
}

.section-dark .person-info .desc {
  color: var(--nv-gray-300);
}

.person-info .tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.person-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  border: 1px solid var(--nv-green);
  border-radius: 1px;
  color: var(--nv-green);
}

/* ===== Person Detail (full-width cards) ===== */
.person-detail {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 48px;
  align-items: start;
  background: var(--nv-white);
  border: 1px solid var(--nv-gray-border);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--nv-shadow);
  margin-bottom: 48px;
}

.section-dark .person-detail {
  background: var(--nv-near-black);
}

.person-detail.reverse {
  grid-template-columns: 1fr 400px;
}

.person-detail.reverse .pd-media {
  order: 2;
}

.pd-media {
  position: relative;
  height: 100%;
  min-height: 400px;
  overflow: hidden;
}

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

.pd-body {
  padding: 48px;
}

.pd-body h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
  color: var(--nv-black);
}

.section-dark .pd-body h2 {
  color: var(--nv-white);
}

.pd-body .alias {
  font-size: 16px;
  font-weight: 700;
  color: var(--nv-green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.pd-body .desc p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.67;
  margin-bottom: 16px;
  color: var(--nv-gray-500);
}

.section-dark .pd-body .desc p {
  color: var(--nv-gray-300);
}

.pd-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--nv-gray-border);
  border-radius: 2px;
}

.pd-spec {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pd-spec-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nv-green);
}

.pd-spec-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--nv-black);
}

.section-dark .pd-spec-value {
  color: var(--nv-white);
}

/* ===== Timeline / Events ===== */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--nv-green);
}

.tl-item {
  position: relative;
  margin-bottom: 48px;
}

.tl-dot {
  position: absolute;
  left: -40px;
  top: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--nv-green);
  border: 3px solid var(--nv-black);
  z-index: 2;
}

.section-light .tl-dot {
  border-color: var(--nv-white);
}

.tl-card {
  background: var(--nv-white);
  border: 1px solid var(--nv-gray-border);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--nv-shadow);
}

.section-dark .tl-card {
  background: var(--nv-near-black);
}

.tl-date {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nv-green);
}

.tl-card-body {
  padding: 24px;
}

.tl-card-body h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--nv-black);
}

.section-dark .tl-card-body h3 {
  color: var(--nv-white);
}

.tl-photo {
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 2px;
}

.tl-photo img {
  width: 100%;
  object-fit: cover;
}

.tl-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.tl-photos .tl-photo {
  margin-bottom: 0;
}

.tl-video {
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 2px;
}

.tl-card-body p {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.67;
  color: var(--nv-gray-500);
  margin-bottom: 12px;
}

.section-dark .tl-card-body p {
  color: var(--nv-gray-300);
}

.tl-note {
  font-size: 12px;
  font-weight: 400;
  color: var(--nv-gray-400);
  font-style: italic;
  margin-top: 8px;
}

.tl-future {
  text-align: center;
  padding: 32px;
  border: 2px dashed var(--nv-gray-border);
  border-radius: 2px;
}

.tl-future-text {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nv-gray-400);
}

.section-dark .tl-future-text {
  color: var(--nv-gray-300);
}

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--nv-gray-border);
  aspect-ratio: 4/3;
  cursor: pointer;
  display: block;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-cap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  border-top: 2px solid var(--nv-green);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--nv-white);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-item:hover .gallery-cap {
  opacity: 1;
}

/* Play badge on video items */
.gallery-item.video .video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: var(--nv-white);
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
  opacity: 0.95;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  pointer-events: none;
}

.gallery-item.video:hover .video-badge {
  background: var(--nv-green);
  border-color: var(--nv-green);
  color: var(--nv-black);
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox.closing {
  opacity: 0;
}

.lightbox img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border: 2px solid var(--nv-green);
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}

.lightbox video {
  max-width: 90%;
  max-height: 85vh;
  width: auto;
  height: auto;
  background: #000;
  border: 2px solid var(--nv-green);
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}

.lightbox-cap {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 700;
  color: var(--nv-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lightbox-count {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 700;
  color: var(--nv-green);
}

.lightbox-btn {
  position: absolute;
  background: transparent;
  border: 2px solid var(--nv-green);
  border-radius: 2px;
  color: var(--nv-white);
  font-size: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, scale 0.1s ease-out;
}

.lightbox-btn:hover {
  background: var(--nv-green);
  color: var(--nv-black);
}

.lightbox-close {
  top: 24px;
  right: 24px;
}

.lightbox-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

/* ===== Video Frame ===== */
.video-frame {
  position: relative;
  border: 2px solid var(--nv-green);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--nv-shadow);
}

.video-frame video {
  width: 100%;
  display: block;
}

.video-cap {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nv-gray-400);
  text-align: center;
}

/* ===== Quote Block ===== */
.quote-block {
  text-align: center;
  padding: 48px 24px;
  max-width: 800px;
  margin: 0 auto;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--nv-black);
  border-top: 2px solid var(--nv-green);
  border-bottom: 2px solid var(--nv-green);
}

.section-dark .quote-block {
  color: var(--nv-white);
}

/* ===== Figure Wide ===== */
.figure-wide {
  margin-top: 32px;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: var(--nv-shadow);
}

.figure-cap {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nv-gray-500);
}

.section-dark .figure-cap {
  color: var(--nv-gray-400);
}

/* ===== Footer ===== */
.footer {
  background: var(--nv-black);
  color: var(--nv-gray-300);
  padding: 64px 0 0;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--nv-white);
  margin-bottom: 16px;
}

.footer-brand .nav-brand-mark {
  width: 36px;
  height: 36px;
}

.footer p {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.67;
  margin-bottom: 12px;
}

.footer h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--nv-white);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--nv-gray-border);
}

.footer ul li {
  margin-bottom: 8px;
}

.footer ul li a {
  font-size: 14px;
  font-weight: 400;
  color: var(--nv-gray-300);
  transition: color 0.15s ease, scale 0.1s ease-out;
}

.footer ul li a:hover {
  color: var(--nv-green);
}

.footer-bottom {
  border-top: 1px solid var(--nv-gray-border);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 400;
  color: var(--nv-gray-500);
}

.footer-bottom a {
  color: var(--nv-gray-400);
}

.footer-bottom a:hover {
  color: var(--nv-green);
}

/* ===== Reveal Animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: flex;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #000000;
    z-index: 9999;
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--nv-green);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.33, 1, 0.68, 1), visibility 0.3s ease;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .feat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .people-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .hero-title {
    font-size: 48px;
  }

  .page-title {
    font-size: 36px;
  }

  .sec-title {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 48px 0;
  }

  .container {
    padding: 0 16px;
  }

  .hero {
    min-height: 480px;
  }

  .hero-inner {
    padding: 48px 16px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-sub {
    font-size: 18px;
  }

  .stats-band {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .feat-grid {
    grid-template-columns: 1fr;
  }

  .village-grid,
  .village-grid.reverse {
    grid-template-columns: 1fr;
    gap: 24px;
    direction: ltr;
  }

  .people-grid {
    grid-template-columns: 1fr;
  }

  .person-detail,
  .person-detail.reverse {
    grid-template-columns: 1fr;
  }

  .person-detail.reverse .pd-media {
    order: 0;
  }

  .pd-body {
    padding: 24px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .sec-title {
    font-size: 24px;
  }

  .sec-sub {
    font-size: 18px;
  }

  .tl-photos {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 375px) {
  .stats-band {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 28px;
  }
}

/* ============================================================
   Phase 1 - Interactions
   Boot sequence, scroll progress, back-to-top, ripple, count-up
   ============================================================ */

/* ===== Boot Sequence ===== */
body.boot-active {
  overflow: hidden;
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--nv-black);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.boot.fade {
  opacity: 0;
  visibility: hidden;
}

.boot-inner {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.9;
  color: var(--nv-green);
  padding: 28px 32px;
  border: 1px solid var(--nv-gray-border);
  border-radius: 2px;
  min-width: 400px;
  max-width: 90vw;
  background: rgba(118, 185, 0, 0.04);
}

.boot-line {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.boot-line.show {
  opacity: 1;
  transform: translateY(0);
}

.boot-tag {
  color: var(--nv-gray-400);
}

.boot-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--nv-green);
  vertical-align: -2px;
  margin-left: 2px;
  animation: boot-blink 0.8s steps(1) infinite;
}

@keyframes boot-blink {
  50% { opacity: 0; }
}

/* ===== Scroll Progress ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--nv-green);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 1100;
  pointer-events: none;
}

/* ===== Back to Top ===== */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  width: 48px;
  height: 48px;
  background: var(--nv-black);
  border: 2px solid var(--nv-green);
  border-radius: 2px;
  color: var(--nv-green);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.25s ease, background 0.15s ease, color 0.15s ease, scale 0.1s ease-out;
}

.to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--nv-green);
  color: var(--nv-black);
}

/* ===== Button Ripple ===== */
.btn {
  position: relative;
  overflow: hidden;
}

.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(118, 185, 0, 0.4);
  transform: scale(0);
  animation: btn-ripple 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes btn-ripple {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* ===== Count Up / Char Spark ===== */
.stat-value .stat-unit {
  font-size: 24px;
  margin-left: 4px;
}

.stat-char {
  opacity: 0.2;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.stat-char.on {
  opacity: 1;
  color: var(--nv-green);
}

/* ===== Nav Enhancement ===== */
.nav.scrolled {
  background: #000000;
  border-bottom-color: var(--nv-green);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

/* ===== Anchor offset for sticky nav ===== */
[id] {
  scroll-margin-top: 76px;
}

/* ===== Selection & Scrollbar ===== */
::selection {
  background: var(--nv-green);
  color: var(--nv-black);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--nv-black);
}

::-webkit-scrollbar-thumb {
  background: var(--nv-gray-border);
  border: 2px solid var(--nv-black);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--nv-green);
}

/* ===== Focus Visible ===== */
:focus-visible {
  outline: 2px solid var(--nv-green);
  outline-offset: 2px;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  .boot {
    display: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn .ripple {
    display: none;
  }
}

/* ============================================================
   Phase 2 - Components
   Tabs, collapsible timeline, gallery filter, terminal
   ============================================================ */

/* ===== Village Tabs ===== */
.tabs {
  background: var(--nv-black);
}

.tab-bar {
  display: flex;
  gap: 8px;
  padding: 0 24px;
  border-bottom: 1px solid var(--nv-gray-border);
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  position: relative;
  background: transparent;
  border: none;
  padding: 16px 20px 14px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--nv-gray-400);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, scale 0.1s ease-out;
}

.tab-btn::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--nv-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.tab-btn:hover {
  color: var(--nv-green);
}

.tab-btn.active {
  color: var(--nv-green);
}

.tab-btn.active::after {
  transform: scaleX(1);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: tab-in 0.35s ease;
}

@keyframes tab-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-panel-dark {
  background: var(--nv-black);
  color: var(--nv-white);
}

.tab-panel-dark .vg-body p,
.tab-panel-dark .figure-cap {
  color: var(--nv-gray-300);
}

.tab-panel-light {
  background: var(--nv-white);
  color: var(--nv-black);
}

/* ===== Collapsible Timeline ===== */
.tl-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--nv-green);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.tl-arrow {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin-right: 20px;
  border: 2px solid var(--nv-green);
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--nv-green);
  transition: transform 0.25s ease, background 0.15s ease, scale 0.1s ease-out;
  position: relative;
}

.tl-arrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
}

.tl-head:hover .tl-arrow {
  background: var(--nv-green);
  color: var(--nv-black);
}

.tl-item.open .tl-arrow {
  transform: rotate(180deg);
}

.tl-card-body {
  max-height: 0;
  overflow: hidden;
  padding: 0 24px;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.3s ease, padding 0.3s ease;
}

.tl-item.open .tl-card-body {
  max-height: 2400px;
  opacity: 1;
  padding: 24px;
}

/* ===== Gallery Filter ===== */
.gallery-filter {
  display: flex;
  gap: 8px;
  margin: 32px 0 24px;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--nv-gray-border);
  border-radius: 2px;
  color: var(--nv-gray-500);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, scale 0.1s ease-out;
}

.filter-btn:hover {
  border-color: var(--nv-green);
  color: var(--nv-green);
}

.filter-btn.active {
  background: var(--nv-green);
  border-color: var(--nv-green);
  color: var(--nv-black);
}

.gallery-item.filter-in {
  animation: filter-in 0.3s ease;
}

@keyframes filter-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== Terminal Component ===== */
.terminal {
  margin-top: 48px;
  background: #0d0d0d;
  border: 1px solid #262626;
  border-radius: 4px;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.8;
  color: var(--nv-green);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--nv-near-black);
  border-bottom: 1px solid var(--nv-gray-border);
}

.terminal-title {
  font-size: 12px;
  color: var(--nv-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  background: var(--nv-green);
  animation: boot-blink 1.2s steps(1) infinite;
}

.terminal-body {
  padding: 20px 24px;
}

.term-prompt {
  color: var(--nv-gray-300);
}

.term-line,
.term-more {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.term-line.show,
.term-more.show {
  opacity: 1;
  transform: translateY(0);
}

.term-more {
  display: none;
}

.term-more.show {
  display: block;
}

.term-status {
  color: var(--nv-yellow-light);
}

.term-muted {
  color: var(--nv-gray-400);
}

.terminal-body {
  padding: 20px 24px;
  max-height: 380px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.term-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--nv-green);
  font-family: inherit;
  font-size: 14px;
  caret-color: var(--nv-green);
  padding: 0;
}

.term-input::placeholder {
  color: var(--nv-gray-500);
}

.term-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.term-ready .term-input-row,
.term-ready .term-chips {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.term-chip {
  background: transparent;
  border: 1px solid var(--nv-gray-border);
  color: var(--nv-gray-400);
  font-family: inherit;
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, scale 0.1s ease-out;
}

.term-chip:hover {
  border-color: var(--nv-green);
  color: var(--nv-green);
  background: rgba(118, 185, 0, 0.1);
}

/* ============================================================
   Phase 3 - Motion
   Magnetic buttons, parallax grid, cursor glow, tilt
   ============================================================ */

/* ===== Magnetic Button Arrow ===== */
.hero-cta .btn::after {
  content: "→";
  margin-left: 8px;
  display: inline-block;
  transition: transform 0.15s ease;
}

.hero-cta .btn:hover::after {
  transform: translateX(4px);
}

/* ===== Parallax Background Scale ===== */
.hero-bg,
.page-banner .hero-bg {
  transform: scale(1.08);
}

/* ===== Hero / Banner Grid Overlay ===== */
.hero::before,
.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(118, 185, 0, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(118, 185, 0, 0.10) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ============================================================
   Phase 4 - Team Matrix Activate (people.html)
   Click to activate a person-detail card: green ring, top bar,
   ACTIVE tag, dim siblings, spec scan highlight. Keyboard nav.
   ============================================================ */
.person-detail {
  position: relative;
  cursor: pointer;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, scale 0.15s ease-out;
}

.person-detail:hover {
  border-color: var(--nv-green);
  box-shadow: 0 10px 30px rgba(118, 185, 0, 0.18);
}

.person-detail .pd-media img {
  transition: transform 0.5s ease;
}

.person-detail:hover .pd-media img {
  transform: scale(1.04);
}

.person-detail:focus-visible {
  outline: 2px solid var(--nv-green);
  outline-offset: 2px;
}

.person-detail.is-active:focus-visible {
  outline: none;
}

/* Active state: green ring + top bar (no layout shift) */
.person-detail.is-active {
  border-color: var(--nv-green);
  box-shadow: 0 0 0 2px var(--nv-green), 0 14px 36px rgba(118, 185, 0, 0.22);
}

.person-detail.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--nv-green);
  z-index: 2;
}

/* Dim sibling cards when one is active */
.has-active .person-detail:not(.is-active) {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.has-active .person-detail:not(.is-active):hover {
  opacity: 0.9;
}

/* ACTIVE tag (injected by JS) */
.pd-active-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nv-green);
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid var(--nv-green);
  border-radius: 1px;
}

.pd-active-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--nv-green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--nv-green);
}

/* Spec scan highlight (one-shot on activate) */
@keyframes pdSpecScan {
  0%   { background: rgba(118, 185, 0, 0.20); }
  100% { background: transparent; }
}

@media (prefers-reduced-motion: no-preference) {
  .person-detail.pd-spec-scan .pd-spec {
    animation: pdSpecScan 0.6s ease both;
  }
}

/* ============================================================
   Phase 5 - Apple Fluid Interactions
   Press feedback on pointer-down, spatial link affordances.
   Press uses the independent `scale` property so it composes
   with existing transforms (tilt, magnetic translate, hover).
   ============================================================ */

/* ===== Press Feedback (responds the instant the pointer goes down) ===== */
.btn:active,
.nav-toggle:active,
.term-chip:active,
.filter-btn:active,
.tab-btn:active,
.lightbox-btn:active,
.to-top:active {
  scale: 0.94;
}

.nav-links a:active,
.nav-brand:active,
.footer ul li a:active,
.footer-bottom a:active {
  scale: 0.96;
}

.tl-head:active .tl-arrow {
  scale: 0.88;
}

/* Cards: subtle physical press */
.feat-card:active,
.person-card:active,
.person-detail:active,
.gallery-item:active {
  scale: 0.985;
}

/* Elements without an existing transition list get one here */
.nav-toggle,
.nav-brand,
.footer-bottom a {
  transition: scale 0.1s ease-out, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.gallery-item {
  transition: scale 0.15s ease-out;
}

/* ===== Footer / external link affordances ===== */
.footer ul li a {
  position: relative;
}

.footer ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: var(--nv-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.footer ul li a:hover::after {
  transform: scaleX(1);
}

/* External links: arrow that hints "leaves the site" */
.footer a[target="_blank"]::after {
  content: "\2197";
  display: inline-block;
  margin-left: 4px;
  font-size: 0.85em;
  transition: translate 0.2s ease;
}

.footer a[target="_blank"]:hover::after {
  translate: 2px -2px;
}

/* ===== Reduced Motion: gentler equivalents, feedback kept ===== */
@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox img,
  .lightbox video,
  .nav-links,
  .to-top,
  .tl-card-body {
    transition-duration: 0.01s;
  }

  .to-top.visible {
    transform: none;
  }

  .hero-cta .btn::after {
    transition: none;
  }
}

/* ===== Rain (像素风绿色流星雨覆盖层) ===== */
.rain-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ============================================================
   Phase 8 - Interactive Temple (village.html · 土地庙)
   上香 / 放鞭炮 互动祈福场景
   ============================================================ */

/* ===== Container ===== */
.temple-interact {
  margin-top: 64px;
  padding: 48px 0;
}

.temple-head {
  text-align: center;
  margin-bottom: 32px;
}

.temple-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
  color: var(--nv-black);
}

.temple-sub {
  font-size: 16px;
  color: var(--nv-gray-500);
}

/* ===== Scene ===== */
.temple-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  background: #1a1a1a;
}

.temple-scene-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55) saturate(0.85);
}

.temple-scene-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 90%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
}

/* ===== Altar & Incense Burner ===== */
.temple-altar {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 170px;
  height: 165px;
  pointer-events: none;
  z-index: 3;
}

/* ===== Incense Burner (Bronze Tripod Censer) ===== */
.incense-burner {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 80px;
  pointer-events: none;
}

/* Top rim / lip — wider than body, bronze gradient */
.burner-lip {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 12px;
  background: linear-gradient(180deg,
    #d4af37 0%, #c9a84c 30%, #a8862e 60%, #8b6914 100%);
  border-radius: 6px 6px 3px 3px;
  box-shadow:
    inset 0 2px 3px rgba(255, 230, 120, 0.5),
    inset 0 -2px 3px rgba(60, 40, 10, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.4);
  z-index: 3;
}

/* Lip top opening (dark slot where incense goes in) */
.burner-lip::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 4px;
  background: #1a0e00;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Main body — bowl shape, curved gradient for 3D effect */
.burner-body {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 116px;
  height: 48px;
  background: linear-gradient(180deg,
    #a8862e 0%,
    #c9a84c 15%,
    #d4af37 30%,
    #b8941f 50%,
    #8b6914 75%,
    #6b4e1a 100%);
  border-radius: 0 0 58px 58px / 0 0 48px 48px;
  box-shadow:
    inset 0 4px 6px rgba(255, 220, 100, 0.3),
    inset 0 -6px 8px rgba(40, 25, 5, 0.4),
    0 3px 6px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

/* Decorative band around the body */
.burner-band {
  position: absolute;
  top: 14px;
  left: -3px;
  right: -3px;
  height: 10px;
  background: linear-gradient(180deg,
    #6b4e1a 0%,
    #8b6914 30%,
    #a8862e 50%,
    #8b6914 70%,
    #5a3e0a 100%);
  border-top: 1px solid #4a3208;
  border-bottom: 1px solid #4a3208;
  box-shadow:
    inset 0 1px 1px rgba(255, 200, 80, 0.2),
    inset 0 -1px 1px rgba(0, 0, 0, 0.3);
}

/* Side handles (耳) — curved protrusions left & right */
.burner-ear {
  position: absolute;
  top: 6px;
  width: 16px;
  height: 22px;
  border: 3px solid;
  border-color: #a8862e #6b4e1a transparent transparent;
  border-radius: 50%;
  z-index: 1;
}

.burner-ear-l {
  left: -14px;
  transform: rotate(-30deg);
}

.burner-ear-r {
  right: -14px;
  transform: scaleX(-1) rotate(-30deg);
}

/* Narrow base between body and legs */
.burner-base {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 10px;
  background: linear-gradient(180deg, #6b4e1a 0%, #4a3208 100%);
  border-radius: 4px;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

/* Three legs */
.burner-leg {
  position: absolute;
  bottom: 0;
  width: 8px;
  height: 14px;
  background: linear-gradient(180deg, #8b6914 0%, #5a3e0a 50%, #3d2807 100%);
  border-radius: 2px 2px 3px 3px;
  z-index: 1;
}

.burner-leg-l {
  left: 28px;
  transform: rotate(-6deg);
}

.burner-leg-c {
  left: 50%;
  transform: translateX(-50%);
}

.burner-leg-r {
  right: 28px;
  transform: rotate(6deg);
}

.incense-rack {
  position: absolute;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 4;
}

.incense-stick {
  position: relative;
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, #d4a040 0%, #b88330 40%, #8B4513 100%);
  border-radius: 1px;
  transform-origin: bottom center;
  transition: height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.incense-stick.lit {
  height: 70px;
}

.incense-stick::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: radial-gradient(circle, #ff6600 0%, #ff3300 60%, transparent 100%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease 0.4s;
}

.incense-stick.lit::before {
  opacity: 1;
  animation: incense-glow 1.5s ease-in-out infinite alternate;
}

@keyframes incense-glow {
  0% { transform: translateX(-50%) scale(1); box-shadow: 0 0 4px #ff6600; }
  100% { transform: translateX(-50%) scale(1.3); box-shadow: 0 0 10px #ff6600, 0 0 20px #ff3300; }
}

/* ===== Canvas (smoke & fireworks) ===== */
.temple-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* ===== Blessing Message ===== */
.temple-blessing {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -20px);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.temple-blessing.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.temple-blessing-text {
  font-size: 24px;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.05em;
  padding: 8px 24px;
}

.temple-blessing-sub {
  font-size: 14px;
  color: #ffcc66;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  margin-top: 4px;
}

/* ===== Action Buttons ===== */
.temple-actions {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.temple-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 700;
  border-width: 2px;
  border-radius: 2px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

#btnIncense {
  border-color: var(--nv-orange);
  color: var(--nv-orange);
}

#btnIncense:hover {
  background: var(--nv-orange);
  color: var(--nv-white);
  border-color: var(--nv-orange);
}

#btnFirecracker {
  border-color: var(--nv-red);
  color: var(--nv-red);
}

#btnFirecracker:hover {
  background: var(--nv-red);
  color: var(--nv-white);
  border-color: var(--nv-red);
}

.temple-btn-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  filter: brightness(1.1);
}

.temple-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Stats ===== */
.temple-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
  padding: 20px 32px;
  border: 1px solid var(--nv-gray-border);
  border-radius: 2px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  background: rgba(0, 0, 0, 0.02);
}

.temple-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.temple-stat-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--nv-green);
  font-family: "Consolas", monospace;
  transition: color 0.3s ease, transform 0.2s ease;
}

.temple-stat-num.bump {
  animation: stat-bump 0.4s ease;
}

@keyframes stat-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); color: var(--nv-orange); }
  100% { transform: scale(1); }
}

.temple-stat-unit {
  font-size: 16px;
  font-weight: 700;
  color: var(--nv-gray-500);
}

.temple-stat-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nv-gray-500);
  margin-left: 4px;
}

.temple-stat-sep {
  width: 1px;
  height: 32px;
  background: var(--nv-gray-border);
}

.temple-hint {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--nv-gray-400);
}

/* ===== Screen Shake ===== */
.temple-scene.shake {
  animation: temple-shake 0.5s ease;
}

@keyframes temple-shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-3px, 1px); }
  20% { transform: translate(3px, -1px); }
  30% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
  50% { transform: translate(-3px, -1px); }
  60% { transform: translate(3px, 1px); }
  70% { transform: translate(-1px, 2px); }
  80% { transform: translate(2px, -1px); }
  90% { transform: translate(-2px, 1px); }
}

/* ===== Firecracker String ===== */
.firecracker-string {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.firecracker-string.show {
  opacity: 1;
}

.firecracker-string .fc-rope {
  width: 2px;
  height: 20px;
  background: #8B0000;
}

.firecracker-string .fc-row {
  display: flex;
  gap: 4px;
}

.firecracker-string .fc-cracker {
  width: 10px;
  height: 18px;
  background: linear-gradient(180deg, #cc0000 0%, #8B0000 100%);
  border-radius: 2px;
  border: 1px solid #600000;
  position: relative;
}

.firecracker-string .fc-cracker::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 4px;
  background: #444;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .temple-title {
    font-size: 22px;
  }

  .temple-scene {
    aspect-ratio: 4/3;
  }

  .temple-altar {
    width: 130px;
    height: 130px;
  }

  .incense-burner {
    width: 100px;
    height: 62px;
  }

  .burner-lip {
    width: 100px;
    height: 10px;
  }

  .burner-body {
    top: 8px;
    width: 90px;
    height: 38px;
  }

  .burner-ear {
    top: 5px;
    width: 12px;
    height: 18px;
  }

  .burner-ear-l {
    left: -11px;
  }

  .burner-ear-r {
    right: -11px;
  }

  .burner-leg {
    width: 6px;
    height: 11px;
  }

  .burner-leg-l {
    left: 22px;
  }

  .burner-leg-r {
    right: 22px;
  }

  .burner-base {
    bottom: 11px;
    width: 54px;
    height: 8px;
  }

  .incense-rack {
    width: 60px;
    height: 60px;
    bottom: 58px;
  }

  .incense-stick.lit {
    height: 50px;
  }

  .temple-btn {
    padding: 12px 24px;
    font-size: 15px;
  }

  .temple-btn-icon {
    width: 22px;
    height: 22px;
  }

  .temple-blessing-text {
    font-size: 18px;
  }

  .temple-stats {
    padding: 16px 20px;
    gap: 16px;
  }

  .temple-stat-num {
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .incense-stick {
    transition: none;
  }

  .incense-stick.lit::before {
    animation: none;
  }

  .temple-scene.shake {
    animation: none;
  }

  .temple-stat-num.bump {
    animation: none;
  }
}

/* ============================================================
   Phase 8b - Temple Extras (签筒 · 铜钟 · 功德箱 · 显灵)
   ============================================================ */

/* ===== Qiuqian (签筒) ===== */
.temple-qiuqian {
  position: absolute;
  left: 10%;
  bottom: 22%;
  width: 60px;
  height: 96px;
  cursor: pointer;
  z-index: 4;
  pointer-events: auto;
}

.temple-qiuqian.shake {
  animation: qiuqian-shake 0.5s ease-in-out;
}

@keyframes qiuqian-shake {
  0% { transform: rotate(0); }
  20% { transform: rotate(-12deg); }
  40% { transform: rotate(10deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(5deg); }
  100% { transform: rotate(0); }
}

.qiuqian-tube {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 60px;
  background: linear-gradient(180deg, #c9893c 0%, #a86828 45%, #7c4a18 100%);
  border-radius: 4px 4px 8px 8px;
  border: 2px solid #5d3510;
  box-shadow:
    inset 0 3px 4px rgba(255, 220, 160, 0.3),
    inset 0 -4px 6px rgba(0, 0, 0, 0.35),
    0 4px 8px rgba(0, 0, 0, 0.4);
}

.qiuqian-tube::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 9px;
  background: linear-gradient(180deg, #d8a05a 0%, #a86828 100%);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.qiuqian-stick {
  position: absolute;
  bottom: 12px;
  left: 50%;
  width: 4px;
  height: 62px;
  background: linear-gradient(180deg, #f3d9a4 0%, #d9a95c 100%);
  border-radius: 2px;
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(var(--r, 0deg));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.qiuqian-stick-1 { --r: -16deg; left: 38%; }
.qiuqian-stick-2 { --r: 0deg; }
.qiuqian-stick-3 { --r: 16deg; left: 62%; }

.qiuqian-draw {
  position: absolute;
  bottom: 68px;
  left: 50%;
  transform: translate(-50%, 0) rotate(-8deg);
  width: 10px;
  height: 96px;
  background: linear-gradient(180deg, #f7e3b8 0%, #e0b46a 100%);
  border: 1px solid #a87c38;
  border-radius: 5px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 6;
  pointer-events: none;
}

.qiuqian-draw.show {
  opacity: 1;
  transform: translate(-50%, -16px) rotate(-8deg);
}

.qiuqian-draw-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  white-space: nowrap;
  font-size: 11px;
  color: #6b3f10;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* ===== Bell (铜钟) ===== */
.temple-bell {
  position: absolute;
  right: 7%;
  top: 12%;
  width: 64px;
  height: 88px;
  cursor: pointer;
  z-index: 4;
  pointer-events: auto;
  transform-origin: top center;
}

.temple-bell.ringing {
  animation: bell-swing 0.55s ease-in-out 2;
}

@keyframes bell-swing {
  0% { transform: rotate(0); }
  20% { transform: rotate(-15deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(5deg); }
  100% { transform: rotate(0); }
}

.bell-hanger {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 16px;
  background: linear-gradient(180deg, #8b6914 0%, #5a3e0a 100%);
  border-radius: 2px;
  z-index: 2;
}

.bell-hanger::before {
  content: "";
  position: absolute;
  top: -6px;
  left: -26px;
  width: 60px;
  height: 6px;
  background: linear-gradient(180deg, #6b4e1a 0%, #3d2807 100%);
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.bell-body {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 54px;
  height: 60px;
  background: radial-gradient(ellipse at 35% 22%, #e8c84a 0%, #c9a84c 30%, #a8862e 55%, #6b4e1a 90%);
  border-radius: 50% 50% 42% 42% / 28% 28% 58% 58%;
  box-shadow:
    inset 0 -6px 10px rgba(30, 18, 2, 0.5),
    inset 0 3px 5px rgba(255, 230, 130, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.bell-body::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 9px;
  background: linear-gradient(180deg, #6b4e1a 0%, #4a3208 100%);
  border-radius: 0 0 50% 50%;
}

.bell-clapper {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 15px;
  background: radial-gradient(circle at 40% 30%, #c9a84c 0%, #7c5a1c 70%);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  z-index: 1;
}


/* ===== Epiphany (土地公显灵) ===== */
.temple-epiphany {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(255, 215, 0, 0.32) 0%, rgba(255, 180, 40, 0.12) 40%, transparent 70%),
    linear-gradient(180deg, rgba(255, 220, 120, 0.18) 0%, transparent 45%);
  opacity: 0;
  pointer-events: none;
  z-index: 8;
}

.temple-epiphany.show {
  animation: epiphany-pulse 2.6s ease;
}

@keyframes epiphany-pulse {
  0% { opacity: 0; }
  15% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

.epiphany-text {
  font-size: 26px;
  font-weight: 800;
  color: #ffe89a;
  letter-spacing: 0.12em;
  text-shadow:
    0 0 18px rgba(255, 215, 0, 0.9),
    0 0 40px rgba(255, 180, 40, 0.6),
    0 2px 10px rgba(0, 0, 0, 0.7);
  animation: epiphany-text-rise 2.6s ease;
}

@keyframes epiphany-text-rise {
  0% { opacity: 0; transform: translateY(14px) scale(0.92); }
  20% { opacity: 1; transform: translateY(0) scale(1); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-6px) scale(1.02); }
}

/* ===== New action buttons ===== */
#btnQiuqian {
  border-color: #b8860b;
  color: #b8860b;
}

#btnQiuqian:hover {
  background: #b8860b;
  color: var(--nv-white);
  border-color: #b8860b;
}

#btnBell {
  border-color: #8b6914;
  color: #8b6914;
}

#btnBell:hover {
  background: #8b6914;
  color: var(--nv-white);
  border-color: #8b6914;
}

#btnDonate {
  border-color: #a8862e;
  color: #a8862e;
}

#btnDonate:hover {
  background: #a8862e;
  color: var(--nv-white);
  border-color: #a8862e;
}

/* ===== Stats — fit 5 items ===== */
.temple-stats {
  max-width: 680px;
  flex-wrap: wrap;
}

/* ===== Responsive (temple extras) ===== */
@media (max-width: 768px) {
  .temple-qiuqian {
    left: 6%;
    bottom: 18%;
    width: 46px;
    height: 74px;
  }

  .qiuqian-tube {
    width: 32px;
    height: 48px;
  }

  .qiuqian-stick {
    height: 48px;
    bottom: 10px;
  }

  .qiuqian-draw {
    bottom: 52px;
    height: 76px;
  }

  .temple-bell {
    right: 4%;
    top: 8%;
    width: 48px;
    height: 68px;
  }

  .bell-body {
    width: 42px;
    height: 48px;
  }

  .bell-hanger::before {
    width: 48px;
    left: -20px;
  }

  .bell-clapper {
    top: 44px;
  }

  .temple-box {
    right: 8%;
    bottom: 16%;
    width: 52px;
    height: 58px;
  }

  .box-label {
    font-size: 12px;
    top: 22px;
  }

  .box-slot {
    width: 24px;
  }

  .epiphany-text {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .temple-qiuqian.shake,
  .temple-bell.ringing,
  .temple-box.glow,
  .temple-epiphany.show {
    animation: none;
  }

  .donate-coin.falling {
    animation: none;
    opacity: 0;
  }

  .qiuqian-draw {
    transition: none;
  }

  .epiphany-text {
    animation: none;
    opacity: 1;
  }
}

/* ===== Temple keepsakes — lacquer, aged bronze and bamboo ===== */
.temple-qiuqian,
.temple-bell,
.temple-box {
  filter: drop-shadow(0 10px 10px rgba(15, 7, 2, 0.42));
  transition: filter 0.22s ease, transform 0.22s ease;
}

.temple-qiuqian:hover,
.temple-qiuqian:focus-visible,
.temple-bell:hover,
.temple-bell:focus-visible,
.temple-box:hover,
.temple-box:focus-visible {
  filter: brightness(1.13) drop-shadow(0 12px 14px rgba(15, 7, 2, 0.56));
}

/* 签盒：深色竹编签筒，配以铜边和木制题签。 */
.temple-qiuqian {
  left: 8%;
  bottom: 13%;
  width: 76px;
  height: 132px;
}

.temple-qiuqian:hover { transform: translateY(-4px); }

.qiuqian-tube {
  width: 58px;
  height: 82px;
  border: 3px solid #3e1b0b;
  border-radius: 8px 8px 13px 13px;
  background:
    linear-gradient(90deg, rgba(255, 222, 142, 0.2), transparent 15%, rgba(20, 5, 0, 0.18) 56%, transparent 76%),
    repeating-linear-gradient(90deg, #7c3618 0 5px, #a85124 5px 9px, #702c12 9px 12px);
  box-shadow: inset 0 3px 0 rgba(255, 219, 145, 0.28), inset 0 -10px 12px rgba(33, 9, 1, 0.42);
}

.qiuqian-tube::before {
  content: "灵签";
  position: absolute;
  left: 50%;
  top: 29px;
  transform: translateX(-50%);
  padding: 3px 4px 2px;
  border: 1px solid #e1b85d;
  color: #ffe6a3;
  background: #6e1f0e;
  font: 700 11px/1 "Microsoft YaHei", sans-serif;
  letter-spacing: 0.12em;
  text-shadow: 0 1px #3a0c03;
}

.qiuqian-tube::after {
  width: 64px;
  height: 13px;
  top: -7px;
  border: 2px solid #4b200d;
  background: radial-gradient(ellipse at 50% 35%, #d78b45 0 27%, #8a3d1d 62%, #4f1e0c 100%);
  box-shadow: inset 0 2px 2px rgba(255, 231, 164, 0.35), 0 3px 5px rgba(24, 8, 2, 0.42);
}

.qiuqian-stick {
  width: 6px;
  height: 78px;
  bottom: 14px;
  border-radius: 3px 3px 1px 1px;
  border: 1px solid rgba(92, 45, 12, 0.72);
  background: linear-gradient(90deg, #a75f25, #f4cc7b 37%, #d58c3f 70%, #814015);
  box-shadow: 1px 0 2px rgba(33, 9, 1, 0.35);
}

.qiuqian-stick-1 { --r: -14deg; left: 35%; }
.qiuqian-stick-2 { --r: 2deg; }
.qiuqian-stick-3 { --r: 17deg; left: 66%; }

.qiuqian-draw {
  bottom: 88px;
  width: 16px;
  height: 104px;
  border: 1px solid #8f4b18;
  border-radius: 2px;
  background: repeating-linear-gradient(180deg, #f7d690 0 10px, #e5b765 10px 12px);
  box-shadow: 0 4px 11px rgba(20, 6, 1, 0.56);
}

.qiuqian-draw-text {
  color: #73200b;
  font-size: 12px;
  text-shadow: 0 1px rgba(255, 241, 197, 0.6);
}

/* 铜钟：木梁、吊环、钟身和钟舌分层呈现。 */
.temple-bell {
  right: 6%;
  top: 7%;
  width: 90px;
  height: 126px;
}

.temple-bell:hover { transform: translateY(-3px); }

.bell-hanger {
  width: 10px;
  height: 24px;
  border: 1px solid #4b260b;
  border-radius: 4px;
  background: linear-gradient(90deg, #5f2c0e, #bb7a2c 46%, #642d0d);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.38);
}

.bell-hanger::before {
  top: -8px;
  left: -39px;
  width: 86px;
  height: 11px;
  border: 2px solid #3c1e09;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, #49210b 0 10px, #713818 10px 14px, #3b1a08 14px 20px);
  box-shadow: inset 0 1px rgba(240, 181, 91, 0.22), 0 3px 5px rgba(0, 0, 0, 0.42);
}

.bell-body {
  top: 21px;
  width: 72px;
  height: 78px;
  border: 2px solid #5a350b;
  border-radius: 50% 50% 39% 39% / 24% 24% 62% 62%;
  background:
    radial-gradient(circle at 50% 48%, transparent 0 13px, rgba(80, 43, 7, 0.76) 14px 15px, transparent 16px),
    radial-gradient(ellipse at 32% 19%, #ffe29a 0, #d6a63e 22%, #9c681c 56%, #4b2908 100%);
  box-shadow: inset 8px 0 14px rgba(255, 232, 148, 0.12), inset -10px -12px 14px rgba(37, 19, 2, 0.52), 0 5px 10px rgba(0, 0, 0, 0.4);
}

.bell-body::before {
  content: "福";
  position: absolute;
  top: 21px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  border: 1px solid rgba(86, 47, 7, 0.74);
  border-radius: 50%;
  color: #5a3307;
  font: 700 15px/24px "Microsoft YaHei", sans-serif;
  text-align: center;
  text-shadow: 0 1px rgba(255, 235, 164, 0.42);
}

.bell-body::after {
  bottom: -6px;
  width: 67px;
  height: 13px;
  border: 2px solid #573109;
  background: linear-gradient(180deg, #d5a743, #7b4b10 70%, #4b2806);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.34);
}

.bell-clapper {
  top: 86px;
  width: 16px;
  height: 20px;
  border: 1px solid #55320d;
  background: radial-gradient(circle at 35% 27%, #f0cc72, #a66f1e 52%, #53300b 100%);
}

.bell-clapper::before {
  content: "";
  position: absolute;
  bottom: 16px;
  left: 50%;
  width: 2px;
  height: 20px;
  transform: translateX(-50%);
  background: #5c3108;
}

/* 功德箱：朱漆木箱加鎏金包角与题字牌。 */
.temple-box {
  position: absolute;
  right: 10%;
  bottom: 13%;
  width: 94px;
  height: 98px;
  cursor: pointer;
  z-index: 4;
  pointer-events: auto;
}

.temple-box:hover { transform: translateY(-4px); }

.temple-box::before {
  content: "";
  position: absolute;
  inset: 7px 2px 0;
  border: 3px solid #4a190b;
  border-radius: 5px 5px 9px 9px;
  background:
    linear-gradient(90deg, rgba(255, 213, 109, 0.18), transparent 17%, rgba(50, 4, 0, 0.18) 58%, transparent 77%),
    linear-gradient(180deg, #a8381f 0 14%, #6c1c10 16% 80%, #461209 100%);
  box-shadow: inset 0 3px rgba(255, 199, 91, 0.25), inset 0 -8px 11px rgba(30, 3, 0, 0.5), 0 6px 10px rgba(0, 0, 0, 0.38);
}

/* ::after removed — gold bottom decoration looked like a stuck coin */

.box-slot {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 8px;
  border: 2px solid #9a6718;
  border-radius: 2px;
  background: #170602;
  box-shadow: inset 0 2px 3px #000, 0 1px rgba(255, 226, 133, 0.45);
}

.box-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 38px;
  padding: 3px 5px 2px 8px;
  border: 1px solid #d8ab45;
  color: #ffe6a1;
  background: #7c210f;
  font-size: 14px;
  letter-spacing: 0.28em;
  line-height: 1.1;
  text-shadow: 0 1px #4a0b04;
  box-shadow: inset 0 1px rgba(255, 225, 145, 0.28);
}

.donate-coin {
  position: absolute;
  top: -30px;
  left: 50%;
  width: 27px;
  height: 27px;
  border: 2px solid #805411;
  color: #764208;
  background: radial-gradient(circle at 35% 28%, #fff1ad, #e2ad3f 47%, #81510e 100%);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  z-index: 6;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
}

.temple-box.glow {
  animation: box-glow 0.6s ease;
}

@keyframes box-glow {
  0% { filter: brightness(1); }
  40% { filter: brightness(1.9) drop-shadow(0 0 14px rgba(255, 215, 0, 0.9)); }
  100% { filter: brightness(1); }
}

.donate-coin.falling {
  animation: coin-drop 0.8s ease-in forwards;
}

@keyframes coin-drop {
  0% { opacity: 1; transform: translate(-50%, 0) rotate(0); }
  40% { opacity: 1; transform: translate(-50%, 18px) rotate(200deg); }
  100% { opacity: 0; transform: translate(-50%, 34px) rotate(540deg) scale(0.55); }
}

@media (max-width: 768px) {
  .temple-qiuqian { left: 5%; bottom: 12%; width: 54px; height: 98px; }
  .qiuqian-tube { width: 42px; height: 60px; }
  .qiuqian-tube::before { top: 19px; font-size: 9px; }
  .qiuqian-tube::after { width: 47px; }
  .qiuqian-stick { width: 4px; height: 59px; bottom: 10px; }
  .qiuqian-draw { bottom: 64px; width: 12px; height: 78px; }

  .temple-bell { right: 3%; top: 5%; width: 61px; height: 88px; }
  .bell-hanger { height: 17px; }
  .bell-hanger::before { left: -27px; width: 60px; height: 8px; }
  .bell-body { top: 16px; width: 51px; height: 57px; }
  .bell-body::before { top: 15px; width: 18px; height: 18px; font-size: 12px; line-height: 18px; }
  .bell-body::after { width: 47px; height: 9px; }
  .bell-clapper { top: 62px; width: 12px; height: 15px; }
  .bell-clapper::before { bottom: 12px; height: 14px; }

  .temple-box { right: 6%; bottom: 11%; width: 65px; height: 70px; }
  .temple-box::before { inset: 5px 1px 0; border-width: 2px; }
  .box-slot { top: 9px; width: 34px; height: 6px; border-width: 1px; }
  .box-label { top: 27px; padding: 2px 3px 1px 5px; font-size: 11px; }
  .donate-coin { top: -24px; width: 22px; height: 22px; }
}

/* ============================================================
   Phase 8c - 观音灵签 100 签 · 解签弹窗
   ============================================================ */

.lot-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.lot-modal.open {
  opacity: 1;
  visibility: visible;
}

.lot-modal.closing {
  opacity: 0;
}

body.lot-modal-open {
  overflow: hidden;
}

.lot-modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--nv-near-black);
  border: 2px solid var(--nv-green);
  border-radius: 2px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  padding: 32px 32px 28px;
  color: var(--nv-white);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.22s ease;
}

.lot-modal.open .lot-modal-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.lot-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--nv-gray-border);
  border-radius: 2px;
  color: var(--nv-white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lot-modal-close:hover {
  background: var(--nv-green);
  border-color: var(--nv-green);
  color: var(--nv-black);
}

/* ===== Head ===== */
.lot-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--nv-gray-border);
  margin-bottom: 20px;
}

.lot-badge {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 10px 12px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  border-radius: 2px;
  background: var(--nv-gray-500);
}

.lot-badge-best { background: var(--nv-red); box-shadow: 0 0 18px rgba(229, 32, 32, 0.45); }
.lot-badge-good { background: var(--nv-orange); box-shadow: 0 0 18px rgba(223, 101, 0, 0.4); }
.lot-badge-mid  { background: var(--nv-green); box-shadow: 0 0 18px rgba(118, 185, 0, 0.4); }
.lot-badge-low  { background: var(--nv-gray-500); }

.lot-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.lot-palace {
  margin-top: 4px;
  font-size: 13px;
  color: var(--nv-gray-300);
  letter-spacing: 0.1em;
}

/* ===== Poem ===== */
.lot-poem {
  background: #101010;
  border-left: 3px solid var(--nv-green);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.lot-poem p {
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: 0.12em;
  color: var(--nv-yellow-light);
}

/* ===== ShiYi / Jie / Whole / Story ===== */
.lot-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.lot-detail-block {
  border: 1px solid var(--nv-gray-border);
  border-radius: 2px;
  padding: 14px 16px;
}

.lot-standalone {
  margin-bottom: 16px;
}

.lot-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nv-green);
  margin-bottom: 8px;
}

.lot-text {
  font-size: 14px;
  line-height: 1.85;
  color: var(--nv-white);
  white-space: pre-line;
}

/* ===== Essence highlight bar ===== */
.lot-essence {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  background: #101010;
  border-left: 3px solid var(--nv-green);
  border-radius: 2px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.lot-essence .lot-label {
  margin-bottom: 0;
}

.lot-essence-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--nv-yellow-light);
  letter-spacing: 0.04em;
  line-height: 1.7;
}

/* ===== Xianji grid ===== */
.lot-xianji {
  margin-bottom: 24px;
}

.lot-xianji-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.lot-xianji-item {
  border: 1px solid var(--nv-gray-border);
  border-radius: 2px;
  padding: 10px 8px;
  text-align: center;
}

.lot-xianji-key {
  display: block;
  font-size: 12px;
  color: var(--nv-gray-300);
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.lot-xianji-val {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--nv-yellow-light);
}

/* ===== Actions ===== */
.lot-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lot-btn {
  border-color: var(--nv-green);
  color: var(--nv-white);
  text-transform: none;
  font-size: 15px;
}

.lot-btn:hover {
  background: var(--nv-green);
  border-color: var(--nv-green);
  color: var(--nv-black);
}

.lot-btn-ghost {
  border-color: var(--nv-gray-border);
  color: var(--nv-gray-300);
}

.lot-btn-ghost:hover {
  background: var(--nv-gray-border);
  border-color: var(--nv-gray-border);
  color: var(--nv-white);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .lot-modal-panel { padding: 24px 18px 20px; }
  .lot-head { gap: 12px; }
  .lot-badge { min-width: 60px; font-size: 15px; padding: 8px 10px; }
  .lot-title { font-size: 18px; }
  .lot-detail { grid-template-columns: 1fr; }
  .lot-xianji-grid { grid-template-columns: repeat(2, 1fr); }
  .lot-poem p { font-size: 15px; }
}
