/* ==========================================================================
   The O1 Space — Base
   Reset + global element styles. Loads after tokens.css and fonts.css.
   Component/page styles build on top of this, never against it.
   ========================================================================== */

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

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

body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

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

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  overflow-wrap: balance;
}

/* Keyboard focus is always visible, in brand color */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--green);
  color: var(--cream);
}

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

.section {
  padding-block: var(--space-8);
}

/* Small uppercase label (section eyebrows) */
.eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}

/* Skip link: invisible until focused via keyboard */
.skip {
  position: fixed;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  z-index: 999;
  background: var(--green);
  color: var(--cream);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: var(--text-sm);
  transform: translateY(-300%);
}
.skip:focus-visible { transform: none; }

/* Inline icons (Iconoir, self-hosted) */
.ic {
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.25em;
  flex: none;
}

/* Screen-reader-only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* RTL: logical properties handle most of it; explicit fixes live here */
[dir="rtl"] .ltr-only {
  display: none;
}
[dir="ltr"] .rtl-only {
  display: none;
}
