/* =============================================================
   ACI — Base
   Reset, typography, and layout primitives. No section styling.
   ============================================================= */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  color: var(--bone);
  /* Dark default so clip-path wedges in the hero/workforce sections
     reveal ink-on-ink instead of a cream sliver. Sections that need a
     light background (e.g. .services) declare their own opaque bg. */
  background-color: var(--ink);
  text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol, li { list-style: none; padding: 0; margin: 0; }
p { margin: 0; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-tight);
  text-transform: uppercase;
}

input, textarea, select { font: inherit; color: inherit; color-scheme: dark; }

::selection {
  background: var(--safety);
  color: var(--ink);
}

/* ---------- Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--max-w);
  padding-inline: var(--gutter);
  margin-inline: auto;
}

.wrap-narrow {
  width: 100%;
  max-width: var(--max-w-narrow);
  padding-inline: var(--gutter);
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section--dark { background: var(--ink); color: var(--bone); }
.section--bone { background: var(--bone); color: var(--ink); }
.section--earth { background: var(--dirt-deep); color: var(--bone); }

/* ---------- Type utilities ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--muted-dark);
}

.section--bone .eyebrow,
.eyebrow--ink { color: var(--muted-light); }

.eyebrow--accent { color: var(--safety); }

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  display: inline-block;
  flex: 0 0 28px;
  opacity: 0.7;
}

.display {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
}

.mega {
  font-family: var(--font-display);
  font-size: var(--fs-mega);
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
}

.h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
}

.h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
}

.lede {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  line-height: 1.45;
  color: var(--muted-dark);
  max-width: 56ch;
}

.section--bone .lede { color: var(--muted-light); }

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
}

.outline-text {
  -webkit-text-stroke: 1.5px currentColor;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
  position: relative;
  isolation: isolate;
}

.btn::after {
  content: "";
  width: 18px;
  height: 10px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'><path d='M0 6 H22 M16 1 L22 6 L16 11' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='square' stroke-linejoin='miter'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'><path d='M0 6 H22 M16 1 L22 6 L16 11' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='square' stroke-linejoin='miter'/></svg>") no-repeat center / contain;
  transition: transform var(--dur-base) var(--ease-out);
  flex: 0 0 18px;
}

.btn:hover::after { transform: translateX(4px); }

.btn--primary {
  background: var(--safety);
  color: var(--ink);
  border-color: var(--safety);
}
.btn--primary:hover {
  background: var(--ink);
  color: var(--safety);
  border-color: var(--safety);
}

.btn--ghost-light { color: var(--bone); border-color: var(--bone); }
.btn--ghost-light:hover { background: var(--bone); color: var(--ink); }

.btn--ghost-dark { color: var(--ink); border-color: var(--ink); }
.btn--ghost-dark:hover { background: var(--ink); color: var(--bone); }

/* ---------- Pill (small inline tag) ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid currentColor;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- Reveal (used by reveal.js) ----------
   Hidden state is only applied when JS has flagged <html> with
   `.has-js`. Without JS (e.g. opening index.html via file://, or
   when scripts are blocked) every [data-reveal] element renders
   immediately as static content. */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
  will-change: opacity, transform;
}

.has-js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

.has-js [data-reveal-delay="1"] { transition-delay: 80ms;  }
.has-js [data-reveal-delay="2"] { transition-delay: 160ms; }
.has-js [data-reveal-delay="3"] { transition-delay: 240ms; }
.has-js [data-reveal-delay="4"] { transition-delay: 320ms; }
.has-js [data-reveal-delay="5"] { transition-delay: 400ms; }

/* ---------- A11y helpers ---------- */
.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;
}

:focus-visible {
  outline: 2px solid var(--safety);
  outline-offset: 3px;
}
