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

html {
  scroll-behavior: smooth;
  background-color: var(--scene-color);
  color: var(--ink-primary);
  transition: background-color var(--dur-slow) var(--ease-out-expo);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-primary);
  background-color: var(--scene-color);
  transition: background-color var(--dur-slow) var(--ease-out-expo);
  overflow-x: hidden;
  position: relative;
}

/* Fixed lowest-layer atmospheric radial tint echoing current shell color */
.shell-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-backdrop);
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 18%, var(--shell-glow), transparent 55%),
    radial-gradient(circle at 82% 80%, var(--shell-glow), transparent 58%);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Subtle desktop-only architectural grain texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 940;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

@media (hover: none), (pointer: coarse), (max-width: 820px), (prefers-reduced-motion: reduce) {
  body::after {
    display: none !important;
  }
}

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

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

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

h1,
h2,
h3,
p {
  margin: 0;
}

:focus-visible {
  outline: 1px solid var(--shell-accent);
  outline-offset: 4px;
}

::selection {
  background: var(--shell-accent);
  color: #0e0f11;
}

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

@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;
  }
}

/* Hide Netlify free-tier floating badge */
#nl-badge-frame,
#nl-hud-frame {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
