/* TOPS Consulting Group — site styles */
/* Self-hosted (latin, variable weight) so no render-blocking request to a font CDN sits in front of the first paint. */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(assets/fonts/manrope-latin-var.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(assets/fonts/jetbrainsmono-latin-var.woff2) format("woff2"); }
:root {
  --ink: #0A2342; --ink-2: #4A5D75; --ink-3: #626F80;
  --paper: #F7F9FC; --stone: #EAF0F6; --line: #D9E1EA;
  --accent: #DC615A; --accent-ink: #B4443D;     /* accent-ink: coral for text on white */
  --accent-bright: #E0706A;                     /* accent-bright: coral behind navy text, 4.5:1 and up */
  --night: #0A2342; --night-2: #17365C; --on-dark: #F4F8FC; --on-dark-2: #A9B8CC;
  --navy-deep: #061529; --field: #C5D1DE;
  --font: "Manrope", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --w: 1180px; --r: 10px;
}
* { 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(--font); font-size: 1.0625rem; line-height: 1.6; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; }
p { margin: 0; }
.container { max-width: var(--w); margin-inline: auto; padding-inline: clamp(20px, 5vw, 56px); }
.container.narrow { max-width: 860px; }
.br { font-family: var(--mono); font-weight: 300; opacity: .6; }
.eyebrow { display: inline-block; font-family: var(--mono); font-size: .76rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 14px; }
.dark .eyebrow, .hero .eyebrow { color: var(--accent-bright); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 6px; font: 700 .95rem var(--font); text-decoration: none; border: 0; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, transform .15s; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); }
.btn-accent { background: var(--accent-bright); color: var(--ink); font-weight: 700; font-size: 1rem; }
.btn-accent:hover { background: #E8857F; }
.btn-text { font-weight: 700; text-decoration: none; color: inherit; }
.btn-text::after { content: " →"; transition: margin .15s; }
.btn-text:hover::after { margin-left: 4px; }

/* nav */
.site-nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: background .3s, border-color .3s; }
.site-nav .container { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.logo { display: block; height: 40px; flex-shrink: 0; }
.logo-mark { height: 40px; width: auto; display: block; color: var(--ink); transition: color .3s; }
.logo-mark .c { fill: var(--accent); }
.nav-links { list-style: none; display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); margin: 0; padding: 0; }
.nav-links a:not(.btn) { text-decoration: none; font-size: .93rem; font-weight: 600; color: var(--ink-2); }
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.nav-links .btn { padding: 9px 16px; font-size: 1rem; }
.nav-toggle { display: none; }
.site-nav.on-dark { background: color-mix(in srgb, var(--night) 55%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); border-color: rgba(244,248,252,.08); }
.site-nav.on-dark .logo-mark { color: var(--on-dark); }
.site-nav.on-dark .nav-links a:not(.btn) { color: var(--on-dark-2); }
.site-nav.on-dark .nav-links a:not(.btn):hover, .site-nav.on-dark .nav-links a[aria-current="page"] { color: var(--on-dark); }
.site-nav.on-dark .btn-primary { background: var(--accent-bright); color: var(--ink); }
.site-nav.on-dark .btn-primary:hover { background: #E8857F; }

/* hero */
.hero { background-color: var(--night); background-image: radial-gradient(rgba(244,248,252,.20) 1.2px, transparent 1.4px); background-size: 24px 24px; color: var(--on-dark); position: relative; overflow: hidden; padding: clamp(64px, 10vw, 120px) 0 clamp(64px, 9vw, 110px); }
.hero-copy { position: relative; z-index: 1; max-width: 640px; }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.3rem); line-height: 1.02; margin-bottom: 22px; }
.hero .lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--on-dark-2); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 34px; }
/* typed part of the hero headline (type.js): coral, with a blinking caret while it types */
.typed { color: var(--accent); white-space: pre-wrap; }
.typed::after { content: ""; display: inline-block; width: 0.055em; height: 0.82em; margin-left: 0.08em; vertical-align: -0.06em; background: currentColor; border-radius: 1px; animation: caret-blink 1s steps(1, end) infinite; }
.typed.typing::after { animation: none; opacity: 1; }
.typed.typed-still::after { display: none; }
@keyframes caret-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.hero-flow h1:has(.typed) { min-height: 3em; }               /* the longest typed phrase still fits; keeps the buttons from jumping */
/* ---------- home hero: 3D mountain scene (hero-flow.js) ---------- */
.hero.hero-flow { --fn: #061529; --fline: rgba(244,248,252,.16); padding: 73px 0 0; margin-top: -73px; background: var(--fn); background-image: none; isolation: isolate; display: flex; flex-direction: column; min-height: clamp(672px, 100svh, 972px); }
/* home: the header floats on the scene while the page is at the top, then turns solid once you scroll */
.site-nav.over-hero.on-dark.at-top { background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.hero-flow #scene { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; }
.hero-flow .grain { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay; background-size: 128px 128px; }
.hero-flow .scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none; background:
  linear-gradient(90deg, rgba(6,21,41,.86) 0%, rgba(6,21,41,.6) 30%, rgba(6,21,41,0) 58%),
  linear-gradient(180deg, rgba(6,21,41,.6) 0%, rgba(6,21,41,0) 20%); }
.hero-flow .main { position: relative; z-index: 3; flex: 1; display: flex; align-items: center; }
.hero-flow .main > .container { width: 100%; }
.hero-flow .copy { max-width: min(660px, 50vw); padding-block: 0 clamp(150px, 22vh, 240px); }   /* the bottom padding biases the centred copy upward, toward the top of the mountain */
.hero-flow .eyebrow { margin-bottom: 18px; }
.hero-flow .copy > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.hero-flow .copy > :nth-child(2) { animation-delay: .12s; } .hero-flow .copy > :nth-child(3) { animation-delay: .24s; } .hero-flow .copy > :nth-child(4) { animation-delay: .36s; }
.hero-flow h1 { font-weight: 800; font-size: clamp(2.3rem, 4.9vw, 4.4rem); line-height: 1; letter-spacing: -.035em; margin: 0 0 26px; text-shadow: 0 2px 40px rgba(6,21,41,.6); }
.hero-flow .lede { color: #C9D5E3; font-size: clamp(1.06rem, 1.4vw, 1.28rem); line-height: 1.55; max-width: 42ch; margin: 0 0 36px; }
.hero-flow .actions { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.hero-flow .cta { display: inline-block; background: var(--accent-bright); color: var(--ink); font-weight: 800; padding: 12px 20px; border-radius: 8px; font-size: 1rem; white-space: nowrap; text-decoration: none; transition: background .15s, box-shadow .2s, transform .15s; }
.hero-flow .cta:hover { background: #E8857F; box-shadow: 0 8px 30px -6px rgba(220,97,90,.7); transform: translateY(-1px); }
.hero-flow .cta.big { padding: 17px 28px; font-size: 1.06rem; border-radius: 10px; }
.hero-flow .link { color: var(--on-dark); font-weight: 700; font-size: 1.04rem; text-decoration: none; border-bottom: 1px solid rgba(244,248,252,.45); padding-bottom: 3px; transition: border-color .15s; }
.hero-flow .link:hover { border-color: var(--accent); }
.hero-flow :focus-visible { outline: 2px solid var(--on-dark); outline-offset: 3px; border-radius: 4px; }
/* the three stages; each lights up when the line reaches it */
.hero-flow .pillars { position: relative; z-index: 3; }
.hero-flow .pillars::before { content: ""; position: absolute; inset: -56px 0 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(6,21,41,0) 0, rgba(6,21,41,.78) 56px, rgba(6,21,41,.94) 100%); }
.hero-flow .pillars ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--fline); }
.hero-flow .pillars li { --l: 0; position: relative; padding: 20px 28px 26px 0; cursor: default; }
.hero-flow .pillars li + li { padding-left: 28px; border-left: 1px solid var(--fline); }
.hero-flow .pillars li::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--accent); transform-origin: left; transform: scaleX(var(--l)); box-shadow: 0 0 14px rgba(220,97,90,.9); }
.hero-flow .pillars .k { display: flex; align-items: baseline; gap: 12px; font-weight: 700; font-size: 1.14rem; letter-spacing: -.01em; }
.hero-flow .pillars .n { font: 600 .8rem/1 var(--mono); letter-spacing: .04em; color: var(--accent); opacity: calc(.55 + .45 * var(--l)); }
.hero-flow .pillars .s { display: block; margin-top: 2px; color: var(--on-dark-2); font-size: .97rem; }
/* scene labels: glass tags pinned to points on the mountain */
.hero-flow .tags { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero-flow .tag { --l: 0; --f: 0; position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 9px; padding: 9px 14px 9px 12px; border-radius: 10px; white-space: nowrap; pointer-events: auto; cursor: default; will-change: transform;
  font: 700 .8rem/1 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: rgba(244,248,252, calc(.55 + .45 * var(--l)));
  background: linear-gradient(180deg, rgba(27,74,126,.6), rgba(10,35,66,.66)); -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
  border: 1px solid color-mix(in srgb, var(--accent) calc(var(--l) * 100%), rgba(244,248,252,.26));
  box-shadow: inset 0 1px 0 rgba(244,248,252,.18), 0 12px 32px rgba(3,10,22,.55), 0 0 calc(12px + 30px * var(--f)) rgba(220,97,90, calc(.3 * var(--l) + .55 * var(--f))); }
.hero-flow .tag i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--accent) calc(var(--l) * 100%), rgba(244,248,252,.32)); box-shadow: 0 0 10px rgba(220,97,90, var(--l)); }
.hero-flow .tag b { font-weight: 600; letter-spacing: .04em; color: var(--accent); }
/* summit label: the same glass tag as the three stages, shown lit once the line reaches the top */
.hero-flow .status { --o: 0; position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 9px; padding: 9px 14px 9px 12px; border-radius: 10px; white-space: nowrap; opacity: var(--o); will-change: transform;
  font: 700 .8rem/1 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--on-dark);
  background: linear-gradient(180deg, rgba(27,74,126,.6), rgba(10,35,66,.66)); -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
  border: 1px solid var(--accent); box-shadow: inset 0 1px 0 rgba(244,248,252,.18), 0 12px 32px rgba(3,10,22,.55), 0 0 22px rgba(220,97,90,.4); }
.hero-flow .status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.hero-flow .stage { display: none; }
@media (max-width: 980px) { .hero-flow .copy { max-width: min(560px, 54vw); } }
@media (max-width: 760px) {
  .hero.hero-flow { min-height: 0; padding-top: 73px; }
  .hero-flow .scrim { background: linear-gradient(180deg, rgba(6,21,41,.9) 0%, rgba(6,21,41,.72) 34%, rgba(6,21,41,0) 56%); }
  .hero-flow .main { flex: none; }
  .hero-flow .copy { max-width: none; padding-block: 28px 4px; }
  .hero-flow h1 { margin-bottom: 18px; }
  .hero-flow .lede { margin-bottom: 26px; }
  .hero-flow .cta.big { padding: 15px 22px; font-size: 1rem; }
  .hero-flow .stage { display: block; height: clamp(330px, 50svh, 430px); }
  .hero-flow .pillars li { padding: 14px 10px 18px 0; }
  .hero-flow .pillars li + li { padding-left: 12px; }
  .hero-flow .pillars .k { flex-direction: column; gap: 8px; font-size: 1rem; }
  .hero-flow .pillars .s { font-size: .84rem; line-height: 1.4; margin-top: 4px; }
  .hero-flow .tag { font-size: .68rem; padding: 7px 10px 7px 9px; gap: 7px; letter-spacing: .12em; border-radius: 8px; }
  .hero-flow .status { font-size: .68rem; padding: 7px 10px 7px 9px; gap: 7px; letter-spacing: .12em; border-radius: 8px; }
}
/* ---------- inner-page hero: a quiet echo of the mountain (hero-sub.js) ---------- */
.hero.hero-sub { padding: 101px 0 clamp(150px, 24vh, 230px); margin-top: -73px; background-color: #0B2546; isolation: isolate; display: flex; align-items: flex-start; min-height: clamp(540px, 66vh, 700px); }
.hero-sub > .container { width: 100%; position: relative; z-index: 2; }
.hero-sub .hero-copy { max-width: min(640px, 50vw); }
.hero-sub h1 { font-size: clamp(2.4rem, 4.6vw, 4rem); }
.hero-sub .hs-canvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; }
.hero-sub .hs-tags { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
/* the stage tags: the same glass tag as the home page, lit (coral) once the light reaches the stage */
.hero-sub .hs-tag { --l: 0; --f: 0; --o: 0; position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 9px; padding: 9px 14px 9px 12px; border-radius: 10px; white-space: nowrap; opacity: var(--o); will-change: transform, opacity;
  font: 700 .76rem/1 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: rgba(244,248,252, calc(.55 + .45 * var(--l)));
  background: linear-gradient(180deg, rgba(27,74,126,.6), rgba(10,35,66,.66)); -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
  border: 1px solid color-mix(in srgb, var(--accent) calc(var(--l) * 100%), rgba(244,248,252,.26));
  box-shadow: inset 0 1px 0 rgba(244,248,252,.18), 0 12px 32px rgba(3,10,22,.55), 0 0 calc(12px + 30px * var(--f)) rgba(220,97,90, calc(.3 * var(--l) + .55 * var(--f))); }
.hero-sub .hs-tag i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--accent) calc(var(--l) * 100%), rgba(244,248,252,.32)); box-shadow: 0 0 10px rgba(220,97,90, var(--l)); }
.hero-sub .hs-tag b { font-weight: 600; letter-spacing: .04em; color: var(--accent); }
@media (max-width: 760px) {
  .hero.hero-sub { display: block; min-height: 0; padding: 101px 0 250px; }
  .hero-sub .hero-copy { max-width: none; }
  .hero-sub .hs-tag { font-size: .66rem; padding: 7px 10px 7px 9px; gap: 7px; letter-spacing: .12em; border-radius: 8px; }
}
/* dot grids */
.dots-dark { background-color: var(--night); background-image: radial-gradient(rgba(244,248,252,.20) 1.2px, transparent 1.4px); background-size: 24px 24px; }
.dots-light { background-color: var(--paper); background-image: radial-gradient(rgba(10,35,66,.09) 1.1px, transparent 1.3px); background-size: 24px 24px; }
/* every light section gets the faint dot grid (tinted ones keep their mist colour underneath) */
.section.section:not(.dark) { background-image: radial-gradient(rgba(10,35,66,.09) 1.1px, transparent 1.3px); background-size: 24px 24px; }
.hero-copy > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.hero-copy > :nth-child(2) { animation-delay: .1s; } .hero-copy > :nth-child(3) { animation-delay: .2s; } .hero-copy > :nth-child(4) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* sections */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section.tint { background: var(--stone); }
.section.dark { background: var(--night); color: var(--on-dark); }
.section h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); line-height: 1.08; max-width: 22ch; }
.head { margin-bottom: clamp(32px, 5vw, 56px); }
.head .body, .narrow .body { margin-top: 18px; }
.body { color: var(--ink-2); font-size: 1.1rem; max-width: 62ch; }
.pains { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pain { border: 1px solid var(--line); border-radius: var(--r); padding: 26px 28px; background: #fff; }
.pain h3 { font-size: 1.15rem; letter-spacing: -0.015em; margin-bottom: 8px; }
.pain p { color: var(--ink-2); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards.four { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.card.link { transition: border-color .15s, transform .15s; }
.card.link:hover { border-color: var(--ink); transform: translateY(-2px); }
.card h3 { font-size: 1.3rem; letter-spacing: -0.02em; }
.card p { color: var(--ink-2); }
.card .more { margin-top: auto; padding-top: 8px; font-weight: 700; font-size: .93rem; }
.card .more::after { content: " →"; }
.num { font-family: var(--mono); font-weight: 500; font-size: .85rem; color: var(--accent-ink); letter-spacing: .04em; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: s; }
.steps li { border-top: 2px solid var(--ink); padding-top: 18px; }
.steps h3 { font-size: 1.2rem; margin: 8px 0 6px; }
.steps p { color: var(--ink-2); font-size: .98rem; }
.why { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px 56px; }
.why h3 { font-size: 1.2rem; margin-bottom: 8px; }
.why p { color: var(--on-dark-2); }
.faq { margin-top: 30px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; font-weight: 700; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.plus { width: 14px; height: 14px; position: relative; flex-shrink: 0; }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 2px; background: var(--ink); transition: transform .2s; }
.plus::after { transform: rotate(90deg); }
details[open] .plus::after { transform: rotate(0); }
.faq p { padding-bottom: 22px; color: var(--ink-2); max-width: 66ch; }

/* ---------- drawings: the flow figure on each service page, and the diagrams in engineering posts ---------- */
/* One vocabulary for both (see the content skill's references/visuals.md). On a phone the drawing keeps a readable
   minimum width and scrolls inside its own box, so the page itself never scrolls sideways. blog.css only adds the
   margins that let a figure break out of the article column. */
.figure { margin: 0; }
.figure .canvas { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; overflow-x: auto; background-image: radial-gradient(rgba(10,35,66,.07) 1px, transparent 1.2px); background-size: 20px 20px; }
.figure svg { display: block; width: 100%; min-width: 640px; height: auto; }
.figure figcaption { margin-top: 12px; font: .85rem/1.5 var(--mono); color: var(--ink-3); text-align: center; }
/* SVG vocabulary: node boxes, edges, labels, numbered steps */
.dg-node { fill: #fff; stroke: var(--ink); stroke-width: 1.5; }
.dg-node.dark { fill: var(--ink); }
.dg-node.accent { fill: #FDF0EF; stroke: var(--accent); }
.dg-node.blue { fill: #EEF5FC; stroke: #1F6FB8; }
.dg-node.muted { fill: var(--paper); stroke: var(--ink-3); stroke-dasharray: 4 4; }
.dg-zone { fill: none; stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 5; }
.dg-t { font: 700 14px var(--font); fill: var(--ink); }
.dg-t.on-dark { fill: #fff; }
.dg-s { font: 500 11px var(--mono); fill: var(--ink-2); }
.dg-s.on-dark { fill: var(--on-dark-2); }
.dg-zl { font: 600 10px var(--mono); letter-spacing: .14em; fill: var(--ink-3); text-transform: uppercase; }
.dg-edge { fill: none; stroke: var(--ink-2); stroke-width: 1.6; }
.dg-edge.accent { stroke: var(--accent); }
.dg-edge.blue { stroke: #1F6FB8; }
.dg-edge.dashed { stroke-dasharray: 5 5; }
/* the only motion in a drawing: dashes travelling along the main route. Still for reduced-motion visitors (rule at the end of this file). */
.dg-edge.flow { stroke-dasharray: 6 8; animation: dg-flow 1.1s linear infinite; }
@keyframes dg-flow { to { stroke-dashoffset: -14; } }
.dg-el { font: 600 11px var(--mono); fill: var(--ink-2); }
.dg-step circle { fill: var(--accent); }
.dg-step text { font: 800 12px var(--font); fill: #fff; text-anchor: middle; dominant-baseline: central; }
.dg-arrow { fill: var(--ink-2); } .dg-arrow.accent { fill: var(--accent); } .dg-arrow.blue { fill: #1F6FB8; }
/* numbered walkthrough keyed to the drawing's coral steps */
.walk { list-style: none; padding: 0 !important; counter-reset: walk; }
.walk > li { counter-increment: walk; position: relative; padding-left: 46px; }
.walk > li + li { margin-top: 1em !important; }
.walk > li::before { content: counter(walk); position: absolute; left: 0; top: .1em; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font: 800 .82rem/28px var(--font); text-align: center; }
/* service pages: the drawing continues the opening section, with its walkthrough in two columns underneath */
.section.flow-sec { padding-top: 0; }
.flow-sec .walk { margin: clamp(26px, 4vw, 40px) 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 56px; color: var(--ink-2); }
.flow-sec .walk > li + li { margin-top: 0 !important; }
.flow-sec .walk strong { color: var(--ink); }
.more-line { margin-top: 24px; }
/* "a first project": the four steps on navy */
.dark .body, .dark .steps p { color: var(--on-dark-2); }
.dark .steps li { border-top-color: var(--on-dark-2); }
.dark .num { color: var(--accent-bright); }

/* ---------- service page layout "hx": split sections with round images, numbered grid, image tiles, article rail ---------- */
/* Modelled on the structure of a large HubSpot partner's service page, in TOPS colours and with TOPS's own images
   (the blog covers). Everything that moves here moves once, as the section is scrolled to (see [data-rv] below). */
.hx-h { display: flex; align-items: flex-start; gap: .4em; font-size: clamp(2rem, 4vw, 3.1rem) !important; line-height: 1.06; max-width: 24ch !important; }
.hx-h.wide { max-width: none !important; }
/* the mark before a heading is the ridge line from the TOPS logo, in coral */
.hx-ridge { flex: none; width: .95em; height: .75em; margin-top: .14em; color: var(--accent); }
.dark .hx-ridge { color: var(--accent-bright); }
.hx-rule { display: block; width: 132px; height: 2px; background: var(--ink); margin: 24px 0 30px; transform-origin: left; }
.dark .hx-rule { background: var(--on-dark-2); }
.hx-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.hx-split.rev { grid-template-columns: .9fr 1.1fr; }
.hx-split .body + .body { margin-top: 16px; }
.hx-split .hx-pill, .hx-split .btn-text { margin-top: 30px; }
.hx-split .btn-text { display: inline-block; }
/* round image with three spheres sitting on its edge */
.hx-orb { position: relative; width: min(100%, 440px); aspect-ratio: 1; margin-inline: auto; }
.hx-orb .disc { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: var(--night); box-shadow: 0 34px 60px -34px rgba(6,21,41,.6); }
.dark .hx-orb .disc { box-shadow: 0 0 0 1px var(--night-2), 0 34px 60px -30px rgba(0,0,0,.6); }
.hx-orb img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.3); }
.hx-orb i { position: absolute; border-radius: 50%; aspect-ratio: 1; }
.hx-orb .s1 { width: 27%; left: -7%; bottom: 9%; background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 18px 30px -18px rgba(6,21,41,.5); }
.hx-orb .s2 { width: 14%; left: 24%; bottom: -5%; background: var(--accent); }
.hx-orb .s3 { width: 9%; right: 1%; top: 9%; background: var(--stone); box-shadow: inset 0 0 0 1px var(--line); }
.hx-nums { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 40px; }
.hx-nums.four { grid-template-columns: repeat(4, 1fr); gap: 56px 32px; }
.hx-nums .n { display: block; font: 500 .85rem var(--mono); letter-spacing: .04em; color: var(--ink-3); }
.hx-nums .hx-rule { width: 62%; height: 1px; margin: 14px 0 28px; }
.hx-nums h3 { font-size: clamp(1.45rem, 2.2vw, 1.85rem); line-height: 1.12; margin-bottom: 14px; }
.hx-nums p { color: var(--ink-2); }
/* image tiles: a cover behind a navy veil, a large faint number, the title and a pill */
.hx-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hx-tile { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; min-height: 320px; padding: 26px; border-radius: 14px; overflow: hidden; color: #fff; text-decoration: none; background: var(--night); }
.hx-tile img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transform: scale(1.5); transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.hx-tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--night); opacity: .86; transition: opacity .3s; }
.hx-tile:hover::before { opacity: .72; }
.hx-tile:hover img { transform: scale(1.62); }
.hx-tile h3 { font-size: 1.65rem; line-height: 1.1; max-width: 7.2em; }
.hx-tile .big { position: absolute; right: 22px; top: 14px; font: 300 4.2rem/1 var(--mono); color: rgba(244,248,252,.3); }
.hx-tiles.two { grid-template-columns: repeat(2, 1fr); }
.hx-tile .sub { display: block; margin-top: 10px; font: 500 .78rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-2); }
.hx-duo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 30px; }
.hx-duo h3 { font-size: 1.2rem; margin-bottom: 8px; }
.hx-duo p, .hx-list p { color: var(--ink-2); }
.hx-nums h3 a { text-decoration: none; }
.hx-nums h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
.hx-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 38px 40px; }
.hx-list h3 { font-size: 1.15rem; margin-bottom: 8px; padding-top: 16px; border-top: 1px solid var(--ink); }
.hx-roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hx-role { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 26px; }
.hx-role h3 { font-size: 1.2rem; margin-bottom: 12px; }
.hx-role ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; color: var(--ink-2); font-size: .97rem; }
.hx-price { margin-top: 24px; font: 500 .95rem var(--mono); letter-spacing: .04em; color: var(--on-dark-2); }
.hx-price b { font-weight: 700; color: var(--on-dark); }
.hx-pill { display: inline-flex; align-items: center; padding: 11px 22px; border: 1px solid currentColor; border-radius: 999px; font: 700 .92rem var(--font); color: inherit; text-decoration: none; transition: background .2s, color .2s, border-color .2s; }
.hx-tile:hover .hx-pill, .dark a.hx-pill:hover { background: #fff; color: var(--ink); border-color: #fff; }
/* article rail: scrolls sideways inside itself, snapped to the cards; the two round buttons move it one card */
.hx-railhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 38px; }
.hx-ctl { display: flex; gap: 10px; }
.hx-ctl button { width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--ink); background: none; color: var(--ink); font: 500 1.15rem var(--mono); cursor: pointer; transition: background .2s, color .2s; }
.hx-ctl button:hover { background: var(--ink); color: #fff; }
.hx-rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(360px, 80vw); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 6px; }
.hx-rail::-webkit-scrollbar { display: none; }
.hx-rail a { scroll-snap-align: start; display: block; text-decoration: none; }
.hx-rail img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: var(--night); transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s; }
.hx-rail a:hover img { transform: translateY(-5px); box-shadow: 0 22px 40px -24px rgba(10,35,66,.6); }
.hx-rail h3 { font-size: 1.2rem; line-height: 1.22; letter-spacing: -.02em; margin: 18px 0 8px; }
.hx-rail p { color: var(--ink-2); font-size: .97rem; }
.dark .faq, .dark .faq details { border-color: rgba(244,248,252,.24); }
.dark .faq p { color: var(--on-dark-2); }
.dark .faq a { color: var(--accent-bright); }
.dark .plus::before, .dark .plus::after { background: var(--on-dark); }
/* scroll-in. site.js adds .rv to <html> only when motion is welcome, so without script or with reduced motion nothing is hidden. */
.rv [data-rv] { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 90ms); }
.rv [data-rv].in { opacity: 1; transform: none; }
.rv [data-rv] .hx-rule, .rv .hx-rule[data-rv] { transform: scaleX(0); transition: transform .9s cubic-bezier(.2,.7,.2,1) .2s; }
.rv [data-rv].in .hx-rule, .rv .hx-rule[data-rv].in { transform: none; }
.rv .hx-orb .disc { transform: scale(.88); transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.rv .hx-orb i { transform: scale(0); transition: transform .7s cubic-bezier(.3,1.3,.4,1) .35s; }
.rv .hx-orb .s2 { transition-delay: .5s; } .rv .hx-orb .s3 { transition-delay: .65s; }
.rv .hx-orb.in .disc, .rv .hx-orb.in i { transform: none; }
.hx-nums > li:nth-child(3n+2), .hx-tiles > :nth-child(2), .hx-list > li:nth-child(3n+2), .hx-roles > :nth-child(3n+2), .hx-duo > :nth-child(2) { --i: 1; }
.hx-nums > li:nth-child(3n), .hx-tiles > :nth-child(3), .hx-list > li:nth-child(3n), .hx-roles > :nth-child(3n) { --i: 2; }

/* contact */
.contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.ticks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; font-weight: 600; }
/* 404 */
.nf-lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-2); margin-top: 14px; max-width: 46ch; }
.nf-links { font-weight: 500; } .nf-links a { font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--line); }
.nf-links a:hover { border-color: var(--accent); }
.nf-actions { margin-top: 34px; }
.ticks li::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--accent); margin-right: 12px; vertical-align: 2px; }
.form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(22px, 3vw, 34px); display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 700; }
.form label i { font-style: normal; white-space: nowrap; font-weight: 500; color: var(--ink-3); }
.form input, .form select, .form textarea { font: 500 1rem var(--font); color: var(--ink); background: #fff; border: 1px solid var(--field); border-radius: 6px; padding: 12px 13px; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form textarea { resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { justify-self: start; }
.form-status { font-weight: 600; font-size: .95rem; min-height: 1.4em; }
.form-status.ok { color: #2F6B3A; } .form-status.err { color: #A3341F; }

/* footer */
.site-footer { background: var(--navy-deep); color: var(--on-dark-2); padding: 52px 0 40px; }
.site-footer .container { display: grid; grid-template-columns: auto 1fr; gap: 24px 48px; align-items: center; }
.f-logo img { height: 52px; width: auto; display: block; }
.f-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 22px; justify-content: flex-end; }
.f-links a { text-decoration: none; font-size: .9rem; } .f-links a:hover { color: var(--on-dark); }
.f-meta { grid-column: 1 / -1; font-size: .82rem; border-top: 1px solid var(--night-2); padding-top: 22px; }
/* "Cookie settings" reopens HubSpot's consent banner. It is a <button> because it performs an action,
   but it has to read as the quiet legal link it is, so the button chrome is stripped back off it. */
.cookie-prefs { margin-left: 18px; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cookie-prefs:hover { color: var(--on-dark); }
a.f-legal { text-decoration: underline; text-underline-offset: 3px; margin-left: 18px; font-size: .82rem; }
a.f-legal:hover { color: var(--on-dark); }
/* The privacy page is long-form prose, so it gets a comfortable measure and more air between sections. */
.legal h3 { margin: 38px 0 10px; font-size: 1.22rem; font-weight: 800; letter-spacing: -.02em; }
.legal p { margin: 0 0 14px; color: var(--ink-2); }
.legal p strong { color: var(--ink); }
.legal .meta-line { font-family: var(--mono); font-size: .78rem; color: var(--ink-3); margin: 0 0 6px; }
.legal .ticks { margin: 0 0 14px; }
.legal code { font-family: var(--mono); font-size: .86em; background: var(--stone); padding: 1px 6px; border-radius: 4px; color: var(--accent-ink); }
/* HubSpot's consent banner. It renders into this page's DOM rather than an iframe, so rules here reach it;
   each needs !important because HubSpot injects its stylesheet after ours. Dario asked to go back to
   HubSpot's own layout, so the sizing and typography overrides that were here are gone — only three
   deliberate changes remain. */
/* 1. Off-white rather than HubSpot's stark white, so it sits in the site's palette. */
#hs-eu-cookie-confirmation { background: var(--paper) !important; }
/* 2. The brand coral on Accept, with an off-white label. Not --accent-bright (#E0706A): off-white on it
      measures 2.9:1, under the 4.5:1 floor, which is why that token is annotated "behind navy text".
      --accent-ink carries off-white at 5.13:1, and the hover tint stays above 4.5 too. */
#hs-eu-confirmation-button { background: var(--accent-ink) !important; color: var(--on-dark) !important; border: 0 !important; }
#hs-eu-confirmation-button:hover { background: #C04A42 !important; }
/* 3. HubSpot always draws Decline beside Accept for the opt-out type and gives no setting to remove it.
      Declining is not taken away: "Cookies settings" opens the category panel, where Analytics,
      Advertisement and Functionality each switch off and save. The disclaimer paragraph goes with it —
      it explains what Decline does, and there is no Decline on show. */
#hs-eu-decline-button { display: none !important; }
#hs-eu-cookie-disclaimer { display: none !important; }
/* 4. The consent banner and HubSpot's chat panel BOTH carry z-index 2147483647 — the maximum an element can
      have — so neither can be raised above the other and DOM order decides. The chat wins. Measured on the
      live site at 1440x900: the banner ran x 244–1182 while the chat panel starts at x 977, which put the
      chat on top of the banner's own Accept button — with the chat open, a visitor could not accept cookies.
      So the banner is kept out of the chat's column instead of fighting the z-index. The chat panel needs
      about 480px on the right; 64px covers the banner's own 32px side margins. Only on screens wide enough
      to show both side by side: below that the chat overlays the whole page anyway, and the banner is seen
      before anyone opens it. */
@media (min-width: 1024px) {
  /* Two IDs, matching HubSpot's own `#hs-banner-parent #hs-eu-cookie-confirmation`: a single-ID rule here is
     outranked and silently does nothing, which is how the first attempt at this failed. 576px = the chat
     column (~512 incl. its margin) plus the banner's 32px left gutter and a 32px gap. Measured after: banner
     32–881, chat starts 977. */
  #hs-banner-parent #hs-eu-cookie-confirmation {
    left: 32px !important; right: auto !important; margin: 0 !important;
    width: calc(100% - 576px) !important; max-width: none !important;
  }
}
/* 768–1023px: too narrow to sit side by side, but the chat is still a 448px panel rather than a full-screen
   takeover — measured at 768 it covered BOTH the banner's Accept and its Cookies settings button. Neither
   z-index can go above 2147483647, so the chat is dropped one step below the banner instead. Consent first;
   the banner is dismissed once and then the chat has the corner to itself. Below 768 the chat does go
   full screen (verified at 375), so the banner is simply behind it and reappears when the chat is closed. */
@media (min-width: 768px) and (max-width: 1023px) {
  #hubspot-messages-iframe-container { z-index: 2147483646 !important; }
}

/* chat */
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; font-family: var(--font); }
.chat-launch { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--paper); border: 0; border-radius: 999px; padding: 13px 18px 13px 15px; font: 700 .9rem var(--font); cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.22); }
.chat-launch i { width: 9px; height: 9px; background: var(--accent); display: inline-block; }
.chat-launch[hidden] { display: none; }

/* responsive */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1fr; }
}
/* six items plus the button: between the hamburger breakpoint and a small laptop the menu is tightened so it stays on one row */
@media (min-width: 861px) and (max-width: 1080px) { .nav-links { gap: 11px; } .nav-links a:not(.btn) { font-size: .84rem; } .nav-links .btn { padding: 8px 12px; font-size: .88rem; } .site-nav .container { gap: 14px; } }
@media (min-width: 861px) and (max-width: 910px) { .nav-links { gap: 8px; } .nav-links a:not(.btn) { font-size: .8rem; white-space: nowrap; } .logo, .logo-mark { height: 34px; } }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 42px; height: 42px; background: none; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; padding: 0 11px; }
  .nav-toggle span { height: 2px; background: currentColor; display: block; }
  .site-nav.on-dark .nav-toggle { color: var(--on-dark); border-color: var(--night-2); }
  .nav-links { position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px clamp(20px, 5vw, 56px) 28px; background: var(--paper); border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .18s; }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .site-nav.on-dark .nav-links { background: var(--night); border-color: var(--night-2); }
  .pains, .cards, .cards.four, .why, .row2 { grid-template-columns: 1fr; }
  .site-footer .container { grid-template-columns: 1fr; } .f-links { justify-content: flex-start; }
}
@media (max-width: 760px) { .flow-sec .walk { grid-template-columns: 1fr; } }
@media (max-width: 960px) { .hx-nums, .hx-nums.four, .hx-list, .hx-roles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .hx-split, .hx-split.rev, .hx-tiles, .hx-tiles.two, .hx-duo { grid-template-columns: 1fr; } .hx-orb { width: min(78%, 340px); } .hx-tile { min-height: 240px; } }
@media (max-width: 600px) { .hx-nums, .hx-nums.four, .hx-list, .hx-roles { grid-template-columns: 1fr; } .hx-nums { gap: 40px; } .hx-ctl button { width: 44px; height: 44px; } }
@media (max-width: 640px) { .figure .canvas { padding: 12px; } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } .chat { left: 12px; right: 12px; bottom: 12px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
