/* ==========================================================================
   AceAssist Logistics — Base: reset, typography, layout primitives, a11y
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-900);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

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

img {
  height: auto;
}

/* --- Headings ------------------------------------------------------------
   Archivo throughout. Weight 600, tight tracking, tight leading. */

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
}

p {
  margin: 0;
  text-wrap: pretty;
}

p + p {
  margin-top: var(--s-4);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

address {
  font-style: normal;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* --- Type utilities ------------------------------------------------------ */

/* The display size. Used once per page, at most twice. */
.t-display {
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
}

.t-lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--steel);
  max-width: 54ch;
}

.t-body {
  color: var(--steel);
  max-width: var(--measure);
}

.t-sm {
  font-size: var(--fs-sm);
}

/* IBM Plex Mono — accent voice only. Labels, indices, codes, data. */
.t-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  line-height: 1.4;
}

.t-mono--lg {
  font-size: var(--fs-mono-lg);
}

.t-mono--plain {
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 400;
}

/* --- Colour context ------------------------------------------------------ */

.on-ink {
  background: var(--ink-900);
  color: var(--paper);
}

.on-ink .t-body,
.on-ink .t-lead {
  color: var(--steel-l);
}

.on-paper-2 {
  background: var(--paper-2);
}

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* Anchor targets must clear the fixed header. */
:target,
[id] {
  scroll-margin-top: calc(var(--header-h) + var(--s-6));
}

.section--tight {
  padding-block: clamp(3rem, 6vw, 5.5rem);
}

/* 12-column grid for the asymmetric editorial layouts. */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-8);
}

@media (max-width: 899px) {
  .grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--s-6);
  }
}

/* --- Section head --------------------------------------------------------
   The recurring rhythm: hairline, mono index, then the heading. */

.sect-head {
  border-top: 1px solid var(--line);
  padding-top: var(--s-6);
}

.on-ink .sect-head {
  border-top-color: var(--line-i);
}

.sect-head__index {
  display: block;
  color: var(--signal-text);
  margin-bottom: var(--s-6);
}

.on-ink .sect-head__index {
  color: var(--signal);
}

/* --- Accessibility ------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: var(--s-4);
  z-index: 200;
  transform: translateY(-160%);
  background: var(--signal);
  color: var(--ink-900);
  padding: var(--s-3) var(--s-6);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  transition: transform var(--t-fast) var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

/* --- Scroll reveal -------------------------------------------------------
   Opacity + a small rise. No scale, no blur, no bounce. */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* JS absent: never leave content hidden. */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
