/*! Strand v0.2.0 | MIT License | dillingerstaffing.com */

/*
 * Strand Base Styles
 * Global styles applied after reset. Establishes the lab surface,
 * typography defaults, focus indicators, and grain texture.
 * Requires tokens.css to be loaded first.
 */

/* ── Lab Surface ── */
body {
  font-family: var(--strand-font-sans);
  font-size: var(--strand-text-base);
  font-weight: var(--strand-weight-regular);
  line-height: var(--strand-leading-normal);
  color: var(--strand-on-surface-primary);
  background:
    /* Layer 1: Dot grid (graph paper / cleanroom floor) */
    radial-gradient(circle, rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    /* Layer 2: Overhead LED glow */
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(59, 130, 246, 0.03) 0%, transparent 100%),
    /* Layer 3: Gentle vertical gradient */
    linear-gradient(180deg, var(--strand-surface-primary) 0%, #FFFFFF 40%, var(--strand-surface-recessed) 100%);
  background-size: 24px 24px, 100% 100%, 100% 100%;
  background-color: var(--strand-surface-primary);
}

/* ── Grain Texture Overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.012;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Focus Ring ── */
:focus-visible {
  outline: 2px solid var(--strand-blue-primary);
  outline-offset: 2px;
}

/* ── Selection ── */
::selection {
  background-color: var(--strand-blue-wash);
  color: var(--strand-blue-abyss);
}

/* ── Prose Width ── */
.strand-prose {
  max-width: 65ch;
}

/* ── Container ── */
.strand-container {
  max-width: var(--strand-content-full);
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 4rem);
}

.strand-container-narrow {
  max-width: var(--strand-content-narrow);
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 4rem);
}

.strand-container-default {
  max-width: var(--strand-content-default);
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 4rem);
}

.strand-container-wide {
  max-width: var(--strand-content-wide);
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 4rem);
}

/* ── Section Rhythm ── */
.strand-section {
  padding-block: clamp(4rem, 8vw, 8rem);
}

.strand-section-hero {
  padding-block: clamp(6rem, 12vw, 12rem);
}

/* ── Scrollbar (Webkit) ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--strand-surface-recessed);
}

::-webkit-scrollbar-thumb {
  background: var(--strand-gray-300);
  border-radius: var(--strand-radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--strand-gray-400);
}
