:root {
  --paper: #f7f5f0;
  --ink: #13232e;
  --muted: #5b6770;
  --line: #dcd8cf;
  --sea: #1f5f66;
  --card: #ffffff;
}
/* dark: follows the device, unless the visitor picks with the header button */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1a21;
    --ink: #e8e6e1;
    --muted: #9aa6ad;
    --line: #23343e;
    --sea: #7cc2c4;
    --card: #13232c;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1a21;
  --ink: #e8e6e1;
  --muted: #9aa6ad;
  --line: #23343e;
  --sea: #7cc2c4;
  --card: #13232c;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sea); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* header */
header.top { position: sticky; top: 0; z-index: 10; padding: 18px 0; background: color-mix(in srgb, var(--paper) 86%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: padding .25s, border-color .25s; }
header.top.scrolled { padding: 10px 0; border-bottom-color: var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: .01em; }
.brand svg { width: 30px; height: 30px; }

/* key words: a thick teal wave that sweeps in like a highlighter */
.wavy {
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 10'%3E%3Cpath d='M-12 5 Q -6 9 0 5 T 12 5 T 24 5 T 36 5' fill='none' stroke='%232a9d9f' stroke-opacity='.55' stroke-width='4.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background:
    linear-gradient(var(--paper), var(--paper)) no-repeat right bottom / 0% 100%,
    var(--wave) repeat-x left 0 bottom .06em / 1em .46em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: 0 .04em;
  transition: background-size .9s cubic-bezier(.22,1,.36,1);
}
.js .wavy:not(.in) { background-size: 100% 100%, 1em .46em; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wavy { --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 10'%3E%3Cpath d='M-12 5 Q -6 9 0 5 T 12 5 T 24 5 T 36 5' fill='none' stroke='%237cd3d4' stroke-opacity='.5' stroke-width='4.5' stroke-linecap='round'/%3E%3C/svg%3E"); } }
:root[data-theme="dark"] .wavy { --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 10'%3E%3Cpath d='M-12 5 Q -6 9 0 5 T 12 5 T 24 5 T 36 5' fill='none' stroke='%237cd3d4' stroke-opacity='.5' stroke-width='4.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
@media (prefers-reduced-motion: reduce) { .wavy { transition: none; } }
nav { display: flex; align-items: center; }
nav a { color: var(--muted); text-decoration: none; font-size: 15px; margin-left: 22px; }
nav a:hover { color: var(--ink); }
nav a.pill { color: var(--paper); background: var(--ink); padding: 7px 16px; border-radius: 99px; font-weight: 600; }
nav a.pill:hover { background: var(--sea); color: var(--paper); }
@media (max-width: 600px) { nav a:not(.pill) { display: none; } }
.theme { display: none; width: 36px; height: 36px; margin-left: 14px; margin-right: -8px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; align-items: center; justify-content: center; }
.js .theme { display: inline-flex; }
.theme:hover { color: var(--ink); }
.theme svg { width: 19px; height: 19px; }
.theme .sun, :root[data-theme="dark"] .theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; }

/* hero */
.hero { padding: 96px 20px 88px; }
h1, h2, h3 { font-family: Newsreader, Georgia, serif; font-weight: 400; line-height: 1.2; margin: 0; }
.hero h1 { font-size: clamp(44px, 8vw, 88px); line-height: 1.04; letter-spacing: -.02em; max-width: 13em; }
.hero p { font-size: clamp(19px, 2vw, 23px); color: var(--muted); max-width: 34em; margin: 26px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.actions .btn { font-size: 16px; padding: 13px 22px; }

section { padding: 88px 0; border-top: 1px solid var(--line); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--sea); margin: 0 0 14px; }
h2 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.1; letter-spacing: -.01em; margin-bottom: 20px; max-width: 18em; }
h3 { font-size: 21px; font-weight: 500; }
.lead { font-size: 18px; max-width: 36em; }

/* consulting areas */
.areas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 36px; margin-top: 48px; }
.areas > div { border-top: 2px solid var(--sea); padding-top: 16px; }
@media (max-width: 900px) { .areas { grid-template-columns: 1fr 1fr; } }
.areas p { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
@media (max-width: 600px) { .areas { grid-template-columns: 1fr; } }

/* work lists */
.group { margin-top: 48px; max-width: 820px; }
.group h3 { font-family: Inter, sans-serif; font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
ul.work { list-style: none; margin: 0; padding: 0; }
ul.work li { padding: 14px 0; border-bottom: 1px solid var(--line); }
ul.work li:last-child { border-bottom: 0; }
ul.work a { font-family: Newsreader, Georgia, serif; font-size: 20px; color: var(--ink); text-decoration: none; }
ul.work a:hover { color: var(--sea); }
.meta { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }

/* featured paper with video */
.feature { max-width: 1080px; margin: 44px auto 8px; padding: 0 20px; display: grid; grid-template-columns: 3fr 2fr; gap: 36px; align-items: center; }
.player { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #f5f0e7; aspect-ratio: 16 / 9; box-shadow: 0 18px 40px -24px rgba(19,35,46,.35); }
.player video { display: block; width: 100%; height: 100%; }
.still { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; aspect-ratio: 16 / 9; box-shadow: 0 18px 40px -24px rgba(19,35,46,.35); }
.still img { display: block; width: 100%; height: 100%; object-fit: cover; }
.feature.third { margin-top: 64px; }
.play { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-start; padding: 18px; border: 0; background: linear-gradient(to top, rgba(19,35,46,.28), transparent 45%); cursor: pointer; }
.play span { display: inline-flex; align-items: center; gap: 10px; background: #13232e; color: #fff; font: 600 15px Inter, sans-serif; padding: 10px 16px 10px 12px; border-radius: 99px; transition: transform .15s, background .15s; }
.play span::before { content: ""; width: 26px; height: 26px; border-radius: 50%; background: #2a9d9f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M3.5 2.5 L7.5 5 L3.5 7.5 Z' fill='white'/%3E%3C/svg%3E") center / 14px no-repeat; }
.play[hidden] { display: none; }
.play:hover span { transform: scale(1.04); background: #1f5f66; }
.feature .kicker { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--sea); margin: 0 0 10px; }
.feature h3 { font-size: 30px; line-height: 1.15; }
.feature h3 a { color: var(--ink); text-decoration: none; }
.feature h3 a:hover { color: var(--sea); }
.feature .meta { margin-top: 10px; }
.feature .sum { color: var(--muted); font-size: 16px; margin: 14px 0 20px; }
.btn { display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 18px; border-radius: 99px; }
.btn:hover { background: var(--sea); color: var(--paper); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--sea); color: var(--sea); }
.feature.flip { grid-template-columns: 2fr 3fr; margin-top: 64px; }
.feature.flip .player { order: 2; }
.feature .sum + .btn { margin-bottom: 4px; }
@media (max-width: 820px) { .feature, .feature.flip { grid-template-columns: 1fr; gap: 22px; } .feature.flip .player { order: 0; } }

/* products */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 22px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--sea); transform: translateY(-2px); }
.card .logo { width: 44px; height: 44px; border-radius: 10px; margin-bottom: 16px; display: block; }
.card .logo.tile { background: #fff; padding: 7px; box-shadow: inset 0 0 0 1px #e4e0d7; }
.card p { color: var(--muted); font-size: 15px; margin: 8px 0 16px; flex: 1; }
.card .url { font-size: 14px; color: var(--sea); }
.card .note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.tag { font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; font-family: Inter, sans-serif; }
@media (max-width: 700px) { .cards { grid-template-columns: 1fr; } }

/* contact */
.contact h2 { font-size: clamp(30px, 5.5vw, 64px); max-width: none; }
.contact h2 a { color: var(--ink); text-decoration: none; }
.contact h2 a:hover { color: var(--sea); }

/* sections rise in gently as they scroll into view */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.4s ease, transform 1.4s cubic-bezier(.22,1,.36,1); }
.js .reveal.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

footer { padding: 40px 0 56px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* research page */
.page-head { padding: 72px 20px 8px; }
.page-head h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.06; letter-spacing: -.02em; }
.page-head .lead { color: var(--muted); margin: 18px 0 0; }
section.plain { border-top: 0; padding-top: 0; }
.more { margin: 56px 0 0; }
nav a[aria-current] { color: var(--ink); }
