/* ============================================================
   KRAKEN WORLD — full-page fixed background + scroll reveal
   ============================================================ */

/* ── Spyglass intro overlay ─────────────────────────────── */
#spyglass-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #030112;
  pointer-events: none;
  overflow: hidden;
}
#spyglass-overlay.done { display: none; }

#spyglass-lens {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  box-shadow:
    0 0 0 200vmax rgba(3,1,18,0.97),
    inset 0 0 30px rgba(255,194,51,0.15),
    0 0 0 3px rgba(255,194,51,0.5),
    0 0 0 6px rgba(255,194,51,0.15),
    0 0 40px rgba(255,194,51,0.3);
  transform: translate(-50%, -50%);
  top: 50%;
  left: 20%;
  background: transparent;
}

.spyglass-crosshair {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; height: 100%;
}
.spyglass-crosshair::before,
.spyglass-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(255,194,51,0.25);
}
.spyglass-crosshair::before {
  width: 1px; height: 100%;
  left: 50%; top: 0;
}
.spyglass-crosshair::after {
  height: 1px; width: 100%;
  top: 50%; left: 0;
}

#spyglass-label {
  position: absolute;
  bottom: -2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(255,194,51,0.7);
  white-space: nowrap;
  text-transform: uppercase;
}
#spyglass-found {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--lime);
  text-transform: uppercase;
  opacity: 0;
  white-space: nowrap;
}

/* ── Kraken world container ─────────────────────────────── */
#kraken-world {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* Sky layer (above waterline) */
#kraken-sky {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(
    180deg,
    #070B1A 0%,
    #0D1F35 40%,
    #0E3A50 70%,
    #0A4A60 100%
  );
}

/* Storm clouds */
#kraken-sky::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 30% 30%, rgba(30,50,80,0.8) 0%, transparent 70%),
    radial-gradient(ellipse 50% 35% at 70% 20%, rgba(20,40,65,0.9) 0%, transparent 65%),
    radial-gradient(ellipse 40% 30% at 50% 10%, rgba(15,30,55,0.7) 0%, transparent 60%);
}
/* God rays through clouds */
#kraken-sky::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -5deg,
    transparent 0%,
    transparent 8%,
    rgba(200,220,255,0.025) 8%,
    rgba(200,220,255,0.025) 9%
  );
  mask-image: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, transparent 80%);
}

/* Ocean layer */
#kraken-ocean {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  top: 40%;
  background: linear-gradient(
    180deg,
    #0A4A60 0%,
    #062030 15%,
    #041525 35%,
    #020B18 55%,
    #010509 100%
  );
}

/* Underwater rays */
#kraken-ocean::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -15deg,
    transparent 0%,
    transparent 6%,
    rgba(10,80,120,0.12) 6%,
    rgba(10,80,120,0.12) 7%
  );
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 60%);
}

/* Waterline SVG wave */
#waterline {
  position: absolute;
  top: 38%;
  left: 0; right: 0;
  height: 120px;
  z-index: 2;
  pointer-events: none;
}

/* ── The Island ─────────────────────────────────────────── */
#the-island {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.island-logo {
  width: clamp(160px, 18vw, 280px);
  filter:
    drop-shadow(0 0 30px rgba(170,255,0,0.4))
    drop-shadow(0 0 60px rgba(255,45,149,0.3))
    drop-shadow(0 0 8px rgba(255,194,51,0.8));
  animation: island-float 4s ease-in-out infinite;
}

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

/* Light beam from island to ocean */
.island-beam {
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255,194,51,0.6), transparent);
  margin-top: -4px;
  animation: beam-pulse 2s ease-in-out infinite;
}
@keyframes beam-pulse { 0%,100%{opacity:0.6} 50%{opacity:1} }

/* ── Kraken body ────────────────────────────────────────── */
#kraken-body {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Kraken image — user drops kraken.jpg into assets/ */
#kraken-img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.85;
  mix-blend-mode: normal;
}

/* CSS kraken fallback (shows when no image) */
#kraken-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── Kraken eyes ────────────────────────────────────────── */
#kraken-eyes {
  position: absolute;
  top: 36%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: clamp(60px, 8vw, 140px);
  z-index: 4;
  pointer-events: none;
}

.kraken-eye {
  position: relative;
  width: clamp(24px, 3vw, 48px);
  height: clamp(16px, 2vw, 32px);
}
.eye-iris {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FF8C00, #CC4400 60%, #660000);
  box-shadow:
    0 0 20px rgba(255,140,0,0.8),
    0 0 50px rgba(255,100,0,0.5),
    0 0 100px rgba(255,80,0,0.3);
  animation: eye-glow 3s ease-in-out infinite;
}
.eye-pupil {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 35%;
  height: 55%;
  background: #0A0005;
  border-radius: 50%;
}
@keyframes eye-glow {
  0%,100% { box-shadow: 0 0 20px rgba(255,140,0,0.8), 0 0 50px rgba(255,100,0,0.5), 0 0 100px rgba(255,80,0,0.3); }
  50%      { box-shadow: 0 0 30px rgba(255,140,0,1),   0 0 70px rgba(255,100,0,0.7), 0 0 130px rgba(255,80,0,0.5); }
}
/* Slow blink */
.eye-lid {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ocean-deep);
  transform-origin: top center;
  animation: eye-blink 8s ease-in-out infinite;
}
@keyframes eye-blink {
  0%,45%,55%,100% { transform: scaleY(0); }
  50%             { transform: scaleY(1); }
}

/* ── Scroll reveal mask on kraken world ─────────────────── */
#kraken-world {
  /* Initially only top 22% visible — just the eyes barely showing */
  clip-path: inset(0 0 78% 0);
  transition: none; /* GSAP handles this */
}

/* ── Bioluminescence canvas overlay ────────────────────── */
#particles-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0.7;
}

/* ── Sailing ship (decorative) ─────────────────────────── */
#sailing-ship {
  position: absolute;
  top: 25%;
  left: 15%;
  font-size: clamp(30px, 4vw, 60px);
  opacity: 0.5;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  animation: ship-drift 20s ease-in-out infinite;
  transform-origin: bottom center;
  z-index: 3;
  user-select: none;
}
@keyframes ship-drift {
  0%,100% { transform: translateX(0) rotate(-1deg); }
  50%     { transform: translateX(-30px) rotate(1deg); }
}

/* ── Custom cursor ──────────────────────────────────────── */
#cursor { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; }
#cursor-dot {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--lime);
  border-radius: 50%;
  transform: translate(-50%,-50%);
}
#cursor-halo {
  position: absolute;
  width: 40px; height: 40px;
  border: 1px solid rgba(170,255,0,0.35);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  transition: width 0.3s var(--ease), height 0.3s var(--ease);
}

/* ── Glass sections (content over kraken) ───────────────── */
.glass-section {
  position: relative;
  z-index: 10;
  padding: 6rem 0;
}

.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-radius: var(--r-lg);
  padding: 2.5rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.glass-card:hover {
  border-color: rgba(170,255,0,0.2);
  box-shadow: 0 0 40px rgba(170,255,0,0.06);
}

/* Full-width glass section bg */
.glass-section-bg {
  background: rgba(3,1,18,0.75);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

/* ── Hero overlay (floating text over world) ────────────── */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 10vh;
  position: relative;
  z-index: 10;
}

.hero-ground {
  text-align: center;
}
.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 1rem;
  display: block;
}
.hero-headline {
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}
.hero-headline .line { display: block; }
.accent-magenta { color: var(--magenta); }
.accent-lime    { color: var(--lime); }
.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: rgba(246,241,232,0.6);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-scroll-hint {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.3);
  font-family: var(--font-mono);
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, rgba(170,255,0,0.4), transparent);
  animation: scroll-hint 2s ease-in-out infinite;
}
@keyframes scroll-hint {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── Section typography ─────────────────────────────────── */
.section-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}
.section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.section-lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* Override problem cards, pillars, pricing, etc. with glass */
.problem-card, .pillar, .tier, .pricing-card, .network-side {
  background: var(--glass) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

/* Accent color overrides */
.section-eyebrow { color: var(--lime); }
.tier-features li::before,
.pricing-features li::before { color: var(--lime); }
.stat-number { color: var(--lime); }
.connector-node { border-color: var(--lime); color: var(--lime); background: rgba(170,255,0,0.1); }

/* Pricing featured overrides */
.pricing-card-featured {
  border-color: var(--lime) !important;
  background: rgba(170,255,0,0.04) !important;
}
.pricing-badge { background: var(--lime) !important; color: #030112 !important; }
.founding-badge { background: var(--lime) !important; color: #030112 !important; }
.tier-badge.t2 { background: rgba(170,255,0,0.15) !important; color: var(--lime) !important; }

/* Form inputs glass */
.form-group input,
.form-group select {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.1) !important;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--lime) !important;
  background: rgba(170,255,0,0.04) !important;
}
.form-group label { color: var(--lime) !important; }

/* Footer glass */
#footer {
  background: rgba(1,0,9,0.85) !important;
  backdrop-filter: blur(30px) !important;
}

/* ── Vision quote accent ─────────────────────────────────── */
.vision-quote { color: var(--lime) !important; }
.problem-quote { border-color: var(--lime) !important; }
