/* =============================================================================
   WipZen design system — BASE
   Reset, element defaults, typography scale, layout primitives.
   ========================================================================== */

/* ----------------------------------------------------------------- reset -- */

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

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

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd,
ul, ol {
  margin: 0;
}

ul[class],
ol[class] {
  padding: 0;
  list-style: none;
}

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button { background: none; }

table {
  border-collapse: collapse;
  width: 100%;
}

/* -------------------------------------------------------------- document -- */

body {
  background: var(--page);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ------------------------------------------------------------ typography -- */

h1, h2, h3, h4, h5, h6 {
  color: var(--heading);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: 1.3;
  text-wrap: balance;
}

h2 { font-size: clamp(31px, 4vw, 40px); line-height: 1.2; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

p { text-wrap: pretty; }

a {
  color: var(--fg-brand);
  text-decoration: none;
  transition: color var(--t-base) var(--ease);
}

a:hover { color: var(--brand-strong); }

strong, b { color: var(--heading); font-weight: 600; }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: .9em;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
}

::selection {
  background: var(--brand-soft);
  color: var(--heading);
}

/* Utility type roles ------------------------------------------------------ */

.display {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: 1.05;
  color: var(--heading);
  text-wrap: balance;
}

.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--body);
}

.meta {
  font-size: 14px;
  color: var(--body-subtle);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-brand-strong);
}

.eyebrow svg { width: 14px; height: 14px; }

/* An eyebrow is inline-flex, so centring it needs the flex context, not
   text-align on the parent. */
.eyebrow--center {
  display: flex;
  justify-content: center;
}

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

/* ---------------------------------------------------------------- layout -- */

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

.section {
  position: relative;
  padding-block: var(--section-y);
}

/* Sits directly under a page hero, which already carries bottom padding. */
.section--tight { padding-top: 24px; }

/* A short strip rather than a full section — the logo wall uses it. */
.section--sm { padding-block: 88px; }

/* Tinted full-bleed strip. */
.section--band {
  background: var(--band);
  border-block: 1px solid var(--border-on-band);
}

/* The inset white slab: a rounded card that spans the container and holds a
   whole section's content. Padding, not margin, so the rhythm still reads. */
.section--card > .container > .section__slab {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--elevation-1);
  padding: clamp(32px, 5vw, 64px);
}

.section__head {
  max-width: 768px;
  margin-bottom: 64px;
}

.section__head--center {
  text-align: center;
  margin-inline: auto;
}

.section__title { margin-bottom: 24px; }

.section__head .lead { margin-top: 0; }

/* Generic grids ----------------------------------------------------------- */

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.stack > * + * { margin-top: var(--stack-gap, 16px); }

@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .grid--2,
  .grid--3,
  .split { grid-template-columns: minmax(0, 1fr); }
  .section__head { margin-bottom: 40px; }
}

@media (max-width: 640px) {
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------- utilities -- */
/* A deliberately tiny layer, only for one-off rhythm adjustments between
   sections. Anything that recurs with meaning gets a real component class in
   components.css instead — these exist so no page needs an inline style. */

.u-flush-top { padding-top: 0; }

.u-mt-0  { margin-top: 0; }
.u-mt-sm { margin-top: 12px; }
.u-mt-md { margin-top: 20px; }
.u-mt-lg { margin-top: 28px; }
.u-mt-xl { margin-top: 40px; }

.u-mb-md  { margin-bottom: 20px; }
.u-mb-lg  { margin-bottom: 28px; }
.u-mb-xl  { margin-bottom: 32px; }
.u-mb-xxl { margin-bottom: 36px; }

.title-md { font-size: 20px; }

.text-sm-subtle {
  font-size: 14px;
  color: var(--body-subtle);
}

/* ------------------------------------------------------------------- a11y -- */

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: var(--r-md);
  background: var(--card);
  color: var(--heading);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--elevation-2);
  transition: top var(--t-base) var(--ease);
}

.skip-link:focus { top: 16px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--r-sm);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
