/*
  ArevNex Consulting, LLC: site stylesheet (the only one).

  Design system: every color, type step, spacing value, radius, and breakpoint lives in the
  :root token block below. Nothing after that block introduces a new literal color or spacing.

  Section order is fixed: Design tokens > Reset and base > Layout > Components > Utilities >
  Media queries. Media queries are collected in the final section, not co-located.

  House style: 2-space indent, lowercase class names, BEM-lite (block__element--modifier),
  one rule per selector, no !important, no @import, lines under ~100 characters.

  Maintenance facts that are easy to get wrong:
  (a) Adding a service means editing services.html AND the summary cards on index.html.
  (b) Changing contact details means editing contact.html AND the footer of all eight pages
      (plus the JSON-LD block in the <head> of index.html).
  The header/footer markup is duplicated verbatim in all eight HTML files; change all together.

  Pages are static and governed by a CSP that forbids inline styles: never add style="" or
  <style>. Add a class here instead.
*/

/* ==== Design tokens ==== */
:root {
  /*
    Colors and verified WCAG 2.x contrast ratios (relative luminance formula):
      ink #111A21 on paper #FAF8F5 ............ 16.60:1  body text
      ink on paper-deep #F2EEE8 ............... 15.22:1  body text, alt sections
      ink on surface #FFFFFF .................. 17.59:1  cards
      ink-muted #3A4750 on paper .............. 9.02:1   secondary text
      ink-muted on paper-deep ................. 8.27:1
      ink-muted on surface .................... 9.56:1
      slate #3E5A6B on paper .................. 6.88:1   eyebrows, step numbers
      slate on paper-deep ..................... 6.31:1
      slate on surface ........................ 7.29:1
      amber-deep #7A4F0C on paper ............. 6.71:1   link text, focus ring
      amber-deep on paper-deep ................ 6.16:1
      amber-deep on surface ................... 7.12:1
      ink on amber #E0A33E .................... 7.94:1   primary button
      paper on ink ............................ 16.60:1  footer text
      on-dark-muted #C9D2D9 on ink ............ 11.48:1  footer secondary text
      amber on ink ............................ 7.94:1   footer links, focus ring on dark
    Amber on paper is only 2.09:1, so amber is never used for text on light backgrounds;
    there it appears only as decoration (mark, rules, link underlines beside darker text).
    The line color #D8D2C8 is decorative (card edges), not a UI-component boundary.
  */
  --color-ink: #111a21;
  --color-ink-muted: #3a4750;
  --color-paper: #faf8f5;
  --color-paper-deep: #f2eee8;
  --color-surface: #fff;
  --color-amber: #e0a33e;
  --color-amber-deep: #7a4f0c;
  --color-amber-glow: rgb(224 163 62 / 0.16);
  --color-slate: #3e5a6b;
  --color-line: #d8d2c8;
  --color-on-dark-muted: #c9d2d9;

  /* Type: system stack only. Fluid scale, ratio ~1.25, 320px to 1180px viewport. */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.44rem, 1.3rem + 0.7vw, 1.75rem);
  --step-3: clamp(1.73rem, 1.5rem + 1.15vw, 2.2rem);
  --step-4: clamp(2.07rem, 1.7rem + 1.9vw, 2.9rem);
  --leading-tight: 1.2;
  --leading-body: 1.6;
  --weight-bold: 700;
  --weight-semibold: 600;

  /* Spacing: 8px scale (0.5rem = 8px), plus a 4px half-step for hairline gaps. */
  --space-half: 0.25rem;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --space-12: 6rem;

  /* Shape and measure */
  --radius-sm: 4px;
  --radius-md: 8px;
  --border-thin: 1px;
  --border-rule: 2px;
  --focus-width: 3px;
  --measure: 68ch;
  --page-max: 1180px;
  --mark-size: 28px;
  --arc-width: 3rem;
  --arc-height: 0.5rem;
  --target-min: 44px;
  --tracking-caps: 0.06em;
  --underline-offset: 0.2em;
  --hero-measure: 22ch;
  --lockup-width: 16rem;
  --glow-reach: 55%;

  /*
    Breakpoints. var() cannot be used inside @media, so these are documentary; the Media
    queries section repeats these literals: --bp-md 40em (640px), --bp-lg 64em (1024px).
  */
  --bp-md: 40em;
  --bp-lg: 64em;
}

/* ==== Reset and base ==== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: var(--leading-body);
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-2);
  line-height: var(--leading-tight);
  font-weight: var(--weight-bold);
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
}

h2 {
  font-size: var(--step-3);
}

h3 {
  font-size: var(--step-1);
}

p,
ul,
ol,
dl {
  margin: 0 0 var(--space-2);
}

ul,
ol {
  padding-left: var(--space-3);
}

li + li {
  margin-top: var(--space-half);
}

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

a {
  color: var(--color-amber-deep);
  text-decoration-color: var(--color-amber);
  text-decoration-thickness: var(--border-rule);
  text-underline-offset: var(--underline-offset);
}

a:hover {
  color: var(--color-ink);
}

:focus-visible {
  outline: var(--focus-width) solid var(--color-amber-deep);
  outline-offset: var(--border-rule);
}

strong {
  font-weight: var(--weight-semibold);
}

/* ==== Layout ==== */
.wrap {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--space-2);
}

.prose {
  max-width: var(--measure);
}

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

.section--alt {
  background: var(--color-paper-deep);
  border-block: var(--border-thin) solid var(--color-line);
}

.grid {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.grid > li + li {
  margin-top: 0;
}

/* ==== Components ==== */

/* Skip link: first focusable element on every page; off-screen until focused. */
.skip-link {
  position: absolute;
  top: var(--space-1);
  left: var(--space-1);
  z-index: 10;
  padding: var(--space-1) var(--space-2);
  background: var(--color-ink);
  color: var(--color-paper);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.skip-link:focus-visible {
  outline-color: var(--color-amber);
}

/* Site header: brand link plus a navigation list that wraps (no toggle, no script). */
.site-header {
  border-bottom: var(--border-thin) solid var(--color-line);
  background: var(--color-paper);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: var(--space-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-ink);
  text-decoration: none;
  min-height: var(--target-min);
}

.brand__mark {
  width: var(--mark-size);
  height: var(--mark-size);
}

.brand__name {
  display: block;
  font-size: var(--step-1);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

.brand__sub {
  display: block;
  font-size: var(--step--1);
  color: var(--color-ink-muted);
  line-height: var(--leading-tight);
}

.nav__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-half) var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__list > li + li {
  margin-top: 0;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  padding-inline: var(--space-1);
  color: var(--color-ink);
  text-decoration: none;
  border-bottom: var(--border-rule) solid transparent;
}

.nav__link:hover {
  border-bottom-color: var(--color-line);
}

/* Current page: weight + amber underline, plus aria-current for assistive tech. */
.nav__link[aria-current="page"] {
  font-weight: var(--weight-semibold);
  border-bottom-color: var(--color-amber);
}

/* Hero: sun motif #1, a large, very low-opacity radial glow. Static; never animates. */
.hero {
  padding-block: var(--space-8) var(--space-6);
  background:
    radial-gradient(circle at 85% 0%, var(--color-amber-glow), transparent var(--glow-reach)),
    var(--color-paper);
}

.hero__title {
  max-width: var(--hero-measure);
}

.hero__lede {
  max-width: var(--measure);
  font-size: var(--step-1);
  color: var(--color-ink-muted);
}

.page-head {
  padding-block: var(--space-6) var(--space-2);
}

.page-head__lede {
  max-width: var(--measure);
  font-size: var(--step-1);
  color: var(--color-ink-muted);
}

.eyebrow {
  margin-bottom: var(--space-1);
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-slate);
}

/* Section heading with sun motif #2: a thin arc rule beneath. */
.arc-heading {
  position: relative;
  padding-bottom: var(--space-2);
}

.arc-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--arc-width);
  height: var(--arc-height);
  border-top: var(--border-rule) solid var(--color-amber);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

/* Cards: summaries that link to services.html for detail. */
.card {
  height: 100%;
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--border-thin) solid var(--color-line);
  border-radius: var(--radius-md);
}

.card__title {
  font-size: var(--step-1);
}

.card p:last-child {
  margin-bottom: 0;
}

/* Steps: ordered "how we work" strip with slate numerals. */
.steps {
  display: grid;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps > li + li {
  margin-top: 0;
}

.steps__item {
  padding-top: var(--space-1);
  border-top: var(--border-rule) solid var(--color-slate);
  counter-increment: step;
}

.steps__item::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: var(--step--1);
  font-weight: var(--weight-bold);
  color: var(--color-slate);
}

.steps__title {
  display: block;
  font-weight: var(--weight-semibold);
}

/* Service entries on services.html (the canonical catalog). */
.service {
  padding-block: var(--space-4);
  border-top: var(--border-thin) solid var(--color-line);
}

.service:first-child {
  border-top: 0;
  padding-top: 0;
}

.service__summary {
  font-size: var(--step-1);
  color: var(--color-ink-muted);
}

/* Phase entries on approach.html. */
.phase {
  padding-block: var(--space-3);
  border-top: var(--border-thin) solid var(--color-line);
}

/* Definition list for identifiers and contact details. */
.facts {
  display: grid;
  gap: var(--space-1) var(--space-3);
  max-width: var(--measure);
}

.facts__term {
  font-weight: var(--weight-semibold);
}

.facts__detail {
  margin: 0 0 var(--space-1);
}

/* Primary call to action: the one solid amber element on a page. */
.button {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  padding: var(--space-1) var(--space-3);
  background: var(--color-amber);
  color: var(--color-ink);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  border: var(--border-thin) solid var(--color-amber-deep);
  border-radius: var(--radius-sm);
}

.button:hover {
  background: var(--color-surface);
  color: var(--color-ink);
}

.cta {
  padding: var(--space-4);
  background: var(--color-surface);
  border: var(--border-thin) solid var(--color-line);
  border-radius: var(--radius-md);
}

.email {
  font-size: var(--step-2);
  font-weight: var(--weight-semibold);
  overflow-wrap: anywhere;
}

/* Site footer: dark ink band. Three short lines; duplicated on all eight pages. */
.site-footer {
  margin-top: var(--space-8);
  padding-block: var(--space-4);
  background: var(--color-ink);
  color: var(--color-paper);
  font-size: var(--step--1);
}

.site-footer p {
  margin-bottom: var(--space-1);
}

.site-footer a {
  color: var(--color-amber);
  text-decoration-color: currentcolor;
}

.site-footer a:hover {
  color: var(--color-paper);
}

.site-footer a:focus-visible {
  outline-color: var(--color-amber);
}

.site-footer__muted {
  color: var(--color-on-dark-muted);
}

/* 404 page lockup */
.lockup {
  width: var(--lockup-width);
  margin-bottom: var(--space-4);
}

/* ==== Utilities ==== */
.u-muted {
  color: var(--color-ink-muted);
}

.u-mt-4 {
  margin-top: var(--space-4);
}

.u-mb-0 {
  margin-bottom: 0;
}

/* ==== Media queries ==== */
@media (min-width: 40em) {
  .wrap {
    padding-inline: var(--space-4);
  }

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

  .nav__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-half);
  }

  .grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facts {
    grid-template-columns: max-content 1fr;
  }

  .facts__detail {
    margin-bottom: 0;
  }
}

@media (min-width: 64em) {
  .hero {
    padding-block: var(--space-12) var(--space-8);
  }

  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition: none;
    animation: none;
  }
}

@media print {
  .site-header,
  .skip-link {
    display: none;
  }
}
