:root {
  --bg: #0c0e12;
  --bg2: #13161c;
  --card: #181c24;
  --line: #262b36;
  --text: #e8eaef;
  --muted: #9aa1ae;
  --accent: #ff6a3d;
  --accent-strong: #cf4419; /* accent behind white text: 4.7:1 contrast (WCAG AA) */
  --good: #3ecf8e;
  --bad: #e5484d;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; padding-top: 72px; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, .logo, dt { font-family: "Space Grotesk", Inter, sans-serif; }
strong, b { color: var(--text); font-weight: 600; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
section { padding: 96px 0; border-top: 1px solid var(--line); scroll-margin-top: 64px; }

/* nav */
/* fixed, not sticky: shrinking a fixed header does not shift the page, so the scroll position cannot flip-flop */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 10; background: rgba(12,14,18,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 72px; transition: height .25s ease; }
.nav.scrolled .nav-inner { height: 52px; }
.nav.scrolled { background: rgba(12,14,18,.94); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.logo-mark { width: 36px; height: 36px; color: var(--accent); transition: width .25s ease, height .25s ease; }
.logo-text { font: 300 24px/1 "Space Grotesk", Inter, sans-serif; letter-spacing: .06em; transition: font-size .25s ease; }
.logo-text b { font-weight: 700; color: var(--accent); }
@media (max-width: 480px) {
  .logo { gap: 8px; }
  .logo-mark, .nav.scrolled .logo-mark { width: 26px; height: 26px; }
  .logo-text, .nav.scrolled .logo-text { font-size: 17px; letter-spacing: .03em; }
  .nav .btn-sm { padding: 7px 12px; font-size: 13px; }
}
.nav.scrolled .logo-mark { width: 28px; height: 28px; }
.nav.scrolled .logo-text { font-size: 19px; }
.nav nav { display: flex; gap: 24px; align-items: center; font-size: 15px; color: var(--muted); }
.nav nav a:hover { color: var(--text); }

/* buttons */
.btn { display: inline-block; background: var(--accent-strong); color: #fff; font-weight: 600; padding: 14px 24px; border-radius: 999px; transition: transform .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-sm { padding: 8px 16px; color: #fff !important; }
.btn-lg { font-size: 20px; padding: 18px 32px; margin-top: 32px; }

/* hero */
.hero { border-top: 0; padding: 120px 0 96px; background: radial-gradient(ellipse at 80% 0%, rgba(255,106,61,.15), transparent 60%); }
.eyebrow { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; margin-bottom: 24px; }
h1 { font-size: clamp(42px, 7vw, 92px); line-height: .95; letter-spacing: -.04em; font-weight: 700; }
h1 em { font-style: normal; color: var(--accent); }
/* rotating word in the headline: all words share one grid cell, so the line never changes size */
.rotator { display: inline-grid; vertical-align: top; }
.rotator > span { grid-area: 1 / 1; opacity: 0; transform: translateY(.45em) rotateX(-70deg); filter: blur(6px); transform-origin: 50% 100%; transition: opacity .45s ease, transform .6s cubic-bezier(.2,.8,.2,1), filter .45s ease; }
.rotator > span.on { opacity: 1; transform: none; filter: none; }
.rotator > span.off { opacity: 0; transform: translateY(-.4em) rotateX(60deg); filter: blur(6px); transform-origin: 50% 0; }
.section-title .accent { color: var(--accent); }
.lead { font-size: 20px; color: var(--muted); max-width: 680px; margin-top: 32px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 80px; padding-top: 40px; border-top: 1px solid var(--line); }
.stats dt { font-size: 40px; font-weight: 700; letter-spacing: -.03em; }
.stats dd { color: var(--muted); font-size: 15px; }

/* sections */
.section-title { font-size: clamp(32px, 5vw, 52px); line-height: 1.05; letter-spacing: -.03em; margin-bottom: 48px; max-width: 820px; }
.legal .section-title, .contact .section-title { margin-bottom: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.pillars .grid3 { margin-top: 0; }
.note { color: var(--muted); font-size: 15px; margin-top: 16px; }
.center { text-align: center; max-width: 720px; margin: 40px auto 0; }

.pillar, .card, .case { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.pillar p, .card p, .case p { color: var(--muted); }
.pillar .num { color: var(--accent); font-family: "Space Grotesk"; font-weight: 700; }
.pillar h3 { font-size: 32px; margin: 8px 0 16px; }
.pillar .note { border-top: 1px solid var(--line); padding-top: 16px; }
.card h4, .card h3 { font-size: 19px; margin-bottom: 12px; }

/* contrast */
.contrast { background: var(--bg2); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.col { border-radius: var(--radius); padding: 32px; border: 1px solid var(--line); }
.col h4 { font-size: 22px; margin-bottom: 16px; }
.col ul { list-style: none; display: grid; gap: 12px; }
.col li { padding-left: 28px; position: relative; color: var(--muted); }
.col.bad li::before { content: "✕"; position: absolute; left: 0; color: var(--bad); }
.col.good { border-color: rgba(62,207,142,.4); }
.col.good li::before { content: "✓"; position: absolute; left: 0; color: var(--good); }

/* work */
.case { margin-bottom: 20px; }
.case h3 { font-size: 26px; }
.case-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.tag { display: inline-block; font-size: 13px; color: var(--accent); margin: 4px 0 12px; }
.case-head .tag { margin: 0; }
.facts { list-style: none; display: flex; gap: 8px 32px; flex-wrap: wrap; margin-top: 20px; color: var(--muted); font-size: 15px; }
.facts b { font-size: 22px; font-family: "Space Grotesk"; color: var(--accent); margin-right: 4px; }
.sub { margin: 16px 0 0 20px; color: var(--muted); display: grid; gap: 8px; }
.work .grid3 { margin-top: 0; }
.work .intro { margin: -24px 0 40px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 8px; }
.steps h5, .steps h2 { font-family: "Space Grotesk", Inter, sans-serif; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 8px; }
.steps p { font-size: 15px; }
.featured { padding: 40px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } .featured { padding: 24px; } }

/* about */
.about-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about p { color: var(--muted); margin-bottom: 16px; font-size: 18px; }
.principles { list-style: none; display: grid; gap: 12px; margin-top: 8px; }
.principles li { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 16px 20px; }

/* contact */
.contact { text-align: center; background: radial-gradient(ellipse at 50% 100%, rgba(255,106,61,.15), transparent 60%); }
.contact .section-title, .contact .lead { margin-left: auto; margin-right: auto; }

.foot { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: 14px; }

/* hero visual */
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.hero-visual { position: relative; height: 460px; clip-path: inset(-200px -200px -24px -200px); }
.hero-visual img { position: absolute; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06); }
.shot-desk { width: 100%; top: 20px; right: -40px; animation: float 9s ease-in-out infinite; }
.shot-phone { width: 30%; bottom: 10px; left: -10px; max-height: 420px; object-fit: cover; object-position: top; border-radius: 20px !important; animation: float 7s ease-in-out infinite reverse; }
.slide { position: absolute; inset: 0; pointer-events: none; }
/* desktop screen swings in like a turning page, swings out the other way */
.slide .shot-desk { opacity: 0; transform-origin: right center; transform: perspective(1200px) rotateY(-75deg) rotateX(4deg); transition: transform 1s cubic-bezier(.2,.7,.2,1), opacity .6s ease; }
.slide.active .shot-desk { opacity: 1; transform: perspective(1200px) rotateY(-12deg) rotateX(4deg); }
.slide.leaving .shot-desk { opacity: 0; transform-origin: left center; transform: perspective(1200px) rotateY(60deg) rotateX(4deg); }
/* phone slides up from below, a beat after the desktop */
.slide .shot-phone { opacity: 0; transform: translateY(130%); transition: transform .8s cubic-bezier(.2,.8,.2,1) .3s, opacity .4s ease .3s; }
.slide.active .shot-phone { opacity: 1; transform: translateY(0); }
.slide.leaving .shot-phone { opacity: 0; transform: translateY(130%); transition-delay: 0s; }
.slide .slide-cap { opacity: 0; transform: translateY(14px); transition: opacity .5s ease .6s, transform .5s ease .6s; }
.slide.active .slide-cap { opacity: 1; transform: none; }
.slide.leaving .slide-cap { opacity: 0; transition-delay: 0s; }
.slide-cap { position: absolute; right: -40px; bottom: -8px; z-index: 2; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; font-size: 13px; color: var(--muted); box-shadow: 0 10px 30px rgba(0,0,0,.45); max-width: 75%; }
.slide-cap b { display: block; color: var(--text); font: 700 15px "Space Grotesk", sans-serif; }
@keyframes float { 50% { translate: 0 -12px; } }

/* clients */
.clients { padding: 40px 0; background: var(--bg2); overflow: hidden; }
.clients-title { text-align: center; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 24px; }
.marquee { mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 20px; width: max-content; animation: scroll 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track img, .wordlogo { height: 84px; width: 180px; object-fit: contain; background: #f4f5f7; border-radius: 12px; padding: 12px 20px; }
.wordlogo { display: flex; align-items: center; justify-content: center; color: #1b2a4a; font: 700 30px "Space Grotesk", sans-serif; letter-spacing: .04em; }
@keyframes scroll { to { transform: translateX(calc(-50% - var(--gap-half, 10px))); } }

/* care */
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.care .section-title { margin-bottom: 0; }
.icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(255,106,61,.12); color: var(--accent); font-size: 22px; margin-bottom: 16px; }

/* case extras */
.case-logo { height: 40px; width: auto; min-width: 40px; max-width: 150px; object-fit: contain; background: #f4f5f7; border-radius: 10px; padding: 4px; vertical-align: middle; margin-right: 12px; }
.cover { display: block; position: relative; width: 100%; aspect-ratio: 21 / 8; margin: 8px 0 28px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: zoom-in; background: #fff; }
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s; }
.cover:hover img { transform: scale(1.03); }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(12,14,18,.75)); }
.cover-cta { position: absolute; right: 16px; bottom: 14px; z-index: 1; background: var(--accent-strong); color: #fff; font: 600 14px Inter, sans-serif; padding: 8px 16px; border-radius: 999px; }
.quote { margin: 28px 0 0; padding: 24px 28px; border-left: 3px solid var(--accent); background: rgba(255,106,61,.06); border-radius: 0 12px 12px 0; }
.quote p { color: var(--text); font-size: 18px; line-height: 1.55; font-style: italic; }
.quote footer { display: flex; align-items: center; gap: 14px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.quote footer img { height: 44px; width: 110px; object-fit: contain; background: #f4f5f7; border-radius: 8px; padding: 4px 8px; }
.quote-sm { margin-top: 20px; padding: 16px 20px; }
.quote-sm p { font-size: 15px; }
.case h3 { display: flex; align-items: center; gap: 12px; }
.case h3 .case-logo { margin-right: 0; flex-shrink: 0; }
.more { margin-top: 16px; background: none; border: 0; color: var(--accent); font: 600 15px Inter, sans-serif; cursor: pointer; padding: 0; }

/* lightbox */
.lightbox { margin: auto; max-width: min(1200px, 94vw); max-height: 92vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(5,6,9,.88); backdrop-filter: blur(4px); }
.lightbox figure { margin: 0; }
.lightbox img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox figcaption { text-align: center; color: var(--text); margin-top: 14px; font-size: 15px; }
.lb-close, .lb-nav { position: fixed; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 50%; width: 48px; height: 48px; font-size: 26px; line-height: 1; cursor: pointer; }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; }
.lb-next { right: 20px; top: 50%; }
.lightbox.single .lb-nav { display: none; }

/* about */
.portrait { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; background: #f4f5f7; border: 3px solid var(--accent); margin-bottom: 24px; }
.ai-tools { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ai-tools li { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 999px; font-size: 14px; color: var(--muted, #b9bec7); }
.ai-tools img { width: 18px; height: 18px; filter: invert(1); opacity: .9; }

/* reveal */
.reveal { opacity: 0; translate: 0 24px; transition: opacity .6s ease, translate .6s ease; }
.reveal.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .shot-desk, .shot-phone, .marquee-track { animation: none; }
  .rotator > span { transition: none; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  .cover { aspect-ratio: 16 / 9; }
  .marquee-track img, .wordlogo { height: 64px; width: 140px; }
  section { padding: 64px 0; }
  .hero { padding: 72px 0 64px; }
  .nav nav a:not(.btn) { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .grid3, .compare, .about-inner { grid-template-columns: 1fr; }
  .pillar, .card, .case, .col { padding: 24px; }
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .grid4 { grid-template-columns: 1fr; } }
.card h4, .card p { overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }
/* phone: stats as a clean list, clients as a compact one-row marquee */
@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr; gap: 0; margin-top: 48px; padding-top: 8px; }
  .stats > div { display: grid; grid-template-columns: 124px 1fr; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .stats > div:last-child { border-bottom: 0; }
  .stats dt { font-size: 28px; white-space: nowrap; }
  .stats dd { font-size: 14px; line-height: 1.4; }
  .clients { padding: 32px 0; }
  .marquee { mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
  .marquee-track { gap: 8px; --gap-half: 4px; animation-duration: 28s; }
  .marquee-track img, .wordlogo { width: 92px; height: 60px; padding: 6px; border-radius: 10px; }
  .wordlogo { font-size: 17px; }
  .quote { padding: 20px; }
  .quote p { font-size: 16px; }
  .case h3 { gap: 10px; font-size: 22px; line-height: 1.2; }
  .case h3 .case-logo { height: 36px; max-width: 84px; }
  .quote footer { flex-direction: column; align-items: flex-start; gap: 12px; }
  .quote footer img { height: 56px; width: auto; max-width: 200px; padding: 6px 10px; }
}
.shot-phone.crop { aspect-ratio: 486 / 770; object-fit: cover; object-position: top; }

/* back-to-top button, shown by to-top.js after scrolling down */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 20; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.45); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-2px); }
.to-top svg { width: 22px; height: 22px; }
@media (max-width: 600px) { .to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; } }

/* footer with full company details */
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; line-height: 1.6; }
.foot-inner b { color: var(--text); }
.foot-inner a:hover { color: var(--text); }

/* home: case study tiles linking to their own pages */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.tile { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, transform .2s; }
.tile:hover { border-color: var(--accent); transform: translateY(-3px); }
.tile-cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #fff; border-bottom: 1px solid var(--line); }
.tile-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s; }
.tile:hover .tile-cover img { transform: scale(1.03); }
.tile-body { display: flex; flex-direction: column; gap: 6px; padding: 24px; flex: 1; }
.tile-name { display: flex; align-items: center; gap: 12px; font: 700 22px/1.2 "Space Grotesk", Inter, sans-serif; }
.tile-name .case-logo { margin-right: 0; flex-shrink: 0; }
.tile .tag { margin: 0; }
.tile-text { color: var(--muted); font-size: 16px; }
.tile .facts { margin-top: 8px; }
.tile-more { margin-top: auto; padding-top: 12px; color: var(--accent); font-weight: 600; font-size: 15px; }
.tile-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; }
.tile-wide .tile-cover { aspect-ratio: auto; height: 100%; min-height: 280px; border-bottom: 0; border-right: 1px solid var(--line); }
.tile-wide .tile-body { padding: 32px; justify-content: center; }
@media (max-width: 860px) {
  .tiles { grid-template-columns: 1fr; }
  .tile-wide { display: flex; }
  .tile-wide .tile-cover { aspect-ratio: 16 / 9; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .tile-body, .tile-wide .tile-body { padding: 20px; }
  .tile-name { font-size: 20px; }
}

/* case study and contact subpages */
.case-section { border-top: 0; padding: 48px 0 64px; }
.back { display: inline-block; color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.back:hover { color: var(--text); }
.case-page h1 { font-size: clamp(30px, 4.5vw, 44px); line-height: 1.1; letter-spacing: -.02em; display: flex; align-items: center; gap: 14px; }
.case-page h1 .case-logo { height: 48px; max-width: 170px; margin-right: 0; flex-shrink: 0; }
.next-case { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin-top: 12px; padding: 20px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font: 700 20px "Space Grotesk", Inter, sans-serif; color: var(--text); transition: border-color .2s; }
.next-case span { font: 500 13px Inter, sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.next-case:hover { border-color: var(--accent); }
.contact-page { border-top: 0; padding: 96px 0 120px; }
.contact-page .section-title { font-size: clamp(36px, 6vw, 64px); }
@media (max-width: 600px) {
  .case-page h1 { font-size: 26px; gap: 10px; }
  .case-page h1 .case-logo { height: 38px; max-width: 96px; }
  .case-section { padding: 32px 0 48px; }
}
.contact-page h1 { display: block; }

/* contact form */
.contact-page { text-align: left; background: radial-gradient(ellipse at 20% 0%, rgba(255,106,61,.12), transparent 60%); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.contact-intro { position: sticky; top: 100px; }
.contact-intro .lead { margin-top: 0; }
.contact-intro a { color: var(--accent); }
.form { display: grid; gap: 18px; padding: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; border: 0; min-width: 0; }
.field > span, .field legend { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.field input, .field textarea, .field select { width: 100%; font: 400 16px/1.5 Inter, sans-serif; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; }
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field ::placeholder { color: #6b7280; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--muted); cursor: pointer; transition: all .15s; }
.chip span:hover { color: var(--text); border-color: var(--muted); }
.chip input:checked + span { background: rgba(255,106,61,.15); border-color: var(--accent); color: var(--text); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); margin-top: -6px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-hint { font-size: 14px; color: var(--muted); padding: 10px 14px; border-left: 3px solid var(--accent); background: rgba(255,106,61,.06); border-radius: 0 8px 8px 0; }
.form .btn { justify-self: start; margin-top: 0; border: 0; cursor: pointer; font-family: inherit; }
.form .btn:disabled { opacity: .6; cursor: progress; }
.form-status { font-weight: 600; min-height: 1.2em; }
.form-status.ok { color: var(--good); }
.form-status.err { color: var(--bad); }
.form-legal { font-size: 12px; line-height: 1.55; color: var(--muted); }
.form-legal a { color: var(--text); }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-intro { position: static; }
  .form { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .form .btn { justify-self: stretch; text-align: center; }
}

/* consent checkbox and legal documents */
.check.consent { align-items: flex-start; margin-top: 0; line-height: 1.5; }
.check.consent input { margin-top: 2px; flex-shrink: 0; }
.check.consent a { color: var(--text); text-decoration: underline; }
.legal-doc .wrap { max-width: 800px; }
.legal-doc h1 { font-size: clamp(32px, 5vw, 48px); display: block; }
.legal-doc .doc-date { color: var(--muted); margin: 8px 0 32px; }
.legal-doc h2 { font: 700 22px "Space Grotesk", Inter, sans-serif; margin: 32px 0 12px; }
.legal-doc p, .legal-doc li { color: var(--muted); margin-bottom: 10px; }
.legal-doc ul, .legal-doc ol { padding-left: 22px; }
.legal-doc a, .foot a { text-decoration: underline; text-underline-offset: 2px; }
.legal-doc a { color: var(--text); }

/* terms / privacy overlay */
.doc-modal { width: min(820px, 94vw); max-height: 88vh; margin: auto; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg2); color: var(--text); display: none; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.doc-modal[open] { display: flex; }
.doc-modal::backdrop { background: rgba(5,6,9,.8); backdrop-filter: blur(4px); }
.doc-modal-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 32px 36px 16px; }
.doc-modal-body h1 { font-size: 30px; }
.doc-modal-foot { display: flex; justify-content: flex-end; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--card); }
.doc-modal-close { border: 0; cursor: pointer; font-family: inherit; }
@media (max-width: 600px) {
  .doc-modal { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: var(--radius) var(--radius) 0 0; }
  .doc-modal-body { padding: 24px 18px 12px; }
  .doc-modal-foot { padding: 12px 16px; }
  .doc-modal-close { width: 100%; }
}

/* spinner on the submit button while the request is in flight (contact-form.js toggles .is-loading) */
.form .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.form .btn.is-loading::before { content: ""; width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.form .btn:disabled.is-loading { opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .form .btn.is-loading::before { animation-duration: 2s; } }

/* hero captions link to the case study; only the visible slide's caption is clickable/focusable */
a.slide-cap { pointer-events: auto; visibility: hidden; transition: opacity .5s ease .6s, transform .5s ease .6s, border-color .2s, visibility 0s linear 1.1s; }
.slide.active a.slide-cap { visibility: visible; transition: opacity .5s ease .6s, transform .5s ease .6s, border-color .2s, visibility 0s; }
a.slide-cap:hover { border-color: var(--accent); }
a.slide-cap:hover b { color: var(--accent); }
.cap-arrow { color: var(--accent); }
.slide.leaving a.slide-cap { visibility: visible; pointer-events: none; }

.stats dt small { font-size: .5em; font-weight: 600; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
@media (max-width: 600px) { .stats > div { grid-template-columns: 162px 1fr; gap: 12px; } .stats dt { font-size: 24px; } }

/* previous / next case study navigation */
.case-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.case-nav .next-case { margin-top: 0; }
.prev-case { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 20px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font: 700 20px "Space Grotesk", Inter, sans-serif; color: var(--text); transition: border-color .2s; }
.prev-case span { font: 500 13px Inter, sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.prev-case:hover { border-color: var(--accent); }
@media (max-width: 600px) { .case-nav { grid-template-columns: 1fr; } .prev-case, .case-nav .next-case { font-size: 17px; padding: 16px 18px; } }

/* language switcher */
.nav nav a.lang { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.nav nav a.lang:hover { color: var(--text); border-color: var(--muted); }
@media (max-width: 860px) { .nav nav a.lang { display: inline-block !important; } }

/* language switcher */
.nav nav a.lang { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.nav nav a.lang:hover { color: var(--text); border-color: var(--muted); }
@media (max-width: 860px) { .nav nav a.lang { display: inline-block !important; } }

/* 404 page */
.notfound h1 em { font-style: normal; color: var(--accent); }
.notfound .lead { max-width: 640px; }
.notfound .note a { color: var(--accent); }

/* links inside running text must not rely on colour alone */
.contact-intro a, .form-legal a, .notfound .note a, .lead a { text-decoration: underline; text-underline-offset: 2px; }
