/**
 * BlackRat — Base styles
 */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .br-particles,
  .br-parallax,
  .br-float,
  .br-cursor,
  .br-light-beam {
    display: none !important;
  }
}

body {
  font-family: var(--br-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--br-text);
  background: var(--br-bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.has-custom-cursor {
  cursor: none;
}

body.has-custom-cursor a,
body.has-custom-cursor button,
body.has-custom-cursor input,
body.has-custom-cursor textarea,
body.has-custom-cursor select,
body.has-custom-cursor [role="button"] {
  cursor: none;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--br-link);
  text-decoration: none;
  transition: color var(--br-dur-micro) var(--br-ease);
}

a:hover {
  color: var(--br-red);
}

:focus-visible {
  outline: 2px solid var(--br-red);
  outline-offset: 3px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--br-font-alt);
  font-weight: 800;
  letter-spacing: var(--br-tracking-tight);
  line-height: 1.1;
  color: var(--br-text);
}

.container {
  width: min(100% - 2.5rem, var(--br-container));
  margin-inline: auto;
}

.container--wide {
  width: min(100% - 2.5rem, var(--br-container-wide));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: var(--br-space-3xl) 0;
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--br-font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--br-red);
  margin-bottom: 1rem;
}

.section__label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--br-red);
  box-shadow: 0 0 12px rgba(255, 23, 68, 0.6);
}

.section__title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 1rem;
}

.section__desc {
  max-width: 560px;
  color: var(--br-text-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
}

.section__header {
  margin-bottom: var(--br-space-xl);
}

.section__header--center {
  text-align: center;
}

.section__header--center .section__desc {
  margin-inline: auto;
}

/* Site background layers */
.br-site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--br-bg-primary);
  overflow: hidden;
}

.br-site-bg__glow {
  position: absolute;
  width: 60vw;
  height: 60vw;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 23, 68, 0.12) 0%, transparent 65%);
  filter: blur(40px);
}

.br-site-bg__glow--secondary {
  width: 40vw;
  height: 40vw;
  top: auto;
  bottom: 10%;
  left: 10%;
  transform: none;
  background: radial-gradient(circle, rgba(255, 23, 68, 0.06) 0%, transparent 70%);
  opacity: 0.7;
}

.br-site-bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 75%);
}

.br-site-bg__particles {
  position: absolute;
  inset: 0;
}

/* Scroll progress */
.br-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--br-red);
  z-index: calc(var(--br-z-header) + 10);
  box-shadow: 0 0 12px rgba(255, 23, 68, 0.5);
  transform-origin: left;
  pointer-events: none;
}

/* Reveal animations */
.br-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--br-dur-section) var(--br-ease-out),
    transform var(--br-dur-section) var(--br-ease-out),
    filter var(--br-dur-section) var(--br-ease-out);
  filter: blur(4px);
}

.br-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.br-reveal--scale {
  transform: scale(0.96) translateY(16px);
}

.br-reveal--scale.is-visible {
  transform: scale(1) translateY(0);
}

.br-stagger > .br-reveal:nth-child(1) { transition-delay: 0ms; }
.br-stagger > .br-reveal:nth-child(2) { transition-delay: 80ms; }
.br-stagger > .br-reveal:nth-child(3) { transition-delay: 160ms; }
.br-stagger > .br-reveal:nth-child(4) { transition-delay: 240ms; }
.br-stagger > .br-reveal:nth-child(5) { transition-delay: 320ms; }
.br-stagger > .br-reveal:nth-child(6) { transition-delay: 400ms; }
.br-stagger > .br-reveal:nth-child(7) { transition-delay: 480ms; }
.br-stagger > .br-reveal:nth-child(8) { transition-delay: 560ms; }

@media (prefers-reduced-motion: reduce) {
  .br-reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* Screen reader */
.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;
}
