/* ═══════════════════════════════════════════════════════════════
   BREATHE SPACE — Cyber-Jungle Design System
   Aesthetic: Underground botanical vault × brutalist tech
   ═══════════════════════════════════════════════════════════════ */

/* — Fonts — 
   Cosi Azure (display) → substituted with Instrument Serif (rare, high-contrast)
   Input Mono (body/UI) → substituted with IBM Plex Mono (industrial, technical) */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ── Design Tokens ── */
:root {
  --vault-black: #0A0A0A;
  --vault-deep: #060606;
  --chlorophyll: #39FF14;
  --chlorophyll-dim: #1a8a0a;
  --chlorophyll-glow: rgba(57, 255, 20, 0.15);
  --chlorophyll-bright: rgba(57, 255, 20, 0.6);
  --oxidized-steel: #4A4E51;
  --steel-light: #6B7074;
  --steel-dark: #2A2D2F;
  --ultraviolet: #7B2CBF;
  --uv-glow: rgba(123, 44, 191, 0.2);
  --uv-dim: #4a1a73;

  --font-display: 'Instrument Serif', 'Georgia', serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --space-2xl: 12rem;

  --border-steel: 1px solid var(--oxidized-steel);
  --border-neon: 1px solid var(--chlorophyll);
  --glow-neon: 0 0 20px var(--chlorophyll-glow), 0 0 60px rgba(57, 255, 20, 0.05);
  --glow-uv: 0 0 30px var(--uv-glow), 0 0 80px rgba(123, 44, 191, 0.08);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--chlorophyll-dim) var(--vault-black);
}

body {
  background: var(--vault-black);
  color: var(--steel-light);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: default;
}

::selection {
  background: var(--chlorophyll);
  color: var(--vault-black);
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--vault-black); }
::-webkit-scrollbar-thumb { background: var(--chlorophyll-dim); border-radius: 2px; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--chlorophyll); text-decoration: none; transition: all 0.3s ease; }
a:hover { text-shadow: 0 0 12px var(--chlorophyll-glow); }

/* ── Smooth Scroll Wrapper ── */
#smooth-wrapper { overflow: hidden; }
#smooth-content { will-change: transform; }

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  mix-blend-mode: difference;
  pointer-events: none;
}

.nav > * { pointer-events: auto; }

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  letter-spacing: 0.05em;
}

.nav__logo span {
  color: var(--chlorophyll);
  font-style: italic;
}

.nav__links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.nav__links a {
  color: #fff;
  position: relative;
  padding-bottom: 4px;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--chlorophyll);
  transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav__links a:hover::after { width: 100%; }

/* ── SECTION 1: THE DESCENT (Hero) ── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: brightness(0.35) contrast(1.2) saturate(0.8);
  transform: scale(1.1);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(57, 255, 20, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 30%, rgba(123, 44, 191, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.3) 0%, rgba(10, 10, 10, 0.1) 40%, rgba(10, 10, 10, 0.85) 100%);
  z-index: 1;
}

/* Noise grain texture */
.hero__noise {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 3;
  max-width: 900px;
}

.hero__tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--chlorophyll);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.hero__tag::before {
  content: '';
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--chlorophyll);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 0.95;
  color: #fff;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.hero__title em {
  font-style: italic;
  color: var(--chlorophyll);
  text-shadow: 0 0 40px var(--chlorophyll-glow);
}

.hero__subtitle {
  font-size: 0.85rem;
  color: var(--steel-light);
  max-width: 500px;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  border: var(--border-neon);
  color: var(--chlorophyll);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
}

.hero__cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--chlorophyll);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: -1;
}

.hero__cta:hover {
  color: var(--vault-black);
  text-shadow: none;
}

.hero__cta:hover::before { transform: translateY(0); }

.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--oxidized-steel);
  writing-mode: vertical-rl;
}

.hero__scroll-indicator::after {
  content: '';
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--chlorophyll), transparent);
  animation: pulse-line 2s ease-in-out infinite;
}

@keyframes pulse-line {
  0%, 100% { opacity: 0.3; height: 40px; }
  50% { opacity: 1; height: 60px; }
}

/* ── SECTION 2: THE INFRASTRUCTURE ── */
.infrastructure {
  position: relative;
  padding: var(--space-2xl) 0;
  overflow: hidden;
}

.infrastructure__diagonal {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 80vh;
  gap: 0;
}

.infrastructure__visual {
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
}

.infrastructure__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7) contrast(1.1);
}

.infrastructure__visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.15), transparent 60%);
  mix-blend-mode: screen;
}

.infrastructure__data {
  padding: var(--space-xl) var(--space-md) var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--chlorophyll);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--chlorophyll);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: #fff;
  line-height: 1.1;
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

.section-title em {
  font-style: italic;
  color: var(--chlorophyll);
}

.spec-list {
  list-style: none;
  border-top: var(--border-steel);
}

.spec-list__item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-sm) 0;
  border-bottom: var(--border-steel);
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.spec-list__item:hover {
  padding-left: var(--space-sm);
  border-bottom-color: var(--chlorophyll-dim);
}

.spec-list__key {
  color: var(--oxidized-steel);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.65rem;
}

.spec-list__value {
  color: #fff;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.spec-list__value--neon { color: var(--chlorophyll); }

/* ── SECTION 3: ATMOSPHERIC DATA ── */
.atmospheric {
  position: relative;
  padding: var(--space-2xl) var(--space-md);
  border-top: var(--border-steel);
  border-bottom: var(--border-steel);
}

.atmospheric__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.atmospheric__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  max-width: 1200px;
  margin: 0 auto;
}

.data-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--steel-dark);
  padding: var(--space-lg) var(--space-md);
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.data-card:hover {
  border-color: var(--chlorophyll-dim);
  background: rgba(57, 255, 20, 0.02);
}

.data-card__label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--oxidized-steel);
  margin-bottom: var(--space-sm);
}

.data-card__value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: #fff;
  line-height: 1;
  margin-bottom: var(--space-xs);
  font-variant-numeric: tabular-nums;
}

.data-card__value span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--oxidized-steel);
  margin-left: 4px;
}

.data-card__status {
  font-size: 0.65rem;
  color: var(--chlorophyll);
  display: flex;
  align-items: center;
  gap: 6px;
}

.data-card__status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chlorophyll);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* SVG Graph */
.data-card__graph {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  opacity: 0.15;
}

.data-card__graph svg {
  width: 100%;
  height: 100%;
}

.graph-line {
  fill: none;
  stroke: var(--chlorophyll);
  stroke-width: 1.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px var(--chlorophyll-glow));
}

.graph-line--uv {
  stroke: var(--ultraviolet);
  filter: drop-shadow(0 0 4px var(--uv-glow));
}

.graph-area {
  fill: url(#neonGradient);
  opacity: 0.3;
}

/* ── SECTION 4: THE GALLERY (Horizontal Tunnel) ── */
.gallery {
  position: relative;
  overflow: hidden;
  border-bottom: var(--border-steel);
}

.gallery__header {
  padding: var(--space-xl) var(--space-md) var(--space-lg);
}

.gallery__tunnel {
  display: flex;
  gap: 2px;
  width: max-content;
  padding-bottom: var(--space-lg);
}

.gallery__item {
  width: 40vw;
  min-width: 400px;
  height: 55vh;
  min-height: 400px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6) saturate(0.9);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery__item:hover img {
  filter: brightness(0.8) saturate(1.1);
  transform: scale(1.05);
}

.gallery__item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 10, 10, 0.9) 100%);
  z-index: 1;
}

.gallery__item-info {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  z-index: 2;
}

.gallery__item-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 4px;
}

.gallery__item-meta {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--chlorophyll);
}

.gallery__item-index {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 2;
  font-size: 0.6rem;
  color: var(--oxidized-steel);
  letter-spacing: 0.1em;
}

/* ── SECTION 5: THE SEAL (Footer) ── */
.seal {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  overflow: hidden;
}

.seal__door {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.seal__door-top,
.seal__door-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  background: var(--vault-deep);
  border: none;
  transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
}

.seal__door-top {
  top: 0;
  border-bottom: 2px solid var(--oxidized-steel);
  transform: translateY(-100%);
}

.seal__door-bottom {
  bottom: 0;
  border-top: 2px solid var(--oxidized-steel);
  transform: translateY(100%);
}

.seal.is-closing .seal__door-top { transform: translateY(0); }
.seal.is-closing .seal__door-bottom { transform: translateY(0); }

.seal__content {
  position: relative;
  z-index: 1;
}

.seal__logo {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 14rem);
  color: #fff;
  line-height: 0.85;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
  opacity: 0.08;
  transition: opacity 0.6s ease;
}

.seal:hover .seal__logo { opacity: 0.15; }

.seal__tagline {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--oxidized-steel);
  margin-bottom: var(--space-xl);
}

.seal__links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.seal__links a { color: var(--oxidized-steel); }
.seal__links a:hover { color: var(--chlorophyll); }

.seal__bottom {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  right: var(--space-md);
  display: flex;
  justify-content: space-between;
  z-index: 1;
  font-size: 0.6rem;
  color: var(--steel-dark);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* ── SVG Flashlight Cursor Mask ── */
.flashlight-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.flashlight-active .flashlight-mask { opacity: 1; }

/* ── Glitch / Scramble Text ── */
.scramble-text {
  opacity: 0;
  transform: translateY(20px);
}

.scramble-text.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Utility: Neon Glow Pulse ── */
.neon-pulse {
  animation: neon-breathe 4s ease-in-out infinite;
}

@keyframes neon-breathe {
  0%, 100% { text-shadow: 0 0 10px var(--chlorophyll-glow); }
  50% { text-shadow: 0 0 30px var(--chlorophyll-bright), 0 0 60px var(--chlorophyll-glow); }
}

/* ── Global Noise Overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .infrastructure__diagonal {
    grid-template-columns: 1fr;
  }
  .infrastructure__visual {
    clip-path: none;
    height: 50vh;
  }
  .infrastructure__data {
    padding: var(--space-lg) var(--space-md);
  }
  .atmospheric__grid {
    grid-template-columns: 1fr;
  }
  .gallery__item {
    width: 80vw;
    min-width: 300px;
  }
}

@media (max-width: 640px) {
  .nav__links { display: none; }
  .hero__title { font-size: clamp(2.2rem, 10vw, 4rem); }
  .seal__logo { font-size: clamp(3rem, 18vw, 8rem); }
  .seal__links { flex-direction: column; gap: var(--space-sm); }
}
