/* =========================================================================
   Base Styles — Reset + Typo-Basis
   ========================================================================= */

/* Modern Reset (light-touch) */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg-base);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

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

ul, ol { list-style: none; padding: 0; margin: 0; }

/* Typography Defaults ----------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-regular);
  margin: 0;
  color: var(--color-text);
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-display); letter-spacing: var(--tracking-tight); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-heading); letter-spacing: var(--tracking-tight); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-heading); letter-spacing: var(--tracking-snug); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-heading); letter-spacing: var(--tracking-snug); }

p { margin: 0; max-width: var(--content-max); }

.eyebrow,
[data-eyebrow] {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: var(--font-weight-regular);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-soft);
}

.lead { font-size: var(--fs-lead); line-height: var(--lh-tight); color: var(--color-text-muted); }

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

/* Focus-States ------------------------------------------------------ */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Selection --------------------------------------------------------- */
::selection {
  background: var(--color-accent);
  color: var(--color-text);
}

/* Containers -------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  padding-inline: var(--container-pad);
  margin-inline: auto;
}

.container--narrow { max-width: 960px; }
.container--wide { max-width: 1440px; }

/* Section -----------------------------------------------------------*/
section {
  padding-block: var(--section-pad-y);
  position: relative;
}

/* Utility: noise-grain overlay for depth (subtle) ------------------- */
.grain {
  position: relative;
  isolation: isolate;
}

.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: screen;
}

/* Skip-Link (a11y) -------------------------------------------------- */
.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-toast);
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus-visible { top: var(--space-4); }
