/* ==========================================================================
   Grant Work Systems
   Palette: shop ink, steel, carbonless-form gray, hi-vis, stamp red
   Type:    Archivo (display) / IBM Plex Sans (body) / IBM Plex Mono (data)
   ========================================================================== */

:root {
  --ink:      #12161a;
  --ink-2:    #1c232a;
  --steel:    #3a4753;
  --steel-2:  #6b7783;
  --paper:    #e8ebe9;
  --white:    #fafbfa;
  --hivis:    #cbd630;
  --hivis-dk: #a3ac1e;
  --stamp:    #a6382a;
  --rule:     #c3c9c6;

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --disp: "Archivo", var(--sans);

  --gut: 1.5rem;
  --max: 1140px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--hivis);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gut);
}

/* --- Form-label eyebrow: the structural device of the whole site ---------- */
.label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-2);
  display: block;
  margin: 0 0 0.75rem;
}
.label::after {
  content: "";
  display: block;
  height: 1px;
  background: var(--rule);
  margin-top: 0.5rem;
}
.label--onink { color: var(--hivis); }
.label--onink::after { background: #333f4a; }

/* --- Display type -------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--disp);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 6.2vw, 4.15rem);
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  text-transform: uppercase;
}

h3 { font-size: 1.3rem; letter-spacing: -0.01em; }

p { margin: 0 0 1.1rem; max-width: 62ch; }
p:last-child { margin-bottom: 0; }

.lede { font-size: 1.175rem; line-height: 1.55; color: var(--steel); }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9rem 1.4rem;
  border: 2px solid var(--ink);
  background: var(--hivis);
  color: var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 4px 4px 0 var(--ink);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.btn--ghost {
  background: transparent;
  border-color: var(--steel-2);
  color: var(--ink);
  box-shadow: none;
}
.btn--ghost:hover { box-shadow: none; border-color: var(--ink); background: rgba(0,0,0,0.03); }

.btn--onink { border-color: var(--hivis); box-shadow: 4px 4px 0 var(--hivis-dk); }
.btn--onink:hover { box-shadow: 6px 6px 0 var(--hivis-dk); }

/* --- Masthead ------------------------------------------------------------ */
.masthead {
  background: var(--ink);
  color: var(--white);
  border-bottom: 3px solid var(--hivis);
}
.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 76px;
  flex-wrap: wrap;
  padding-block: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  margin-right: auto;
}
.brand img { height: 52px; width: auto; }
.brand__name {
  font-family: var(--disp);
  font-weight: 900;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
}
.brand__sub {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-2);
  display: block;
  margin-top: 2px;
}

.nav { display: flex; gap: 0.35rem; }
.nav a {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  color: #a9b4bd;
  border: 1px solid transparent;
}
.nav a:hover { color: var(--white); border-color: #333f4a; }
.nav a[aria-current="page"] { color: var(--hivis); border-color: var(--hivis); }

.masthead__tel {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink);
  background: var(--hivis);
  padding: 0.55rem 0.9rem;
  white-space: nowrap;
}
.masthead__tel:hover { background: var(--white); }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  background: var(--ink);
  color: var(--white);
  padding-block: clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 { color: var(--white); }
.hero h1 em {
  font-style: normal;
  color: var(--hivis);
}
.hero__sub {
  color: #b8c2ca;
  font-size: 1.15rem;
  line-height: 1.55;
  margin-top: 1.5rem;
  max-width: 46ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.1rem;
}

/* --- Signature element: the call-slip stack ------------------------------ */
.slips {
  position: relative;
  padding: 1rem 0.5rem 2rem;
  isolation: isolate;
}

.slip {
  background: var(--white);
  color: var(--ink);
  border: 1px solid #cfd4d1;
  padding: 1.1rem 1.25rem 1.35rem;
  box-shadow: 0 14px 30px rgba(0,0,0,0.42);
  font-family: var(--mono);
}

.slip--back-2 {
  position: absolute;
  inset: 2.5rem 1.6rem auto auto;
  width: 88%;
  height: 210px;
  transform: rotate(3.2deg);
  z-index: -2;
  opacity: 0.5;
}
.slip--back-1 {
  position: absolute;
  inset: 1.7rem auto auto 1.2rem;
  width: 90%;
  height: 220px;
  transform: rotate(-2.4deg);
  z-index: -1;
  opacity: 0.75;
}

.slip--front {
  position: relative;
  transform: rotate(-1.1deg);
  z-index: 1;
}

.slip__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid var(--stamp);
  padding-bottom: 0.5rem;
  margin-bottom: 0.9rem;
}
.slip__title {
  font-family: var(--disp);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--stamp);
}
.slip__no { font-size: 0.6875rem; color: var(--steel-2); letter-spacing: 0.08em; }

.slip__row {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--rule);
  font-size: 0.8125rem;
}
.slip__row dt {
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-2);
}
.slip__row dd { margin: 0; font-weight: 500; }

.slip__checks {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-top: 0.95rem;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel);
}
.slip__check { display: flex; align-items: center; gap: 0.4rem; }
.slip__box {
  width: 13px; height: 13px;
  border: 1.5px solid var(--steel);
  display: grid; place-items: center;
  font-size: 11px; line-height: 1; color: var(--stamp);
  font-weight: 700;
}

.stamp {
  position: absolute;
  right: 0.75rem;
  bottom: -0.4rem;
  transform: rotate(-9deg);
  border: 3px solid var(--stamp);
  color: var(--stamp);
  font-family: var(--disp);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.7rem;
  opacity: 0.86;
  background: rgba(250,251,250,0.72);
  animation: stamp-down 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) 0.7s both;
}
@keyframes stamp-down {
  from { opacity: 0; transform: rotate(-9deg) scale(2.1); }
  to   { opacity: 0.86; transform: rotate(-9deg) scale(1); }
}

.slips__caption {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--steel-2);
  margin-top: 1.9rem;
  text-align: center;
}
.slips__caption b { color: var(--hivis); font-weight: 600; }

/* --- Generic section ----------------------------------------------------- */
.section { padding-block: clamp(3.25rem, 6.5vw, 5.5rem); }
.section--rule { border-top: 1px solid var(--rule); }
.section--ink { background: var(--ink); color: var(--white); }
.section--ink h2 { color: var(--white); }
.section--ink p { color: #b8c2ca; }
.section--steel { background: var(--ink-2); color: var(--white); }

/* --- The math ------------------------------------------------------------ */
.math__q {
  font-family: var(--disp);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  line-height: 1.1;
  max-width: 22ch;
  margin: 0 0 1.4rem;
}
.math__q span { color: var(--hivis); }

/* --- About --------------------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(1.75rem, 4vw, 3.25rem);
  align-items: start;
}
.about__photo {
  border: 1px solid var(--rule);
  background: var(--white);
  padding: 10px;
  box-shadow: 6px 6px 0 rgba(18,22,26,0.09);
}
.about__photo img { width: 100%; height: auto; }
.about__cap {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-2);
  margin-top: 0.7rem;
}

/* --- Steps (a real sequence, so numbered) -------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #333f4a;
  border: 1px solid #333f4a;
  margin-top: 2.25rem;
}
.step { background: var(--ink-2); padding: 1.75rem 1.5rem; }
.step__n {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--hivis);
  display: block;
  margin-bottom: 0.9rem;
}
.step h3 { color: var(--white); margin-bottom: 0.6rem; }
.step p { color: #a9b4bd; font-size: 0.95rem; margin: 0; }

/* --- Pilot callout ------------------------------------------------------- */
.pilot {
  border: 2px solid var(--ink);
  background: var(--white);
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
  box-shadow: 8px 8px 0 var(--hivis);
}
.pilot h2 { margin-bottom: 1.1rem; }

/* --- Systems list -------------------------------------------------------- */
.systems { margin-top: 2.5rem; display: grid; gap: 1.25rem; }

.sys {
  background: var(--white);
  border: 1px solid var(--rule);
  border-left: 5px solid var(--hivis);
  padding: 1.6rem 1.65rem;
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 1.5rem 2.25rem;
  align-items: start;
}
.sys__code {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--steel-2);
  display: block;
  margin-bottom: 0.5rem;
}
.sys h3 { margin-bottom: 0.7rem; }
.sys p { font-size: 0.98rem; margin: 0; }
.sys__meta { border-left: 1px solid var(--rule); padding-left: 1.5rem; }
.sys__meta dt {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--steel-2);
  margin-bottom: 0.3rem;
}
.sys__meta dd {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}
.sys__meta dd:last-child { margin-bottom: 0; }

/* --- Contact ------------------------------------------------------------- */
.contact__tel {
  font-family: var(--disp);
  font-weight: 900;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--white);
  display: inline-block;
  margin: 0.35rem 0 0.9rem;
  border-bottom: 4px solid var(--hivis);
}
.contact__tel:hover { color: var(--hivis); }

.towns {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: #8d99a3;
  line-height: 1.9;
  max-width: 58ch;
  margin-top: 1.5rem;
}

/* --- Footer -------------------------------------------------------------- */
.foot {
  background: var(--ink);
  border-top: 1px solid #2a343d;
  padding-block: 1.75rem;
  color: var(--steel-2);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.foot__inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.foot a { color: #8d99a3; text-decoration: none; }
.foot a:hover { color: var(--hivis); }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .slips { margin-top: 1rem; max-width: 440px; }
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 300px; }
  .steps { grid-template-columns: 1fr; }
  .sys { grid-template-columns: 1fr; }
  .sys__meta {
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding-left: 0;
    padding-top: 1.1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .sys__meta dd { margin-bottom: 0; }
}

@media (max-width: 620px) {
  .masthead__inner { min-height: 0; row-gap: 0.75rem; }
  .brand { margin-right: 0; width: 100%; }
  .nav { flex: 1; }
  .masthead__tel { flex-shrink: 0; }
  .slip--back-1, .slip--back-2 { display: none; }
  .slip--front { transform: none; }
  .stamp { right: 0.5rem; }
  .hero__actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  .stamp { opacity: 0.86; }
}
