:root {
  --cobalt: #2138a0;
  --ink: #16204f;
  --butter: #f3d675;
  --sky: #a9bdf0;
  --sage: #dce2d8;
  --chalk: #f6f5f0;
  --white: #fff;
  --muted: #4d5372;
  --rule: #c9c9bf;
  --error: #a3231b;
  --display: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif;
  --body: "Instrument Sans", system-ui, sans-serif;
  --gap: clamp(1.5rem, 3vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body { margin: 0; background: var(--chalk); color: var(--ink); font: 400 1.0625rem/1.65 var(--body); }
svg { display: block; width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7.2vw, 6.4rem); font-weight: 700; letter-spacing: -.035em; line-height: .98; max-width: 13.5em; }
h1 em { font-style: normal; color: var(--cobalt); }
h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); font-weight: 700; letter-spacing: -.025em; }
h3 { font-size: 1.5rem; font-weight: 500; }
h4 { font-size: 1.35rem; font-weight: 500; }
p { margin: 0 0 1.1em; }
address { font-style: normal; }
:focus-visible { outline: 3px solid #d17a00; outline-offset: 3px; }

.wrap { width: min(1340px, 100% - 2 * clamp(1rem, 4vw, 3rem)); margin-inline: auto; }
.section { padding-block: clamp(4.5rem, 8vw, 7.5rem); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--white); padding: .6rem 1rem; }
.label, .eyebrow { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .13em; }
.label::before, .eyebrow::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .8em; background: var(--cobalt); border-radius: 50%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--chalk); border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 80px; }
.logo { display: flex; align-items: center; gap: .75rem; text-decoration: none; font: 700 1.5rem/1 var(--display); }
.logo small { display: block; margin-top: .3rem; font: 500 .72rem var(--body); color: var(--muted); }
.logo-mark { width: 40px; height: 40px; background: radial-gradient(circle, var(--butter) 0 9px, var(--cobalt) 10px); }
.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a { text-decoration: none; font-weight: 500; font-size: .98rem; padding-block: .4rem; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { border-bottom-color: var(--cobalt); }
.site-nav .nav-cta { background: var(--ink); color: var(--white); padding: .7rem 1.3rem; border: 0; }
.site-nav .nav-cta:hover { background: var(--cobalt); }
.menu-toggle { display: none; }

/* Buttons */
.btn { display: inline-block; font: 600 1rem var(--body); padding: 1rem 1.7rem; border: 2px solid var(--ink); text-decoration: none; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--cobalt); border-color: var(--cobalt); color: var(--white); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--white); }

/* Hero */
.hero { padding-block: clamp(3rem, 6vw, 5.5rem) 0; }
.hero-grid { display: grid; grid-template-columns: 4fr 5fr 3fr; gap: var(--gap); margin-top: 3rem; border-top: 1px solid var(--ink); padding-top: 2rem; }
.lead { font-size: 1.18rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-art { margin: 0; display: flex; flex-direction: column; }
.hero-art svg { flex: 1; min-height: 300px; height: 100%; }
.hero-art figcaption { font-size: .85rem; color: var(--muted); padding-top: .6rem; }
.hero-panel { display: grid; grid-template-rows: 1fr 1fr; gap: 1rem; }
.hero-panel a { display: flex; flex-direction: column; gap: .8rem; padding: 1.5rem; background: var(--butter); text-decoration: none; transition: transform .25s; }
.hero-panel a + a { background: var(--sage); }
.hero-panel a:hover { transform: translateX(-6px); }
.hero-panel span { font-size: .8rem; font-weight: 600; letter-spacing: .08em; }
.hero-panel strong { font: 500 1.35rem/1.2 var(--display); }
.hero-panel i { margin-top: auto; align-self: flex-end; font-style: normal; font-size: 1.6rem; }

.strip { background: var(--ink); color: var(--white); margin-top: clamp(3rem, 5vw, 4.5rem); }
.strip ul { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 1.5rem; list-style: none; padding: 1.6rem 0; margin-block: 0; }
.strip li { display: flex; align-items: center; gap: .8rem; font-size: .95rem; }
.strip b { font: 700 2rem var(--display); color: var(--butter); }

/* About */
.about-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.about-title { grid-column: 1 / 8; grid-row: 1; }
.about-text { grid-column: 1 / 8; grid-row: 2; }
.about-visual { grid-column: 8 / 13; grid-row: 1 / 3; }
.about-visual svg { height: 100%; min-height: 380px; border-radius: 999px 999px 0 0; }
.large { font: 500 1.55rem/1.4 var(--display); }
.principles { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 2rem; border-block: 1px solid var(--ink); }
.principles article { padding: 2rem 2rem 1rem; }
.principles article:first-child { padding-left: 0; }
.principles article + article { border-left: 1px solid var(--rule); }

/* Services */
.services { background: var(--white); }
.section-head { display: grid; grid-template-columns: 2fr 1fr; column-gap: var(--gap); align-items: end; margin-bottom: 4rem; }
.section-head .label { grid-column: 1 / -1; }
.section-head h2 { margin: 0; }
.section-head p:last-child:not(.label) { margin: 0; color: var(--muted); }
.service-block { display: grid; grid-template-columns: 1fr 2.4fr; gap: var(--gap); }
.block-intro { align-self: start; position: sticky; top: 120px; }
.tag { display: inline-block; background: var(--butter); padding: .25rem .8rem; border-radius: 99px; font-size: .85rem; font-weight: 600; margin-bottom: 1.3rem; }
.num { font: 700 1.1rem var(--display); color: var(--cobalt); }
.row { display: grid; grid-template-columns: 3rem 1.5fr 1fr; gap: 1.5rem; padding-block: 2.2rem; border-top: 1px solid var(--rule); transition: background .25s, opacity .6s, transform .6s; }
.row:first-child { border-top: 2px solid var(--ink); }
.row:hover { background: var(--chalk); }
.row p { margin: 0; color: var(--muted); }
.row ul { margin: 0; padding-left: 1.1rem; font-size: .95rem; }
.row li::marker { color: var(--cobalt); }

.research { margin-top: 5rem; background: var(--cobalt); color: var(--white); padding: clamp(1.5rem, 5vw, 4.5rem); }
.research-head { max-width: 720px; }
.research-head h3 { font-size: clamp(1.8rem, 3.2vw, 2.7rem); }
.research-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); margin-top: 3rem; }
.research-cols article { display: flex; flex-direction: column; border-top: 1px solid var(--sky); padding-top: 1.4rem; }
.research .num { color: var(--butter); margin-bottom: 2.5rem; }
.output { margin: auto 0 0; font-size: .9rem; font-weight: 600; color: var(--butter); }

/* Approach */
.approach { background: var(--sage); }
.tab-list { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--ink); }
.tab-list button { font: 600 1rem var(--body); color: var(--ink); background: none; border: 0; padding: 1rem 1.6rem; cursor: pointer; }
.tab-list button[aria-selected="true"] { background: var(--ink); color: var(--white); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); list-style: none; counter-reset: step; padding: 3rem 0 0; margin: 0; }
.steps[hidden] { display: none; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 1.5rem; border-radius: 50%; background: var(--chalk); font: 700 1.5rem var(--display); }

/* Benefits */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.tile { display: flex; flex-direction: column; padding: 2rem; border: 1px solid var(--ink); }
.tile span { font: 500 .95rem var(--display); width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; margin-bottom: 3rem; }
.tile h3 { margin-top: auto; }
.tile p { margin: 0; }
.tile-feature { grid-column: span 2; grid-row: span 2; background: var(--ink); color: var(--white); padding: clamp(2rem, 4vw, 3.5rem); }
.tile-feature h3 { font-size: clamp(2rem, 3.5vw, 3rem); }
.tile-yellow { grid-column: span 2; background: var(--butter); border-color: var(--butter); }
.tile-wide { grid-column: 1 / -1; background: var(--sky); border-color: var(--sky); display: grid; grid-template-columns: auto 1fr 1.4fr; align-items: center; gap: 2rem; }
.tile-wide span, .tile-wide h3 { margin: 0; }

/* FAQ */
.faq { border-top: 1px solid var(--rule); }
.faq-grid, .contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 7vw, 7rem); }
details { border-bottom: 1px solid var(--ink); }
summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem 0; cursor: pointer; list-style: none; font: 500 1.25rem var(--display); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.6rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); max-width: 60ch; }

/* Contact */
.contact { background: var(--butter); }
dl { margin: 2.5rem 0; }
dl div { border-top: 1px solid var(--ink); padding-block: 1rem; }
dt { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; }
dd { margin: .3rem 0 0; font: 500 1.2rem/1.4 var(--display); overflow-wrap: anywhere; }
.text-link { font: 600 .95rem var(--body); color: var(--ink); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.contact-form { background: var(--white); padding: clamp(1.4rem, 4vw, 3.5rem); align-self: start; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { margin-bottom: .6rem; }
.field > label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
input:not([type="checkbox"]), select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--chalk); border: 0; border-bottom: 2px solid var(--ink); padding: .85rem; border-radius: 0; }
textarea { resize: vertical; }
[aria-invalid="true"]:not([type="checkbox"]) { border-bottom-color: var(--error) !important; }
.error { color: var(--error); font-size: .85rem; min-height: 1.4em; margin: .2rem 0 0; }
.check label { display: flex; gap: .7rem; font-size: .93rem; }
.check input { width: 20px; height: 20px; flex: none; accent-color: var(--cobalt); }
.contact-form .privacy-open { display: block; margin-bottom: 1.5rem; }
.form-status { font-size: .88rem; color: var(--muted); margin: 1rem 0 0; }

/* Footer and dialog */
.site-footer { background: var(--ink); color: var(--white); padding-top: 4.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--gap); padding-bottom: 3rem; }
.footer-grid h2 { font-size: clamp(3rem, 7vw, 6rem); color: var(--butter); margin-bottom: .2em; }
.footer-grid h3 { font-size: 1.1rem; }
.footer-grid > div:first-child p { max-width: 34ch; }
.footer-grid nav { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.footer-grid nav h3 { margin-bottom: .5rem; }
.footer-grid address { margin-bottom: 1rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; border-top: 1px solid #454e7c; font-size: .82rem; }
.footer-bottom p { margin: 0; }
.footer-bottom button { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
dialog { width: min(640px, calc(100% - 2rem)); max-height: 85vh; border: 0; padding: clamp(1.4rem, 4vw, 2.5rem); color: var(--ink); background: var(--chalk); }
dialog::backdrop { background: rgb(22 32 79 / .75); }
dialog h2 { font-size: 2rem; }

/* Scroll reveal: only hidden when JavaScript is running */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1080px) {
  .menu-toggle { display: flex; align-items: center; gap: .7rem; font: 600 .95rem var(--body); color: var(--ink); background: none; border: 1px solid var(--ink); padding: .65rem .9rem; cursor: pointer; }
  .menu-icon { width: 18px; height: 8px; border-block: 2px solid currentColor; }
  .js .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100vh - 80px); overflow-y: auto; flex-direction: column; align-items: stretch; gap: 0; background: var(--chalk); padding: 1rem clamp(1rem, 4vw, 3rem) 2rem; border-bottom: 2px solid var(--ink); }
  .js .site-nav.open { display: flex; }
  .site-nav a { padding-block: .9rem; font-size: 1.1rem; }
  .site-nav .nav-cta { margin-top: 1rem; text-align: center; }
  html:not(.js) .menu-toggle { display: none; }
  html:not(.js) .site-header { position: static; }
  html:not(.js) .header-inner { flex-wrap: wrap; }
  html:not(.js) .site-nav { flex-wrap: wrap; gap: 1rem; }
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .hero-panel { grid-column: 1 / -1; grid-template: auto / 1fr 1fr; }
  .service-block { grid-template-columns: 1fr; }
  .block-intro { position: static; }
  .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .hero-grid, .section-head, .faq-grid, .contact-grid, .research-cols, .principles { grid-template-columns: 1fr; }
  .about-title, .about-text, .about-visual, .principles { grid-column: 1 / -1; grid-row: auto; }
  .about-visual svg { height: 420px; }
  .principles article { padding: 1.6rem 0 .5rem; }
  .principles article + article { border-left: 0; border-top: 1px solid var(--rule); }
  .strip ul { grid-template-columns: 1fr; }
  .strip b { min-width: 2.5rem; }
  .row { grid-template-columns: 2.2rem 1fr; gap: 1rem; }
  .row ul { grid-column: 2; }
  .mosaic { grid-template-columns: 1fr; }
  .tile-feature, .tile-yellow, .tile-wide { grid-column: auto; grid-row: auto; }
  .tile-wide { display: flex; align-items: flex-start; gap: .8rem; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .hero-panel, .steps, .field-pair { grid-template-columns: 1fr; }
  .logo small { font-size: .65rem; }
  .actions .btn { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
