/* ==========================================================================
   Anvixa — reset, elements, layout primitives
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--ax-bg);
  color: var(--ax-text);
  font-family: var(--ax-font-body);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* Every Lucide icon carries .ax-i. Without an explicit size an inline SVG
   stretches to its container, so the default is set here and components
   override it where they need a different size. */
.ax-i {
  width: 18px;
  height: 18px;
  flex: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ax-font-display);
  color: var(--ax-ink);
  margin: 0 0 .5em;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.35rem + 3.1vw, 3.9rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.75rem); letter-spacing: -.03em; }
h3 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); }
h4 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; }
h5 { font-size: .9375rem; font-weight: 600; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-color: rgba(25, 132, 199, .55); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ax-accent); }

ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: .4em; }

strong, b { font-weight: 600; color: var(--ax-ink); }
small { font-size: .8125rem; }
hr { border: 0; border-top: 1px solid var(--ax-border); margin: 2.5rem 0; }

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

::selection { background: var(--ax-accent); color: var(--ax-ink); }

:focus-visible {
  outline: 2px solid var(--ax-accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

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

.ax-section { padding-block: var(--ax-section-y); position: relative; }
.ax-section--sm { padding-block: var(--ax-section-y-sm); }
.ax-section--tight-top { padding-top: 0; }

.ax-section--cream { background: var(--ax-mist); }
.ax-section--stone { background: var(--ax-stone-soft); }
.ax-section--offwhite { background: var(--ax-offwhite); }

.ax-section--ink {
  background: var(--ax-ink);
  color: var(--ax-text-on-dark);
}
.ax-section--ink h1, .ax-section--ink h2, .ax-section--ink h3,
.ax-section--ink h4, .ax-section--ink h5 { color: var(--ax-white); }
.ax-section--ink .ax-lede,
.ax-section--ink p { color: var(--ax-text-on-dark-muted); }
.ax-section--ink strong { color: var(--ax-white); }

/* Hairline rules between same-coloured stacked sections */
.ax-section--ruled { border-top: 1px solid var(--ax-border); }
.ax-section--ink.ax-section--ruled { border-top-color: rgba(255, 255, 255, .1); }

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

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

.ax-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.ax-split--text-first { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
@media (max-width: 980px) {
  .ax-split, .ax-split--text-first { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.ax-center { text-align: center; }
.ax-center .ax-lede { margin-inline: auto; }
.ax-mono { font-family: var(--ax-font-mono); }
.ax-nowrap { white-space: nowrap; }

.screen-reader-text,
.ax-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.ax-skip-link {
  position: absolute;
  left: 16px; top: -80px;
  z-index: 9999;
  background: var(--ax-ink);
  color: var(--ax-white);
  padding: 12px 20px;
  border-radius: var(--ax-r-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--ax-dur) var(--ax-ease);
}
.ax-skip-link:focus { top: 16px; }

/* Spacing utilities — used sparingly where a component needs a nudge */
.ax-mt-sm { margin-top: 18px; }
.ax-mt-md { margin-top: 24px; }
.ax-mt-lg { margin-top: 44px; }
.ax-mb-md { margin-bottom: 28px; }
.ax-strip-label { display: flex; justify-content: center; margin-bottom: 28px; }
.ax-stack-lg { display: grid; gap: 28px; }
