/* This file is for custom vanilla css that can not be initiated using tailwind4. */
:root {
  color-scheme: light;

  /* Liquid Glass Effect Variables */
  --lg-bg-color: rgba(255, 255, 255, 0.02);
  --lg-highlight: rgba(255, 255, 255, 0.4);
  --lg-text: #ffffff;
}

/* =================
   Animations
   ================= */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-fade-in-up {
  opacity: 0;
  animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

[x-cloak] {
  display: none !important;
}

/* Scroll Reveal Initial State
   Mobile: Always visible — JS exits early, no animation runs.
   Desktop: Hidden until JS/GSAP reveals the element.
*/
.scroll-reveal {
  /* Mobile default: fully visible, no transition cost */
  opacity: 1;
  transform: none;
  visibility: visible;
}

/* Desktop: hide by default so GSAP can animate in */
@media (min-width: 768px) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: transform, opacity;
  }
}

/* Revealed state (applied by JS after animation) */
.revealed {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
  will-change: auto;
}

.animation-delay-100 {
  animation-delay: 100ms;
}

.animation-delay-200 {
  animation-delay: 200ms;
}

.animation-delay-300 {
  animation-delay: 300ms;
}

.animation-delay-400 {
  animation-delay: 400ms;
}

.animation-delay-500 {
  animation-delay: 500ms;
}

.animation-delay-600 {
  animation-delay: 600ms;
}

.animation-delay-700 {
  animation-delay: 700ms;
}

.animation-delay-800 {
  animation-delay: 800ms;
}

.animation-delay-900 {
  animation-delay: 900ms;
}

.animation-delay-1000 {
  animation-delay: 1000ms;
}

/* Typing Cursor Effect */
#typing-text::after {
  content: '|';
  animation: blink 0.8s infinite;
  margin-left: 2px;
  color: var(--color-cta);
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* =================
   Horizontal Scroll Journey Container
   ================= */

.horizontal-scroll-journey {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 2rem;
  padding: 2rem 0;
}

/* Hide scrollbar but keep functionality */
.horizontal-scroll-journey::-webkit-scrollbar {
  display: none;
}

.horizontal-scroll-journey {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Child snap alignment */
.horizontal-scroll-journey>* {
  scroll-snap-align: start;
  flex-shrink: 0;
}


/* =================
   Code Syntax Highlighting (Complex nested selectors)
   ================= */

.highlight {
  background: #f6f8fa;
  border-radius: 0.375rem;
  padding: 1rem;
  overflow-x: auto;
}

.highlight pre {
  margin: 0;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* =================
   Markdown Content Styles (Complex nested selectors)
   ================= */

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
  font-family: var(--font-heading);
  color: var(--color-dark);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.markdown-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.markdown-content a {
  color: var(--color-primary);
  text-decoration: underline;
}

.markdown-content a:hover {
  color: var(--color-secondary);
}

.markdown-content code {
  background: #f6f8fa;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

/* =================
   Cursor Pointer Enforcement
   ================= */

button,
a,
[role="button"],
.cursor-pointer,
input[type="submit"],
input[type="button"],
label[for] {
  cursor: pointer;
}

/* =================
   Focus States for Accessibility
   ================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #6366F1;
  outline-offset: 2px;
  border-radius: 4px;
}

/* =================
   Liquid Glass Effect
   Updated based on user request for radiating white light
   ================= */

.glass-card {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--lg-bg-color);
  backdrop-filter: blur(10px) brightness(1.1) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) brightness(1.1) saturate(1.2);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;

  /* Radiating inside and outside effect */
  box-shadow:
    /* Inner Radiance (White) */
    inset 0 0 2px 1px rgba(255, 255, 255, 0.15),
    inset 0 0 10px 4px rgba(255, 255, 255, 0.05),

    /* Outer Shadow/Depth */
    0 4px 16px rgba(17, 17, 26, 0.05),
    0 8px 24px rgba(17, 17, 26, 0.05),

    /* Inner Depth */
    inset 0 4px 16px rgba(17, 17, 26, 0.05),
    inset 0 8px 24px rgba(17, 17, 26, 0.05);

  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card:hover {
  transform: scale(1.05);
  z-index: 10;
}

/* Helpers for glass content if needed, though clean div structure preferred */
.glass-content {
  position: relative;
  z-index: 10;
}



/* =================
   Roadmap Custom Styles
   ================= */

.roadmap-step {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.roadmap-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: var(--color-background);
  border: 2px solid rgba(24, 24, 27, 0.1);
  color: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 10;
}

.roadmap-step:hover .roadmap-circle {
  transform: scale(1.15) translateY(-4px);
  color: var(--color-background);
}

.roadmap-step-primary:hover .roadmap-circle {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 30px -5px var(--color-primary);
}

.roadmap-step-cta:hover .roadmap-circle {
  background-color: var(--color-cta);
  border-color: var(--color-cta);
  box-shadow: 0 0 30px -5px var(--color-cta);
}

.roadmap-step:hover h3 {
  transition: color 0.3s ease;
}

.roadmap-step-primary:hover h3 {
  color: var(--color-primary);
}

.roadmap-step-cta:hover h3 {
  color: var(--color-cta);
}

.roadmap-connector-desktop {
  display: none;
  position: absolute;
  top: 24px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(to right,
      rgba(24, 24, 27, 0.05) 0%,
      rgba(24, 24, 27, 0.2) 50%,
      rgba(24, 24, 27, 0.05) 100%);
  z-index: 0;
}

@media (min-width: 768px) {
  .roadmap-connector-desktop {
    display: block;
  }
}

.roadmap-connector-mobile {
  position: absolute;
  top: 3rem;
  bottom: -3rem;
  left: 50%;
  width: 2px;
  background: rgba(24, 24, 27, 0.1);
  transform: translateX(-50%);
  z-index: 0;
}

@media (min-width: 768px) {
  .roadmap-connector-mobile {
    display: none;
  }
}

/* =================
   Hover Border Draw Animation
   ================= */

.hover-border-draw {
  position: relative;
}

.hover-border-draw .border-draw-svg {
  position: absolute;
  /* Match the div boundary exactly. The 4px stroke will extend 2px in and 2px out. */
  inset: 0;
  width: 100%;
  height: 101%;
  pointer-events: none;
  z-index: 20;
  overflow: visible;
}

.hover-border-draw .border-draw-svg rect {
  fill: none;
  stroke: var(--color-cta);
  stroke-width: 1px;
  stroke-linecap: round;
  stroke-linejoin: round;

  /* Dasharray controls the draw: 0 line, 100 gap. 
     Using pathLength="100" in HTML makes this work with percentages. */
  stroke-dasharray: 0 100;
  stroke-dashoffset: 0;

  opacity: 0;

  /* Neon effect: Brighten the stroke and add a colored shadow glow */
  filter: brightness(1.3) drop-shadow(0 0 6px var(--color-cta));

  /* Transition for unhover: 0.5s delay before disappearing */
  transition: opacity 0.5s 0.5s ease-in, stroke-dasharray 0.5s 0.5s ease-out;
}

.hover-border-draw:hover .border-draw-svg rect {
  opacity: 1;
  stroke-dasharray: 100 0;
  /* Transition for hover: Immediate start (no delay) */
  transition: opacity 0.5s ease-in, stroke-dasharray 0.5s ease-out;
}

/* =================
   Global Custom Scrollbar
   ================= */

::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(24, 24, 27, 0.2);
  border-radius: 9999px;
  border: 4px solid transparent;
  background-clip: content-box;
  transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-primary);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox */
@supports (scrollbar-color: auto) {
  * {
    scrollbar-width: thin;
    scrollbar-color: rgba(24, 24, 27, 0.2) transparent;
  }
}

/* =================
   Glass Button
   ================= */

.glass-btn {
  position: relative;
  padding: clamp(12px, 2.5vw, 14px) clamp(24px, 5vw, 28px);
  font-size: clamp(14px, 2.5vw, 15px);
  font-weight: 600;
  color: #e0e0ff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(clamp(10px, 2vw, 12px));
  -webkit-backdrop-filter: blur(clamp(10px, 2vw, 12px));
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: clamp(1px, 0.3vw, 1.5px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px color-mix(in srgb, var(--color-primary), transparent 70%);
}

/* Button 1: Quantum Flicker */
.btn-1:hover {
  animation: quantumFlicker 1s ease-in-out infinite;
}

@keyframes quantumFlicker {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 20px color-mix(in srgb, var(--color-primary), transparent 70%);
  }

  50% {
    opacity: 0.8;
    box-shadow: 0 0 30px color-mix(in srgb, var(--color-primary), transparent 50%);
  }
}

/* =================
   Ripple Effect (JS Triggered)
   ================= */

.ripple {
  position: absolute;
  background: rgba(0, 255, 255, 0.3);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.8s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(5);
    opacity: 0;
  }
}

/* =================
   Dot Background Animation
   ================= */
#dot-background-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: all;
  z-index: 0;
  opacity: 0.6;
}

/* Hero Fullscreen: always fill the full viewport height */
[data-hero-fullscreen] {
  min-height: 95svh;
}

/* Ensure hero content stays above canvas */
[data-hero-fullscreen]>.max-w-7xl {
  position: relative;
  z-index: 10;
}

/* Ensure decorative elements stay behind content */
[data-hero-fullscreen]>div:first-child {
  z-index: 0;
}