/* Static service pages: same tokens and type as the home page, no JavaScript needed. */
@font-face { font-family: 'Archivo'; src: url('/fonts/archivo.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/plex-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/plex-mono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --navy: #0f1b2d; --navy-800: #16243a; --navy-700: #1e2f4a; --navy-600: #2a3b57;
  --amber: #f5a524; --amber-400: #ffc35c; --off-white: #f4f6fa; --white: #fff;
  --slate: #5b6779; --mist: #a9b4c6; --line: #d5dbe5;
  /* Same accents as src/styles.css. 700 is text-safe on light, 50 is the light tint. */
  --teal: #2dd4bf; --teal-700: #19786c; --teal-50: #eafbf9;
  --coral: #ff6b5e; --coral-700: #c5382c; --coral-50: #fff0ef;
  --sky: #4cc9f0; --sky-700: #0c7495; --sky-50: #edfafe;
  --amber-700: #965f07; --amber-50: #fef6e9;
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif; --mono: 'Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --margin: 16px;
}
@media (min-width: 768px) { :root { --margin: 32px; } }
@media (min-width: 1024px) { :root { --margin: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--navy); }
body { margin: 0; font: 17px/1.6 var(--sans); color: var(--navy); background: var(--off-white); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.wrap { width: min(100% - 2 * var(--margin), 1100px); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -100px; background: var(--amber); color: var(--navy); padding: 12px 16px; border-radius: 6px; font-weight: 600; z-index: 10; }
.skip:focus { top: 16px; }

.dark { background: var(--navy); color: var(--off-white); }
.dark :focus-visible { outline-color: var(--off-white); }
.eyebrow { font: 500 13px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate); }
.dark .eyebrow { color: var(--mist); }
.eyebrow b { font-weight: 500; color: var(--navy); }
.dark .eyebrow b { color: var(--amber); } /* amber is never text on light backgrounds */

/* Header */
.top { border-bottom: 1px solid var(--navy-700); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo svg { width: 28px; height: 28px; }
.logo span { font-size: 16px; letter-spacing: 0.18em; font-stretch: 112%; text-transform: uppercase; }
.logo b { font-weight: 800; } .logo i { font-style: normal; font-weight: 300; }
.top nav { display: flex; gap: 20px; align-items: center; }
.top nav a { font-size: 15px; font-weight: 500; text-decoration: none; padding: 12px 0; }
.top nav a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--amber); }
@media (max-width: 599px) { .top nav .hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 6px; font-weight: 600; text-decoration: none; border: 1.5px solid transparent; }
.btn-primary { background: var(--amber); color: var(--navy); }
.btn-primary:hover { background: var(--amber-400); }
.btn-secondary { border-color: var(--off-white); color: var(--off-white); }
.btn-secondary:hover { background: rgb(244 246 250 / 0.08); }
.top nav a.btn-small { min-height: 40px; padding: 0 16px; white-space: nowrap; }
@media (max-width: 400px) { .top nav a.btn-small { padding: 0 8px; font-size: 13px; } }

/* Hero */
.hero { padding: 64px 0 72px; background-image: linear-gradient(to right, rgb(42 59 87 / 0.35) 1px, transparent 1px), linear-gradient(to bottom, rgb(42 59 87 / 0.35) 1px, transparent 1px); background-size: 24px 24px; }
.crumbs { font: 400 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mist); margin-bottom: 24px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.hero h1 { margin-top: 16px; font-size: clamp(2.25rem, 1.6rem + 2.8vw, 3.75rem); line-height: 1.05; letter-spacing: -0.025em; font-weight: 700; max-width: 18ch; }
.hero .lede { margin-top: 24px; font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem); line-height: 1.5; color: var(--mist); max-width: 52ch; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Content */
main section { padding: 64px 0; border-top: 1px solid var(--line); }
main section:first-of-type { border-top: 0; }
@media (min-width: 1024px) { main section { padding: 88px 0; } }
.section-head { margin-bottom: 32px; }
.section-head h2 { margin-top: 12px; font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; }
.section-head .rule { position: relative; height: 1px; background: var(--line); margin-top: 12px; }
.section-head .rule::before { content: ''; position: absolute; left: 0; top: 0; width: 24px; height: 1px; background: var(--amber); }
.prose p + p { margin-top: 16px; }
.prose p, .prose li { max-width: 64ch; }
.prose ul { padding-left: 20px; margin-top: 12px; }
.prose li + li { margin-top: 6px; }

.grid { display: grid; gap: 16px; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.card h3 { font-size: 20px; line-height: 1.3; font-weight: 600; }
.card p { margin-top: 8px; color: var(--slate); font-size: 15px; line-height: 1.55; }
.card .num { font: 500 13px/1 var(--mono); letter-spacing: 0.14em; color: var(--navy); }

.steps { list-style: none; padding: 0; display: grid; gap: 24px; counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; border-top: 1px solid var(--line); padding-top: 16px; position: relative; }
.steps li::before { content: counter(step, decimal-leading-zero); font: 500 13px/1 var(--mono); letter-spacing: 0.14em; display: block; margin-bottom: 12px; }
.steps li::after { content: ''; position: absolute; left: 0; top: -1px; width: 24px; height: 1px; background: var(--amber); }
.steps h3 { font-size: 20px; font-weight: 600; }
.steps p { margin-top: 8px; color: var(--slate); font-size: 15px; }

.roles { list-style: none; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
@media (min-width: 768px) { .roles { grid-template-columns: repeat(2, 1fr); column-gap: 32px; } }
.roles li { display: grid; grid-template-columns: 36px 1fr; padding: 12px 0; border-bottom: 1px solid var(--line); }
.roles li::before { content: attr(data-n); font: 500 13px/1.6 var(--mono); color: var(--slate); }
.roles b { display: block; font-weight: 600; }
.roles span { display: block; color: var(--slate); font-size: 15px; }
.note { margin-top: 16px; color: var(--slate); font-size: 15px; max-width: 64ch; }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 20px 0; font-size: 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 22px/1 var(--mono); }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding-bottom: 20px; color: var(--slate); max-width: 64ch; }

.cta { padding: 72px 0; text-align: left; }
.cta h2 { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; max-width: 22ch; }
.cta p { margin-top: 16px; color: var(--mist); max-width: 52ch; }
.cta .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Packages and prices */
.hero .from { margin-top: 20px; font: 500 14px/1.5 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--off-white); }
.hero .from b { font-weight: 500; color: var(--amber); }
.pkg { display: flex; flex-direction: column; }
.pkg .tag { font: 500 12px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); margin-bottom: 8px; }
.card.pkg .price { margin-top: 8px; color: var(--slate); font-size: 15px; }
.pkg .price b { font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; color: var(--navy); margin-right: 4px; }
.pkg ul { margin: 16px 0 0; padding-left: 18px; font-size: 15px; line-height: 1.5; flex: 1; }
.pkg li + li { margin-top: 4px; }
.pkg dl { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; line-height: 1.5; }
.pkg dt { font: 500 12px/1.75 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate); }
.pkg dd { margin: 0; }
.offers { display: grid; gap: 16px; margin-top: 24px; }
@media (min-width: 768px) { .offers { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
.offer { border-radius: 12px; padding: 24px; }
.offer h3 { font-size: 20px; line-height: 1.3; font-weight: 600; }
.offer p { margin-top: 8px; color: var(--mist); font-size: 15px; line-height: 1.55; }
.offer a { text-underline-offset: 4px; }

.related { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; }
.related a { font-weight: 600; text-underline-offset: 4px; }

/* Footer */
.foot { padding: 40px 0 48px; border-top: 1px solid var(--navy-700); font-size: 14px; color: var(--mist); }
.foot .wrap { display: grid; gap: 12px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot nav a { color: var(--off-white); text-decoration: none; padding: 4px 0; }
.foot nav a:hover { text-decoration: underline; }
.foot p { max-width: 72ch; }

/* ===== Hero drawings (one per service) ===== */
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; } }
.hero-art { margin: 0; justify-self: center; width: 100%; max-width: 460px; }
.art { display: block; width: 100%; height: auto; overflow: visible; }
.art * { vector-effect: non-scaling-stroke; }
.art .ln { fill: none; stroke: #6b7a93; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.art .faint { stroke: var(--navy-600); }
.art .hl { stroke: var(--amber); }
.art .thick { stroke-width: 2.5; }
.art .dashed { stroke-dasharray: 4 6; }
.art .dimhead, .art .fill-dim { fill: #6b7a93; }
.art .fill-navy { fill: var(--navy-600); }
.art .fill-navy-800 { fill: var(--navy-800); stroke: #6b7a93; stroke-width: 1; }
.art .fill-mist { fill: var(--mist); }
.art .fill-offwhite { fill: var(--off-white); }
.art .fill-amber { fill: var(--amber); }
.art .tick { fill: none; stroke: var(--navy); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.art .lbl { font: 500 13px var(--mono); letter-spacing: 0.08em; fill: var(--mist); }
.art .specimen { font: 300 64px var(--sans); fill: var(--off-white); letter-spacing: -0.02em; }
.art .draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.art .dashed.draw { stroke-dasharray: 4 6; }
.art .pop, .art .swatch, .art .finding, .art .fixed { transform-box: fill-box; transform-origin: center; }
/* Decorative loops are hidden in the static (no-motion) state */
.art .pulse { fill: none; stroke: var(--amber); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 5 95; stroke-dashoffset: 100; opacity: 0; }
.art .scan { stroke: var(--amber); stroke-width: 1.5; opacity: 0; }
.art .progress { transform-box: fill-box; transform-origin: left; opacity: 0; }
.art .finding { opacity: 0; }

/* Build sequence (only with motion; the final state is the default) */
html.motion-ok .art .draw { animation: art-draw 900ms cubic-bezier(0.65, 0, 0.35, 1) both; }
html.motion-ok .art .dashed.draw { animation-name: art-fade; }
html.motion-ok .art .pop { animation: art-pop 500ms cubic-bezier(0.22, 1, 0.36, 1) both; }
html.motion-ok .art .swatch { animation-name: art-slide; }
.art .d1 { animation-delay: 200ms; } .art .d2 { animation-delay: 320ms; } .art .d3 { animation-delay: 440ms; }
.art .d4 { animation-delay: 560ms; } .art .d5 { animation-delay: 680ms; } .art .d6 { animation-delay: 800ms; }
.art .d7 { animation-delay: 920ms; } .art .d8 { animation-delay: 1040ms; } .art .d9 { animation-delay: 1160ms; }
.art .d10 { animation-delay: 1280ms; } .art .d11 { animation-delay: 1400ms; } .art .d12 { animation-delay: 1520ms; }
@keyframes art-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes art-fade { from { opacity: 0; } }
@keyframes art-pop { from { opacity: 0; transform: scale(0.85); } }
@keyframes art-slide { from { opacity: 0; transform: translateX(16px); } }

/* One ambient loop per page, after the drawing has built */
html.motion-ok .art .pulse { opacity: 1; animation: art-pulse 3.2s linear 2.2s infinite both; }
html.motion-ok .art .pulse.p2 { animation-delay: 2.6s; } html.motion-ok .art .pulse.p3 { animation-delay: 3s; }
html.motion-ok .art .pulse.p4 { animation-delay: 3.4s; animation-duration: 1.6s; }
html.motion-ok .art .pulse.token { stroke-dasharray: 3 97; animation-duration: 7s; }
@keyframes art-pulse { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
html.motion-ok .art .progress { animation: art-progress 5s cubic-bezier(0.65, 0, 0.35, 1) 2s infinite both; }
@keyframes art-progress { 0% { opacity: 1; transform: scaleX(0); } 70% { opacity: 1; transform: scaleX(1); } 85%, 100% { opacity: 0; transform: scaleX(1); } }
html.motion-ok .art .scan { animation: art-scan 4.5s ease-in-out 1.8s infinite alternate both; }
@keyframes art-scan { from { opacity: 0.7; transform: translateY(0); } to { opacity: 0.7; transform: translateY(205px); } }
/* Security: the finding flags amber, then is fixed */
html.motion-ok .art .finding { animation: art-finding 1.6s ease both 1.3s; }
@keyframes art-finding { 0% { opacity: 0; } 25%, 70% { opacity: 1; } 100% { opacity: 0.35; } }
html.motion-ok .art .fixed { animation: art-pop 500ms cubic-bezier(0.22, 1, 0.36, 1) 2.6s both; }
.art .fixed { stroke: var(--amber); }
html.motion-ok .art .drift { animation: art-draw 900ms both 440ms, art-drift 24s linear 2s infinite; }
@keyframes art-drift { to { stroke-dashoffset: -100; } }
.hero.is-offscreen .art * { animation-play-state: paused !important; }

/* ===== Section reveals ===== */
html.motion-ok [data-reveal]:not(.is-revealed) .section-head .rule { transform: scaleX(0); }
html.motion-ok [data-reveal]:not(.is-revealed) .section-head h2 { opacity: 0; transform: translateY(16px); }
html.motion-ok [data-reveal]:not(.is-revealed) .section-head .eyebrow { opacity: 0; }
html.motion-ok [data-reveal]:not(.is-revealed) :is(.card, .steps li, .roles li, .faq details, .prose > *, .note, .offer) { opacity: 0; transform: translateY(16px); }
.section-head .rule { transform-origin: left; }
html.motion-ok [data-reveal].is-revealed .section-head .rule { transition: transform 720ms cubic-bezier(0.65, 0, 0.35, 1); }
html.motion-ok [data-reveal].is-revealed .section-head :is(h2, .eyebrow) { transition: opacity 560ms ease, transform 640ms cubic-bezier(0.22, 1, 0.36, 1) 80ms; }
html.motion-ok [data-reveal].is-revealed :is(.card, .steps li, .roles li, .faq details, .prose > *, .note, .offer) {
  transition: opacity 560ms ease, transform 560ms cubic-bezier(0.22, 1, 0.36, 1); transition-delay: 200ms;
}
html.motion-ok [data-reveal].is-revealed :is(.card, .steps li, .roles li, .faq details):nth-child(2) { transition-delay: 260ms; }
html.motion-ok [data-reveal].is-revealed :is(.card, .steps li, .roles li, .faq details):nth-child(3) { transition-delay: 320ms; }
html.motion-ok [data-reveal].is-revealed :is(.card, .steps li, .roles li, .faq details):nth-child(4) { transition-delay: 380ms; }
html.motion-ok [data-reveal].is-revealed :is(.card, .steps li, .roles li, .faq details):nth-child(5) { transition-delay: 440ms; }
html.motion-ok [data-reveal].is-revealed :is(.card, .steps li, .roles li, .faq details):nth-child(n + 6) { transition-delay: 500ms; }

/* Dash-drawn shapes need normal stroke scaling, or pathLength dashes stop short */
.art .draw, .art .pulse { vector-effect: none; }

/* ===== Color pass: each page wears its service's accent (body.accent-*, same mapping as the home cards) ===== */
.accent-teal { --accent: var(--teal); --accent-ink: var(--teal-700); --accent-tint: var(--teal-50); }
.accent-coral { --accent: var(--coral); --accent-ink: var(--coral-700); --accent-tint: var(--coral-50); }
.accent-sky { --accent: var(--sky); --accent-ink: var(--sky-700); --accent-tint: var(--sky-50); }
.accent-amber { --accent: var(--amber); --accent-ink: var(--amber-700); --accent-tint: var(--amber-50); }
.dark { --accent-ink: var(--accent); }

.eyebrow b, .dark .eyebrow b { color: var(--accent-ink); }
.section-head .rule::before { top: -1px; width: 48px; height: 3px; background: var(--accent); }
.hero {
  border-bottom: 3px solid var(--accent);
  background-image:
    radial-gradient(60% 80% at 85% 20%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    linear-gradient(to right, rgb(42 59 87 / 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(42 59 87 / 0.35) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
}
.hero .from b { color: var(--accent); }
.art { --amber: var(--accent); }
main section:nth-of-type(even) { background: var(--accent-tint); }
.card .num, .pkg .tag, .steps li::before, .roles li::before, .faq summary::after { color: var(--accent-ink); }
.steps li::after { top: -2px; width: 48px; height: 3px; background: var(--accent); }
.pkg { box-shadow: inset 0 4px 0 var(--accent); }
.pkg .price b { text-decoration: underline 3px var(--accent); text-underline-offset: 6px; text-decoration-skip-ink: none; }
.offer { border-left: 3px solid var(--accent); }
.prose a, .related a, .faq details a { text-decoration-color: var(--accent-ink); }
.cta { border-top: 3px solid var(--accent); }
