@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --color-paper: #FFFFFF;
  --color-paper-2: #F0F9FA;
  --color-ink: #0F172A;
  --color-ink-soft: #475569;
  --color-line: #E2E8F0;
  
  --color-forest: #000000;
  --color-forest-700: #1A1A1A;
  --color-sage: #94A3B8;
  --color-accent: rgb(98 171 180);
  --color-accent-600: #4B929A;

  --color-paper-dark: #000000;
  --color-paper-2-dark: #0A0A0A;
  --color-ink-dark: #FFFFFF;
  --color-line-dark: #222222;

  --font-serif: "Outfit", sans-serif;
  --font-sans: "Inter", sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  
  --shadow-soft: 0 4px 20px rgba(0,0,0,0.5);
  --shadow-lift: 0 10px 40px rgba(0,0,0,0.8);
}

/* Custom base adjustments */
html {
  background-color: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-sans);
  scroll-behavior: auto; /* Managed by Lenis */
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
}

/* Focus styling */
*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-paper);
}
::-webkit-scrollbar-thumb {
  background: var(--color-sage);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-forest);
}

/* Global noise overlay */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  content: "";
  opacity: 0.035;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Custom cursor */
.custom-cursor {
  width: 8px;
  height: 8px;
  background-color: var(--color-accent);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.custom-cursor-ring {
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease-out, width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
}

/* Custom cursor hover states */
.custom-cursor.hovering {
  width: 24px;
  height: 24px;
  background-color: rgba(232, 176, 75, 0.2);
}

.custom-cursor-ring.hovering {
  width: 48px;
  height: 48px;
  background-color: rgba(232, 176, 75, 0.1);
  border-color: var(--color-accent-600);
}

/* Fluid Typography and Utilities */
.text-display-xl {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5.5vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.text-fluid-h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.text-fluid-h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

/* Tabular numbers for counters */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Button drawing hover animations */
.btn-sweep {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-sweep::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: var(--color-forest-700);
  z-index: -1;
  transition: height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-sweep:hover::after {
  height: 100%;
}

.btn-ghost-draw {
  position: relative;
  overflow: hidden;
}

.btn-ghost-draw::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: var(--color-forest);
  z-index: -1;
  transition: height 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-ghost-draw:hover::after {
  height: 100%;
}

/* New Pill Button from blashq theme */
.btn-pill {
  display: inline-flex;
  align-items: center;
  background-color: var(--color-forest);
  color: var(--color-paper);
  border-radius: 9999px;
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.btn-pill:hover {
  background-color: var(--color-forest-700);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  color: var(--color-paper);
}
.btn-pill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--color-accent);
  color: var(--color-forest);
  margin-left: 1.25rem;
  transition: transform 0.3s ease;
}
.btn-pill:hover .btn-pill-icon {
  transform: scale(1.05) rotate(45deg);
}

/* Navigation frosted styling */
.nav-scrolled {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-line);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  box-shadow: 0 4px 30px rgba(0,0,0,0.03);
}

/* Smooth clip-mask slider reveal animations */
.split-word-mask {
  overflow: hidden;
  display: inline-block;
  vertical-align: bottom;
}

.split-word-inner {
  display: inline-block;
  transform: translateY(110%);
}

/* Horizontal scroll components */
.horizontal-scroll-container {
  display: flex;
  flex-wrap: nowrap;
  will-change: transform;
}

/* Chart draw animation */
.chart-stroke {
  animation: drawChart 2.5s cubic-bezier(.22, 1, .36, 1) forwards;
  animation-delay: 0.5s;
}

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

/* Disable styles for prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
  
  .custom-cursor, .custom-cursor-ring {
    display: none !important;
  }
  
  .split-word-inner {
    transform: none !important;
}

/* Sticky Stepper active/inactive styles */
.sticky-step {
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  border-left: 4px solid transparent;
  opacity: 0.45;
}

.sticky-step.active-step {
  border-left-color: var(--color-accent-600);
  opacity: 1 !important;
}

@media (min-width: 1024px) {
  .sticky-step.active-step {
    transform: translateX(16px);
  }
}

