/* =========================================================================
   BUSYWORK BUREAU — Bureau of Cleared Work
   Palette : institutional form-paper + filing ink + clerical blue + stamp red
   Type    : Bricolage Grotesque (display) · Newsreader (body) · JetBrains Mono (utility)
   ========================================================================= */

:root {
  --paper:      #E9E5D8;
  --paper-2:    #F2EEE4;
  --paper-3:    #FBFAF4;
  --ink:        #18241F;
  --ink-soft:   #51605A;
  --ink-faint:  #8B948E;
  --seal:       #1F4D63;
  --seal-deep:  #163A4C;
  --stamp:      #C0392B;
  --line:       rgba(24, 36, 31, 0.16);
  --line-2:     rgba(24, 36, 31, 0.30);

  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-body:    "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --wrap: 1120px;
  --r: 4px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* tactile paper grain + soft top light for depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255,255,255,0.55), rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #ECE8DC 0%, var(--paper) 38%, #E4E0D2 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a { color: var(--seal); text-decoration-thickness: 1px; text-underline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; letter-spacing: -0.015em; }

::selection { background: var(--stamp); color: var(--paper-3); }

:focus-visible { outline: 2.5px solid var(--seal); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 5vw, 56px); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 50;
  font-family: var(--font-mono); font-size: 0.8rem;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- utilities ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--seal);
  margin: 0 0 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--seal); opacity: 0.6;
}
.eyebrow--invert { color: #E8B9A6; }
.eyebrow--invert::before { background: #E8B9A6; }

.btn {
  --bg: var(--ink); --fg: var(--paper-3);
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-mono); font-weight: 500;
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg); background: var(--bg);
  padding: 0.85em 1.4em; border: 1px solid var(--ink);
  border-radius: var(--r); text-decoration: none; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: 0 1px 0 rgba(24,36,31,0.25);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px -10px rgba(24,36,31,0.55); }
.btn:active { transform: translateY(0); }
.btn--lg { font-size: 0.85rem; padding: 1.05em 1.7em; }
.btn--sm { font-size: 0.7rem; padding: 0.6em 1em; box-shadow: none; }
.btn--invert { --bg: var(--paper-3); --fg: var(--ink); border-color: var(--paper-3); }

.link-arrow {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5em;
  border-bottom: 1px solid var(--line-2); padding-bottom: 2px;
  transition: gap .18s ease, border-color .18s ease;
}
.link-arrow::after { content: "→"; transition: transform .18s ease; }
.link-arrow:hover { gap: 0.75em; border-color: var(--ink); }
.link-arrow:hover::after { transform: translateX(3px); }
.link-arrow--invert { color: var(--paper-3); border-color: rgba(255,255,255,0.4); }
.link-arrow--invert:hover { border-color: var(--paper-3); }

/* ---------- header ---------- */
.head {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.head__inner { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand__seal { width: 44px; height: 44px; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.01em; }
.head__meta { display: flex; align-items: center; gap: 1.4rem; }
.head__file { color: var(--ink-faint); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  padding-top: clamp(3.5rem, 9vw, 7rem);
  padding-bottom: clamp(3.5rem, 8vw, 6.5rem);
}
.hero__title {
  font-size: clamp(2.35rem, 6vw, 5.1rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 1.6rem;
  overflow-wrap: break-word;
}
.hero__title em {
  font-style: normal;
  color: var(--stamp);
  position: relative;
  white-space: nowrap;
}
.hero__title em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em; height: 0.5em;
  background: var(--stamp); opacity: 0.12; z-index: -1; transform: rotate(-0.6deg);
}
.hero__sub {
  font-size: clamp(1.12rem, 1.7vw, 1.32rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 36ch;
  margin: 0 0 2.2rem;
}
.hero__actions { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }

/* signature: intake card */
.intake {
  position: relative;
  min-width: 0;
  background:
    repeating-linear-gradient(180deg, transparent 0 31px, var(--line) 31px 32px),
    var(--paper-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 1.5rem 1.6rem 1.7rem;
  box-shadow: 0 22px 50px -28px rgba(24,36,31,0.5), 0 2px 0 rgba(24,36,31,0.08);
  transform: rotate(0.5deg);
}
.intake__head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 0.9rem; margin-bottom: 0.4rem; border-bottom: 1.5px solid var(--ink);
}
.intake__ref { color: var(--ink-faint); }
.intake__list { list-style: none; margin: 0; padding: 0; }
.intake__list li {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.62rem 0; font-size: 1.04rem; line-height: 1.35;
  border-bottom: 1px dashed var(--line);
}
.tick {
  flex: none; width: 1.35em; height: 1.35em; margin-top: 0.05em;
  display: grid; place-items: center;
  border: 1.5px solid var(--seal); border-radius: 3px;
  color: var(--seal); font-family: var(--font-mono); font-size: 0.82em; font-weight: 600;
}
.intake__foot { display: flex; align-items: center; gap: 0.8rem; padding-top: 0.95rem; }
.intake__rule { flex: 1; height: 1px; background: var(--line-2); }

.stamp {
  position: absolute;
  right: -14px; bottom: 6px;
  width: clamp(150px, 42%, 188px);
  height: auto;
  transform: rotate(-13deg);
  filter: drop-shadow(0 2px 1px rgba(192,57,43,0.18));
  pointer-events: none;
}
.stamp__word { font-family: var(--font-display); font-weight: 800; font-size: 42px; letter-spacing: 1px; }
.stamp__micro { font-family: var(--font-mono); font-weight: 600; font-size: 12px; letter-spacing: 2px; }

/* ---------- sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); border-top: 1px solid var(--line); }
.section__head { max-width: 60ch; margin-bottom: 2.6rem; }
.section__no {
  display: block; font-family: var(--font-mono); color: var(--stamp);
  font-size: 0.8rem; letter-spacing: 0.2em; margin-bottom: 0.9rem;
}
.section__title { font-size: clamp(1.75rem, 3.4vw, 2.6rem); line-height: 1.05; margin-bottom: 0.9rem; }
.section__note { font-size: 1.12rem; color: var(--ink-soft); margin: 0; max-width: 52ch; }

/* §1 scope */
.scope { list-style: none; margin: 0; padding: 0; }
.scope__row {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 1.2rem;
  padding: 1.5rem 0; border-top: 1px solid var(--line); align-items: start;
}
.scope__row:last-child { border-bottom: 1px solid var(--line); }
.scope__idx { color: var(--seal); padding-top: 0.4rem; }
.scope__row h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.3rem; }
.scope__row p { margin: 0; color: var(--ink-soft); max-width: 56ch; }

/* §2 steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.step {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1.6rem 1.5rem; position: relative;
}
.step__tag { display: block; color: var(--seal); margin-bottom: 0.9rem; font-weight: 600; }
.step p { margin: 0; color: var(--ink-soft); font-size: 1.04rem; }

/* §3 standard */
.standard { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem 2.4rem; }
.standard li { display: flex; align-items: flex-start; gap: 0.9rem; padding: 0.6rem 0; }
.standard__mark {
  flex: none; width: 1.5em; height: 1.5em; display: grid; place-items: center;
  border-radius: 50%; background: var(--seal); color: var(--paper-3);
  font-family: var(--font-mono); font-size: 0.8em; font-weight: 600; margin-top: 0.1em;
}
.standard p { margin: 0; font-size: 1.12rem; }
.standard em { font-style: italic; color: var(--ink); }

/* ---------- CTA ---------- */
.open {
  background:
    radial-gradient(90% 120% at 80% -20%, rgba(31,77,99,0.55), transparent 55%),
    var(--ink);
  color: var(--paper-2);
  margin-top: clamp(3rem, 7vw, 5.5rem);
  border-top: 3px solid var(--stamp);
}
.open__inner { padding-block: clamp(3.5rem, 8vw, 6rem); max-width: 50ch; }
.open__title {
  font-family: var(--font-display); font-weight: 800; color: var(--paper-3);
  font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.04; letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
}
.open__sub { font-size: 1.18rem; color: rgba(242,238,228,0.78); margin: 0 0 2.3rem; }
.open__actions { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--paper-2); }
.foot__inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding-block: 2.2rem; }
.foot__brand { display: flex; align-items: center; gap: 0.9rem; }
.foot__name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin: 0; }
.foot__tag { margin: 0.2rem 0 0; }
.foot__meta { display: flex; flex-direction: column; gap: 0.25rem; text-align: right; color: var(--ink-faint); }

/* ========================== MOTION ========================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 0.72s cubic-bezier(.2,.7,.2,1) both; }
  .reveal[data-d="1"] { animation-delay: 0.08s; }
  .reveal[data-d="2"] { animation-delay: 0.18s; }
  .reveal[data-d="3"] { animation-delay: 0.30s; }
  .stamp { animation: slam 0.5s cubic-bezier(.2,.8,.3,1) 0.85s both; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes slam {
    0%   { opacity: 0; transform: rotate(-3deg) scale(1.75); }
    60%  { opacity: 1; transform: rotate(-14.5deg) scale(0.9); }
    80%  { transform: rotate(-12deg) scale(1.04); }
    100% { opacity: 1; transform: rotate(-13deg) scale(1); }
  }
}

/* ========================== RESPONSIVE ========================== */
@media (max-width: 880px) {
  .hero { display: block; padding-top: clamp(2.5rem, 9vw, 4rem); }
  .hero__lede { margin-bottom: 3rem; }
  .intake { max-width: 460px; }
  .steps { grid-template-columns: 1fr; }
  .standard { grid-template-columns: 1fr; gap: 0.4rem; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .eyebrow { letter-spacing: 0.14em; font-size: 0.64rem; gap: 0.5em; flex-wrap: wrap; }
  .eyebrow::before { width: 18px; }
  .head__file { display: none; }
  .brand__name { font-size: 1.05rem; }
  .hero__actions { gap: 1.1rem; }
  .scope__row { grid-template-columns: 1fr; gap: 0.4rem; }
  .scope__idx { padding-top: 0; }
  .foot__inner { flex-direction: column; align-items: flex-start; }
  .foot__meta { text-align: left; }
  .stamp { width: 150px; right: -6px; }
}

/* ========================== 404 PAGE ========================== */
.nf { min-height: 78vh; display: grid; place-content: center; text-align: center; gap: 1.1rem; }
.nf__code { font-family: var(--font-mono); color: var(--stamp); letter-spacing: 0.24em; font-size: 0.8rem; text-transform: uppercase; }
.nf__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: -0.02em; }
.nf__sub { color: var(--ink-soft); max-width: 42ch; margin-inline: auto; }
