/* ============================================================================
   ONEEXISTS — Base
   Reset + typography + body + headings + links + editorial defaults.
   All values reference tokens.css — never hard-code a color or size here.
   ============================================================================ */

/* Tiny reset (modern, not exhaustive — parent Astra covers most of it) */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--oe-font-body);
  font-size: var(--oe-fs-body);
  line-height: var(--oe-lh-body);
  font-weight: var(--oe-fw-regular);
  color: rgb(var(--oe-text));
  background: rgb(var(--oe-bg));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* Selection — subtle, on-brand */
::selection { background: rgb(var(--oe-black)); color: rgb(var(--oe-white)); }

/* Editorial focus ring — visible only for keyboard users */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid rgb(var(--oe-black));
  outline-offset: 3px;
}

/* Images — sensible defaults */
img, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Headings — the DNA rule: weight 500, never bold */
h1, h2, h3, h4, h5, h6, .oe-h1, .oe-h2, .oe-h3, .oe-h4, .oe-h5, .oe-h6 {
  font-family: var(--oe-font-head);
  font-weight: var(--oe-fw-medium);
  line-height: var(--oe-lh-heading);
  margin: 0 0 0.75em;
  color: rgb(var(--oe-text));
}

h1, .oe-h1 { font-size: var(--oe-fs-h1); letter-spacing: var(--oe-ls-tight); }
h2, .oe-h2 { font-size: var(--oe-fs-h2); letter-spacing: var(--oe-ls-tight); }
h3, .oe-h3 { font-size: var(--oe-fs-h3); letter-spacing: var(--oe-ls-normal); }
h4, .oe-h4 { font-size: var(--oe-fs-h4); letter-spacing: var(--oe-ls-normal); }
h5, .oe-h5 { font-size: var(--oe-fs-h5); letter-spacing: var(--oe-ls-normal); }
h6, .oe-h6 { font-size: var(--oe-fs-h6); letter-spacing: var(--oe-ls-extra-wide); text-transform: uppercase; color: rgb(var(--oe-text-muted)); }

.oe-display {
  font-family: var(--oe-font-head);
  font-weight: var(--oe-fw-medium);
  font-size: var(--oe-fs-display);
  line-height: var(--oe-lh-tight);
  letter-spacing: var(--oe-ls-extra-tight);
  margin: 0 0 0.5em;
}

.oe-eyebrow {
  display: inline-block;
  font-size: var(--oe-fs-caption);
  font-weight: var(--oe-fw-medium);
  letter-spacing: var(--oe-ls-extra-wide);
  text-transform: uppercase;
  color: rgb(var(--oe-text-muted));
  margin-bottom: 1rem;
}

/* Body copy */
p { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }
.oe-lede {
  font-size: var(--oe-fs-body-lg);
  line-height: 1.55;
  color: rgb(var(--oe-text));
  font-weight: var(--oe-fw-light);
}

/* Links — thin underline, offset just enough to breathe */
a {
  color: currentColor;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgb(var(--oe-text) / 0.4);
  transition: text-decoration-color var(--oe-duration-fast) var(--oe-ease);
}
a:hover { text-decoration-color: rgb(var(--oe-text)); }

/* Navigation / UI links — no underline by default */
nav a, .oe-btn, .oe-eyebrow a, .oe-nav-link {
  text-decoration: none;
}
.oe-nav-link {
  font-size: var(--oe-fs-nav);
  font-weight: var(--oe-fw-medium);
  letter-spacing: var(--oe-ls-extra-wide);
  text-transform: uppercase;
  color: rgb(var(--oe-text));
  transition: color var(--oe-duration-fast) var(--oe-ease);
}
.oe-nav-link:hover { color: rgb(var(--oe-text-muted)); }

/* Lists */
ul, ol { margin: 0 0 1.25em; padding-left: 1.5em; }
li + li { margin-top: 0.35em; }
ul.oe-plain, ol.oe-plain { list-style: none; padding-left: 0; }

/* HR — a hairline */
hr {
  border: 0;
  height: 1px;
  background: rgb(var(--oe-border));
  margin: var(--oe-gap-xl) 0;
}

/* Blockquote — editorial pull quote */
blockquote {
  margin: var(--oe-gap-xl) 0;
  padding: 0 var(--oe-gap-lg);
  border-left: 1px solid rgb(var(--oe-black));
  font-size: var(--oe-fs-body-lg);
  line-height: 1.5;
  font-weight: var(--oe-fw-light);
  color: rgb(var(--oe-text));
}

/* Tabular numerals — for prices and serial numbers */
.oe-tabular, .oe-price, .oe-passport {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Serial / passport block — monospace industrial */
.oe-passport {
  font-family: var(--oe-font-mono);
  font-size: var(--oe-fs-small);
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: var(--oe-ls-normal);
  color: rgb(var(--oe-text));
  border-top: var(--oe-border-thin);
  padding-top: 1rem;
  margin-top: var(--oe-gap-lg);
}
.oe-passport dt {
  color: rgb(var(--oe-text-muted));
  font-weight: var(--oe-fw-regular);
  float: left;
  width: 8rem;
}
.oe-passport dd {
  margin: 0 0 0.25rem;
}

/* Utility: visually-hidden for accessible labels */
.oe-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Skip link for keyboard nav */
.oe-skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: rgb(var(--oe-black));
  color: rgb(var(--oe-white));
  padding: 0.75rem 1rem;
  z-index: 9999;
  text-decoration: none;
  font-size: var(--oe-fs-caption);
  letter-spacing: var(--oe-ls-extra-wide);
  text-transform: uppercase;
}
.oe-skip-link:focus-visible { top: 1rem; }

/* Override common Astra defaults that fight our system */
.ast-container { max-width: var(--oe-container-md) !important; }
.entry-title { font-weight: var(--oe-fw-medium); letter-spacing: var(--oe-ls-tight); }
button, input, select, textarea { font-family: inherit; }
