/* base.css - Base Styles and Paper Texture */

/* Keep the body background on its full document box, not the root canvas. */
html {
  background-color: var(--paper);
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 0, 0, 0.02) 0%, transparent 50%),
    url('../assets/textures/paper-grain.png');
  background-repeat: no-repeat, no-repeat, repeat;
  background-size: 100% 100%, 100% 100%, 256px 256px;
}

/* Continuous document-sized grain; only the small texture tile repeats. */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.045;
  background-size: 200px 200px;
  background-repeat: repeat;
  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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

::selection {
  background-color: var(--blue);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Typography utilities */
.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.handwritten {
  font-family: var(--font-hand);
  line-height: 1.15;
}

.brush {
  font-family: var(--font-brush);
}

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