/* Intermedia Code. One idea carries the brand: two chevrons that overlap.
   Cyan + magenta, violet where they cross. Everything else stays quiet. */
:root {
  --paper: #ffffff;
  --ink: #161b33;
  --ink-2: #10142a;
  --muted: #565d78;
  --line: #e3e6ee;
  --tint: #f3f4f8;
  --cyan: #0fa3b1;
  --magenta: #d81e6a;
  --violet: #3d2c8d;
  --on-dark: #c9cde0;

  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --s-1: 0.875rem;  /* 14 */
  --s0: 1.0625rem;  /* 17 */
  --s1: 1.3125rem;  /* 21 */
  --s2: 1.625rem;   /* 26 */
  --s3: 2.0625rem;  /* 33 */
  --s4: 2.5625rem;  /* 41 */

  --gutter: clamp(20px, 5vw, 48px);
  --max: 1160px;
  --radius: 10px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--s0)/1.6 var(--body);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--violet); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.06; }
h2 { font-size: clamp(1.55rem, 3vw, var(--s3)); line-height: 1.15; }
h3 { font-size: var(--s1); line-height: 1.3; font-weight: 600; }
p { margin: 0; }
.lead { font-size: clamp(var(--s0), 1.6vw, var(--s1)); color: var(--muted); max-width: 60ch; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: relative; z-index: 5; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 32px; height: 32px; }
.word { font-family: var(--display); font-weight: 500; font-size: 1.05rem; letter-spacing: -0.01em; }
.word b { font-weight: 700; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.menu-wide { display: flex; gap: 26px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--violet); text-decoration: underline; text-decoration-thickness: 2px; }
.lang { border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: var(--s-1); font-weight: 600; }
.lang:hover { border-color: var(--violet); }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; font-weight: 600; padding: 6px 12px; border: 1.5px solid var(--ink); border-radius: 8px; }
.menu summary::-webkit-details-marker { display: none; }
.menu ul { position: absolute; right: 0; top: calc(100% + 10px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; min-width: 200px; box-shadow: 0 12px 30px rgb(22 27 51 / 0.12); }
.menu li a { display: block; padding: 10px 12px; border-radius: 6px; }
.menu li a:hover { background: var(--tint); }
@media (max-width: 760px) {
  .menu-wide { display: none; }
  .menu { display: block; }
  .word { font-size: 0.95rem; }
}

/* Mark colours (shared by header and hero) */
.m-l { fill: var(--cyan); }
.m-r { fill: var(--magenta); }
.m-o { fill: var(--violet); }

/* Hero */
.hero { padding-block: clamp(48px, 9vw, 110px) clamp(48px, 8vw, 96px); }
.hero-in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero-text { display: grid; gap: 24px; }
.hero-mark { justify-self: end; width: min(100%, 340px); }
.big-mark { width: 100%; height: auto; overflow: visible; }
@media (prefers-reduced-motion: no-preference) {
  .big-mark .m-l { animation: in-left 0.9s cubic-bezier(.2,.8,.2,1) both; }
  .big-mark .m-r { animation: in-right 0.9s cubic-bezier(.2,.8,.2,1) both; }
  .big-mark .m-o { animation: overlap 0.35s ease-out 0.8s both; }
  @keyframes in-left { from { transform: translateX(-18px); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes in-right { from { transform: translateX(18px); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes overlap { from { opacity: 0; } to { opacity: 1; } }
}
@media (max-width: 760px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-mark { order: -1; justify-self: start; width: 96px; }
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: var(--radius);
  background: var(--ink); color: #fff; border: 1.5px solid var(--ink);
  font-weight: 600; text-decoration: none; line-height: 1.2;
}
.btn:hover { background: var(--violet); border-color: var(--violet); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--tint); border-color: var(--ink); }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 96px); }
.tint { background: var(--tint); }
.sec-head { display: grid; gap: 10px; margin-bottom: clamp(28px, 4vw, 44px); max-width: 62ch; }
.sec-head p { color: var(--muted); }
.page-head { padding-block: clamp(48px, 8vw, 88px) clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.page-head .wrap { display: grid; gap: 18px; }
.lineage { font-size: var(--s-1); color: var(--muted); max-width: 70ch; }
.more { margin-top: 32px; font-weight: 600; }

/* Project rows (home) */
.proj-list { display: grid; gap: clamp(40px, 6vw, 72px); }
.proj { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.proj-img img, .case-img img { border-radius: var(--radius); background: var(--tint); }
.proj-text { display: grid; gap: 6px; }
.proj-text h3 { font-family: var(--display); font-weight: 700; font-size: var(--s2); letter-spacing: -0.01em; }
.proj-text h3 a { color: var(--ink); text-decoration: none; }
.proj-text h3 a:hover { color: var(--violet); }
.who { color: var(--muted); margin-bottom: 14px; }

/* The three-part story used for every project */
.story { margin: 0; display: grid; gap: 14px; }
.story div { display: grid; gap: 2px; }
.story dt { font-size: var(--s-1); font-weight: 600; color: var(--violet); }
.story dd { margin: 0; }
.story .changed dd { font-weight: 600; }
@media (max-width: 860px) { .proj { grid-template-columns: 1fr; } }

/* Case studies page */
.cases .wrap { display: grid; gap: clamp(64px, 9vw, 112px); }
.case { display: grid; gap: 22px; scroll-margin-top: 24px; }
.case-head { display: grid; gap: 4px; border-top: 2px solid var(--ink); padding-top: 18px; }
.case-head .who { margin: 0; }
.case-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.case-text { display: grid; gap: 20px; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: var(--s-1); padding: 4px 10px; border-radius: 999px; background: var(--tint); color: var(--ink); }
.live { font-weight: 600; }
@media (max-width: 860px) { .case-body { grid-template-columns: 1fr; } }

/* Services and values: a two-column spec list */
.services { list-style: none; margin: 0; padding: 0; }
.services li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px 40px; padding-block: 22px; border-top: 1px solid var(--line); }
.tint .services li { border-color: #d9dce6; }
.services li:last-child { border-bottom: 1px solid var(--line); }
.services p { color: var(--muted); max-width: 62ch; }
.services.big h2 { font-size: var(--s2); }
@media (max-width: 760px) { .services li { grid-template-columns: 1fr; } }

/* Steps: a real sequence, so numbered */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.steps li { counter-increment: step; display: grid; gap: 8px; align-content: start; }
.steps li::before { content: counter(step); font-family: var(--display); font-weight: 700; font-size: var(--s3); line-height: 1; color: var(--violet); }
.steps p { color: var(--muted); }
.steps.compact { grid-template-columns: 1fr; gap: 22px; }
.steps.compact li { grid-template-columns: 44px 1fr; column-gap: 12px; }
.steps.compact li::before { grid-row: span 2; font-size: var(--s2); }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Quotes */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 28px; }
.quote { margin: 0; display: grid; gap: 18px; align-content: space-between; background: var(--paper); border-radius: var(--radius); padding: 26px; }
.quote blockquote { margin: 0; }
.quote blockquote p::before { content: "“"; }
.quote blockquote p::after { content: "”"; }
.quote figcaption { display: flex; align-items: center; gap: 12px; font-size: var(--s-1); color: var(--muted); }
.quote figcaption img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.quote figcaption span { display: grid; }
.quote figcaption b { color: var(--ink); font-size: var(--s0); font-weight: 600; }
.note { margin-top: 16px; font-size: var(--s-1); color: var(--muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 80px); }
.contact-grid h2 { font-size: var(--s2); margin-bottom: 22px; }
.ways { margin: 0; display: grid; gap: 18px; }
.ways dt { font-size: var(--s-1); font-weight: 600; color: var(--violet); }
.ways dd { margin: 0; font-size: var(--s1); overflow-wrap: anywhere; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* Prose */
.prose { display: grid; gap: 18px; }
.prose > * { max-width: 70ch; }

/* Closing band */
.band { background: var(--ink); color: #fff; padding-block: clamp(56px, 8vw, 88px); }
.band-in { display: grid; gap: 18px; justify-items: start; }
.band h2 { max-width: 22ch; }
.band p { color: var(--on-dark); max-width: 55ch; }
.band .btn { background: #fff; color: var(--ink); border-color: #fff; }
.band .btn:hover { background: var(--tint); }
.band .btn.ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.6); }
.band .btn.ghost:hover { border-color: #fff; background: rgb(255 255 255 / 0.08); }
.band :focus-visible, .site-footer :focus-visible { outline-color: #f0508f; }

/* Footer */
.site-footer { background: var(--ink-2); color: var(--on-dark); padding-block: 48px 28px; font-size: var(--s-1); }
.foot { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); gap: 32px; }
.foot-brand { display: grid; gap: 14px; }
.foot-brand img { width: 200px; height: auto; }
.foot-brand p { max-width: 46ch; }
.foot-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: start; }
.foot-contact { display: grid; gap: 8px; align-content: start; }
.site-footer a { color: #fff; }
.foot-small { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 0.12); }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr; } }

/* 404 */
.nf .btn { margin-top: 8px; }
.mk-line { margin-top: 18px; font-size: var(--s0); }

/* Company details (contact page) */
.co-h { font-size: var(--s2); margin-bottom: 22px; }
.company { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 40px; }
.company dt { font-size: var(--s-1); font-weight: 600; color: var(--violet); }
.company dd { margin: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .company { grid-template-columns: 1fr; } }
.foot-contact span { color: var(--on-dark); }

/* Value points: four short reasons, two columns */
.value { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; }
.value li { display: grid; gap: 6px; padding-top: 18px; border-top: 2px solid var(--violet); }
.value p { color: var(--muted); max-width: 52ch; }
@media (max-width: 760px) { .value { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px 56px; align-items: start; }
.qa-list { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-weight: 600; font-size: var(--s1); line-height: 1.35; position: relative; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 700 1.5rem/1 var(--display); color: var(--violet); }
.qa[open] summary::after { content: "–"; }
.qa p { padding: 0 0 20px; color: var(--muted); max-width: 64ch; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }
.value li { align-content: start; }
.section:not(.tint) .quote { border: 1px solid var(--line); }

/* Prices page */
.price-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-bottom: clamp(40px, 6vw, 64px); }
.price-card { display: grid; gap: 10px; align-content: start; padding: 28px; border-radius: var(--radius); border: 1.5px solid var(--ink); }
.price-card:first-child { background: var(--ink); color: #fff; }
.price-card:first-child p { color: var(--on-dark); }
.price-card h2 { font-size: var(--s2); }
.price-card p { color: var(--muted); max-width: 52ch; }
.factors { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 16px 56px; }
.factors h2 { font-size: var(--s2); }
.factors ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.table-wrap { overflow-x: auto; }
.price-table { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--paper); border-radius: var(--radius); }
.price-table th, .price-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table thead th { font-size: var(--s-1); font-weight: 600; color: var(--violet); }
.price-table tbody th { font-weight: 600; white-space: nowrap; }
.price-table tbody th a { color: var(--ink); }
.price-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.price-table tbody tr:last-child > * { border-bottom: 0; }
@media (max-width: 760px) { .price-cards, .factors { grid-template-columns: 1fr; } }

/* Person (technical advisor) */
.person { display: grid; grid-template-columns: 120px minmax(0, 7fr) minmax(0, 4fr); gap: 24px 48px; align-items: start; }
.person.short { grid-template-columns: 120px minmax(0, 1fr); max-width: 900px; }
.person-photo {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover; background: var(--tint);
  padding: 5px; border: 2px solid var(--violet);
}
.person-text { display: grid; gap: 14px; max-width: 64ch; }
.person-name { font-size: var(--s1); }
.person-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 600; }
.person-facts { border-top: 2px solid var(--violet); padding-top: 16px; }
.person-facts h3 { margin-bottom: 10px; }
.person-facts ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; color: var(--muted); }
@media (max-width: 960px) { .person { grid-template-columns: 96px minmax(0, 1fr); } .person-facts { grid-column: 1 / -1; } .person-photo { width: 96px; height: 96px; } }
@media (max-width: 560px) { .person, .person.short { grid-template-columns: 1fr; } }

/* FAQ page */
.faq-toc { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.faq-toc a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--tint); color: var(--ink); text-decoration: none; font-size: var(--s-1); font-weight: 600; }
.faq-toc a:hover { background: var(--ink); color: #fff; }
.faq-page { display: grid; gap: clamp(40px, 6vw, 64px); }
.faq-group { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 16px 56px; align-items: start; scroll-margin-top: 24px; }
.faq-group h2 { font-size: var(--s2); }
@media (max-width: 860px) { .faq-group { grid-template-columns: 1fr; } }
.menu-wide { gap: 22px; }
.nav a { white-space: nowrap; }
@media (max-width: 960px) { .menu-wide { display: none; } .menu { display: block; } }
