/* Screen reader only class */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.spacer {
  flex: 1;
}

body {
  font-family: var(--font-family-primary);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
  position: relative;
}

/* Noise texture overlay - applies to key surfaces */
body::before,
#top-header::before,
.service-list li::before,
footer::before,
.office::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--noise-svg);
  opacity: var(--noise-opacity);
  pointer-events: none;
  z-index: -1; /* Behind content, above background */
}

/* Ensure target elements create stacking context for noise overlay */
#top-header {
  isolation: isolate; /* already has position: sticky, no change needed */
}
.service-list li,
.office,
footer {
  position: relative;
  isolation: isolate;
}

/* Typography hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: clamp(1vw, 6vw, 5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 600;
}

h4 {
  margin: 0;
  font-size: 1.25rem;
}

h5, h6 {
  font-size: 1rem;
}

p {
  font-size: 1.125rem;
  line-height: 1.5;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-surface);
}
::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.logo-text {
  font-family: PhiloLogicXP;
}

/* Responsive font sizes */
.text-responsive {
  font-size: clamp(2rem, 5vw, 4rem);
}

.row {
  display: flex;
  flex-direction: row;
  align-items: center;
}

section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  padding: 1rem;
  gap: 1rem;

  & > p, blockquote {
    max-width: clamp(200px, 800px, 90%);
  }
}

/* Reset default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Remove default margins */
ul, ol {
  margin: 0;
  padding: 0;
}

/* Remove default list styles */
ul, ol {
  list-style: none;
}

/* Remove default links */
a {
  text-decoration: none;
  color: inherit;
}

/* Remove default focus styles */
:focus {
  outline: none;
}
