/* ============================================================
   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;
  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;
  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;
}

.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;
}

.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;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border: 2px solid var(--nv-green);
  border-radius: 2px;
}

.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;
}

.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;
}

.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: none;
    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);
  }

  .nav-links.open {
    display: flex;
  }

  .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.25s ease, visibility 0.25s ease, background 0.15s ease, color 0.15s ease;
}

.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;
}

.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;
  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.45s ease, 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;
}

.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;
}

.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;
}

.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;
  }
}
