/* ============================================================
   Rankline design system
   Type: Newsreader (display) + Plus Jakarta Sans (body/UI)
   Palette: paper, ink, rankline blue
   ============================================================ */

@font-face {
  font-family: 'Newsreader';
  src: url('/assets/fonts/newsreader-latin-opsz-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('/assets/fonts/newsreader-latin-opsz-italic.woff2') format('woff2');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #FAF9F6;
  --paper-deep: #F2F0EB;
  --ink: #1F2123;
  --ink-soft: #4A4D52;
  --ink-faint: #7A7D83;
  --blue: #2563EB;
  --blue-deep: #1D4ED8;
  --blue-tint: #EBF1FB;
  --orange: #E8702A;
  --orange-deep: #B4530F;
  --orange-tint: #FBE9DC;
  --green: #2F9E6B;
  --green-deep: #1D7A4F;
  --green-tint: #E2F3EA;
  --line: #E5E2DC;
  --line-dark: #33363A;
  --card: #FFFFFF;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Plus Jakarta Sans', -apple-system, 'Segoe UI', sans-serif;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(31,33,35,.04), 0 8px 28px rgba(31,33,35,.06);
  --shadow-lift: 0 2px 4px rgba(31,33,35,.05), 0 18px 44px rgba(31,33,35,.10);
  --wrap: 1140px;
  --wrap-narrow: 768px;
  --ease: cubic-bezier(.22,.9,.3,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.72;
  font-weight: 410;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--blue); color: #fff; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- type ---------- */
h1, h2, .display {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 540;
  letter-spacing: -0.018em;
  line-height: 1.06;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.2vw, 4.35rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.85rem); line-height: 1.1; }
h3 {
  font-family: var(--sans);
  font-weight: 660;
  font-size: 1.17rem;
  letter-spacing: -0.012em;
  line-height: 1.35;
}
p { max-width: 62ch; }
.lede {
  font-size: clamp(1.13rem, 2vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-soft);
  font-weight: 420;
}
.measure { max-width: var(--wrap-narrow); }
strong { font-weight: 640; }

.dot { color: var(--blue); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .78rem;
  font-weight: 660;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
  flex: none;
}

/* ---------- layout ---------- */
.wrap { width: min(var(--wrap), 100% - 3rem); margin-inline: auto; }
.section { padding-block: clamp(4.2rem, 9vw, 7.5rem); }
.section-tight { padding-block: clamp(3rem, 6vw, 4.8rem); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: var(--wrap-narrow); margin-bottom: clamp(2rem, 4.5vw, 3.4rem); }
.section-head p { margin-top: 1.1rem; }
.stack > * + * { margin-top: 1.15rem; }

.band-dark {
  background: var(--ink);
  color: var(--paper);
}
.band-dark .eyebrow { color: #B9BDC4; }
.band-dark .lede, .band-dark p { color: #C8CBD1; }
.band-dark h1, .band-dark h2, .band-dark h3 { color: var(--paper); }

.band-tint { background: var(--paper-deep); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250,249,246,.86);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}
.brand {
  font-family: var(--sans);
  font-weight: 640;
  font-size: 1.42rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  line-height: 1;
}
.brand .dot { font-weight: 800; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  list-style: none;
}
.nav-links a:not(.btn) {
  text-decoration: none;
  font-size: .95rem;
  font-weight: 540;
  color: var(--ink-soft);
  position: relative;
  padding-block: .35rem;
  transition: color .2s var(--ease);
}
.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px; height: 44px;
  cursor: pointer;
  border-radius: 10px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  margin: 5px auto;
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--sans);
  font-weight: 620;
  font-size: .98rem;
  text-decoration: none;
  border-radius: 999px;
  padding: .82rem 1.55rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background .22s var(--ease), color .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease), box-shadow .22s var(--ease);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--blue); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(37,99,235,.25); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-1px); }
.band-dark .btn-primary { background: var(--blue); color: #fff; }
.band-dark .btn-primary:hover { background: var(--paper); color: var(--ink); }
.band-dark .btn-ghost { border-color: var(--line-dark); color: var(--paper); }
.band-dark .btn-ghost:hover { border-color: var(--paper); }
.btn .arrow { transition: transform .22s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.textlink {
  font-weight: 620;
  font-size: .98rem;
  color: var(--blue-deep);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: border-color .2s var(--ease);
}
.textlink:hover { border-color: var(--blue-deep); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(4.5rem, 10vw, 8rem) clamp(3.5rem, 7vw, 5.5rem); }
.hero h1 { max-width: 17ch; }
.hero .lede { margin-top: 1.5rem; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.3rem; }
.hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 2.4rem;
  margin-top: clamp(2.8rem, 5vw, 4rem);
  padding-top: 1.7rem;
  border-top: 1px solid var(--line);
  list-style: none;
}
.hero-strip li {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink-soft);
}
.hero-strip li::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

/* hero load animation */
.js .hero [data-rise] {
  opacity: 0;
  transform: translateY(18px);
  animation: rise .8s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes rise {
  to { opacity: 1; transform: none; }
}

/* ---------- scroll reveals ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 1.3rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.6rem;
  box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: #D8D4CC; }
.card h3 { margin-bottom: .55rem; }
.card p { font-size: .98rem; line-height: 1.65; color: var(--ink-soft); }
.card .icon { margin-bottom: 1.05rem; }
.card-accent {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.card-accent h3 { color: var(--paper); }
.card-accent p { color: #C8CBD1; }
.card-accent:hover { border-color: var(--ink); }
.card-accent .textlink { color: #8FB1F7; }
.card-accent .textlink:hover { border-color: #8FB1F7; }

.icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--blue-tint);
  display: grid;
  place-items: center;
  color: var(--blue-deep);
}
.icon svg { width: 22px; height: 22px; }

/* ---------- numbered steps ---------- */
.steps { display: grid; gap: 0; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 1.6rem;
  padding-block: 1.9rem;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 2.5rem;
  font-weight: 460;
  line-height: 1;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.step h3 { margin-bottom: .45rem; }
.step p { color: var(--ink-soft); font-size: 1rem; }
.step .textlink { font-size: .94rem; }

/* ---------- sample article card ---------- */
.sample {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  max-width: 820px;
}
.sample-chrome {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .85rem 1.4rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.sample-dots { display: flex; gap: 6px; }
.sample-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.sample-dots span:first-child { background: var(--blue); }
.sample-label {
  font-size: .78rem;
  font-weight: 640;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.sample-body { padding: clamp(1.6rem, 4vw, 2.6rem); }
.sample-body h3 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 560;
  letter-spacing: -0.014em;
  line-height: 1.2;
  margin-bottom: 1.1rem;
}
.sample-body p { margin-top: .95rem; font-size: 1.01rem; color: #36393D; }
.sample-body p:first-of-type { margin-top: 0; }
.sample-more {
  margin-top: 1.2rem;
  color: var(--ink-faint);
  font-style: italic;
  font-family: var(--serif);
}
.sample-caption {
  margin-top: 1.4rem;
  font-size: .95rem;
  color: var(--ink-soft);
  max-width: 70ch;
}

/* ---------- before / after ---------- */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.pair-card {
  border-radius: var(--radius);
  padding: 1.7rem 1.6rem;
  border: 1px solid var(--line);
  background: var(--card);
}
.pair-card.generic { background: var(--paper-deep); }
.pair-card.tailored { border-color: rgba(37,99,235,.35); box-shadow: 0 0 0 3px var(--blue-tint), var(--shadow); }
.pair-tag {
  display: inline-block;
  font-size: .74rem;
  font-weight: 680;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .9rem;
  color: var(--ink-faint);
}
.pair-card.tailored .pair-tag { color: var(--blue-deep); }
.pair-card blockquote {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 1.13rem;
  line-height: 1.55;
  font-weight: 440;
}
.pair-note { margin-top: 1.3rem; font-size: .95rem; color: var(--ink-soft); }

/* ---------- definition rows ---------- */
.deflist { border-top: 1px solid var(--line); }
.defrow {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.6rem;
  padding-block: 1.45rem;
  border-bottom: 1px solid var(--line);
}
.defrow dt { font-weight: 660; font-size: 1.02rem; letter-spacing: -0.01em; }
.defrow dd { color: var(--ink-soft); font-size: 1rem; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); max-width: var(--wrap-narrow); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding-block: 1.25rem;
  font-weight: 620;
  font-size: 1.06rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--blue);
  line-height: 1;
  transition: transform .25s var(--ease);
  flex: none;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { padding-bottom: 1.4rem; color: var(--ink-soft); max-width: 60ch; }

/* ---------- diagram ---------- */
.diagram-wrap { display: grid; place-items: center; padding-block: 1rem; }
.diagram { width: min(560px, 100%); height: auto; }
.diagram .spoke-line {
  stroke: var(--ink-faint);
  stroke-width: 1.5;
  stroke-dasharray: 230;
  stroke-dashoffset: 230;
}
.diagram .node {
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
  transform: scale(.4);
}
.diagram .hub-ring { opacity: 0; transform-origin: center; transform-box: fill-box; transform: scale(.6); }
.diagram .node-label { opacity: 0; }
.js .diagram.draw .spoke-line { animation: drawline 1.1s var(--ease) forwards; animation-delay: var(--d, 0s); }
.js .diagram.draw .node { animation: pop .6s var(--ease) forwards; animation-delay: var(--d, 0s); }
.js .diagram.draw .hub-ring { animation: pop .7s var(--ease) forwards; }
.js .diagram.draw .node-label { animation: fadein .6s ease forwards; animation-delay: calc(var(--d, 0s) + .35s); }
@keyframes drawline { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; transform: scale(1); } }
@keyframes fadein { to { opacity: 1; } }
.no-js .diagram .spoke-line { stroke-dashoffset: 0; }
.no-js .diagram .node, .no-js .diagram .hub-ring, .no-js .diagram .node-label { opacity: 1; transform: none; }

/* ---------- readers row ---------- */
.readers .card { position: relative; padding-top: 2rem; }
.reader-tag {
  display: inline-block;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-style: italic;
  font-size: 1rem;
  color: var(--blue-deep);
  margin-bottom: .8rem;
}

/* ---------- CTA band ---------- */
.cta-band { text-align: left; }
.cta-band h2 { max-width: 18ch; }
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}
.cta-inner p { margin-top: 1rem; max-width: 46ch; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 620; font-size: .92rem; }
.field .hint { font-weight: 440; color: var(--ink-faint); font-size: .85rem; }
.field input, .field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: .8rem .95rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  width: 100%;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-tint);
}
.hidden { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

.contact-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact-aside {
  border-left: 2px solid var(--blue);
  padding-left: 1.6rem;
  display: grid;
  gap: 1.5rem;
  position: sticky;
  top: 110px;
}
.contact-aside h3 { font-size: 1.02rem; }
.contact-aside p { font-size: .97rem; color: var(--ink-soft); }

/* ---------- footer ---------- */
.footer {
  background: var(--ink);
  color: #B9BDC4;
  padding-block: 3.4rem 2.4rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem 3rem;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid var(--line-dark);
}
.footer .brand { color: var(--paper); }
.footer-tag { margin-top: .8rem; font-size: .92rem; max-width: 34ch; }
.footer-links { list-style: none; display: grid; gap: .55rem; }
.footer-links a { text-decoration: none; font-size: .94rem; transition: color .2s; }
.footer-links a:hover { color: var(--paper); }
.footer-heading {
  font-size: .76rem;
  font-weight: 660;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #80848B;
  margin-bottom: .9rem;
}
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.8rem;
  font-size: .85rem;
  color: #80848B;
}
.footer a.mail { color: #8FB1F7; text-decoration: none; }
.footer a.mail:hover { text-decoration: underline; }

/* ---------- page intro (subpages) ---------- */
.page-hero { padding-block: clamp(4rem, 8vw, 6.2rem) clamp(2.6rem, 5vw, 4rem); }
.page-hero h1 { max-width: 16ch; }
.page-hero .lede { margin-top: 1.4rem; max-width: 56ch; }
.crumb {
  font-size: .82rem;
  font-weight: 620;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.2rem;
}

.next-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 1.5rem 1.7rem;
  text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.next-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.next-link .k { font-size: .78rem; font-weight: 660; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); display: block; margin-bottom: .3rem; }
.next-link .t { font-family: var(--serif); font-optical-sizing: auto; font-size: 1.35rem; font-weight: 540; }
.next-link .arrow { color: var(--blue); font-size: 1.4rem; }

/* ---------- work page: full sample documents ---------- */
.sample + .sample, .work-item + .work-item { margin-top: clamp(2.6rem, 5vw, 4rem); }
.work-item { scroll-margin-top: 96px; }
.sample-body h4 {
  font-family: var(--sans);
  font-weight: 660;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  margin: 1.9rem 0 .2rem;
}
.sample-body .dateline {
  font-size: .85rem;
  color: var(--ink-faint);
  margin: -0.4rem 0 1.2rem;
}
.sample-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  line-height: 1.5;
  margin: 1.4rem 0 .4rem;
}
.sample-body th, .sample-body td {
  border: 1px solid var(--line);
  padding: .55rem .7rem;
  text-align: left;
  vertical-align: top;
}
.sample-body th { background: var(--paper); font-weight: 660; }
.sample-foot {
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: var(--ink-faint);
}
.sample-foot p { margin-top: .6rem; max-width: none; }
.sample-meta {
  margin-top: 1.4rem;
  padding: 1.1rem 1.3rem;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-size: .85rem;
  color: var(--ink-soft);
}
.sample-meta p { margin-top: .4rem; max-width: none; }
.sample-meta .k { font-weight: 660; color: var(--ink); }
.jump-links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.jump-links a {
  text-decoration: none;
  font-size: .9rem;
  font-weight: 620;
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: .5rem 1.05rem;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.jump-links a:hover { border-color: var(--blue); color: var(--blue-deep); }
.work-note {
  font-size: .95rem;
  color: var(--ink-soft);
  max-width: 70ch;
  margin-bottom: 1.2rem;
}
.work-note strong { color: var(--ink); }

/* ---------- motion layer ---------- */
.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;
}

/* scroll progress */
.progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px;
  width: 100%;
  background: var(--blue);
  transform-origin: left;
  transform: scaleX(0);
  pointer-events: none;
}

/* typewriter line */
.typeline {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-style: italic;
  font-weight: 480;
  font-size: clamp(1.3rem, 2.7vw, 1.75rem);
  line-height: 1.3;
  margin-top: 1.15rem;
  color: var(--ink-soft);
  min-height: 1.5em;
}
.typed {
  color: var(--blue-deep);
  border-bottom: 2px solid rgba(37,99,235,.25);
  padding-bottom: 1px;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1.02em;
  background: var(--blue);
  margin-left: 3px;
  vertical-align: -0.12em;
  animation: caretblink 1.05s steps(1) infinite;
}
@keyframes caretblink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

/* hero grids with illustration column */
.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-art { min-width: 0; }
.page-hero .hero-grid { grid-template-columns: 1.2fr .8fr; }
.hero-art .illo { width: 100%; height: auto; }

/* marquee */
.marquee {
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding-block: .95rem;
  background: var(--paper);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.6rem;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span.m-item {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-style: italic;
  font-size: 1.08rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.marquee-track .m-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
  flex: none;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* illustration draw-in and idle life */
.illo .ink {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.illo .ink-heavy { stroke-width: 4.5; }
.illo .ink-soft { fill: none; stroke: var(--ink-faint); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.illo .ink-orange { fill: none; stroke: var(--orange); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.illo .ink-green { fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.illo .bar { stroke-width: 5; }
.illo .dash { stroke-dasharray: 3 5 !important; }
.illo .fill-blue { fill: var(--blue); stroke: none; }
.illo .fill-orange { fill: var(--orange); stroke: none; }
.illo .fill-green { fill: var(--green); stroke: none; }
.illo .fill-paper { fill: var(--paper); stroke: none; }
.illo .fill-soft { fill: var(--ink-faint); stroke: none; }
.js .illo .draw {
  stroke-dasharray: var(--len, 1);
  stroke-dashoffset: var(--len, 1);
}
.js .illo.play .draw {
  animation: idraw 1s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes idraw { to { stroke-dashoffset: 0; } }
.js .illo .late { opacity: 0; }
.js .illo.play .late { animation: fadein .7s ease forwards; animation-delay: var(--d, 1s); }
.no-js .illo .draw { stroke-dashoffset: 0; }
.no-js .illo .late { opacity: 1; }

/* truck life */
.js .illo.play .t-road { animation: idraw 1s var(--ease) .2s forwards, roadmove 1.1s linear 1.6s infinite; }
@keyframes roadmove { to { stroke-dashoffset: -48; } }
.illo .t-road { stroke-dasharray: 10 14 !important; stroke-dashoffset: 0; }
.js .illo .t-road { stroke-dashoffset: 240; }
.js .illo.play .spoke { animation: fadein .4s ease 1.5s forwards, wheelspin 2.2s linear 1.6s infinite; }
.js .illo .spoke { opacity: 0; }
.no-js .illo .spoke { opacity: 1; }
@keyframes wheelspin { to { transform: rotate(-360deg); } }
.illo .spoke { transform-box: fill-box; transform-origin: center; }
.illo .puff { transform-box: fill-box; transform-origin: center; opacity: 0; }
.js .illo.play .puff { animation: puffrise 3.2s ease-out infinite; animation-delay: var(--pd, 1.8s); }
@keyframes puffrise {
  0% { opacity: 0; transform: translateY(10px) scale(.55); }
  25% { opacity: .55; }
  100% { opacity: 0; transform: translateY(-26px) scale(1.2); }
}

/* excavator life */
.illo .jboom, .illo .jstick, .illo .jbucket { transform-box: view-box; }
.js .illo.play .jboom { animation: boomsway 7s ease-in-out 1.8s infinite alternate; }
.js .illo.play .jstick { animation: sticksway 5.4s ease-in-out 1.8s infinite alternate; }
.js .illo.play .jbucket { animation: bucketsway 4.2s ease-in-out 1.8s infinite alternate; }
@keyframes boomsway { from { transform: rotate(-2deg); } to { transform: rotate(2.6deg); } }
@keyframes sticksway { from { transform: rotate(2.8deg); } to { transform: rotate(-3.2deg); } }
@keyframes bucketsway { from { transform: rotate(6deg); } to { transform: rotate(-7deg); } }
.illo .beacon { transform-box: fill-box; transform-origin: center; }
.js .illo.play .beacon { animation: beaconpulse 2.2s ease-in-out 2s infinite; }
@keyframes beaconpulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* crane life */
.illo .crane-jib { transform-box: view-box; }
.js .illo.play .crane-jib { animation: cranesway 8s ease-in-out 2s infinite alternate; }
@keyframes cranesway { from { transform: rotate(-1.2deg); } to { transform: rotate(1.5deg); } }
.illo .hookline { transform-box: fill-box; transform-origin: center top; }
.js .illo.play .hookline { animation: hookbob 5.4s ease-in-out 2.3s infinite alternate; }
@keyframes hookbob { from { transform: translateY(0); } to { transform: translateY(6px); } }

/* segment grid mini illustrations */
.illo-mini { width: 100%; height: auto; }
.card .illo-mini { margin-bottom: 1.05rem; }

/* pen life */
.js .illo.play .penline { animation: penloop 5s var(--ease) 1.2s infinite; }
@keyframes penloop {
  0% { stroke-dashoffset: var(--len, 1); opacity: 1; }
  58% { stroke-dashoffset: 0; opacity: 1; }
  86% { stroke-dashoffset: 0; opacity: 1; }
  97% { stroke-dashoffset: 0; opacity: 0; }
  100% { stroke-dashoffset: var(--len, 1); opacity: 0; }
}
.illo .penbob { transform-box: fill-box; transform-origin: center; }
.js .illo.play .penbob { animation: penbob 2.6s ease-in-out 1.2s infinite alternate; }
@keyframes penbob { from { transform: translateY(0); } to { transform: translateY(-4px); } }

/* self-typing document line */
.js .illo.play .typeline-loop { animation: penloop 4.4s var(--ease) 1.7s infinite; }

/* ambient micro-interactions */
.js .reveal.in .eyebrow::before, .js .hero .eyebrow::before {
  animation: dotping 1.1s var(--ease) .5s 1;
}
@keyframes dotping {
  0% { box-shadow: 0 0 0 0 rgba(37,99,235,.4); }
  100% { box-shadow: 0 0 0 11px rgba(37,99,235,0); }
}
.hero h1 .dot, .page-hero h1 .dot { display: inline-block; }
.js .hero h1 .dot, .js .page-hero h1 .dot {
  animation: dotpop .55s var(--ease) .9s backwards;
}
@keyframes dotpop {
  0% { transform: scale(.2); opacity: 0; }
  60% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.icon { transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease); }
.icon-orange { background: var(--orange-tint); color: var(--orange-deep); }
.icon-green { background: var(--green-tint); color: var(--green-deep); }
.card:hover .icon { background: var(--blue); color: #fff; transform: rotate(-4deg) scale(1.06); }
.card:hover .icon-orange { background: var(--orange); }
.card:hover .icon-green { background: var(--green); }
.marquee-track .m-dot:nth-child(6n+4) { background: var(--orange); }
.marquee-track .m-dot:nth-child(6n+6) { background: var(--green); }
.readers .card:nth-child(2) .reader-tag { color: var(--orange-deep); }
.readers .card:nth-child(3) .reader-tag { color: var(--green-deep); }
.js .diagram.draw .node { animation: pop .6s var(--ease) forwards, nodebreathe 3.8s ease-in-out calc(var(--d, 0s) + 1.6s) infinite alternate; }
@keyframes nodebreathe { from { transform: scale(1); } to { transform: scale(1.14); } }
.footer .brand .dot { display: inline-block; }
.footer .brand:hover .dot { animation: dotpop .45s var(--ease); }
.next-link:hover .arrow { animation: nudge .5s var(--ease); }
@keyframes nudge { 50% { transform: translateX(5px); } }

@media (max-width: 860px) {
  .hero-grid, .page-hero .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; }
  .page-hero .hero-art { max-width: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  .caret { animation: none !important; opacity: .55; }
  .marquee-track { animation: none !important; }
  .js .illo .draw { stroke-dashoffset: 0 !important; animation: none !important; }
  .js .illo .late, .js .illo .spoke { opacity: 1 !important; animation: none !important; }
  .js .illo .t-road { stroke-dashoffset: 0 !important; }
  .js .illo.play .puff { animation: none !important; opacity: 0 !important; }
  .js .illo.play .jboom, .js .illo.play .jstick, .js .illo.play .jbucket,
  .js .illo.play .beacon, .js .illo.play .penline, .js .illo.play .penbob,
  .js .illo.play .crane-jib, .js .illo.play .hookline,
  .js .diagram.draw .node, .js .reveal.in .eyebrow::before,
  .js .hero .eyebrow::before, .js .hero h1 .dot, .js .page-hero h1 .dot { animation: none !important; }
  .js .illo .penline { stroke-dashoffset: 0 !important; opacity: 1; }
  .progress { display: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-aside { position: static; }
}
@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: .6rem 1.5rem 1.3rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links li:first-child { border-top: 0; }
  .nav-links a:not(.btn) { display: block; padding-block: .95rem; font-size: 1.05rem; }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-links .btn { margin-top: 1rem; justify-content: center; }
  .grid-2, .grid-3, .pair, .form-grid { grid-template-columns: 1fr; }
  .defrow { grid-template-columns: 1fr; gap: .35rem; }
  .step { grid-template-columns: 56px 1fr; gap: 1rem; }
  .step-num { font-size: 1.9rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero [data-rise], .js .reveal { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .js .diagram .spoke-line { stroke-dashoffset: 0 !important; animation: none !important; }
  .js .diagram .node, .js .diagram .hub-ring, .js .diagram .node-label { opacity: 1 !important; transform: none !important; animation: none !important; }
  .card, .btn, .next-link { transition: none !important; }
}
