/* ===================================================
   chika.trade — Y2K Forest Night Terminal
   Colors: Forest-Green Palette + Chrome Bevel
   =================================================== */

/* --- Google Fonts loaded via index.html --- */

/* --- CSS Custom Properties --- */
:root {
  --color-void:         #0A1A0A;
  --color-floor:        #0D1F0D;
  --color-terminal:     #091409;
  --color-dark-alt:     #0D3A0D;
  --color-midtone:      #2D5A2D;
  --color-phosphor:     #4ADE80;
  --color-signal:       #57E872;
  --color-canopy:       #A7C4A7;
  --color-ghost:        #E8F5E8;
  --color-chrome-hi:    #C8DFC8;
  --color-chrome-shadow:#1A3A1A;
  --color-chrome-label: #C8E6C9;

  --font-display: 'Barlow Condensed', sans-serif;
  --font-sub:     'Rajdhani', sans-serif;
  --font-mono:    'Roboto Mono', monospace;
  --font-accent:  'Orbitron', sans-serif;
}

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

html {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100%;
  background: var(--color-void);
}

body {
  font-family: var(--font-mono);
  background: var(--color-void);
  color: var(--color-canopy);
  height: 100%;
  overflow-x: hidden;
}

/* --- Panel Base --- */
.panel {
  position: relative;
  scroll-snap-align: start;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 32px;
}

/* Make scroll snap work across full width */
@supports (scroll-snap-type: y mandatory) {
  html {
    scroll-snap-type: y mandatory;
  }
  .panel {
    scroll-snap-align: start;
    height: 100vh;
    min-height: 100vh;
  }
}

/* --- Scanline Overlay --- */
.panel__scanline {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 3px
  );
  pointer-events: none;
  z-index: 10;
}

/* --- Panel Timestamp --- */
.panel__timestamp {
  position: absolute;
  top: 14px;
  right: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-midtone);
  letter-spacing: 0.08em;
  z-index: 20;
  pointer-events: none;
}

/* --- Chrome Bevel Frame --- */
.bevel-frame {
  border: 1px solid var(--color-midtone);
  box-shadow:
    inset 1px 1px 0 var(--color-chrome-hi),
    inset -1px -1px 0 var(--color-chrome-shadow),
    2px 2px 6px rgba(0, 0, 0, 0.7);
  background: var(--color-floor);
}

/* --- Bevel Inset (inverted) --- */
.bevel-inset {
  border: 1px solid var(--color-midtone);
  box-shadow:
    inset 1px 1px 0 var(--color-chrome-shadow),
    inset -1px -1px 0 var(--color-chrome-hi),
    inset 0 0 8px rgba(0, 0, 0, 0.5);
}

/* --- Typography Helpers --- */
.orbitron-label {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.15em;
  color: var(--color-chrome-label);
  text-shadow: 0 1px 0 #8BCB8B, 0 -1px 0 #1B4D1B;
}

.rajdhani-sub {
  font-family: var(--font-sub);
  font-weight: 600;
  color: var(--color-phosphor);
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Panel Title (Kinetic Header) --- */
.panel-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 80px;
  color: var(--color-ghost);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Kinetic header animation states */
.kinetic-header {
  opacity: 0;
  font-size: 140px;
  letter-spacing: 0.3em;
}

.kinetic-header.kinetic-active {
  opacity: 1;
  font-size: 80px;
  letter-spacing: -0.02em;
  transition:
    font-size 600ms cubic-bezier(0.16, 1, 0.3, 1),
    letter-spacing 600ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 300ms ease;
}

/* Hero title gets larger kinetic target */
.hero-title.kinetic-header {
  font-size: 160px;
  letter-spacing: 0.3em;
}

.hero-title.kinetic-header.kinetic-active {
  font-size: 120px;
  letter-spacing: -0.02em;
}

/* --- Slide-Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateX(-40px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
  transition-delay: calc(var(--i, 0) * 80ms);
}

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

/* ===================================================
   PANEL I: COMMAND HEADER (Hero)
   =================================================== */
.panel-hero {
  background: var(--color-floor);
  position: relative;
}

/* Corner bracket decorations */
.corner-bracket {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--color-phosphor);
  border-style: solid;
  z-index: 5;
}

.corner-bracket--tl {
  top: 60px;
  left: 24px;
  border-width: 2px 0 0 2px;
}

.corner-bracket--tr {
  top: 60px;
  right: 24px;
  border-width: 2px 2px 0 0;
}

.corner-bracket--bl {
  bottom: 60px;
  left: 24px;
  border-width: 0 0 2px 2px;
}

.corner-bracket--br {
  bottom: 60px;
  right: 24px;
  border-width: 0 2px 2px 0;
}

/* Background corner icons */
.hero-icon {
  position: absolute;
  opacity: 0.15;
  z-index: 2;
}

.hero-icon--tl { top: 80px; left: 60px; }
.hero-icon--tr { top: 80px; right: 60px; }
.hero-icon--bl { bottom: 80px; left: 60px; }
.hero-icon--br { bottom: 80px; right: 60px; }

/* Hero central frame */
.hero-frame {
  width: 640px;
  max-width: 95vw;
  padding: 48px 40px;
  position: relative;
  z-index: 5;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.hero-label {
  margin-bottom: 8px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-ghost);
  line-height: 0.92;
  /* kinetic-header handles initial state */
}

.hero-tagline {
  margin-top: 4px;
}

.hero-tagline .rajdhani-sub {
  font-size: 18px;
  letter-spacing: 0.08em;
}

.hero-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-midtone), transparent);
  margin: 8px 0;
}

.hero-body {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-canopy);
  text-align: center;
  letter-spacing: 0.04em;
}

.hero-entry-label {
  margin-top: 8px;
}

.hero-entry-label .orbitron-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-midtone);
  text-shadow: none;
}

/* ===================================================
   PANEL II: INTELLIGENCE FEED
   =================================================== */
.panel-feed {
  background: var(--color-terminal);
  align-items: stretch;
  padding: 40px 32px;
}

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.feed-header .panel-title {
  font-size: 64px;
}

.feed-header .panel-title.kinetic-active {
  font-size: 64px;
}

.feed-header .kinetic-header {
  font-size: 100px;
}

.status-live {
  font-size: 12px;
  letter-spacing: 0.1em;
  animation: blink-live 1.4s step-end infinite;
}

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

.feed-container {
  flex: 1;
  overflow: hidden;
  background: var(--color-terminal);
  padding: 16px;
  position: relative;
}

.feed-list {
  list-style: none;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.feed-row {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.4;
  border-bottom: 1px solid rgba(45, 90, 45, 0.3);
  animation: slideInRow 0.3s ease both;
}

.feed-row:nth-child(even) {
  background: rgba(13, 31, 13, 0.6);
}

.feed-row:nth-child(odd) {
  background: transparent;
}

.feed-signal-type {
  font-weight: 700;
  min-width: 48px;
}

.feed-signal-buy { color: var(--color-signal); }
.feed-signal-sell { color: #FF6B6B; }
.feed-signal-hold { color: var(--color-canopy); }

.feed-signal-body {
  color: var(--color-canopy);
  flex: 1;
  padding: 0 8px;
}

.feed-signal-conf {
  color: var(--color-phosphor);
  text-shadow: 0 0 6px rgba(74, 222, 128, 0.3);
}

@keyframes slideInRow {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===================================================
   PANEL III: MARKET ARCHITECTURE
   =================================================== */
.panel-architecture {
  background: var(--color-void);
  align-items: stretch;
  justify-content: flex-start;
  padding: 40px 32px 20px;
  gap: 0;
}

.panel-architecture .panel-title {
  margin-bottom: 20px;
  flex-shrink: 0;
  font-size: 64px;
}

.panel-architecture .panel-title.kinetic-active {
  font-size: 64px;
}

.panel-architecture .kinetic-header {
  font-size: 100px;
}

.arch-blocks {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.arch-block {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--color-midtone);
  background: var(--color-floor);
  transition: box-shadow 0.3s ease;
}

.arch-block:last-child {
  border-bottom: none;
}

.arch-block:hover {
  box-shadow:
    inset 1px 1px 0 var(--color-chrome-hi),
    inset -1px -1px 0 var(--color-chrome-shadow),
    2px 2px 6px rgba(0, 0, 0, 0.7),
    0 0 12px rgba(74, 222, 128, 0.12);
}

.arch-icon {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.3s ease;
}

.arch-block:hover .arch-icon {
  filter: drop-shadow(0 0 8px rgba(74, 222, 128, 0.5));
}

.arch-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.arch-label {
  font-size: 12px;
  letter-spacing: 0.12em;
}

.arch-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--color-ghost);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.arch-body {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-canopy);
  line-height: 1.7;
  letter-spacing: 0.02em;
}

/* ===================================================
   PANEL IV: METHODOLOGY DECLARATION
   =================================================== */
.panel-methodology {
  background: var(--color-dark-alt);
  align-items: stretch;
  justify-content: flex-start;
  padding: 40px 32px 32px;
}

.panel-methodology .panel-title {
  margin-bottom: 24px;
  flex-shrink: 0;
  font-size: 64px;
}

.panel-methodology .panel-title.kinetic-active {
  font-size: 64px;
}

.panel-methodology .kinetic-header {
  font-size: 100px;
}

/* Double-rule border */
.double-rule-frame {
  flex: 1;
  position: relative;
  padding: 4px;
  border: 1px solid var(--color-midtone);
  overflow: hidden;
}

.double-rule-frame::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 3px solid var(--color-dark-alt);
  pointer-events: none;
  z-index: 1;
}

.double-rule-frame::after {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid var(--color-midtone);
  pointer-events: none;
  z-index: 1;
}

.methodology-content {
  display: flex;
  height: 100%;
  padding: 28px 32px;
  gap: 32px;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.methodology-icons {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex-shrink: 0;
}

.method-icon {
  width: 80px;
  height: 80px;
  transition: filter 0.3s ease;
}

.method-icon:hover {
  filter: drop-shadow(0 0 8px rgba(74, 222, 128, 0.5));
}

.methodology-text {
  flex: 1;
}

.method-statement {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.85;
  color: var(--color-canopy);
  letter-spacing: 0.05em;
  word-spacing: 0.2em;
  text-transform: uppercase;
}

/* ===================================================
   PANEL V: ACCESS TERMINAL
   =================================================== */
.panel-access {
  background: var(--color-void);
  position: relative;
}

.panel-access .panel-title {
  margin-bottom: 32px;
  font-size: 64px;
}

.panel-access .panel-title.kinetic-active {
  font-size: 64px;
}

.panel-access .kinetic-header {
  font-size: 100px;
}

.access-bg-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}

.access-frame {
  width: 480px;
  max-width: 95vw;
  padding: 0;
  position: relative;
  z-index: 5;
  background: var(--color-floor);
}

.access-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-midtone);
  background: var(--color-dark-alt);
}

.access-header .orbitron-label {
  font-size: 11px;
  letter-spacing: 0.18em;
}

.access-status-row {
  padding: 10px 20px;
  border-bottom: 1px solid var(--color-midtone);
  background: var(--color-terminal);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-signal);
  box-shadow: 0 0 6px rgba(87, 232, 114, 0.8);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(87, 232, 114, 0.8); }
  50% { opacity: 0.6; box-shadow: 0 0 3px rgba(87, 232, 114, 0.4); }
}

.status-text {
  font-size: 12px;
  letter-spacing: 0.06em;
}

.access-form-wrap {
  padding: 24px 20px;
}

.access-field-label {
  margin-bottom: 8px;
}

.field-label-text {
  font-size: 11px;
  letter-spacing: 0.14em;
}

.access-input-wrap {
  display: flex;
  align-items: center;
  background: var(--color-terminal);
  padding: 10px 14px;
  gap: 10px;
  margin-bottom: 12px;
  transition: box-shadow 0.2s ease;
}

.access-input-wrap:focus-within {
  box-shadow:
    inset 1px 1px 0 var(--color-chrome-shadow),
    inset -1px -1px 0 var(--color-chrome-hi),
    inset 0 0 8px rgba(0, 0, 0, 0.5),
    0 0 12px rgba(74, 222, 128, 0.5);
  border-color: var(--color-phosphor);
}

.input-prefix {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--color-phosphor);
  text-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
  flex-shrink: 0;
}

.access-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--color-ghost);
  caret-color: var(--color-phosphor);
  letter-spacing: 0.04em;
}

.access-input::placeholder {
  color: var(--color-midtone);
  font-size: 13px;
}

.enter-prompt {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-midtone);
  letter-spacing: 0.08em;
  text-align: center;
  padding: 0 0 4px;
}

.access-confirm {
  padding: 10px 0;
}

.confirm-text {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--color-signal);
  text-shadow: 0 0 8px rgba(87, 232, 114, 0.4);
}

.access-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--color-midtone);
  background: var(--color-dark-alt);
}

.access-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.access-meta-item {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-midtone);
  letter-spacing: 0.06em;
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 900px) {
  .panel-title,
  .panel-architecture .panel-title.kinetic-active,
  .panel-feed .feed-header .panel-title.kinetic-active,
  .panel-methodology .panel-title.kinetic-active,
  .panel-access .panel-title.kinetic-active {
    font-size: 48px;
  }

  .hero-title.kinetic-active {
    font-size: 60px;
  }

  .arch-block {
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
    text-align: center;
  }

  .methodology-content {
    flex-direction: column;
    padding: 20px;
  }

  .methodology-icons {
    flex-direction: row;
  }

  .hero-frame {
    width: 95vw;
    padding: 32px 20px;
  }
}

@media (max-width: 600px) {
  .hero-icon {
    display: none;
  }

  .corner-bracket {
    display: none;
  }

  .feed-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
