/* Reset + base typography for BlackHaus */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: var(--body);
  line-height: 1.55;
  color: var(--bh-text-primary);
  background: var(--bh-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
  min-height: 100vh;
}

html {
  overflow-x: clip;
}

/* Atmospheric grain — subtle, on body */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Display family */
.font-display,
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  letter-spacing: -0.022em;
  font-weight: 600;
  line-height: 1.05;
  text-wrap: balance;
}

/* Headings */
h1 { font-size: var(--display-lg); font-weight: 700; }
h2 { font-size: var(--display-md); font-weight: 700; }
h3 { font-size: var(--display-sm); font-weight: 600; }
h4 { font-size: var(--headline); font-family: 'Inter', system-ui, sans-serif; line-height: 1.2; letter-spacing: -0.01em; font-weight: 700; }

p {
  text-wrap: pretty;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

::selection {
  background: var(--bh-accent);
  color: var(--bh-black);
}

/* Utilities */
.label {
  font-size: var(--label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--bh-text-secondary);
}

.eyebrow {
  font-size: var(--label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--bh-nude);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--bh-taupe);
  opacity: 0.6;
}

.eyebrow.no-rule::before {
  display: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-block: clamp(64px, 10vw, 160px);
  position: relative;
}

.section-tight {
  padding-block: clamp(48px, 7vw, 96px);
}

.divider {
  height: 1px;
  background: var(--bh-border);
  border: 0;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--bh-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link */
.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--bh-snow);
  color: var(--bh-black);
  padding: 12px 16px;
  z-index: 10000;
  font-weight: 700;
  font-size: 14px;
}

.skip:focus {
  top: 16px;
}

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

/* Stacking */
main {
  position: relative;
  z-index: 2;
}
