/* ============================================================
   HE3 LLC — "Quantum Void" Design System
   A website that IS art. The background is the foreground.
   Light from darkness. Form from emptiness.
   ============================================================ */

/* --- Animatable Custom Properties (bleeding-edge @property) --- */
@property --glow-hue {
  syntax: "<angle>";
  inherits: false;
  initial-value: 190deg;
}

@property --orbit-rotation {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@property --void-opacity {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

@property --gradient-pos {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

@property --enso-draw {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

/* --- CSS Layers for cascade control --- */
@layer reset, base, layout, components, animations, utilities;

/* --- Reset --- */
@layer reset {
  *, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

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

  body {
    min-height: 100dvh;
    overflow-x: hidden;
  }

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

  img, svg {
    display: block;
    max-width: 100%;
  }

  button, input, textarea {
    font: inherit;
    color: inherit;
    border: none;
    background: none;
  }

  ul, ol {
    list-style: none;
  }
}

/* --- Base / Design Tokens --- */
@layer base {
  :root {
    /* Void palette */
    --void: #06060c;
    --void-deep: #030308;
    --void-surface: #0d0d18;
    --void-elevated: #141425;

    /* Energy spectrum */
    --cyan: #00e5ff;
    --cyan-dim: #00a5b8;
    --purple: #7c4dff;
    --purple-dim: #5c35cc;
    --gold: #ffd740;
    --gold-dim: #bfa030;
    --rose: #ff4081;

    /* Neutrals */
    --text-primary: #f0eeec;
    --text-secondary: #c2beb9;
    --text-ghost: #9e9a95;

    /* Semantic */
    --glow-cyan: 0 0 40px rgba(0, 229, 255, 0.3), 0 0 80px rgba(0, 229, 255, 0.1);
    --glow-purple: 0 0 40px rgba(124, 77, 255, 0.3), 0 0 80px rgba(124, 77, 255, 0.1);
    --glow-gold: 0 0 40px rgba(255, 215, 64, 0.3), 0 0 80px rgba(255, 215, 64, 0.1);

    /* Glass */
    --glass-bg: rgba(13, 13, 24, 0.6);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-highlight: rgba(255, 255, 255, 0.03);

    /* Spacing — fluid scale */
    --space-xs: clamp(0.25rem, 0.5vw, 0.5rem);
    --space-s: clamp(0.5rem, 1vw, 1rem);
    --space-m: clamp(1rem, 2vw, 2rem);
    --space-l: clamp(2rem, 4vw, 4rem);
    --space-xl: clamp(3rem, 6vw, 6rem);
    --space-2xl: clamp(4rem, 10vw, 10rem);

    /* Typography — fluid scale */
    --text-xs: clamp(0.7rem, 0.8vw, 0.8rem);
    --text-s: clamp(0.8rem, 0.9vw, 0.95rem);
    --text-m: clamp(1rem, 1.1vw, 1.15rem);
    --text-l: clamp(1.3rem, 1.8vw, 1.8rem);
    --text-xl: clamp(2rem, 3.5vw, 3.5rem);
    --text-2xl: clamp(3rem, 6vw, 6rem);
    --text-display: clamp(5rem, 15vw, 15rem);

    /* Fonts */
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', monospace;

    /* Timing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-sine: cubic-bezier(0.37, 0, 0.63, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Misc */
    --radius: 8px;
    --radius-l: 16px;
  }

  body {
    font-family: var(--font-body);
    font-size: var(--text-m);
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--void);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Selection */
  ::selection {
    background: rgba(0, 229, 255, 0.2);
    color: var(--cyan);
  }

  /* Scrollbar */
  ::-webkit-scrollbar {
    width: 6px;
  }
  ::-webkit-scrollbar-track {
    background: var(--void);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--void-elevated);
    border-radius: 3px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: var(--text-ghost);
  }

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

/* --- Layout --- */
@layer layout {
  .page-wrapper {
    position: relative;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  .canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
  }

  .content {
    position: relative;
    z-index: 1;
    flex: 1;
  }

  .container {
    width: min(90%, 1200px);
    margin-inline: auto;
  }

  .container--narrow {
    width: min(85%, 800px);
    margin-inline: auto;
  }

  /* --- Navigation --- */
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-m) var(--space-l);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.6s var(--ease-out-expo),
                backdrop-filter 0.6s var(--ease-out-expo);
  }

  .nav--scrolled {
    background: rgba(6, 6, 12, 0.8);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
  }

  .nav__logo {
    display: flex;
    align-items: center;
    gap: var(--space-s);
  }

  .nav__logo-icon {
    width: 36px;
    height: 36px;
    transition: transform 0.4s var(--spring);
  }

  .nav__logo:hover .nav__logo-icon {
    transform: rotate(120deg) scale(1.1);
  }

  .nav__logo-text {
    font-family: var(--font-mono);
    font-size: var(--text-s);
    font-weight: 300;
    letter-spacing: 0.3em;
    color: var(--text-secondary);
    text-transform: uppercase;
  }

  .nav__links {
    display: flex;
    gap: var(--space-l);
    align-items: center;
  }

  .nav__link {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-ghost);
    position: relative;
    padding-block: var(--space-xs);
    transition: color 0.3s ease;
  }

  .nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    transition: width 0.4s var(--ease-out-expo);
  }

  .nav__link:hover {
    color: var(--text-primary);
  }

  .nav__link:hover::after {
    width: 100%;
  }

  .nav__link--active {
    color: var(--text-secondary);
  }

  .nav__link--active::after {
    width: 100%;
    opacity: 0.4;
  }

  /* Mobile nav toggle */
  .nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
  }

  .nav__toggle-bar {
    width: 24px;
    height: 1.5px;
    background: var(--text-secondary);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav__toggle--open .nav__toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(4.5px, 4.5px);
  }
  .nav__toggle--open .nav__toggle-bar:nth-child(2) {
    opacity: 0;
  }
  .nav__toggle--open .nav__toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(4.5px, -4.5px);
  }

  @media (max-width: 640px) {
    .nav__toggle {
      display: flex;
    }

    /* backdrop-filter on .nav--scrolled creates a new containing block,
       which breaks position:fixed on .nav__links (the mobile menu overlay).
       Remove it on mobile so the fixed sidebar covers the full viewport. */
    .nav--scrolled {
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }

    .nav__links {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      width: 260px;
      flex-direction: column;
      justify-content: center;
      gap: var(--space-l);
      background: rgba(6, 6, 12, 0.95);
      backdrop-filter: blur(30px);
      -webkit-backdrop-filter: blur(30px);
      padding: var(--space-xl);
      transform: translateX(100%);
      transition: transform 0.5s var(--ease-out-expo);
    }

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

    .nav__link {
      font-size: var(--text-s);
    }
  }
}

/* --- Components --- */
@layer components {
  /* ---- Hero ---- */
  .hero {
    position: relative;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  .hero__title-container {
    position: relative;
    text-align: center;
    z-index: 2;
    pointer-events: none;
  }

  /* Giant background text — the void speaks */
  .hero__bg-text {
    font-family: var(--font-body);
    font-weight: 100;
    font-size: var(--text-display);
    letter-spacing: 0.15em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    user-select: none;
    z-index: 0;
    animation: bg-text-drift 30s var(--ease-in-out-sine) infinite alternate;
  }

  @keyframes bg-text-drift {
    0%   { letter-spacing: 0.15em; opacity: 0.5; }
    50%  { letter-spacing: 0.25em; opacity: 1; }
    100% { letter-spacing: 0.15em; opacity: 0.5; }
  }

  .hero__subtitle {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--text-ghost);
    margin-top: var(--space-m);
    animation: fade-up 1.2s var(--ease-out-expo) 0.8s both;
  }

  .hero__scroll-hint {
    position: absolute;
    bottom: var(--space-l);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-s);
    animation: fade-up 1.2s var(--ease-out-expo) 1.5s both;
  }

  .hero__scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--text-ghost), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
  }

  @keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
    50%      { opacity: 1; transform: scaleY(1); }
  }

  /* ---- Philosophy Section ---- */
  .philosophy {
    padding: var(--space-2xl) 0;
    position: relative;
  }

  .philosophy__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
  }

  @media (max-width: 768px) {
    .philosophy__layout {
      grid-template-columns: 1fr;
      gap: var(--space-l);
    }
  }

  .philosophy__text {
    max-width: 500px;
  }

  .philosophy__heading {
    font-weight: 200;
    font-size: var(--text-xl);
    line-height: 1.2;
    margin-bottom: var(--space-m);
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .philosophy__body {
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.9;
  }

  .philosophy__body p + p {
    margin-top: var(--space-m);
  }

  /* ---- Enso Section ---- */
  .enso-section {
    padding: var(--space-2xl) 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 80vh;
  }

  .enso-container {
    position: relative;
    width: clamp(280px, 50vw, 500px);
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .enso-svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
  }

  .enso-path {
    fill: none;
    stroke: url(#ensoGradient);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.3));
    transition: stroke-dashoffset 2s var(--ease-out-expo);
  }

  .enso-path--drawn {
    stroke-dashoffset: 0;
  }

  .enso-text {
    text-align: center;
    z-index: 1;
    max-width: 300px;
  }

  .enso-text__quote {
    font-weight: 200;
    font-size: var(--text-l);
    font-style: italic;
    line-height: 1.5;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease 0.8s, transform 1s var(--ease-out-expo) 0.8s;
  }

  .enso-text__quote--visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* ---- Separator — energy line ---- */
  .energy-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent 0%,
      var(--cyan-dim) 20%,
      var(--purple) 50%,
      var(--gold-dim) 80%,
      transparent 100%
    );
    opacity: 0.3;
    margin: var(--space-xl) 0;
    animation: energy-flow 4s linear infinite;
    background-size: 200% 100%;
  }

  @keyframes energy-flow {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }

  /* ---- CTA Section ---- */
  .cta-section {
    padding: var(--space-2xl) 0;
    text-align: center;
  }

  .cta-section__heading {
    font-weight: 200;
    font-size: var(--text-xl);
    margin-bottom: var(--space-m);
  }

  .cta-section__text {
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: var(--space-l);
    max-width: 500px;
    margin-inline: auto;
  }

  /* ---- Buttons ---- */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-s);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: var(--space-s) var(--space-l);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
  }

  .btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(124, 77, 255, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  .btn:hover {
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
  }

  .btn:hover::before {
    opacity: 1;
  }

  .btn:active {
    transform: translateY(0);
  }

  .btn__arrow {
    transition: transform 0.3s var(--spring);
  }

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

  /* ---- Contact Form ---- */
  .contact-section {
    padding: var(--space-2xl) 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
  }

  .contact-form {
    width: min(90%, 560px);
    padding: var(--space-xl);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-l);
    backdrop-filter: blur(30px) saturate(1.2);
    -webkit-backdrop-filter: blur(30px) saturate(1.2);
    position: relative;
    overflow: hidden;
  }

  /* Subtle gradient shimmer on the form */
  .contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), var(--purple), transparent);
    animation: form-shimmer 6s linear infinite;
  }

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

  .contact-form__title {
    font-weight: 200;
    font-size: var(--text-xl);
    margin-bottom: var(--space-xs);
  }

  .contact-form__subtitle {
    color: var(--text-ghost);
    font-size: var(--text-s);
    margin-bottom: var(--space-l);
  }

  .form-field {
    margin-bottom: var(--space-m);
    position: relative;
  }

  .form-field__label {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-ghost);
    margin-bottom: var(--space-xs);
  }

  .form-field__input,
  .form-field__textarea {
    width: 100%;
    padding: var(--space-s);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: var(--text-m);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
  }

  .form-field__input:focus,
  .form-field__textarea:focus {
    outline: none;
    border-color: rgba(0, 229, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.08), inset 0 0 20px rgba(0, 229, 255, 0.03);
  }

  .form-field__textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.7;
  }

  .form-field__input::placeholder,
  .form-field__textarea::placeholder {
    color: var(--text-ghost);
    opacity: 0.6;
  }

  .contact-form__submit {
    width: 100%;
    margin-top: var(--space-m);
  }

  .contact-form__note {
    margin-top: var(--space-m);
    font-size: var(--text-xs);
    color: var(--text-ghost);
    text-align: center;
    line-height: 1.6;
  }

  .contact-form__note a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  /* ---- Legal Pages (Privacy, Terms) ---- */
  .legal {
    padding: var(--space-2xl) 0 var(--space-xl);
  }

  .legal__header {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-l);
    border-bottom: 1px solid var(--glass-border);
  }

  .legal__title {
    font-weight: 200;
    font-size: var(--text-xl);
    margin-bottom: var(--space-xs);
  }

  .legal__updated {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-ghost);
    letter-spacing: 0.1em;
  }

  .legal__content h2 {
    font-weight: 400;
    font-size: var(--text-l);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-m);
    color: var(--text-primary);
  }

  .legal__content h3 {
    font-weight: 400;
    font-size: var(--text-m);
    margin-top: var(--space-l);
    margin-bottom: var(--space-s);
    color: var(--text-secondary);
  }

  .legal__content p {
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.9;
    margin-bottom: var(--space-m);
    text-wrap: pretty;
  }

  .legal__content ul {
    margin-bottom: var(--space-m);
    padding-left: var(--space-m);
  }

  .legal__content li {
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.9;
    margin-bottom: var(--space-xs);
    position: relative;
    padding-left: var(--space-m);
  }

  .legal__content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.8em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--purple-dim);
  }

  .legal__content a {
    color: var(--cyan-dim);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(0, 229, 255, 0.3);
    transition: text-decoration-color 0.3s ease;
  }

  .legal__content a:hover {
    text-decoration-color: var(--cyan);
  }

  /* ---- Footer ---- */
  .footer {
    padding: var(--space-l) 0;
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 1;
  }

  .footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-m);
  }

  .footer__copyright {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-ghost);
    letter-spacing: 0.05em;
  }

  .footer__links {
    display: flex;
    gap: var(--space-l);
  }

  .footer__link {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-ghost);
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
  }

  .footer__link:hover {
    color: var(--text-secondary);
  }

  @media (max-width: 480px) {
    .footer__inner {
      flex-direction: column;
      text-align: center;
    }
  }
}

/* --- Animations --- */
@layer animations {
  /* Fade in up — used throughout */
  @keyframes fade-up {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  /* Reveal on scroll — IntersectionObserver adds this class */
  .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
  }

  .reveal--visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger children */
  .reveal--stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out-expo),
                transform 0.6s var(--ease-out-expo);
  }

  .reveal--stagger.reveal--visible > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
  .reveal--stagger.reveal--visible > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
  .reveal--stagger.reveal--visible > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
  .reveal--stagger.reveal--visible > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
  .reveal--stagger.reveal--visible > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }

  /* Continuous ambient glow shift */
  @keyframes glow-shift {
    0%   { --glow-hue: 190deg; }
    33%  { --glow-hue: 260deg; }
    66%  { --glow-hue: 45deg; }
    100% { --glow-hue: 190deg; }
  }

  /* Page-level view transition names */
  .hero              { view-transition-name: hero; }
  .nav               { view-transition-name: navigation; }
  .footer            { view-transition-name: footer; }

  /* View Transition API animations */
  @keyframes vt-slide-out {
    to {
      opacity: 0;
      transform: translateY(-20px);
    }
  }

  @keyframes vt-slide-in {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
  }

  ::view-transition-old(root) {
    animation: vt-slide-out 0.3s var(--ease-out-expo) forwards;
  }

  ::view-transition-new(root) {
    animation: vt-slide-in 0.3s var(--ease-out-expo) forwards;
  }

  /* Custom cursor glow */
  .cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(
      circle,
      rgba(0, 229, 255, 0.06) 0%,
      rgba(124, 77, 255, 0.03) 30%,
      transparent 70%
    );
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
  }

  /* Film grain overlay */
  .grain {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    animation: grain-drift 8s steps(10) infinite;
  }

  @keyframes grain-drift {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
  }

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

    .canvas-bg {
      display: none;
    }

    .grain {
      display: none;
    }

    .cursor-glow {
      display: none;
    }

    .reveal {
      opacity: 1;
      transform: none;
    }

    .reveal--stagger > * {
      opacity: 1;
      transform: none;
    }
  }
}

/* --- Utilities --- */
@layer utilities {
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .text-gradient {
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .text-gradient--warm {
    background: linear-gradient(135deg, var(--gold), var(--rose));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .glow-text {
    text-shadow: 0 0 40px rgba(0, 229, 255, 0.4), 0 0 80px rgba(0, 229, 255, 0.1);
  }
}
