:root {
  --bg: #eef1f8;
  --surface: #f8f9fd;
  --text: #16161a;
  --muted: #5d5d66;
  --border: #dde2ee;
  --accent: #3b5bdb;
  --accent-soft: #dde4ff;
  --on-accent: #ffffff;
  --cta: #15803d;        /* action buttons only: green, so they pop against the blue/violet brand */
  --cta-hover: #116b33;
  --on-cta: #ffffff;
  color-scheme: light;
}
/* Dark follows the device unless the toggle saved a choice (data-theme on <html>) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f12;
    --surface: #18181d;
    --text: #ececf0;
    --muted: #a0a0ab;
    --border: #2a2a32;
    --accent: #7c95ff;
    --accent-soft: #1d2340;
    --on-accent: #0f0f12;
    --cta: #4ade80;
    --cta-hover: #6ee79a;
    --on-cta: #0b1a10;
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .logo .logo-dark, :root:not([data-theme="light"]) .theme-btn .ico-sun { display: block; }
  :root:not([data-theme="light"]) .logo .logo-light, :root:not([data-theme="light"]) .theme-btn .ico-moon { display: none; }
}
:root[data-theme="dark"] {
  --bg: #0f0f12;
  --surface: #18181d;
  --text: #ececf0;
  --muted: #a0a0ab;
  --border: #2a2a32;
  --accent: #7c95ff;
  --accent-soft: #1d2340;
  --on-accent: #0f0f12;
  --cta: #4ade80;
  --cta-hover: #6ee79a;
  --on-cta: #0b1a10;
  color-scheme: dark;
}
:root[data-theme="dark"] .logo .logo-dark, :root[data-theme="dark"] .theme-btn .ico-sun { display: block; }
:root[data-theme="dark"] .logo .logo-light, :root[data-theme="dark"] .theme-btn .ico-moon { display: none; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* The menu sticks to the top (64px tall). Sections already have top padding (56px on phones),
   so a small extra margin is enough to keep the first line clear of the menu after an in-page link. */
section[id] { scroll-margin-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 Inter, system-ui, sans-serif;
}
h1, h2, h3 { font-family: "Space Grotesk", Inter, sans-serif; line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; max-width: 20ch; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 600; margin-bottom: 1.5rem; }
h3 { font-size: 1.15rem; font-weight: 500; }
p { margin: 0 0 .75rem; color: var(--muted); }
a { color: inherit; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.section { padding: 5rem 16px; }
.eyebrow { color: var(--accent); font-weight: 500; font-size: .85rem; letter-spacing: .04em; margin-bottom: .5rem; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s, background .25s; }
.nav.scrolled { border-bottom-color: var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .45); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { display: block; height: 32px; width: auto; }
.links { display: flex; align-items: center; gap: .25rem; }
.links a:not(.btn) { position: relative; padding: .45rem .7rem; border-radius: 6px; text-decoration: none; color: var(--muted); font-size: .9rem; font-weight: 500; transition: color .15s; }
.links a:not(.btn)::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .15rem; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.links a:not(.btn):hover { color: var(--text); }
.links a.active, .links a[aria-current="page"] { color: var(--text); }
.links a:not(.btn):hover::after, .links a.active::after, .links a[aria-current="page"]::after { transform: scaleX(1); }
.links .btn { position: relative; margin-left: 1.25rem; display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .95rem; border-radius: 8px; font-size: .88rem; transition: filter .15s; }
.links .btn::before { content: ""; position: absolute; left: -1.25rem; top: 50%; width: 1px; height: 22px; transform: translateY(-50%); background: var(--border); }
.links .btn:hover { transform: none; filter: brightness(.93); }
.menu-btn { display: none; width: 40px; height: 40px; place-items: center; background: none; border: 1px solid transparent; border-radius: 8px; color: var(--text); font-size: 1.35rem; line-height: 1; cursor: pointer; }
.menu-btn:hover { border-color: var(--border); }
.links { margin-left: auto; }
.logo .logo-dark, .theme-btn .ico-sun { display: none; }
.theme-btn { display: grid; place-items: center; width: 40px; height: 40px; margin-left: .75rem; background: none; border: 1px solid transparent; border-radius: 8px; color: var(--text); cursor: pointer; }
.theme-btn:hover { border-color: var(--border); }
.theme-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* buttons */
.btn { display: inline-block; background: var(--cta); color: var(--on-cta) !important; padding: 1rem 1.9rem; border-radius: 12px; text-decoration: none; font-size: 1.05rem; font-weight: 600; box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--cta) 70%, transparent); transition: transform .15s, background .15s, box-shadow .15s; }
.btn:hover { background: var(--cta-hover); transform: translateY(-2px); box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--cta) 75%, transparent); }
.btn-sm { padding: .5rem 1rem; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--text) !important; border: 1px solid var(--border); box-shadow: none; }
.btn-ghost:hover { background: transparent; border-color: var(--text); box-shadow: none; }

/* hero */
.hero { padding-top: 4.5rem; padding-bottom: 3.5rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; align-items: center; }
.hero-photo { width: 240px; height: 240px; object-fit: cover; object-position: center 25%; border-radius: 50%; border: 4px solid var(--surface); outline: 2px solid var(--accent); outline-offset: 4px; background: var(--surface); }
.pill { display: inline-block; background: var(--accent-soft); color: var(--accent); padding: .3rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 500; margin-bottom: 1.25rem; }
.lead { font-size: 1.08rem; max-width: 48ch; margin: .9rem 0 1.75rem; }
.cta-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
/* Hero: text and buttons centred in their column, per the portfolio review */
.hero-text { text-align: center; }
.hero-text .lead { margin-left: auto; margin-right: auto; }
.hero-text .cta-row { justify-content: center; }
.tags { list-style: none; padding: 0; margin: 2.5rem 0 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.tags li { border: 1px solid var(--border); border-radius: 999px; padding: .25rem .8rem; font-size: .85rem; color: var(--muted); }

/* grids and cards */
.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.card, .project { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; }
.project { transition: border-color .2s, transform .2s; }
.project:hover { border-color: var(--accent); transform: translateY(-3px); }
.project.wide { grid-column: 1 / -1; }
.project h3 { font-size: 1.4rem; margin-top: .75rem; }
.tag { display: inline-block; background: var(--accent-soft); color: var(--accent); font-size: .78rem; font-weight: 500; padding: .2rem .65rem; border-radius: 6px; }
.stack { font-size: .85rem; margin: 0; }
.demo-link { display: inline-block; margin-top: .25rem; color: var(--accent); font-weight: 500; font-size: .95rem; text-decoration: none; }
.demo-link:hover { text-decoration: underline; }

/* process */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.steps li { border-top: 2px solid var(--accent); padding-top: 1rem; }
.steps b { color: var(--accent); font-family: "Space Grotesk", sans-serif; }

/* contact */
.cta-box { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: clamp(1.5rem, 5vw, 3.5rem); text-align: center; }
.cta-box p { max-width: 56ch; margin: 0 auto 1.75rem; }

.footer { padding: 2rem 16px 3rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--border); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* phone */
@media (max-width: 720px) {
  .menu-btn { display: grid; order: 2; }
  .theme-btn { margin-left: auto; margin-right: .25rem; }
  .links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: .25rem 16px 1.25rem; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .5); }
  .links.open { display: flex; }
  .links a:not(.btn) { padding: .95rem .25rem; font-size: 1.05rem; border-radius: 0; border-bottom: 1px solid var(--border); }
  .links a:not(.btn)::after { display: none; }
  .links .btn { margin: 1.25rem 0 0; justify-content: center; padding: .8rem 1rem; font-size: 1rem; }
  .links .btn::before { display: none; }
  .hero { padding-top: 2.5rem; grid-template-columns: 1fr; gap: 2rem; }
  .hero picture { order: -1; }
  .hero-photo { width: 160px; height: 160px; }
  .section { padding: 3.5rem 16px; }
}

/* ---------- contact page ---------- */
.contact-hero { padding: 5rem 0 3rem; border-bottom: 1px solid var(--border); }
.contact-hero h1 { max-width: 20ch; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 3rem; align-items: start; padding-top: 4rem; padding-bottom: 5rem; }
.contact-side h2, .form-card h2 { font-size: 1.6rem; margin-bottom: 1.25rem; }

.next-steps { list-style: none; padding: 0; margin: 0 0 2.5rem; display: grid; gap: 1.25rem; }
.next-steps li { display: grid; grid-template-columns: 2.25rem 1fr; gap: 1rem; align-items: start; }
.next-steps b { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: "Space Grotesk", sans-serif; }
.next-steps h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.next-steps p { margin: 0; }

.direct { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; }
.direct h3 { margin-bottom: .35rem; }
.direct-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: clamp(1.25rem, 4vw, 2.25rem); }
.form-sub { margin-top: -.75rem; margin-bottom: 1.5rem; }
#contact-form { display: grid; gap: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: .4rem; min-width: 0; }
.field > span { font-size: .9rem; font-weight: 500; }
.field i { color: var(--accent); font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; padding: .75rem .9rem;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.invalid input, .field.invalid textarea { border-color: #e5484d; }
.err { color: #e5484d; font-size: .85rem; min-height: 0; }
.err:empty { display: none; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.submit { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 500; }
.submit[aria-busy="true"] { opacity: .7; cursor: progress; }
.form-note { font-size: .85rem; margin: 0; }
.form-status { margin: 0; font-weight: 500; }
.form-status.ok { color: #2f9e6e; }
.form-status.fail { color: #e5484d; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 3rem; }
  .contact-hero { padding-top: 3rem; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .submit { justify-self: stretch; text-align: center; }
}

/* icons (contact page) */
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn { display: inline-flex; align-items: center; gap: .5rem; }
.next-steps b .ico { width: 1.15rem; height: 1.15rem; }
.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; }

/* contact page v2 */
[hidden] { display: none !important; }
.contact-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; align-items: end; }
.facts { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; color: var(--muted); font-size: .95rem; }
.facts li { display: inline-flex; align-items: center; gap: .45rem; }
.facts .ico { color: var(--accent); }
.hello { margin: 0; display: grid; grid-template-columns: 72px 1fr; gap: 1rem; align-items: center; max-width: 330px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1rem 1.25rem 1rem 1rem; }
.hello img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: center 25%; background: var(--surface); }
.hello figcaption { color: var(--muted); font-size: .95rem; line-height: 1.5; }
.hello strong { display: block; color: var(--text); font-family: "Space Grotesk", sans-serif; font-size: 1.05rem; }

.proof { margin-top: 1.5rem; font-size: .95rem; }
.proof a { color: var(--accent); font-weight: 500; text-underline-offset: 3px; white-space: nowrap; }

/* Cost calculator call to action: a big centred green pill that gently pulses */
.cost-cta { margin-top: 2.5rem; text-align: center; }
.cost-cta-q { margin: 0 0 1rem; font-size: 1.1rem; font-weight: 500; color: var(--text); }
.btn-big { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; padding: 1.2rem 2.4rem; border-radius: 999px; font-size: 1.2rem; animation: cta-pulse 2.8s ease-out infinite; }
.btn-big .ico { width: 1.4em; height: 1.4em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.btn-big:hover { animation-play-state: paused; }
.cost-cta-note { margin: .75rem 0 0; font-size: .88rem; color: var(--muted); }
@keyframes cta-pulse {
  0%   { box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--cta) 70%, transparent), 0 0 0 0 color-mix(in srgb, var(--cta) 45%, transparent); }
  70%  { box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--cta) 70%, transparent), 0 0 0 16px transparent; }
  100% { box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--cta) 70%, transparent), 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) { .btn-big { animation: none; } }
@media (max-width: 480px) { .btn-big { display: flex; width: 100%; padding: 1.1rem 1.25rem; font-size: 1.08rem; } }

.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips legend { font-size: .9rem; font-weight: 500; margin-bottom: .6rem; padding: 0; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span { display: inline-block; padding: .5rem .95rem; border: 1px solid var(--border); border-radius: 999px; font-size: .92rem; color: var(--muted); background: var(--bg); transition: border-color .15s, color .15s, background .15s; }
.chips input:hover + span { border-color: var(--accent); color: var(--text); }
.chips input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 500; }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.more summary { cursor: pointer; color: var(--accent); font-size: .92rem; font-weight: 500; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+ "; }
.more[open] summary::before { content: "− "; }
.more[open] .field-row { margin-top: 1rem; }
.form-status a { color: inherit; }

.thanks { text-align: center; padding: 2rem 0; outline: none; }
.thanks .big { width: 3rem; height: 3rem; color: #2f9e6e; margin-bottom: 1rem; }
.thanks h2 { margin-bottom: .5rem; }
.thanks .btn { margin-top: .5rem; }

.faq { padding-top: 1rem; padding-bottom: 5rem; }
.faq details { max-width: 820px; }
.faq h2 { font-size: 1.6rem; margin-bottom: 1.25rem; }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-of-type { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 0; font-weight: 500; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 1.1rem; max-width: 65ch; }

@media (max-width: 860px) {
  .contact-hero-inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- site-wide fixes ---------- */
.hero picture { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 8px; top: -100px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: .6rem 1rem; border-radius: 8px; font-weight: 500; text-decoration: none; }
.skip:focus { top: 8px; }
.cta-center { justify-content: center; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 1.5rem; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--text); }
.notfound { min-height: calc(100vh - 64px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-top: 3rem; padding-bottom: 3rem; }
.notfound h1 { margin-top: 1.5rem; }
.notfound .lead { margin: 1rem auto 2rem; }

/* ---------- services ---------- */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } /* seven services, then the wide "not sure" tile fills the last row */
/* The tile after the last service card: fills the two empty columns so the grid ends on a full row */
.service-ask { grid-column: span 2; display: flex; flex-direction: column; justify-content: center; gap: .35rem; padding: 1.75rem 1.5rem; border: 1px dashed var(--border); border-radius: 20px; text-decoration: none; color: var(--text); }
.service-ask strong { font-family: "Space Grotesk", Inter, sans-serif; font-size: 1.15rem; font-weight: 600; }
.service-ask span { color: var(--muted); font-size: .95rem; line-height: 1.55; max-width: 46ch; }
.service-ask b { color: var(--accent); font-weight: 600; margin-top: .35rem; }
.service-ask:hover { border-color: var(--accent); }
@media (max-width: 1100px) { .services { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } .service-ask { grid-column: auto; } }
@media (max-width: 600px) { .services { grid-template-columns: minmax(0, 1fr); } }
.service { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1.75rem 1.5rem 1.5rem; transition: border-color .2s, transform .2s; }
.service:hover { border-color: var(--accent); transform: translateY(-3px); }
.service-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); margin-bottom: 1.5rem; }
.service-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { font-size: 1.3rem; margin-bottom: .6rem; }
.service p { flex: 1; margin-bottom: 1.5rem; font-size: .95rem; line-height: 1.55; }
.service-link { color: var(--accent); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.service-link span { transition: transform .2s; }
.service-link:hover span { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .service, .service-link span { transition: none; } .service:hover { transform: none; } }

/* ---------- 3D flip service cards ---------- */
.service { background: none; border: 0; padding: 0; perspective: 1200px; outline: none; }
.service:hover { transform: none; }
.flip { display: grid; height: 100%; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2, .75, .2, 1); }
.face { grid-area: 1 / 1; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1.75rem 1.5rem 1.5rem; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face.back { transform: rotateY(180deg); border-color: var(--accent); }
.service:hover .flip, .service:has(.service-link:focus-visible) .flip, .service.flipped .flip { transform: rotateY(180deg); }
/* When the card is flipped, its button is on the hidden front face, so the back shows the focus ring */
.service.flipped:has(.flip-hint:focus-visible) .face.back { box-shadow: 0 0 0 2px var(--accent); }
.flip-hint { margin-top: auto; align-self: flex-start; background: none; border: 0; padding: 0; font-family: inherit; color: var(--muted); font-size: .85rem; cursor: pointer; }
.face.back h3 { font-size: 1.05rem; margin-bottom: .9rem; color: var(--accent); }
.gets { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .6rem; flex: 1; }
.gets li { position: relative; padding-left: 1.5rem; font-size: .92rem; line-height: 1.45; color: var(--text); }
.gets li::before { content: ""; position: absolute; left: 0; top: .35em; width: .85rem; height: .5rem; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg) scale(.8); }
.face.back .service-link { margin-top: auto; }
@media (prefers-reduced-motion: reduce) { .flip { transition: none; } }

/* Phones: each service becomes a compact row that opens on tap (script.js toggles .flipped). No 3D flip here. */
@media (max-width: 600px) {
  .services { gap: .6rem; }
  .service-ask { padding: 1rem; border-radius: 16px; }
  .service { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; perspective: none; }
  .service.flipped { border-color: var(--accent); }
  .flip, .service:hover .flip, .service:has(.service-link:focus-visible) .flip, .service.flipped .flip { display: block; height: auto; transform: none; transform-style: flat; transition: none; }
  .face { background: none; border: 0; border-radius: 0; backface-visibility: visible; -webkit-backface-visibility: visible; }
  .service.flipped:has(.flip-hint:focus-visible) .face.back { box-shadow: none; }
  .face.front { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: .85rem; align-items: center; min-height: 44px; padding: .85rem 1rem; }
  .face.front .service-icon { grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 11px; margin: 0; }
  .face.front .service-icon svg { width: 20px; height: 20px; }
  .face.front h3 { grid-column: 2; font-size: 1.02rem; margin: 0; }
  .face.front p { grid-column: 2; margin: .1rem 0 0; font-size: .88rem; line-height: 1.4; }
  /* The hint becomes a chevron: its "What you get ↻" text is hidden here, not removed */
  .flip-hint { grid-column: 3; grid-row: 1 / span 2; display: grid; place-items: center; width: 24px; height: 24px; margin: 0; font-size: 0; }
  .flip-hint::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
  .service.flipped .flip-hint::after { border-color: var(--accent); transform: translateY(2px) rotate(-135deg); }
  .face.back { transform: none; padding: 0 1rem 1rem calc(1rem + 40px + .85rem); }
  .face.back h3 { display: none; }
  .face.back .gets { gap: .45rem; margin-bottom: .85rem; }
  .face.back .gets li { font-size: .88rem; }
}
/* Lists collapse only when JavaScript can open them again; without it they all stay visible */
@media (max-width: 600px) and (scripting: enabled) {
  .face.back { display: none; }
  .service.flipped .face.back { display: flex; }
}
@media (max-width: 600px) and (scripting: none) { .flip-hint { display: none; } }
@media (max-width: 600px) and (prefers-reduced-motion: reduce) { .flip-hint::after { transition: none; } }

/* Phones: tighter work cards; every project, description and link stays */
@media (max-width: 720px) {
  #work .project { padding: 1.1rem; }
  #work .project h3 { font-size: 1.15rem; margin: .55rem 0 .35rem; }
  #work .project p { font-size: .95rem; line-height: 1.55; margin-bottom: .5rem; }
  #work .stack { display: none; }
}

/* ---------- how I work: step rail + example project thread ---------- */
.journey { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 2.5rem; align-items: start; }

.rail { list-style: none; margin: 0; padding: 0; }
.rail > li { position: relative; padding: 0 0 .35rem 2.25rem; }
.rail > li::before { content: ""; position: absolute; left: .55rem; top: 1.9rem; bottom: -.5rem; width: 2px; background: var(--border); transition: background .3s; }
.rail > li:last-child::before { display: none; }
.rail > li.done::before { background: var(--accent); }
.rail-step { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .6rem .5rem .6rem 0; color: inherit; font: inherit; cursor: pointer; border-radius: 8px; }
.dot { position: absolute; left: 0; top: .95rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 2px solid var(--border); background: var(--bg); transition: border-color .2s, background .2s, box-shadow .2s; }
.rail > li.done .dot { border-color: var(--accent); background: var(--accent); }
.rail > li.done .dot::after { content: ""; position: absolute; left: .32rem; top: .12rem; width: .28rem; height: .55rem; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.rail > li.active .dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.rail-head { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.rail-name { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 1.15rem; color: var(--muted); transition: color .2s; }
.rail-step:hover .rail-name, .rail > li.done .rail-name { color: var(--text); }
.rail > li.active .rail-name { color: var(--accent); }
.rail-when { font-size: .85rem; color: var(--muted); }
.rail-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s ease; }
.rail-body > div { overflow: hidden; }
.rail > li.active .rail-body { grid-template-rows: 1fr; }
.rail-body p { max-width: 42ch; margin: .15rem 0 .9rem; }

.thread { display: flex; flex-direction: column; min-height: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1.25rem 1.5rem 1.5rem; }
.thread-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.thread-title { font-family: "Space Grotesk", sans-serif; font-weight: 600; }
.thread-sub { font-size: .85rem; color: var(--muted); }
.messages { list-style: none; margin: 0; padding: 1.25rem 0 0; display: flex; flex-direction: column; gap: .9rem; flex: 1; }
.msg { max-width: 86%; display: grid; gap: .3rem; animation: msg-in .3s ease; }
.msg p { margin: 0; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 16px 16px 16px 4px; padding: .7rem .95rem; line-height: 1.5; font-size: .95rem; }
.msg.client { align-self: flex-end; justify-items: end; }
.msg.client p { background: var(--accent-soft); border-color: transparent; border-radius: 16px 16px 4px 16px; }
.msg.bot p { border-style: dashed; border-color: var(--accent); }
.msg.bot .who { color: var(--accent); }
.who { font-size: .78rem; color: var(--muted); padding: 0 .3rem; }
.files { display: flex; flex-wrap: wrap; gap: .4rem; }
.file { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 500; color: var(--accent); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .3rem .65rem; }
.file::before { content: ""; width: .55rem; height: .7rem; border: 1.5px solid currentColor; border-radius: 2px 4px 2px 2px; opacity: .8; }
.typing .dots { display: inline-flex; gap: .3rem; background: var(--bg); border: 1px solid var(--border); border-radius: 16px 16px 16px 4px; padding: .85rem .95rem; }
.typing.client .dots { background: var(--accent-soft); border-color: transparent; border-radius: 16px 16px 4px 16px; }
.dots i { width: .4rem; height: .4rem; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.thread-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.thread-count { font-size: .85rem; color: var(--muted); }
.thread-next { background: none; border: 1px solid var(--border); border-radius: 10px; color: var(--accent); font: inherit; font-weight: 500; padding: .55rem 1rem; cursor: pointer; transition: border-color .15s; }
.thread-next:hover { border-color: var(--accent); }

@media (max-width: 860px) {
  .journey { grid-template-columns: 1fr; gap: 1.5rem; }
  .thread { min-height: 0; padding: 1rem 1.1rem 1.25rem; }
  .msg { max-width: 94%; }
}
/* Phones: the example chat is hidden and all four steps are open at once, as a plain numbered rail.
   script.js stops the auto-advance here and reports every step as expanded. */
@media (max-width: 600px) {
  .journey .thread { display: none; }
  .rail .rail-body { grid-template-rows: 1fr; }
  .rail .rail-step { cursor: default; }
  .rail > li .rail-name, .rail > li.active .rail-name { color: var(--text); }
  .rail > li .dot, .rail > li.active .dot, .rail > li.done .dot { border-color: var(--accent); background: var(--bg); box-shadow: none; }
  .rail > li.done .dot::after { display: none; }
  .rail > li::before, .rail > li.done::before { background: var(--border); }
}
@media (prefers-reduced-motion: reduce) {
  .rail-body, .rail > li::before, .dot, .rail-name { transition: none; }
  .msg, .dots i { animation: none; }
}

/* ---------- why me ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.about-lead { font-family: "Space Grotesk", Inter, sans-serif; font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.45; color: var(--text); max-width: 32ch; margin-bottom: 1.75rem; }
.about-bio { max-width: 56ch; margin: 0 0 1.75rem; line-height: 1.65; }
.promises { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.promises li { position: relative; padding-left: 2rem; max-width: 52ch; color: var(--muted); line-height: 1.55; }
.promises li::before { content: ""; position: absolute; left: .15rem; top: .5em; width: .9rem; height: .5rem; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.promises strong { color: var(--text); font-weight: 600; }
.facts-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1.5rem 1.75rem; }
.facts-panel dl { margin: 0; display: grid; gap: 1rem; }
.facts-panel dl > div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; align-items: baseline; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.facts-panel dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts-panel dt { font-size: .85rem; color: var(--muted); }
.facts-panel dd { margin: 0; color: var(--text); font-weight: 500; }
.tools { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tools li { border: 1px solid var(--border); border-radius: 999px; padding: .2rem .7rem; font-size: .85rem; font-weight: 500; color: var(--muted); }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; gap: 2rem; }
  .facts-panel dl > div { grid-template-columns: 1fr; gap: .25rem; }
}

/* ---------- client feedback (#feedback). Switched off with the hidden attribute until real quotes
   are added: see the comment above the section in index.html. One, two or three cards all lay out. ---------- */
#feedback[hidden] { display: none; }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.quote { margin: 0; max-width: 34rem; display: flex; flex-direction: column; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--svc, var(--accent)); border-radius: 20px; padding: 1.5rem; box-shadow: var(--shadow-card); }
.quote blockquote { margin: 0; }
.quote blockquote p { margin: 0; color: var(--text); font-size: 1.02rem; line-height: 1.6; }
.quote figcaption { display: flex; align-items: center; gap: .75rem; margin-top: auto; }
.quote-avatar { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--svc-soft, var(--accent-soft)); color: var(--svc, var(--accent)); font-weight: 600; font-size: .85rem; }
.quote-name { display: block; font-weight: 600; color: var(--text); }
.quote-role { display: block; font-size: .88rem; color: var(--muted); }
.quote-project { color: var(--svc, var(--accent)); font-weight: 600; font-size: .92rem; text-decoration: none; }
.quote-project:hover { text-decoration: underline; }

/* ---------- "What eats your team's time?" picker (the Quick check section) ---------- */
.pick-intro { max-width: 52ch; margin-bottom: 1.25rem; }
.pick { max-width: 780px; }
.pick-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.pick-options button { min-height: 44px; padding: .5rem .9rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .95rem; text-align: left; cursor: pointer; }
.pick-options button:hover { border-color: var(--accent); }
.pick-options button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 500; }
.pick-result { margin-top: 1rem; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--svc, var(--accent)); border-radius: 16px; padding: 1.25rem 1.4rem; }
.pick-result[hidden] { display: none; }
.pick-result h3 { font-size: 1.25rem; color: var(--svc, var(--accent)); margin-bottom: .35rem; }
.pick-result p { max-width: 56ch; margin: 0; }
.pick-result .pick-q { font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: .25rem; }
/* Once the buttons exist they carry these labels, so the copies inside the results are hidden */
.pick-ready .pick-q { display: none; }
.pick-result .pick-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: .9rem; }
.pick-links a { color: var(--svc, var(--accent)); font-weight: 600; text-decoration: none; }
.pick-links a:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .links a:not(.btn)::after, .nav { transition: none; } }

/* ---------- the problem: four tiles (scoped to #problem) ---------- */
#problem .problem-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
#problem .problem-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1.25rem; box-shadow: var(--shadow-card); }
#problem .problem-art { display: block; width: 96px; height: auto; margin-bottom: 1rem; border-radius: 14px; background: var(--svc-soft, var(--accent-soft)); }
#problem .problem-tile h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: .35rem; }
#problem .problem-tile p { font-size: .95rem; line-height: 1.55; margin: 0; }

/* illustrations: each takes its tile's colour */
#problem .pa-line { fill: none; stroke: var(--muted); stroke-width: 2; opacity: .55; }
#problem .pa-faint { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 3 5; opacity: .35; }
#problem .pa-dot { fill: var(--svc, var(--accent)); }
#problem .pa-mark { fill: none; stroke: var(--svc, var(--accent)); stroke-width: 2; }
#problem .pa-hand { stroke: var(--svc, var(--accent)); stroke-width: 3; stroke-linecap: round; }
#problem .pa-bubble-shape { fill: var(--surface); stroke: var(--svc, var(--accent)); stroke-width: 2; }
#problem .pa-shuttle { animation: pa-shuttle 3.2s ease-in-out infinite; }
#problem .pa-drift { animation: pa-drift 5s ease-in-out infinite; }
#problem .pa-hand { transform-box: view-box; transform-origin: 70px 50px; animation: pa-spin 6s linear infinite; }
#problem .pa-mark { animation: pa-miss 6s linear infinite; }
#problem .pa-bubble { animation: pa-bubble 4.5s ease-in-out infinite; }
@keyframes pa-shuttle { 0%, 12% { transform: none; } 42%, 58% { transform: translateX(84px); } 88%, 100% { transform: none; } }
@keyframes pa-drift { 0%, 10% { transform: none; opacity: 1; } 65%, 80% { transform: translate(var(--dx), var(--dy)); opacity: .45; } 100% { transform: none; opacity: 1; } }
@keyframes pa-spin { to { transform: rotate(360deg); } }
/* The hand passes the mark at 45°, one eighth of the turn: the mark flashes, then is missed */
@keyframes pa-miss { 0%, 9% { opacity: .5; } 12.5% { opacity: 1; stroke-width: 3; } 20%, 100% { opacity: .5; } }
@keyframes pa-bubble { 0% { opacity: 0; transform: translateY(8px); } 20%, 55% { opacity: 1; transform: none; } 85%, 100% { opacity: 0; transform: translateY(-6px); } }

/* Tablets and phones: two by two */
@media (max-width: 860px) {
  #problem .problem-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  #problem .problem-tile { padding: 1rem; border-radius: 16px; }
  #problem .problem-art { width: 72px; margin-bottom: .75rem; border-radius: 12px; }
  #problem .problem-tile h3 { font-size: 1.02rem; }
  #problem .problem-tile p { font-size: .9rem; line-height: 1.5; }
}
@media (prefers-reduced-motion: reduce) {
  /* Stop the loops at their resting frame (pausing would freeze the chat bubble at 0% = invisible) */
  #problem .problem-art * { animation: none; }
}

/* ---------- home page FAQ (scoped to #faq; the contact page keeps its own .faq) ---------- */
#faq .faq-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 3rem; align-items: start; }
#faq .faq-intro { position: sticky; top: 96px; }
#faq .faq-intro h2 { max-width: 14ch; }
#faq .faq-intro p { max-width: 36ch; }
#faq .faq-more { color: var(--text); font-weight: 500; }
#faq .faq-more a { color: var(--accent); text-underline-offset: 3px; white-space: nowrap; }
#faq .faq-list { display: grid; gap: .75rem; }
#faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; transition: border-color .2s, box-shadow .2s; }
#faq details:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
#faq details[open] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.25rem; border-radius: 16px; font-family: "Space Grotesk", Inter, sans-serif; font-weight: 600; font-size: 1.08rem; line-height: 1.35; color: var(--text); }
#faq summary::-webkit-details-marker { display: none; }
#faq .faq-num { flex: none; min-width: 1.75rem; font-family: Inter, system-ui, sans-serif; font-size: .85rem; font-weight: 500; color: var(--accent); }
/* Round +/× button: the plus turns 45° into a cross when the answer is open */
#faq summary::after { content: "+"; flex: none; margin-left: auto; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: Inter, system-ui, sans-serif; font-size: 1.25rem; font-weight: 400; line-height: 1; transition: transform .25s ease; }
#faq details[open] summary::after { transform: rotate(45deg); }
#faq details p { margin: 0; padding: 0 1.25rem 1.3rem 4rem; max-width: 62ch; }
/* Smooth open/close where the browser supports animating <details>; others simply snap open */
@supports selector(::details-content) {
  #faq { interpolate-size: allow-keywords; }
  #faq details::details-content { block-size: 0; overflow: hidden; transition: block-size .3s ease, content-visibility .3s allow-discrete; }
  #faq details[open]::details-content { block-size: auto; }
}
@media (max-width: 860px) {
  #faq .faq-layout { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  #faq .faq-intro { position: static; }
  #faq .faq-intro h2 { max-width: none; }
  #faq summary { padding: 1rem; font-size: 1rem; gap: .75rem; }
  #faq details p { padding: 0 1rem 1.15rem 3.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  #faq details, #faq summary::after { transition: none; }
  #faq details::details-content { transition: none; }
}

/* ---------- case study pages (scoped to main.case) ---------- */
.case .case-hero { padding-top: 3.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--border); }
.case .case-back { display: table; margin-bottom: 1.25rem; color: var(--muted); font-size: .92rem; font-weight: 500; text-decoration: none; }
.case .case-back:hover { color: var(--accent); }
.case .case-hero h1 { margin-top: .9rem; max-width: 22ch; }
.case .case-hero .lead { max-width: 60ch; margin-bottom: 1.75rem; }
.case .case-facts { margin: 0; display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; }
.case .case-facts dt { font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.case .case-facts dd { margin: 0; color: var(--text); font-weight: 500; }
.case .case-body { display: grid; gap: 3.5rem; padding-top: 3.5rem; padding-bottom: 4rem; }
.case .case-block { max-width: 760px; }
.case .case-block h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: 1rem; }
.case .case-block > p { font-size: 1.05rem; max-width: 62ch; }
.case .case-media { margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.case .case-media img, .case .case-media video { display: block; width: 100%; height: auto; }
/* Unfinished content is impossible to miss: dashed accent boxes labelled "To fill in" */
.case .case-todo, .case .case-media-todo { border: 2px dashed var(--accent); border-radius: 16px; background: var(--accent-soft); }
.case .case-todo { padding: 1rem 1.25rem; margin-top: 1rem; }
.case .case-todo strong, .case .case-media-todo strong { display: block; color: var(--accent); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .35rem; }
.case .case-todo p { margin: 0; color: var(--text); }
.case .case-todo-inline { color: var(--accent); border-bottom: 2px dashed var(--accent); font-size: .92rem; }
.case .case-media-todo { aspect-ratio: 16 / 10; display: grid; place-items: center; text-align: center; padding: 1rem; }
.case .case-media-todo span { color: var(--muted); font-size: .9rem; }
.case .case-cta { padding-bottom: 3rem; }
.case .case-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; padding-top: 1rem; padding-bottom: 4rem; }
.case .case-pager a { text-decoration: none; color: var(--text); font-family: "Space Grotesk", Inter, sans-serif; font-weight: 600; }
.case .case-pager a span { display: block; font-family: Inter, system-ui, sans-serif; font-size: .85rem; font-weight: 500; color: var(--muted); margin-bottom: .2rem; }
.case .case-pager a:hover { color: var(--accent); }
.case .case-next { text-align: right; }
.case .case-all { font-size: .92rem; color: var(--accent) !important; }
@media (max-width: 720px) {
  .case .case-hero { padding-top: 2rem; }
  .case .case-body { gap: 2.75rem; padding-top: 2.5rem; padding-bottom: 3rem; }
  .case .case-pager { grid-template-columns: 1fr 1fr; }
  .case .case-all { grid-column: 1 / -1; grid-row: 2; text-align: center; }
}

/* Work cards: case study link (and the trainer's live demo link) side by side */
.project-links { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin: .5rem 0 0; }
.case .case-block > p + p { margin-top: .25rem; }
.case .case-points { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .9rem; max-width: 62ch; }
.case .case-points li { position: relative; padding-left: 1.6rem; color: var(--muted); line-height: 1.6; }
.case .case-points li::before { content: ""; position: absolute; left: 0; top: .6em; width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); }
.case .case-points strong { color: var(--text); font-weight: 600; }
.case .case-pager-single { grid-template-columns: 1fr; justify-items: center; }
.case .case-pager-single .case-all { grid-column: auto; grid-row: auto; }

/* ---------- cost calculator (scoped to #cost) ---------- */
#cost .cost-intro { max-width: 56ch; margin-bottom: 1.5rem; }
#cost .cost-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: clamp(1.25rem, 4vw, 2.25rem); }
#cost .cost-inputs { display: grid; gap: 1.5rem; margin: 0; align-content: start; }
#cost .cost-field label { display: block; font-weight: 500; font-size: .95rem; color: var(--text); margin-bottom: .5rem; }
#cost .cost-cur-code { color: var(--muted); font-weight: 400; }
#cost .cost-row { display: grid; grid-template-columns: minmax(0, 1fr) 7.5rem; gap: 1rem; align-items: center; }
#cost input[type="number"] { width: 100%; min-height: 44px; font: inherit; font-weight: 600; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: .55rem .75rem; text-align: right; font-variant-numeric: tabular-nums; }
#cost input[type="number"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#cost input[type="range"] { width: 100%; height: 44px; margin: 0; accent-color: var(--accent); background: transparent; cursor: pointer; }
#cost .cost-cur legend { color: var(--text); }
#cost .cost-results { display: flex; flex-direction: column; background: var(--accent-soft); border-radius: 16px; padding: 1.5rem; min-width: 0; }
#cost .cost-results-title { font-family: "Space Grotesk", Inter, sans-serif; font-weight: 600; font-size: 1.05rem; color: var(--text); margin-bottom: 1.1rem; }
#cost .cost-results dl { margin: 0; display: grid; gap: 1rem; }
#cost .cost-results dt { font-size: .85rem; color: var(--muted); }
#cost .cost-results dd { margin: 0; font-family: "Space Grotesk", Inter, sans-serif; font-weight: 600; font-size: 1.45rem; line-height: 1.2; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: normal; word-break: keep-all; }
#cost .cost-results .cost-main dd { font-size: clamp(2rem, 4vw, 2.6rem); color: var(--accent); }
#cost .cost-note { font-size: .85rem; margin: 1.25rem 0 0; }
#cost .cost-honest { color: var(--text); font-size: .95rem; margin: .5rem 0 1.25rem; }
#cost .cost-results .btn { align-self: flex-start; margin-top: auto; }
@media (max-width: 860px) { #cost .cost-card { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { #cost .cost-row { grid-template-columns: minmax(0, 1fr) 6.25rem; gap: .75rem; } #cost .cost-results .btn { align-self: stretch; text-align: center; } }

/* The calculator's own page uses an h1 where the home page had an h2 */
#cost h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); max-width: none; margin-bottom: 1rem; }
#cost .cost-back { display: table; margin-bottom: 1.25rem; color: var(--muted); font-size: .92rem; font-weight: 500; text-decoration: none; }
#cost .cost-back:hover { color: var(--accent); }

/* ---------- privacy page: long-form reading (scoped to main.legal) ---------- */
.legal .legal-body { max-width: 760px; padding-top: 3.5rem; padding-bottom: 4.5rem; }
.legal h1 { max-width: 22ch; }
.legal .lead { max-width: 60ch; margin-bottom: 2.5rem; }
.legal h2 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); margin: 2.5rem 0 .75rem; }
.legal p, .legal li { max-width: 68ch; line-height: 1.75; }
.legal ul { padding-left: 1.2rem; margin: 0 0 1rem; display: grid; gap: .6rem; }
.legal li { color: var(--muted); }
.legal li strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--accent); text-underline-offset: 3px; }
.legal .case-todo-inline { color: var(--accent); border-bottom: 2px dashed var(--accent); background: var(--accent-soft); padding: 0 .25rem; }
@media (max-width: 720px) { .legal .legal-body { padding-top: 2.25rem; padding-bottom: 3rem; } }

/* Per-dot drift, as classes instead of inline style attributes (keeps the CSP free of 'unsafe-inline') */
#problem .drift-1 { --dx: -44px; --dy: -24px; }
#problem .drift-2 { --dx: 42px; --dy: -26px; }
#problem .drift-3 { --dx: -42px; --dy: 26px; }
#problem .drift-4 { --dx: 44px; --dy: 24px; }
#problem .drift-5 { --dx: 2px; --dy: 38px; }

/* The case studies page uses an h1 where the home page had an h2 */
#work h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); max-width: none; margin-bottom: .75rem; }
#work .work-intro { max-width: 60ch; margin-bottom: 1.75rem; }

/* ---------- examples: pick a business, watch a scene (scoped to #examples) ---------- */
/* Without JavaScript every scene shows as a card in a plain list. examples.js adds .ex-ready. */
#examples [hidden] { display: none !important; }
#examples .ex-intro { max-width: 62ch; margin: -.75rem 0 1.75rem; }
#examples .ex-tabs { display: flex; gap: .5rem; margin-bottom: 1.25rem; padding: 2px; overflow-x: auto; scrollbar-width: none; }
#examples .ex-tabs::-webkit-scrollbar { display: none; }
#examples .ex-tabs button { flex: 0 0 auto; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: .92rem; font-weight: 500; white-space: nowrap; cursor: pointer; }
#examples .ex-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
#examples button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#examples .ex-name { font-family: "Space Grotesk", Inter, sans-serif; font-weight: 600; font-size: 1.3rem; color: var(--text); margin: 2rem 0 1rem; }
#examples .ex-scene { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1.25rem; margin-bottom: 1rem; }
#examples .ex-scene h3 { font-size: 1.1rem; font-weight: 600; margin: 0 0 .25rem; }
#examples .ex-scene h3::before { content: "Example"; display: block; font-family: Inter, system-ui, sans-serif; font-size: .75rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: .3rem; }
#examples .ex-sub { font-size: .92rem; margin: 0; }
#examples .ex-steps { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .6rem; }
#examples .ex-steps li { justify-self: start; max-width: 85%; padding: .6rem .85rem; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
#examples .ex-steps p { margin: 0; color: var(--text); font-size: .95rem; line-height: 1.45; }
#examples .ex-who { display: block; font-size: .78rem; font-weight: 500; color: var(--muted); margin-bottom: .15rem; }
#examples .ex-steps li[data-kind="ai"] { justify-self: end; background: var(--accent-soft); border-color: transparent; }
#examples .ex-steps li[data-kind="ai"] .ex-who { color: var(--accent); }
#examples .ex-steps li[data-kind="look"] { justify-self: stretch; max-width: none; background: none; border-style: dashed; }
#examples .ex-steps li[data-kind="look"] p { color: var(--muted); font-size: .9rem; }
#examples .ex-steps li[data-kind="done"] { justify-self: stretch; max-width: none; background: none; border: 0; border-left: 3px solid var(--accent); border-radius: 0; padding: .2rem 0 .2rem .85rem; }
#examples .ex-steps li[data-kind="done"] p { font-weight: 500; }
#examples .ex-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--border); }
#examples .ex-built { margin: 0; font-size: .85rem; }
#examples .ex-replay { flex-shrink: 0; min-height: 44px; padding: .4rem .9rem; border: 1px solid var(--border); border-radius: 10px; background: none; color: var(--text); font: inherit; font-size: .88rem; font-weight: 500; cursor: pointer; }
#examples .ex-replay:hover { border-color: var(--accent); color: var(--accent); }
#examples .ex-more { margin: 0; }
#examples .ex-more a { display: inline-block; padding: .6rem 0; color: var(--accent); font-weight: 500; text-decoration: none; }
#examples .ex-more a:hover { text-decoration: underline; }

/* With JavaScript: the list of automations on the left, one scene on the right */
#examples.ex-ready .ex-panel { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 1rem 1.25rem; align-items: start; }
#examples.ex-ready .ex-name, #examples.ex-ready .ex-sub { display: none; }
#examples .ex-pick { grid-column: 1; grid-row: 1; display: grid; gap: .5rem; }
#examples .ex-pick button { min-height: 44px; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
#examples .ex-pick b { display: block; font-size: .98rem; font-weight: 600; line-height: 1.35; }
#examples .ex-pick span { display: block; margin-top: .15rem; color: var(--muted); font-size: .88rem; line-height: 1.4; }
#examples .ex-pick button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
#examples.ex-ready .ex-scene { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
#examples.ex-ready .ex-more { grid-column: 1; grid-row: 2; }
/* Steps not yet played keep their space, so the page never jumps while a scene fills in */
#examples.ex-ready .ex-steps li { opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .35s, transform .35s, visibility 0s .35s; }
#examples.ex-ready .ex-steps li.shown { opacity: 1; visibility: visible; transform: none; transition: opacity .35s, transform .35s; }
@media (prefers-reduced-motion: reduce) { #examples.ex-ready .ex-steps li, #examples.ex-ready .ex-steps li.shown { transition: none; transform: none; } }
@media (max-width: 860px) {
  #examples.ex-ready .ex-panel { grid-template-columns: minmax(0, 1fr); }
  #examples .ex-pick, #examples.ex-ready .ex-scene, #examples.ex-ready .ex-more { grid-column: 1; grid-row: auto; }
}
@media (max-width: 600px) {
  #examples .ex-intro { margin-bottom: 1.25rem; font-size: .95rem; }
  #examples .ex-pick span { display: none; }
  #examples .ex-pick button { padding: .55rem .9rem; }
  #examples .ex-scene { padding: 1rem; }
  /* The chosen automation's title is already highlighted in the list above, so only the label stays */
  #examples.ex-ready .ex-scene h3 { font-size: 0; margin: 0; }
  #examples.ex-ready .ex-scene h3::before { font-size: .75rem; margin: 0; }
  #examples .ex-steps { gap: .45rem; margin: .75rem 0; }
  #examples .ex-steps li { max-width: 92%; padding: .5rem .7rem; }
  #examples .ex-steps p { font-size: .9rem; line-height: 1.4; }
  #examples .ex-who { font-size: .74rem; }
  #examples .ex-foot { padding-top: .6rem; gap: .75rem; }
  #examples .ex-built { font-size: .78rem; line-height: 1.4; }
}

/* ================= colour layer =================
   The blue (--accent) stays the main colour. Each service also has its own colour, used on its
   icon, tag, case study card and examples tab. Every colour here was checked for readable
   contrast (4.5:1 or better) on the page, card and tint backgrounds in both themes. */
:root {
  /* The service colours for the light theme. To change one, edit its colour and its pale tint here. */
  --c-agents: var(--accent); --c-agents-soft: var(--accent-soft);   /* AI agents and bots: your blue */
  --c-auto: #0b6e66; --c-auto-soft: #d3efea;                        /* Workflow automation: teal */
  --c-train: #6537c9; --c-train-soft: #e8e0fb;                      /* AI training simulators: violet */
  --c-crm: #8f4f00; --c-crm-soft: #fbe8c8;                          /* CRM and dashboards: amber */
  --c-web: #b93a22; --c-web-soft: #fbe0d8;                          /* Websites: coral */
  --c-coach: #a3266a; --c-coach-soft: #fbe0ee;                      /* 1:1 AI coaching: pink */
  --c-know: #4d6b0f; --c-know-soft: #e6f0c9;                        /* AI knowledge assistant: olive */
  --ok: #17734a; --ok-soft: #d8f1e3;                                /* outcomes and ticks: green */
  --band: #e4e9f7;                                                  /* tinted section background */
  --panel: #111a44;                                                 /* the dark contact panel */
  --shadow-card: 0 1px 2px rgba(22, 28, 60, .05), 0 10px 28px -16px rgba(22, 28, 60, .22);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-auto: #4fd1c0; --c-auto-soft: #11302c;
    --c-train: #b79cff; --c-train-soft: #2a2148;
    --c-crm: #f2b24c; --c-crm-soft: #3a2b10;
    --c-web: #ff9478; --c-web-soft: #3f2018;
    --c-coach: #ff8fc4; --c-coach-soft: #3d1830;
    --c-know: #b5d95a; --c-know-soft: #252e10;
    --ok: #5fd39a; --ok-soft: #12301f;
    --band: #15151b; --panel: #1b2559;
    --shadow-card: none;
  }
}
:root[data-theme="dark"] {
    --c-auto: #4fd1c0; --c-auto-soft: #11302c;
    --c-train: #b79cff; --c-train-soft: #2a2148;
    --c-crm: #f2b24c; --c-crm-soft: #3a2b10;
    --c-web: #ff9478; --c-web-soft: #3f2018;
    --c-coach: #ff8fc4; --c-coach-soft: #3d1830;
    --c-know: #b5d95a; --c-know-soft: #252e10;
    --ok: #5fd39a; --ok-soft: #12301f;
    --band: #15151b; --panel: #1b2559;
    --shadow-card: none;
}
.svc-agents { --svc: var(--c-agents); --svc-soft: var(--c-agents-soft); }
.svc-auto { --svc: var(--c-auto); --svc-soft: var(--c-auto-soft); }
.svc-train { --svc: var(--c-train); --svc-soft: var(--c-train-soft); }
.svc-crm { --svc: var(--c-crm); --svc-soft: var(--c-crm-soft); }
.svc-web { --svc: var(--c-web); --svc-soft: var(--c-web-soft); }
.svc-coach { --svc: var(--c-coach); --svc-soft: var(--c-coach-soft); }
.svc-know { --svc: var(--c-know); --svc-soft: var(--c-know-soft); }

/* Service colours: icon, tag, the card's back face, ticks and links fall back to blue when no service is set */
.service-icon, .tag { background: var(--svc-soft, var(--accent-soft)); color: var(--svc, var(--accent)); }
.face.back { border-color: var(--svc, var(--accent)); }
.face.back h3, .service-link { color: var(--svc, var(--accent)); }
.gets li::before { border-color: var(--svc, var(--accent)); }
.project:hover { border-color: var(--svc, var(--accent)); }

/* A soft blue and violet wash at the top of every page, and a gradient on the headline's key words */
body { background-image: radial-gradient(46rem 26rem at 4% -4rem, color-mix(in srgb, var(--accent) 17%, transparent), transparent 70%), radial-gradient(52rem 28rem at 92% -6rem, color-mix(in srgb, var(--c-train) 15%, transparent), transparent 70%); background-repeat: no-repeat; }
.hero h1 em { background: linear-gradient(90deg, var(--accent), var(--c-train)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Every second section sits on a tinted band that runs the full width of the screen */
#quiz, #examples, #faq { background: var(--band); box-shadow: 0 0 0 100vmax var(--band); clip-path: inset(0 -100vmax); }

/* Cards lift slightly off the page (light theme only) */
.card, .project, .face, .pick-result, #examples .ex-scene, #cost .cost-card { box-shadow: var(--shadow-card); }

/* Examples: each business tab takes a service colour; outcomes are green */
#examples .ex-tabs button[aria-selected="true"] { background: var(--svc, var(--accent)); border-color: var(--svc, var(--accent)); }
#examples .ex-pick button[aria-pressed="true"] { border-color: var(--svc, var(--accent)); background: var(--svc-soft, var(--accent-soft)); }
#examples .ex-scene h3::before, #examples .ex-more a, #examples .ex-steps li[data-kind="ai"] .ex-who { color: var(--svc, var(--accent)); }
#examples .ex-steps li[data-kind="ai"] { background: var(--svc-soft, var(--accent-soft)); }
#examples .ex-steps li[data-kind="done"] { border-left-color: var(--ok); background: var(--ok-soft); border-radius: 0 10px 10px 0; padding: .5rem .85rem; }

/* Contact: one dark panel, the boldest block on the page */
#contact .cta-box { background: var(--panel) radial-gradient(34rem 18rem at 100% 0%, color-mix(in srgb, var(--c-train) 45%, transparent), transparent 70%); border-color: transparent; }
#contact .cta-box h2 { color: #fff; }
#contact .cta-box p { color: #c4cbea; }
#contact .cta-box .btn:not(.btn-ghost) { background: #22c55e; color: #08180d !important; }
#contact .cta-box .btn:not(.btn-ghost):hover { background: #4ade80; }
#contact .cta-box .btn-ghost { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, .4); }

/* ---------- what happens in the call: three timed steps above the contact panel (scoped to #contact) ---------- */
#contact .call-steps { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
#contact .call-steps li { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.25rem; box-shadow: var(--shadow-card); }
#contact .call-when { display: inline-block; background: var(--accent-soft); color: var(--accent); font-size: .8rem; font-weight: 500; padding: .2rem .65rem; border-radius: 999px; margin-bottom: .8rem; }
#contact .call-steps li:nth-child(2) .call-when { background: var(--c-train-soft); color: var(--c-train); }
#contact .call-steps li:nth-child(3) .call-when { background: var(--ok-soft); color: var(--ok); }
#contact .call-steps h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: .35rem; }
#contact .call-steps p { margin: 0; font-size: .95rem; line-height: 1.55; }
@media (max-width: 860px) {
  #contact .call-steps { grid-template-columns: minmax(0, 1fr); gap: .75rem; margin-bottom: 1.5rem; }
  #contact .call-steps li { padding: 1rem 1.1rem; }
}
