/* -------------------------------------------------------------
   RESET & SYSTEM BASES
------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: #ffffff; /* Plain white foundation background */
  overflow-x: clip; /* Fix for CSS position: sticky scroll stacking support */
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
}

/* -------------------------------------------------------------
   ACCESSIBILITY: Focus & Motion
------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid #b14c33;
  outline-offset: 2px;
}

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

/* -------------------------------------------------------------
   TACTILE NOISE OVERLAY
------------------------------------------------------------- */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  content: "";
  opacity: 0.05;
  z-index: 500; /* Lowered from 9999 to leave room for modals/tooltips */
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* -------------------------------------------------------------
   SCROLL-TO-TOP BUTTON
------------------------------------------------------------- */
.scroll-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(11, 25, 44, 0.12);
  background-color: rgba(255, 251, 242, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(11, 25, 44, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease, background-color 0.3s ease;
}

.scroll-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(11, 25, 44, 0.15);
}

.scroll-to-top svg {
  width: 18px;
  height: 18px;
  color: #0b192c;
}

@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}

