/* Theme tokens. Light is the default; the head script sets data-theme from the saved choice or the OS. */
:root {
  color-scheme: light;
  --bg: #F3F4F1;
  --panel: #FBFBF9;
  --line: #D9DCD6;
  --line-strong: #B9BEB6;
  --text: #17202B;
  --body: #3A4553;
  --muted: #6A7480;
  --accent: #2346B8;
  --accent-hover: #1A3690;
  --on-accent: #FFFFFF;
  --live: #2F7D4F;
  --hover-bg: rgba(23, 32, 43, 0.05);
  --nav-bg: #F3F4F1;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 64px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14181E;
  --panel: #1A1F27;
  --line: #2A303A;
  --line-strong: #3C4450;
  --text: #E7E9EC;
  --body: #C2C7CE;
  --muted: #8D949E;
  --accent: #93A9F0;
  --accent-hover: #B4C4F6;
  --on-accent: #10172B;
  --live: #6BC28E;
  --hover-bg: rgba(231, 233, 236, 0.06);
  --nav-bg: #14181E;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
h1, h2, h3, .stat-value, .metric b, .mark, .brand, .industries dt, .skills dt {
  font-family: "Bricolage Grotesque", "Instrument Sans", sans-serif;
  font-optical-sizing: auto;
}
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:is(a, button):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
strong { color: var(--text); font-weight: 600; }

.wrap { max-width: 1600px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; background: var(--nav-bg); border-bottom: 1px solid transparent; }
.top.scrolled, .top.open { border-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; white-space: nowrap; color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.brand:hover { color: var(--text); }
.mark {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--text); color: var(--bg);
  font-weight: 700; font-size: 0.85rem;
}
.top nav { display: flex; gap: 2px; }
.top nav a { white-space: nowrap; padding: 6px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.top nav a:hover { color: var(--text); }
.top nav a[aria-current="true"] { color: var(--text); text-decoration: underline; text-underline-offset: 6px; }
.actions { display: flex; align-items: center; gap: 8px; }
.top .top-cta { padding: 7px 14px; font-size: 0.875rem; white-space: nowrap; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--hover-bg); }
.icon-btn svg { width: 18px; height: 18px; }
/* Show the icon for the theme you would switch to */
.theme-toggle .moon, :root[data-theme="dark"] .theme-toggle .sun { display: block; }
.theme-toggle .sun, :root[data-theme="dark"] .theme-toggle .moon { display: none; }
.menu-toggle { display: none; }
.menu-toggle span { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; transition: transform 0.25s var(--ease); }
.menu-toggle span::before { transform: translateY(-6px); }
.menu-toggle span::after { transform: translateY(6px); }
.top.open .menu-toggle span { background: transparent; }
.top.open .menu-toggle span::before { transform: rotate(45deg); }
.top.open .menu-toggle span::after { transform: rotate(-45deg); }

@media (max-width: 1240px) {
  .menu-toggle { display: inline-grid; }
  .top nav {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    padding: 8px 20px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .top.open nav { display: flex; }
  .top nav a { padding: 12px 4px; font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .top nav a:last-child { border-bottom: 0; }
}
@media (max-width: 520px) { .top .top-cta { display: none; } }
@media (max-width: 380px) { .brand span { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  border: 1px solid var(--line-strong); color: var(--text);
}
.btn:hover { color: var(--text); background: var(--hover-bg); }
.btn-fill { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-fill:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Hero */
.hero { padding: 96px 0 0; animation: settle 0.7s var(--ease) both; }
@keyframes settle { from { opacity: 0; } to { opacity: 1; } }
.badge { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 40px; color: var(--body); font-size: 0.9rem; font-weight: 500; }
.badge::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.hero h1 { margin: 0 0 28px; }
/* The header already shows the name; it stays in the h1 for search engines and screen readers. */
.hero h1 .name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero h1 .headline {
  display: block;
  font-size: clamp(2.5rem, 7.6vw, 8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  max-width: 18ch;
  text-wrap: balance;
}
.hero .role { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.45; color: var(--text); margin: 0 0 16px; max-width: 46ch; }
.hero .lede { color: var(--body); margin: 0 0 36px; max-width: 66ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 72px; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; border-top: 1px solid var(--text); border-bottom: 1px solid var(--line); }
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats div { display: flex; flex-direction: column; padding: 22px 24px 22px 0; }
@media (min-width: 800px) { .stats div + div { padding-left: 24px; border-left: 1px solid var(--line); } }
@media (max-width: 799px) { .stats div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); } .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
.stats dt { order: 2; color: var(--muted); font-size: 0.875rem; line-height: 1.4; }
.stats dd { order: 1; margin: 0 0 6px; }
.stat-value { color: var(--text); font-size: clamp(2rem, 3.6vw, 2.75rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }

@media (max-width: 600px) {
  .hero { padding-top: 56px; }
  .badge { margin-bottom: 28px; }
  .cta { margin-bottom: 48px; }
  .cta .btn { flex: 1 1 140px; }
}

/* Sections */
section { padding: 112px 0 0; scroll-margin-top: var(--nav-h); }
@media (max-width: 600px) { section { padding-top: 72px; } }
.section-head { max-width: 66ch; margin-bottom: 36px; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 650; letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 12px; }
.section-head p { color: var(--muted); margin: 0; }

/* Services: a ruled list, not boxes */
.services, .industries, .production, .steps, .skills { display: grid; margin: 0; }
.services { grid-template-columns: 1fr; column-gap: 40px; border-top: 1px solid var(--text); }
@media (min-width: 560px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .services { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1140px) { .services { grid-template-columns: repeat(4, 1fr); } }
.services .card { padding: 22px 0 26px; border-bottom: 1px solid var(--line); }
.services h3 { font-size: 1.1rem; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.services p { margin: 0; color: var(--body); font-size: 0.95rem; }

.industries { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); column-gap: 40px; border-top: 1px solid var(--text); }
.industries div { padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.industries dt { font-weight: 600; font-size: 1.05rem; margin-bottom: 4px; }
.industries dd { margin: 0; color: var(--body); font-size: 0.95rem; }

/* Work and AI: spec-sheet rows, the number carries each row */
.work, .live { list-style: none; margin: 0; padding: 0; }
.work { border-top: 1px solid var(--text); }
.work > li {
  display: grid; grid-template-columns: minmax(140px, 300px) minmax(0, 1fr); column-gap: 56px;
  padding: 36px 0; border-bottom: 1px solid var(--line);
}
.work > li > * { grid-column: 2; }
.work .metric { grid-column: 1; grid-row: 1 / span 4; margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.35; max-width: 18ch; }
.metric b {
  display: block;
  font-size: clamp(2.8rem, 5vw, 4rem); font-weight: 600; line-height: 0.95; letter-spacing: -0.04em;
  color: var(--accent); margin-bottom: 10px; font-variant-numeric: tabular-nums;
}
.work h3, .live h3 { font-size: 1.3rem; font-weight: 600; margin: 0; letter-spacing: -0.015em; line-height: 1.25; }
.where { display: block; color: var(--muted); font-size: 0.9rem; margin: 4px 0 12px; }
.desc { margin: 0 0 16px; color: var(--body); max-width: 84ch; }
@media (max-width: 700px) {
  .work > li { grid-template-columns: 1fr; padding: 28px 0; }
  .work > li > *, .work .metric { grid-column: 1; grid-row: auto; }
  .work .metric { margin-bottom: 14px; max-width: none; }
  .metric b { font-size: 2.6rem; margin-bottom: 4px; }
}

/* Live products are links, so they get a frame */
.live { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.live > li { display: flex; flex-direction: column; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.live h3 { font-size: 1.15rem; }
.live .host { font-size: 0.9rem; font-weight: 500; margin-top: 2px; align-self: flex-start; overflow-wrap: anywhere; }
.live .desc { font-size: 0.95rem; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.live .chips { margin-top: auto; }
.chips li { padding: 2px 9px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; line-height: 1.6; }

.production { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); column-gap: 40px; row-gap: 32px; }
.production .card { border-top: 1px solid var(--text); padding-top: 18px; }
.production h3 { font-size: 1.1rem; font-weight: 600; margin: 0 0 6px; }
.production ul { list-style: none; margin: 0; padding: 0; }
.production li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; color: var(--body); }

/* Steps are a real sequence, so they keep their numbers */
.steps { list-style: none; padding: 0; counter-reset: s; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); column-gap: 40px; row-gap: 28px; }
.steps li { counter-increment: s; border-top: 1px solid var(--text); padding-top: 16px; }
.steps li::before { content: counter(s); display: block; margin-bottom: 10px; font-family: "Bricolage Grotesque", sans-serif; font-size: 1.6rem; font-weight: 600; color: var(--accent); line-height: 1; }
.steps h3 { font-size: 1.1rem; font-weight: 600; margin: 0 0 6px; }
.steps p { margin: 0; color: var(--body); font-size: 0.95rem; }

.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--text); }
.timeline li { display: grid; grid-template-columns: minmax(140px, 300px) minmax(0, 1fr); column-gap: 56px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.timeline li > * { grid-column: 2; }
.timeline time { grid-column: 1; grid-row: 1 / span 2; color: var(--muted); font-size: 0.95rem; font-weight: 500; font-variant-numeric: tabular-nums; padding-top: 3px; }
.timeline h3 { font-size: 1.15rem; font-weight: 600; margin: 0 0 6px; }
.timeline p { margin: 0; color: var(--body); max-width: 72ch; }
@media (max-width: 700px) {
  .timeline li { grid-template-columns: 1fr; }
  .timeline li > *, .timeline time { grid-column: 1; grid-row: auto; }
}

.skills { border-top: 1px solid var(--text); }
.skills div { display: grid; grid-template-columns: minmax(140px, 300px) minmax(0, 1fr); column-gap: 56px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.skills dt { font-weight: 600; font-size: 1.05rem; }
.skills dd { margin: 0; }
@media (max-width: 700px) { .skills div { grid-template-columns: 1fr; row-gap: 10px; } }

.about { max-width: 66ch; }
.about p { margin: 0 0 16px; color: var(--body); }
.about p:last-child { margin-bottom: 0; }

footer { margin-top: 112px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero { animation: none; }
}

/* Hero globe: client regions. Desktop only; the copy carries the hero on smaller screens. */
.globe { display: none; margin: 0; }
.globe canvas { width: 100%; aspect-ratio: 1; opacity: 0; transition: opacity 1.2s var(--ease); cursor: default; }
.globe figcaption { color: var(--muted); font-size: 0.875rem; text-align: center; max-width: 36ch; margin: 8px auto 0; }
@media (min-width: 1100px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); column-gap: 48px; align-items: center; }
  .hero .stats { grid-column: 1 / -1; margin-top: 8px; }
  .globe { display: block; max-width: 620px; justify-self: end; width: 100%; }
  .hero h1 .headline { font-size: clamp(3.4rem, 5vw, 6rem); }
  .hero .cta { margin-bottom: 0; }
  .hero { padding-bottom: 0; }
  .hero-copy { padding-bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) { .globe canvas { transition: none; } }

/* FAQ: native disclosure rows */
.faq { border-top: 1px solid var(--text); max-width: 980px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 20px 0; cursor: pointer; list-style: none;
  font-family: "Bricolage Grotesque", sans-serif; font-size: 1.15rem; font-weight: 600; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--accent); font-size: 1.5rem; font-weight: 500; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.faq details p { margin: 0 0 22px; color: var(--body); max-width: 72ch; }
