/* ============================================
   STONKAPE — Premium Dark Financial Terminal
   Pure CSS — No frameworks
   ============================================ */

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

:root {
  --bg-deep: #050508;
  --bg-dark: #0a0e14;
  --bg-navy: #0d1520;
  --bg-card: #111820;
  --green-bright: #00ff88;
  --green-glow: #00cc6a;
  --green-dim: #1a4d3a;
  --red-dim: #4d1a1a;
  --red-bright: #ff4444;
  --blue-ice: #a8d4e8;
  --blue-pale: #7ec8e3;
  --blue-electric: #3399ff;
  --text-primary: #e8eef4;
  --text-muted: #8899aa;
  --text-dim: #556677;
  --border-subtle: rgba(126, 200, 227, 0.15);
  --glass: rgba(10, 14, 20, 0.75);
  --font-display: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
  --nav-height: 72px;
  --container-max: 1200px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: default;
}

body.no-custom-cursor {
  cursor: auto;
}

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

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

ul {
  list-style: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* --- Noise overlay --- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  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)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
  opacity: 0.4;
}

/* --- Logo Pattern --- */
.logo-pattern {
  position: absolute;
  inset: 0;
  background-image: url("assets/logo.png");
  background-size: 80px 80px;
  background-repeat: repeat;
  opacity: 0.04;
  pointer-events: none;
  animation: patternDrift 60s linear infinite;
}

@keyframes patternDrift {
  0% { background-position: 0 0; }
  100% { background-position: 400px 400px; }
}

/* --- Page Loader --- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  text-align: center;
}

.loader-logo {
  margin: 0 auto 1.5rem;
  animation: loaderPulse 1.2s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.1); opacity: 1; }
}

.loader-text {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--green-bright);
  margin-bottom: 1rem;
  font-weight: 600;
}

.loader-bar {
  width: 200px;
  height: 2px;
  background: var(--bg-navy);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--green-bright);
  animation: loaderFill 1.2s ease forwards;
}

@keyframes loaderFill {
  to { width: 100%; }
}

/* --- Cursor Glow --- */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.cursor-glow.active {
  opacity: 1;
}

/* --- Particles --- */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--green-bright);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes particleFloat {
  0%, 100% { opacity: 0; transform: translateY(0); }
  20% { opacity: 0.6; }
  80% { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-100vh); }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 8px;
  padding: 0.875rem 1.75rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::after {
  left: 100%;
}

.btn-primary {
  background: var(--green-bright);
  color: var(--bg-deep);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3), 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 0 35px rgba(0, 255, 136, 0.5), 0 6px 20px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.magnetic-btn:hover {
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: var(--blue-ice);
  border: 2px solid var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--blue-pale);
  background: rgba(126, 200, 227, 0.05);
  transform: translateY(-2px);
}

.btn-icon {
  padding: 0.875rem;
  border: 2px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
}

.btn-icon:hover {
  border-color: var(--blue-pale);
  color: var(--blue-ice);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 0.9375rem;
}

.btn-xl {
  padding: 1.25rem 2.5rem;
  font-size: 1.0625rem;
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.8125rem;
}

.btn-arrow {
  transition: transform var(--transition);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

.btn:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: background var(--transition), backdrop-filter var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(126, 200, 227, 0.08);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1001;
}

.nav-logo {
  transition: transform var(--transition);
}

.nav-brand:hover .nav-logo {
  transform: rotate(-8deg) scale(1.05);
}

.nav-name {
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
}

.nav-link {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  padding: 0.25rem 0;
  transition: color var(--transition);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green-bright);
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.btn-nav {
  padding: 0.625rem 1.25rem;
  font-size: 0.75rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.6);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.nav-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

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

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 80%);
}

.hero-chart-lines {
  position: absolute;
  bottom: 10%;
  left: 0;
  right: 0;
  height: 40%;
  opacity: 0.3;
}

.chart-svg {
  width: 100%;
  height: 100%;
}

.chart-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line-1 {
  stroke: var(--green-bright);
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: drawLine 3s ease forwards 0.5s;
}

.chart-line-2 {
  stroke: var(--blue-pale);
  opacity: 0.5;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: drawLine 3.5s ease forwards 1s;
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

.hero-candles {
  position: absolute;
  bottom: 15%;
  left: 5%;
  right: 5%;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 120px;
  opacity: 0.25;
}

.candle {
  width: 8px;
  border-radius: 2px;
  animation: candlePulse 2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.2s);
}

.candle-up {
  height: calc(40px + var(--i) * 8px);
  background: var(--green-bright);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.candle-down {
  height: calc(25px + var(--i) * 5px);
  background: var(--red-bright);
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

@keyframes candlePulse {
  0%, 100% { transform: scaleY(1); opacity: 0.8; }
  50% { transform: scaleY(1.15); opacity: 1; }
}

.hero-pattern {
  opacity: 0.03;
}

.hero-glow {
  position: absolute;
  top: 20%;
  right: 10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(0, 255, 136, 0.08) 0%, rgba(51, 153, 255, 0.04) 40%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.hero-tag {
  font-size: clamp(0.75rem, 1.5vw, 0.875rem);
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--green-bright);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, var(--blue-ice) 50%, var(--blue-pale) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,0.8)) drop-shadow(0 0 30px rgba(0,255,136,0.2));
  margin-bottom: 1.5rem;
  transition: transform 0.1s ease-out;
}

.hero-narrative {
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero-sub {
  font-size: clamp(0.9375rem, 2vw, 1.125rem);
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-image-wrap {
  position: relative;
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-rim-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(ellipse, rgba(0, 255, 136, 0.15) 0%, rgba(51, 153, 255, 0.08) 50%, transparent 70%);
  z-index: -1;
  animation: rimPulse 4s ease-in-out infinite;
}

@keyframes rimPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.hero-image {
  max-height: clamp(350px, 60vh, 650px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

.hero-float-symbols {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.float-symbol {
  position: absolute;
  opacity: 0.3;
  animation: symbolFloat 8s ease-in-out infinite;
}

.fs-1 { top: 10%; right: -5%; animation-delay: 0s; }
.fs-2 { bottom: 20%; left: -8%; animation-delay: -2s; }
.fs-3 { top: 40%; right: -10%; animation-delay: -4s; }

@keyframes symbolFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.2; }
  50% { transform: translateY(-20px) rotate(15deg); opacity: 0.4; }
}

/* --- Ticker --- */
.ticker-wrap {
  background: var(--bg-navy);
  border-top: 1px solid rgba(0, 255, 136, 0.15);
  border-bottom: 1px solid rgba(0, 255, 136, 0.15);
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: tickerScroll 30s linear infinite;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.875rem 1rem;
  white-space: nowrap;
}

.ticker-item {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--green-bright);
  text-transform: uppercase;
}

.ticker-symbol {
  opacity: 0.5;
  flex-shrink: 0;
}

/* --- Sections --- */
.section {
  position: relative;
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--green-bright);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.section-pattern {
  opacity: 0.03;
}

/* --- About --- */
.about {
  background: var(--bg-dark);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.about-image-frame {
  position: relative;
}

.about-image {
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.about-frame-glow {
  position: absolute;
  inset: -10%;
  background: radial-gradient(ellipse, rgba(51, 153, 255, 0.1) 0%, transparent 70%);
  z-index: 0;
}

.about-lines {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-line {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--text-muted);
  line-height: 1.4;
}

.about-line strong {
  color: var(--text-primary);
  font-weight: 800;
}

/* --- Strategy Cards --- */
.strategy {
  background: var(--bg-deep);
}

.strategy-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
}

.strategy-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  min-height: 280px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow var(--transition);
  transform-style: preserve-3d;
  cursor: default;
}

.strategy-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.card-bg {
  position: absolute;
  inset: 0;
  opacity: 0.6;
  transition: opacity var(--transition);
}

.strategy-card:hover .card-bg {
  opacity: 1;
}

.card-bg-red {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(77, 26, 26, 0.4) 100%);
}

.card-bg-green {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(26, 77, 58, 0.5) 100%);
}

.card-bg-loop {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(26, 50, 77, 0.4) 100%);
}

.card-chart {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
}

.card-chart-loop {
  animation: loopChart 4s ease-in-out infinite;
}

@keyframes loopChart {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.card-number {
  position: relative;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 1rem;
  display: block;
}

.card-title {
  position: relative;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.card-text {
  position: relative;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 800;
  color: var(--green-bright);
  letter-spacing: 0.05em;
}

.card-glow {
  position: absolute;
  bottom: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 80%;
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.strategy-card:hover .card-glow {
  opacity: 0.3;
}

.card-glow-red { background: radial-gradient(circle, rgba(255, 68, 68, 0.4), transparent 70%); }
.card-glow-green { background: radial-gradient(circle, rgba(0, 255, 136, 0.4), transparent 70%); }
.card-glow-blue { background: radial-gradient(circle, rgba(51, 153, 255, 0.3), transparent 70%); }

/* --- Showcase --- */
.showcase {
  position: relative;
  padding: clamp(4rem, 10vw, 8rem) 0;
  overflow: hidden;
  background: var(--bg-navy);
}

.showcase-bg {
  position: absolute;
  inset: 0;
}

.showcase-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(126, 200, 227, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 200, 227, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.showcase-pattern {
  opacity: 0.05;
}

.showcase-ticker-deco {
  position: absolute;
  top: 10%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  opacity: 0.06;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--blue-ice);
}

.showcase-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.showcase-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.showcase-character {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.showcase-spotlight {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(0, 255, 136, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.showcase-banner {
  width: 100%;
  border-radius: 12px;
  filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.5));
}

/* --- Terminal --- */
.terminal-section {
  background: var(--bg-dark);
}

.terminal-wrap {
  max-width: 700px;
  margin: 0 auto;
  background: #0c1018;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 255, 136, 0.05);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dots span:nth-child(1) { background: #ff5f57; }
.terminal-dots span:nth-child(2) { background: #febc2e; }
.terminal-dots span:nth-child(3) { background: #28c840; }

.terminal-title {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: "Consolas", "Courier New", monospace;
}

.terminal-body {
  padding: 1.5rem;
  min-height: 220px;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--green-bright);
}

.terminal-output {
  display: inline;
}

.terminal-line {
  display: block;
  opacity: 0;
  animation: terminalFadeIn 0.3s ease forwards;
}

@keyframes terminalFadeIn {
  to { opacity: 1; }
}

.terminal-cursor {
  display: inline;
  animation: cursorBlink 1s step-end infinite;
  color: var(--green-bright);
}

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

.terminal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

/* --- Gallery --- */
.gallery {
  background: var(--bg-deep);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item-lg {
  grid-column: span 7;
  grid-row: span 2;
}

.gallery-item:not(.gallery-item-lg):not(.gallery-item-graphic) {
  grid-column: span 5;
}

.gallery-item-graphic {
  grid-column: span 3;
}

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

.gallery-item:hover {
  transform: rotate(-1deg) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 255, 136, 0.1);
  z-index: 2;
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 5, 8, 0.8) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity var(--transition);
}

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

.gallery-overlay span {
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--green-bright);
}

.graphic-card {
  width: 100%;
  height: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-navy) 100%);
  padding: 1.5rem;
}

.graphic-card-green {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(26, 77, 58, 0.3) 100%);
}

.graphic-logo {
  opacity: 0.6;
  animation: logoSpin 20s linear infinite;
}

@keyframes logoSpin {
  to { transform: rotate(360deg); }
}

.graphic-text {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--blue-ice);
}

.graphic-candles {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 40px;
}

.gc {
  width: 8px;
  border-radius: 2px;
}

.gc-up {
  height: 30px;
  background: var(--green-bright);
  animation: candlePulse 2s ease-in-out infinite;
}

.gc-down {
  height: 18px;
  background: var(--red-bright);
  animation: candlePulse 2s ease-in-out infinite 0.5s;
}

.graphic-arrow {
  font-size: 3rem;
  color: var(--green-bright);
  animation: arrowBounce 2s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.graphic-line {
  width: 100%;
  max-width: 160px;
  height: 40px;
}

/* --- Community --- */
.community {
  background: var(--bg-navy);
  text-align: center;
  overflow: hidden;
}

.community-pattern {
  opacity: 0.04;
}

.community-floats {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.comm-float {
  position: absolute;
  opacity: 0.15;
  animation: commFloat 10s ease-in-out infinite;
}

.cf-1 { top: 15%; left: 10%; animation-delay: 0s; }
.cf-2 { top: 60%; right: 12%; animation-delay: -3s; }
.cf-3 { bottom: 20%; left: 20%; animation-delay: -6s; }
.cf-4 { top: 30%; right: 25%; animation-delay: -1.5s; }

@keyframes commFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-25px) rotate(10deg); }
}

.community-inner {
  position: relative;
  z-index: 2;
}

.community-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.community-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.community-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* --- Final CTA --- */
.final-cta {
  position: relative;
  overflow: hidden;
  background: var(--bg-deep);
  padding: clamp(5rem, 12vw, 10rem) 0;
}

.final-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.final-arrow {
  position: absolute;
  right: 5%;
  bottom: 10%;
  width: clamp(200px, 40vw, 400px);
  height: auto;
  opacity: 0.2;
}

.final-chart-line {
  fill: none;
  stroke: var(--green-bright);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: drawLine 2s ease forwards;
}

.final-arrow-head {
  fill: var(--green-bright);
  opacity: 0;
  animation: arrowAppear 0.5s ease forwards 1.8s;
}

@keyframes arrowAppear {
  to { opacity: 1; }
}

.final-glow {
  position: absolute;
  top: 50%;
  left: 30%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(0, 255, 136, 0.1) 0%, transparent 60%);
}

.final-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.final-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  background: linear-gradient(180deg, var(--green-bright) 0%, var(--green-glow) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(0, 255, 136, 0.3));
}

.final-ape {
  max-height: clamp(300px, 50vh, 500px);
  width: auto;
  margin: 0 auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

/* --- Footer --- */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-name {
  display: block;
  font-weight: 800;
  font-size: 1rem;
}

.footer-ticker {
  display: block;
  font-size: 0.8125rem;
  color: var(--green-bright);
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--green-bright);
}

.footer-tagline {
  width: 100%;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-dim);
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.5rem;
}

/* --- Scroll Reveal --- */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal {
  transform: translateY(40px);
}

.reveal-left {
  transform: translateX(-40px);
}

.reveal-right {
  transform: translateX(40px);
}

.reveal-scale {
  transform: scale(0.92);
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible,
.reveal-scale.visible {
  opacity: 1;
  transform: none;
}

.reveal[style*="--delay:1"].visible { transition-delay: 0.1s; }
.reveal[style*="--delay:2"].visible { transition-delay: 0.2s; }
.reveal[style*="--delay:3"].visible { transition-delay: 0.3s; }

/* --- Heading shine --- */
.hero-title,
.section-title,
.showcase-title,
.community-title,
.final-title {
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: titleShine 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes titleShine {
  0%, 100% { left: -100%; }
  50% { left: 150%; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-image {
    max-height: clamp(280px, 45vh, 450px);
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-visual {
    order: -1;
  }

  .strategy-cards {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

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

  .gallery-item-lg {
    grid-column: span 2;
    grid-row: span 1;
  }

  .gallery-item:not(.gallery-item-lg) {
    grid-column: span 1;
  }

  .gallery-item-graphic {
    grid-column: span 1;
  }

  .final-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .final-visual {
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: 2rem;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links li {
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-link {
    display: block;
    padding: 1rem 0;
    font-size: 0.9375rem;
  }

  .btn-nav {
    margin-top: 1rem;
    text-align: center;
    justify-content: center;
  }

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

  .gallery-item-lg,
  .gallery-item:not(.gallery-item-lg),
  .gallery-item-graphic {
    grid-column: span 1;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .community-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .community-actions .btn {
    width: 100%;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .cursor-glow {
    display: none;
  }

  .hero-image-wrap {
    animation: none;
  }

  .ticker-track {
    animation: none;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }

  .page-loader {
    display: none;
  }
}

/* --- Touch devices: hide custom cursor --- */
@media (hover: none) and (pointer: coarse) {
  .cursor-glow {
    display: none;
  }
}
