/* ==============================================================================
   MINDFRAME STUDIO — DESIGN TOKENS & BASE STYLES v4
   Dark Cosmic Premium Theme
   ============================================================================== */

:root {
  /* ── Core Dark Palette ── */
  --color-bg:             #08080f;
  --color-bg-alt:         #0c0c16;
  --color-surface:        #111119;
  --color-surface-hover:  #16161f;
  --color-card:           rgba(255, 255, 255, 0.03);
  --color-card-hover:     rgba(255, 255, 255, 0.06);
  --color-card-solid:     #131320;

  /* ── Accent: Warm Amber/Gold (from sun/fire brand imagery) ── */
  --color-primary:        #F5A623;
  --color-primary-hover:  #E6991A;
  --color-primary-light:  rgba(245, 166, 35, 0.15);
  --color-primary-glow:   rgba(245, 166, 35, 0.25);
  --color-primary-subtle: rgba(245, 166, 35, 0.08);

  /* ── Cosmic Supporting Tones ── */
  --color-gold:           #FFD700;
  --color-gold-glow:      rgba(255, 215, 0, 0.2);
  --color-blue:           #4A9EFF;
  --color-blue-glow:      rgba(74, 158, 255, 0.2);
  --color-blue-deep:      #2563EB;
  --color-rose:           #FF6B8A;
  --color-rose-glow:      rgba(255, 107, 138, 0.2);
  --color-purple:         #A78BFA;
  --color-purple-glow:    rgba(167, 139, 250, 0.2);
  --color-teal:           #2DD4BF;
  --color-teal-glow:      rgba(45, 212, 191, 0.2);
  --color-orange:         #FB923C;
  --color-orange-glow:    rgba(251, 146, 60, 0.2);

  /* ── Text ── */
  --color-text:           #FFFFFF;
  --color-text-soft:      rgba(255, 255, 255, 0.75);
  --color-text-muted:     rgba(255, 255, 255, 0.45);
  --color-text-dim:       rgba(255, 255, 255, 0.25);
  --color-text-on-primary:#0a0a0f;

  /* ── Borders ── */
  --color-border:         rgba(255, 255, 255, 0.08);
  --color-border-light:   rgba(255, 255, 255, 0.04);
  --color-border-hover:   rgba(255, 255, 255, 0.15);
  --color-border-glow:    rgba(245, 166, 35, 0.3);

  /* ── Overlays & Glass ── */
  --color-overlay:        rgba(8, 8, 15, 0.8);
  --color-glass:          rgba(255, 255, 255, 0.04);
  --color-glass-hover:    rgba(255, 255, 255, 0.08);
  --color-glass-border:   rgba(255, 255, 255, 0.08);
  --backdrop-blur:        blur(20px);
  --backdrop-blur-heavy:  blur(40px);

  /* ── Status ── */
  --color-success:        #34D399;
  --color-error:          #F87171;

  /* ── Platform Colors ── */
  --color-youtube:        #FF0000;
  --color-youtube-glow:   rgba(255, 0, 0, 0.15);
  --color-instagram:      #E4405F;
  --color-instagram-glow: rgba(228, 64, 95, 0.15);
  --color-facebook:       #1877F2;
  --color-facebook-glow:  rgba(24, 119, 242, 0.15);
  --color-tiktok:         #FFFFFF;
  --color-tiktok-glow:    rgba(255, 255, 255, 0.1);

  /* ── Cosmic Gradients ── */
  --gradient-hero:        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(245, 166, 35, 0.08) 0%, transparent 70%);
  --gradient-cosmic:      radial-gradient(ellipse at center, rgba(74, 158, 255, 0.06) 0%, transparent 70%);
  --gradient-nebula:      radial-gradient(ellipse at 30% 50%, rgba(167, 139, 250, 0.1) 0%, rgba(255, 107, 138, 0.05) 50%, transparent 80%);
  --gradient-section-glow:radial-gradient(ellipse 60% 40% at 50% 0%, rgba(245, 166, 35, 0.04) 0%, transparent 70%);
  --gradient-card:        linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  --gradient-card-border: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%);
  --gradient-text-gold:   linear-gradient(135deg, #F5A623, #FFD700, #F5A623);
  --gradient-btn-primary: linear-gradient(135deg, #FFD04A 0%, #F5A623 100%);

  /* ── Typography ── */
  --font-heading:         'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:            'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --fs-display:           clamp(3.2rem, 8vw, 7rem);
  --fs-h1:                clamp(2.6rem, 5.5vw, 4.8rem);
  --fs-h2:                clamp(2rem, 4vw, 3.4rem);
  --fs-h3:                clamp(1.4rem, 2.5vw, 2rem);
  --fs-h4:                clamp(1.1rem, 1.8vw, 1.4rem);
  --fs-body:              clamp(0.95rem, 1.1vw, 1.05rem);
  --fs-body-lg:           clamp(1.05rem, 1.3vw, 1.25rem);
  --fs-small:             clamp(0.82rem, 0.95vw, 0.9rem);
  --fs-xs:                clamp(0.72rem, 0.85vw, 0.8rem);

  --fw-regular:           400;
  --fw-medium:            500;
  --fw-semibold:          600;
  --fw-bold:              700;

  --lh-tight:             1.1;
  --lh-heading:           1.15;
  --lh-normal:            1.65;
  --lh-relaxed:           1.8;

  --ls-tight:            -0.03em;
  --ls-normal:            0;
  --ls-wide:              0.08em;
  --ls-wider:             0.16em;

  /* ── Spacing ── */
  --space-1:              0.25rem;
  --space-2:              0.5rem;
  --space-3:              0.75rem;
  --space-4:              1rem;
  --space-5:              1.25rem;
  --space-6:              1.5rem;
  --space-8:              2rem;
  --space-10:             2.5rem;
  --space-12:             3rem;
  --space-16:             4rem;
  --space-20:             5rem;
  --space-24:             6rem;
  --space-32:             8rem;

  /* ── Border Radius ── */
  --radius-sm:            0.5rem;
  --radius-md:            0.75rem;
  --radius-lg:            1rem;
  --radius-xl:            1.25rem;
  --radius-2xl:           1.5rem;
  --radius-3xl:           2rem;
  --radius-full:          9999px;

  /* ── Shadows (dark theme — glows instead of shadows) ── */
  --shadow-xs:            0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm:            0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md:            0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg:            0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl:            0 16px 64px rgba(0, 0, 0, 0.6);
  --shadow-glow-amber:    0 0 40px rgba(245, 166, 35, 0.15);
  --shadow-glow-blue:     0 0 40px rgba(74, 158, 255, 0.12);
  --shadow-glow-rose:     0 0 40px rgba(255, 107, 138, 0.12);
  --shadow-glow-purple:   0 0 40px rgba(167, 139, 250, 0.12);
  --shadow-card:          0 2px 8px rgba(0, 0, 0, 0.2), 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow-card-hover:    0 8px 32px rgba(0, 0, 0, 0.3), 0 0 1px rgba(255, 255, 255, 0.1);

  /* ── Transitions ── */
  --ease-out:             cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:          cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring:          cubic-bezier(0.34, 1.56, 0.64, 1);

  --duration-fast:        150ms;
  --duration-normal:      300ms;
  --duration-slow:        500ms;
  --duration-slower:      800ms;
  --duration-cosmic:      20s;

  /* ── Layout ── */
  --max-width:            1200px;
  --max-width-wide:       1400px;
  --max-width-narrow:     800px;
  --max-width-text:       640px;
  --section-padding-x:    clamp(1.5rem, 6vw, 8rem);
  --section-padding-y:    clamp(6rem, 14vh, 12rem);
  --header-height:        72px;

  /* ── Z-Index ── */
  --z-stars:              1;
  --z-spline:             5;
  --z-content:            10;
  --z-card:               15;
  --z-header:             500;
  --z-modal:              1000;
  --z-preloader:          9999;
}

/* ── Google Fonts are loaded in index.html ── */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-text-soft);
  background-color: var(--color-bg);
  overflow-x: hidden;
  min-height: 100vh;
}


/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ── Selection ── */
::selection {
  background: var(--color-primary-light);
  color: var(--color-text);
}

/* ── Typography ── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
  color: var(--color-text);
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

h4 {
  font-size: var(--fs-h4);
}

p {
  line-height: var(--lh-normal);
  color: var(--color-text-soft);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-normal) var(--ease-out);
}

a:hover {
  color: var(--color-gold);
}

strong,
b {
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}

/* ── Images & Media ── */
img,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

/* ── Lists ── */
ul,
ol {
  list-style: none;
}

/* ── Focus States (Accessibility) ── */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Section Base ── */
.section {
  position: relative;
  padding: var(--section-padding-y) var(--section-padding-x);
  overflow: hidden;
}

/* ── Utility Classes ── */
.text-gradient {
  color: var(--color-primary);
  background: var(--gradient-text-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted {
  color: var(--color-text-muted);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Cosmic Divider (replaces stitch-divider) ── */
.cosmic-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      var(--color-border) 20%,
      var(--color-primary-subtle) 50%,
      var(--color-border) 80%,
      transparent 100%);
  margin: 0;
}

/* ── Section Header ── */
.section-header {
  text-align: center;
  max-width: var(--max-width-narrow);
  margin: 0 auto var(--space-12);
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-primary-light);
  border-radius: var(--radius-full);
  background: var(--color-primary-subtle);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  font-size: var(--fs-body-lg);
  color: var(--color-text-muted);
  max-width: var(--max-width-text);
  margin: 0 auto;
}

/* ── Scroll-reveal animation states ── */
.animate-on-scroll {
  opacity: 0;
  transform: perspective(1200px) rotateX(-8deg) translateY(40px) translateZ(-50px) scale(0.97);
  transform-origin: center top;
  transition:
    opacity var(--duration-slower) var(--ease-out),
    transform var(--duration-slower) var(--ease-out);
  backface-visibility: hidden;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: perspective(1200px) rotateX(0deg) translateY(0) translateZ(0) scale(1);
}

/* Stagger delays */
.animate-on-scroll.delay-1 {
  transition-delay: 80ms;
}

.animate-on-scroll.delay-2 {
  transition-delay: 160ms;
}

.animate-on-scroll.delay-3 {
  transition-delay: 240ms;
}

.animate-on-scroll.delay-4 {
  transition-delay: 320ms;
}

.animate-on-scroll.delay-5 {
  transition-delay: 400ms;
}

.animate-on-scroll.delay-6 {
  transition-delay: 480ms;
}

/* ── Cosmic Keyframes ── */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes spin-reverse {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0deg);
  }
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

@keyframes drift {
  0% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(10px, -5px);
  }

  50% {
    transform: translate(-5px, 10px);
  }

  75% {
    transform: translate(-10px, -3px);
  }

  100% {
    transform: translate(0, 0);
  }
}

@keyframes orbit {
  from {
    transform: rotate(0deg) translateX(var(--orbit-radius)) rotate(0deg);
  }

  to {
    transform: rotate(360deg) translateX(var(--orbit-radius)) rotate(-360deg);
  }
}

@keyframes breathe {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

@keyframes accretion-spin {
  from {
    transform: rotateX(75deg) rotate(0deg);
  }

  to {
    transform: rotateX(75deg) rotate(360deg);
  }
}

/* ── Responsive base ── */
@media (max-width: 768px) {
  .section {
    padding: clamp(2rem, 5vh, 3rem) clamp(1rem, 4vw, 2rem);
  }

  .section-header {
    margin-bottom: var(--space-5);
  }
}

/* ── Claymation SVG Gooey Filters ── */
.visual-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

#cosmic-cursor-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999999;
}