/* =============================================================
   Ciclo — Base
   Reset, typography defaults, and global atmospherics (paper grain).
   ============================================================= */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }

/* Smooth in-page scrolling for nav-anchor clicks — gated behind
   prefers-reduced-motion so motion-sensitive visitors get an instant
   jump instead. This is the one motion allowed on this page. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper-cream);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv01', 'kern';
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; background: none; border: none; padding: 0; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

/* Headings reset — page composes its own */
h1, h2, h3, h4, h5, h6, p { margin: 0; }

/* Frost mode: no paper grain. The body's gradient blobs do the work. */
body::before { display: none; }

/* All page chrome should sit above the grain — sections and overlays */
.layer { position: relative; z-index: 2; }

/* ---------- Container ---------- */

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

.container-wide {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Section rhythm ---------- */

.section { padding-top: var(--section-y); padding-bottom: var(--section-y); position: relative; z-index: 2; }
.section-tight { padding-top: clamp(48px, 6vw, 96px); padding-bottom: clamp(48px, 6vw, 96px); position: relative; z-index: 2; }

/* ---------- Type primitives ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--tracking-display);
  line-height: 0.94;
  color: var(--ink);
}

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.mono {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  font-size: 11px;
  font-weight: 500;
}

.mono-md {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  font-size: 12px;
  font-weight: 500;
}

.mono-num {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0;
  font-feature-settings: 'tnum';
}

.lead {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.5;
  color: var(--body);
}

.muted { color: var(--body-muted); }
.on-dark .muted { color: var(--body-on-dark-muted); }

/* Hairline rule */
hr.hairline {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 0;
  height: 0;
}
.on-dark hr.hairline { border-top-color: var(--hairline-on-dark); }

/* Selection */
::selection {
  background: var(--brand);
  color: #FFFFFF;
}
