:root {
  --night: #17233f; --ink: #0f1a2e; --paper: #f2f6f7; --mist: #e3edef; --line: #cfdce0;
  --early: #ffc933; --late: #1aa396; --teal-ink: #0b6e69; --muted: #44546a; --flag: #e11d48;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font: 400 1.0625rem/1.65 var(--body); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--teal-ink); }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 3px; }
.dark :focus-visible, .chat-panel :focus-visible { outline-color: var(--early); }
.skip { position: absolute; left: 12px; top: -64px; background: var(--night); color: #fff; padding: 10px 16px; border-radius: 6px; z-index: 100; }
.skip:focus { top: 12px; }
.eyebrow { font: 700 .85rem var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--teal-ink); margin: 0 0 14px; }
.dark .eyebrow { color: var(--early); }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.bar { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--night); font: 700 1.3rem var(--display); }
.brand img { height: 44px; width: auto; }
nav.primary { margin-left: auto; }
nav.primary ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; align-items: center; }
nav.primary a { display: block; padding: 10px 14px; color: var(--ink); text-decoration: none; font-weight: 700; border-radius: 999px; }
nav.primary a:hover, nav.primary a[aria-current] { background: var(--mist); }
nav.primary a.call { background: var(--night); color: #fff; margin-left: 8px; }
nav.primary a.call:hover { background: #22325a; }
.menu-btn { display: none; margin-left: auto; background: none; border: 2px solid var(--night); border-radius: 999px; padding: 8px 16px; font: 700 .95rem var(--body); color: var(--night); cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 24px; min-height: 48px; border-radius: 999px; font: 700 1rem var(--body); text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn-yellow { background: var(--early); color: var(--night); }
.btn-yellow:hover { background: #ffd75e; }
.btn-navy { background: var(--night); color: #fff; }
.btn-navy:hover { background: #22325a; }
.btn-line { border-color: var(--night); color: var(--night); background: transparent; }
.btn-line:hover { background: var(--night); color: #fff; }
.dark .btn-line { border-color: #fff; color: #fff; }
.dark .btn-line:hover { background: #fff; color: var(--night); }
.textlink { font-weight: 700; padding: 10px 4px; }

/* Hero */
.hero { padding: 64px 0 24px; }
.hero h1 { font-size: clamp(2.6rem, 7.2vw, 5.2rem); max-width: 14ch; }
.hero .lead { font-size: 1.25rem; max-width: 48ch; margin: 22px 0 30px; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; }
.band-wrap { margin-top: 28px; padding-bottom: 8px; }
.band { position: relative; display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 100px; margin-top: 40px; }
.shift { display: flex; align-items: flex-end; padding: 10px 14px; font: 700 1rem var(--display); border-radius: 4px; transform-origin: left center; transform: scaleX(0); animation: grow .8s cubic-bezier(.2, .7, .2, 1) forwards; overflow: hidden; white-space: nowrap; }
.shift.night { background: var(--night); color: #fff; }
.shift.early { background: var(--early); color: var(--night); animation-delay: .25s; }
.shift.late { background: var(--late); color: #062b28; animation-delay: .5s; }
.shift.n1 { grid-column: 1 / 7; }
.shift.early { grid-column: 7 / 15; }
.shift.late { grid-column: 15 / 23; }
.shift.n2 { grid-column: 23 / 25; animation-delay: .75s; }
.ticks { position: relative; height: 28px; margin-top: 10px; font-size: .88rem; color: var(--muted); }
.ticks span { position: absolute; top: 0; transform: translateX(-50%); }
.ticks span:first-child { transform: none; }
.ticks span:last-child { transform: translateX(-100%); }
.now { position: absolute; top: -34px; bottom: -6px; left: 0; width: 3px; margin-left: -1px; background: var(--flag); border-radius: 2px; z-index: 3; opacity: 0; animation: fade .5s 1.1s forwards; transition: left .6s ease; }
.now .flag { position: absolute; top: 0; left: 10px; background: var(--flag); color: #fff; font: 700 .85rem var(--body); padding: 2px 9px; border-radius: 4px; white-space: nowrap; }
.now.flip .flag { left: auto; right: 10px; }
.band-note { margin: 12px 0 0; color: var(--muted); }
.band-note strong { color: var(--ink); }
.hero-note { margin: 34px 0 0; color: var(--muted); font-size: 1.05rem; }
.hero-note strong { color: var(--ink); }
@keyframes grow { to { transform: scaleX(1); } }
@keyframes fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shift { animation: none; transform: none; }
  .now { animation: none; opacity: 1; transition: none; }
}

/* Trust strip */
.trust { background: var(--night); color: #fff; padding: 22px 0; margin-top: 40px; }
.trust ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 28px; }
.trust li { font: 700 1rem var(--display); display: flex; gap: 10px; align-items: baseline; }
.trust li::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--early); border-radius: 2px; transform: translateY(-1px); }

/* Sections */
section { padding: 84px 0; }
.section-head { max-width: 40rem; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.section-head p { margin: 16px 0 0; color: var(--muted); font-size: 1.125rem; }
.rows { border-top: 3px solid var(--night); margin-top: 36px; }
.row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.row h3 { font-size: 1.55rem; }
.row p { margin: 0; max-width: 62ch; }
.bg-white { background: #fff; }
.bg-mist { background: var(--mist); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.statement { font: 700 clamp(1.8rem, 3.6vw, 2.7rem)/1.12 var(--display); letter-spacing: -0.02em; color: var(--night); }
.split p { max-width: 58ch; }
.clients { margin-top: 28px; padding: 20px 22px; border-left: 6px solid var(--early); background: var(--paper); font-weight: 700; }
.plain-cols { list-style: none; margin: 32px 0 0; padding: 0; columns: 2; column-gap: 48px; border-top: 3px solid var(--night); }
.plain-cols li { break-inside: avoid; padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 40px; }
.role { border: 2px solid var(--night); border-radius: 6px; padding: 22px 20px 20px; background: #fff; }
.role h3 { font-size: 1.45rem; }
.role p { margin: 6px 0 0; color: var(--muted); font-size: 1rem; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 40px; }
.step { border-top: 5px solid var(--night); padding-top: 16px; }
.step .n { font: 800 3.4rem/1 var(--display); color: var(--night); }
.step h3 { font-size: 1.4rem; margin: 10px 0 8px; }
.step p { margin: 0; max-width: 34ch; }
.dark { background: var(--night); color: #fff; }
.dark a { color: var(--early); }
.dark a.btn-yellow { color: var(--night); }
.dark .section-head p { color: #c8d3e6; }
.perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 40px 0; border-top: 1px solid #3a4a6e; padding-top: 28px; }
.perk h3 { font-size: 1.45rem; color: var(--early); margin-bottom: 6px; }
.perk p { margin: 0; color: #c8d3e6; }
.dark-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* App section */
.app-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: center; }
.app-points { list-style: none; margin: 28px 0 32px; padding: 0; border-top: 1px solid #3a4a6e; }
.app-points li { padding: 16px 0; border-bottom: 1px solid #3a4a6e; }
.app-points strong { display: block; font: 700 1.15rem var(--display); color: #fff; }
.app-points span { color: #c8d3e6; }
.phone { width: min(300px, 100%); margin: 0 auto; background: #0b1428; border: 3px solid #3a4a6e; border-radius: 34px; padding: 14px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
.phone-screen { background: var(--paper); color: var(--ink); border-radius: 22px; padding: 18px 16px 20px; min-height: 420px; }
.ph-top { display: flex; justify-content: space-between; align-items: center; font: 700 .85rem var(--body); color: var(--muted); }
.ph-title { font: 700 1.25rem var(--display); margin: 14px 0 12px; color: var(--night); }
.ph-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; font-size: .92rem; }
.ph-card b { display: block; font: 700 1rem var(--display); color: var(--night); }
.ph-card small { color: var(--muted); }
.ph-pill { display: inline-block; margin-top: 8px; padding: 2px 10px; border-radius: 999px; font: 700 .75rem var(--body); background: #d8f1e0; color: #1f7a45; }
.ph-pill.amber { background: #fce4d4; color: #b5541b; }
.ph-btn { margin-top: 14px; background: var(--night); color: #fff; text-align: center; padding: 12px; border-radius: 999px; font: 700 .95rem var(--body); }
.ph-note { margin: 8px 0 0; text-align: center; font-size: .78rem; color: var(--muted); }

/* FAQ */
.faq-list { margin-top: 28px; border-top: 3px solid var(--night); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font: 700 1.15rem var(--display); position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font: 600 1.7rem var(--display); color: var(--teal-ink); }
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list .ans { padding: 0 40px 22px 0; max-width: 68ch; color: var(--muted); }
.faq-list .ans p:last-child { margin-bottom: 0; }
.faq-group { margin-top: 56px; }
.faq-group:first-of-type { margin-top: 40px; }
.faq-group h2 { font-size: 1.7rem; }
.page-hero { padding: 64px 0 8px; }
.page-hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); max-width: 18ch; }
.page-hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 52ch; margin: 18px 0 0; }
.help-box { margin-top: 56px; padding: 28px; background: #fff; border: 2px solid var(--night); border-radius: 14px; display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.help-box h2 { font-size: 1.5rem; }
.help-box p { margin: 6px 0 0; color: var(--muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.details { margin: 28px 0 0; padding: 0; list-style: none; }
.details li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.details strong { display: block; font: 700 1.05rem var(--display); }
.details a.big { font: 700 1.8rem var(--display); color: var(--night); text-decoration: none; }
.details a.big:hover { text-decoration: underline; }
form#enquiry { background: #fff; border: 2px solid var(--night); border-radius: 14px; padding: 28px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
label { display: block; font-weight: 700; margin-bottom: 16px; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: 400 1rem var(--body); color: var(--ink); background: #fff; border: 1.5px solid #8ea1ad; border-radius: 8px; }
input:focus, select:focus, textarea:focus { border-color: var(--teal-ink); outline: 3px solid rgba(11, 110, 105, .25); outline-offset: 0; }
textarea { resize: vertical; min-height: 120px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#formMsg { margin: 16px 0 0; font-weight: 700; }
#formMsg.ok { color: var(--teal-ink); }
#formMsg.bad { color: #b42318; }

/* Footer */
footer { background: var(--ink); color: #c8d3e6; padding: 56px 0 32px; }
footer a { color: #fff; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot .logo-chip { display: inline-block; background: #fff; border-radius: 10px; padding: 8px 12px; }
.foot .logo-chip img { height: 40px; width: auto; }
.foot .logo-chip .wordmark { color: var(--night); font: 700 1.2rem var(--display); }
.foot h3 { color: #fff; font-size: 1.05rem; margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 8px; }
.foot .tag { max-width: 30ch; margin-top: 16px; }
.legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid #2c3b5c; font-size: .92rem; }

/* Chat assistant */
.chat-launch { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; align-items: center; gap: 10px; background: var(--night); color: #fff; border: 2px solid var(--early); border-radius: 999px; padding: 13px 20px; font: 700 1rem var(--body); cursor: pointer; box-shadow: 0 10px 30px rgba(15, 26, 46, .35); }
.chat-launch:hover { background: #22325a; }
.chat-launch .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--late); }
.chat-panel { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: min(400px, calc(100vw - 24px)); height: min(600px, calc(100vh - 40px)); background: #fff; border: 2px solid var(--night); border-radius: 18px; display: none; flex-direction: column; overflow: hidden; box-shadow: 0 24px 60px rgba(15, 26, 46, .4); }
.chat-panel.open { display: flex; }
.chat-head { background: var(--night); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.chat-head h2 { font-size: 1.1rem; flex: 1; }
.chat-head small { display: block; font: 400 .8rem var(--body); color: #c8d3e6; margin-top: 2px; }
.chat-close { background: none; border: 2px solid #fff; color: #fff; border-radius: 999px; width: 36px; height: 36px; font-size: 1.1rem; cursor: pointer; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; background: var(--paper); display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: .98rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.msg.me { background: var(--night); color: #fff; align-self: flex-end; }
.msg.err { background: #fde8e8; border: 1px solid #f3b4b4; align-self: flex-start; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { background: #fff; border: 1.5px solid var(--night); color: var(--night); border-radius: 999px; padding: 8px 14px; font: 700 .9rem var(--body); cursor: pointer; }
.chips button:hover { background: var(--night); color: #fff; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.chat-form input { margin: 0; flex: 1; min-width: 0; }
.chat-form button { flex: none; }
.chat-foot { padding: 0 14px 12px; font-size: .8rem; color: var(--muted); background: #fff; }
.typing { color: var(--muted); font-style: italic; }

@media (max-width: 860px) {
  section { padding: 60px 0; }
  .menu-btn { display: block; }
  nav.primary { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 18px; margin: 0; }
  nav.primary.open { display: block; }
  nav.primary ul { flex-direction: column; align-items: stretch; gap: 2px; }
  nav.primary a.call { margin: 8px 0 0; text-align: center; }
  .row { grid-template-columns: 1fr; gap: 8px; }
  .split, .contact-grid, .app-grid { grid-template-columns: 1fr; gap: 36px; }
  .plain-cols { columns: 1; }
  .roles, .steps, .perks { grid-template-columns: 1fr; }
  .trust ul { grid-template-columns: 1fr 1fr; }
  .foot { grid-template-columns: 1fr; gap: 28px; }
  .band { height: 78px; }
  .shift { font-size: .85rem; padding: 8px 10px; }
  .fields { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .chat-launch span.t { display: none; }
  .chat-launch { padding: 14px; }
  .chat-panel { right: 12px; bottom: 12px; height: calc(100vh - 24px); }
}
/* Append to the END of styles.css (QA fixes). */

/* 1. Mobile chat launcher: keep the visible label so it is obviously a chat button (was an unlabeled dot at <=860px). */
@media (max-width: 860px) {
  .chat-launch span.t { display: inline; }
  .chat-launch { padding: 12px 18px; }
}
/* 2. Chat panel height on phones: 100vh is taller than the visible area on iOS/Android browsers with a collapsing toolbar,
      which can push the Send box off screen. dvh follows the visible viewport. */
@supports (height: 100dvh) {
  .chat-panel { height: min(600px, calc(100dvh - 40px)); }
  @media (max-width: 860px) { .chat-panel { height: calc(100dvh - 24px); } }
}
.chat-form button:disabled { opacity: .55; cursor: not-allowed; }

/* 3. Header nav: between 861px and ~1100px the eight items wrap onto 2-3 lines each ("Our / app", "Work / with / us").
      Switch to the menu button earlier. (Copy of the existing <=860px nav rules with a wider breakpoint.) */
@media (max-width: 1100px) {
  .menu-btn { display: block; }
  nav.primary { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 18px; margin: 0; }
  nav.primary.open { display: block; }
  nav.primary ul { flex-direction: column; align-items: stretch; gap: 2px; }
  nav.primary a.call { margin: 8px 0 0; text-align: center; }
}
/* 4. Mobile menu overlay should sit above the chat launcher. */
/* header (95) above launcher (80) but below the open chat panel (100) */
.site-header { z-index: 95; }
.chat-panel { z-index: 100; }

/* 5. Small tap targets */
.menu-btn { min-height: 44px; }
.foot li a, .details a:not(.big) { display: inline-block; padding: 8px 0; }

/* 6. Illustration pills: contrast fix (4.05:1 and 4.48:1 -> >= 4.5:1) */
.ph-pill { color: #1a6b3c; }
.ph-pill.amber { color: #99440f; }

/* 7. Print: no chat button, no sticky header, show all FAQ answers */
@media print {
  .chat-launch, .chat-panel, .skip, .menu-btn { display: none !important; }
  .site-header { position: static; }
  details > .ans { display: block !important; }
  .hero, section, .page-hero { padding-top: 24px; padding-bottom: 24px; }
}

/* site-v2 additions */
.chat-foot a { color: inherit; text-decoration: underline; }
.legal a { color: inherit; text-decoration: underline; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin: 34px 0 10px; }
.prose p, .prose li { margin: 10px 0; line-height: 1.6; }
.prose ul { padding-left: 22px; }
.ph { background: #fff3b0; color: #3b2f00; padding: 0 4px; border-radius: 3px; font-weight: 700; }
.todo-box { border: 2px dashed #99440f; background: #fff8ec; padding: 14px 18px; border-radius: 8px; margin-top: 22px; }
#enquiry { scroll-margin-top: 90px; }
.app-note { background: #fff8ec; border: 2px solid #99440f; color: #3b2f00; padding: 12px 14px; border-radius: 8px; font-weight: 700; margin: 0 0 18px; }


/* Blog */
.byline { color: var(--muted); font-size: .95rem; margin: 14px 0 0; }
.post h2 { margin: 36px 0 8px; }
.post h3 { font-size: 1.15rem; margin: 22px 0 6px; }
.post ol { padding-left: 24px; }
.post-cta { margin-top: 48px; padding: 28px; background: #fff; border: 2px solid var(--night); border-radius: 14px; }
.post-cta h2 { margin: 0 0 8px; font-size: 1.5rem; }
.post-cta p { color: var(--muted); }
.post-cta .btn { margin: 6px 10px 0 0; }
.post-note { color: var(--muted); font-size: .9rem; margin-top: 28px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 36px; }
.post-card { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; text-decoration: none; color: var(--ink); }
.post-card:hover, .post-card:focus-visible { border-color: var(--night); box-shadow: 0 6px 18px rgba(23,35,63,.10); }
.post-card h2 { font-size: 1.3rem; line-height: 1.15; }
.post-card p { margin: 0; color: var(--muted); font-size: 1rem; }
.post-cat { font: 700 .8rem var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--teal-ink); }
.post-more { margin-top: auto; font-weight: 700; color: var(--teal-ink); }

/* Keep the desktop menu on one line now that it has a Blog link */
nav.primary a { white-space: nowrap; }
@media (min-width: 900px) and (max-width: 1200px) { nav.primary a { padding: 10px 9px; font-size: .95rem; } }
