/* KAI Labs - design system. Tokens follow the UI specification. */
:root {
  --dark: #030b0c;
  --dark-2: #071317;
  --dark-border: #18313b;
  --light: #ededed;
  --surface: #f4f6f9;
  --white: #fff;
  --accent: #2f6fde;
  --accent-600: #2560c7;
  --accent-soft: #7aa7ff;
  --text: #111827;
  --muted: #5b6472;
  --border: #e5e7eb;
  --ok: #16a34a;
  --err: #dc2626;
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1200px;
  --gutter: 24px;
  --header-h: 72px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* theme variables, switched by .dark */
  --c-bg: #fff;
  --c-text: var(--text);
  --c-muted: var(--muted);
  --c-card: #fff;
  --c-border: var(--border);
  --c-link: var(--accent-600);
  --c-chip: #eef2f8;
}
.dark {
  --c-bg: var(--dark);
  --c-text: var(--light);
  --c-muted: #9db0b7;
  --c-card: var(--dark-2);
  --c-border: var(--dark-border);
  --c-link: var(--accent-soft);
  --c-chip: #0d2027;
}
.surface { --c-bg: var(--surface); }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--dark); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.65; color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-optical-sizing: auto; text-rendering: optimizeLegibility; }
::selection { background: rgba(47, 111, 222, .28); }
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--c-link, var(--accent-600)); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { text-wrap: balance; margin: 0 0 .5em; line-height: 1.12; letter-spacing: -.018em; color: var(--c-text); font-weight: 700; }
h1 { font-size: clamp(2.25rem, 1.2rem + 3.4vw, 3.5rem); font-weight: 700; letter-spacing: -.026em; line-height: 1.08; }
h2 { font-size: clamp(1.75rem, 1.25rem + 1.8vw, 2.5rem); }
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

/* ---------- sections ---------- */
.section { background: var(--c-bg); color: var(--c-text); padding: 96px 0; }
.section.tight { padding: 64px 0; }
.lead { font-size: 1.125rem; line-height: 1.7; color: var(--c-muted); max-width: 60ch; }
.muted { color: var(--c-muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--c-link); }
.eyebrow::before { content: ""; width: 20px; height: 1.5px; border-radius: 2px; background: currentColor; opacity: .7; }
/* hero labels: pill with a glowing dot */
.hero .eyebrow, .page-hero .eyebrow { padding: 7px 14px 7px 12px; border-radius: 999px; background: rgba(47, 111, 222, .1); border: 1px solid rgba(122, 167, 255, .22); color: #9dbdff; letter-spacing: .14em; font-size: .6875rem; }
.hero .eyebrow::before, .page-hero .eyebrow::before { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-soft); opacity: 1; box-shadow: 0 0 0 3px rgba(122, 167, 255, .18), 0 0 10px rgba(122, 167, 255, .8); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.head-row .section-head { margin: 0; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; align-items: start; }
.split .section-head { margin-bottom: 28px; }
.sticky { position: sticky; top: calc(var(--header-h) + 32px); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-size: .9375rem; font-weight: 600; letter-spacing: -.005em; line-height: 1; cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s, transform .2s, color .2s, box-shadow .2s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; transition: transform .2s; }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary { background: linear-gradient(180deg, #3a7bec, var(--accent)); color: #fff; border-color: rgba(255, 255, 255, .08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(3, 11, 12, .2), 0 8px 22px -10px rgba(47, 111, 222, .7); }
.btn-primary:hover { background: linear-gradient(180deg, #4685f2, #3474e4); color: #fff; transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 1px 2px rgba(3, 11, 12, .2), 0 14px 30px -10px rgba(47, 111, 222, .8); }
.btn-outline { background: #fff; color: var(--c-text); border-color: #d9dee7; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
.btn-outline:hover { border-color: var(--accent); color: var(--c-link); }
.dark .btn-outline, .btn-outline.on-dark { color: var(--light); border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .03); }
.dark .btn-outline:hover, .btn-outline.on-dark:hover { border-color: rgba(122, 167, 255, .6); background: rgba(122, 167, 255, .08); color: #fff; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .875rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9375rem; color: var(--c-link); }
.link-arrow .icon { width: 16px; height: 16px; transition: transform .2s; }
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- icons ---------- */
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-chip { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 22px; border-radius: 12px; color: var(--accent); background: linear-gradient(180deg, #f1f6ff, #e6effd); border: 1px solid #d6e3fb; }
.icon-chip .icon { width: 22px; height: 22px; }
.dark .icon-chip { color: #7fabff; background: linear-gradient(180deg, rgba(47, 111, 222, .2), rgba(47, 111, 222, .06)); border-color: rgba(122, 167, 255, .2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.icon-box { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--c-border); color: var(--accent); margin-bottom: 20px; }
.dark .icon-box { color: #4d88f0; background: rgba(47, 111, 222, .08); border-color: #1d3a4a; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(255, 255, 255, .05); transition: border-color .3s; }
/* blur lives on a pseudo-element: backdrop-filter on the header itself would trap the fixed mobile menu */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(3, 11, 12, .97); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); transition: background .3s, box-shadow .3s; }
.site-header.scrolled { border-bottom-color: rgba(255, 255, 255, .08); }
.site-header.scrolled::before { background: rgba(3, 11, 12, .86); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: block; flex: none; line-height: 0; border-radius: 6px; }
.brand img { height: 46px; width: auto; }
.nav { flex: 1; display: flex; align-items: center; justify-content: center; }
.nav > ul { display: flex; align-items: center; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px; font-size: .9375rem; font-weight: 500; color: #cdd8dc; border-radius: 8px; position: relative; }
.nav-link { transition: color .18s, background .18s; }
.nav-link:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .05); }
.nav-link[aria-current] { color: #fff; }
.nav-link[aria-current]::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 18px; height: 2px; margin-left: -9px; border-radius: 2px; background: var(--accent-soft); box-shadow: 0 0 10px rgba(122, 167, 255, .8); }
.chev .icon { width: 14px; height: 14px; }
.has-dropdown { position: relative; }
.dropdown { position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px; padding: 8px; background: rgba(8, 22, 26, .96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--dark-border); border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; }
.dropdown a { display: block; padding: 10px 12px; border-radius: 8px; color: #cdd8dc; font-size: .9rem; font-weight: 500; }
.dropdown a:hover { background: rgba(47, 111, 222, .14); color: #fff; text-decoration: none; }
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: none; }
.header-cta { flex: none; }
.menu-toggle { display: none; width: 46px; height: 46px; border: 1px solid #284752; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; place-items: center; }
.menu-toggle .icon-close { display: none; }
.menu-open .menu-toggle .icon-open { display: none; }
.menu-open .menu-toggle .icon-close { display: block; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--dark); color: var(--light); padding: 72px 0 88px; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(55% 70% at 78% 42%, rgba(47, 111, 222, .2), transparent 70%), radial-gradient(40% 50% at 0% 0%, rgba(47, 111, 222, .08), transparent 70%); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(70% 80% at 50% 0%, #000, transparent 75%); mask-image: radial-gradient(70% 80% at 50% 0%, #000, transparent 75%); pointer-events: none; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; font-size: .875rem; color: #9fb0b7; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points .icon { width: 16px; height: 16px; padding: 2px; border-radius: 50%; color: #7fabff; background: rgba(47, 111, 222, .16); stroke-width: 2.6; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 32px; align-items: center; }
.hero h1 { color: #fff; margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { color: #a9b8be; margin-bottom: 36px; }
.hero-visual { margin-right: -16px; }
.hero-visual img { width: 100%; height: auto; -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 90%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent, #000 12%, #000 90%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent); mask-composite: intersect; }

.page-hero { position: relative; overflow: hidden; background: var(--dark); color: var(--light); padding: 64px 0 80px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 90% at 85% 10%, rgba(47, 111, 222, .14), transparent 70%); pointer-events: none; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero.plain::before { background: radial-gradient(38% 60% at 82% 50%, rgba(47, 111, 222, .2), transparent 70%); }
.page-hero h1 { color: #fff; max-width: 18ch; font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem); }
.page-hero .lead { color: #aebcc2; max-width: 56ch; }
.page-hero.plain h1, .page-hero.plain .lead { max-width: none; }
.page-hero .hero-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.page-hero .hero-split h1 { max-width: 16ch; }
.page-hero .btn-row { margin-top: 28px; }
.breadcrumbs { margin-bottom: 28px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: .875rem; color: #8ea2a9; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: #4b6772; }
.breadcrumbs a { color: #b9c9ce; }
.breadcrumbs [aria-current] { color: #fff; }

/* ---------- cards ---------- */
.card { position: relative; background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 28px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); transition: transform .3s cubic-bezier(.2, .7, .2, 1), border-color .3s, box-shadow .3s; }
.dark .card { background: linear-gradient(180deg, #0a191e, #061115); border-color: #142c35; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--c-muted); font-size: .9375rem; margin-bottom: 0; }
.card .link-arrow { margin-top: 16px; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-link { color: inherit; }
.card-link:hover { text-decoration: none; }
.card:hover, .card:focus-within { transform: translateY(-4px); border-color: rgba(47, 111, 222, .45); box-shadow: 0 22px 44px -18px rgba(16, 24, 40, .22), 0 0 0 1px rgba(47, 111, 222, .08); }
.dark .card:hover, .dark .card:focus-within { border-color: rgba(122, 167, 255, .4); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 48px -20px rgba(47, 111, 222, .45); }
.card.static:hover { transform: none; border-color: var(--c-border); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.dark .card.static:hover { border-color: #142c35; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.service-card { padding: 26px 24px; }
.card-arrow { position: absolute; top: 22px; right: 20px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--c-muted); opacity: .6; transition: all .3s; }
.card-arrow .icon { width: 16px; height: 16px; }
.card:hover .card-arrow { opacity: 1; color: #fff; background: var(--accent); transform: rotate(0deg) translate(2px, -2px); }
.service-card h3 { font-size: 1.0625rem; }

/* template / project cards */
.tcard { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.shot-wrap { overflow: hidden; border-bottom: 1px solid var(--c-border); background: #071013; }
.shot { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; background: #071013; border-bottom: 1px solid var(--c-border); }
.shot-wrap .shot { border-bottom: 0; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.tcard:hover .shot-wrap .shot { transform: scale(1.04); }
.tcard-body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 24px; }
.tcard-body h3 { margin-bottom: 4px; }
.tcard-body .kind { font-size: .8125rem; font-weight: 600; color: var(--c-link); margin-bottom: 10px; }
.tcard-body p { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--c-chip); border: 1px solid var(--c-border); color: var(--c-muted); font-size: .75rem; font-weight: 600; line-height: 1.5; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(47, 111, 222, .14); color: var(--accent-soft); font-size: .75rem; font-weight: 600; }
.tcard-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.tcard-actions .btn { position: relative; z-index: 2; }
.tcard-actions .link-arrow { margin: 0; }
.note { font-size: .8125rem; color: var(--c-muted); }

/* ---------- process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: s; position: relative; }
.steps.six { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.step { position: relative; }
.step .num { font-size: .8125rem; font-weight: 700; letter-spacing: .1em; color: var(--accent-600); margin-bottom: 14px; }
.step .step-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid #c9daf8; color: var(--accent); background: linear-gradient(180deg, #fff, #eef4ff); box-shadow: 0 0 0 5px #fff, 0 6px 16px -6px rgba(47, 111, 222, .4); margin-bottom: 18px; position: relative; z-index: 1; }
.step h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.step p { font-size: .9rem; color: var(--c-muted); margin: 0; }
.steps.timeline .step:not(:last-child)::after { content: ""; position: absolute; top: 24px; left: 60px; right: -12px; border-top: 1.5px dashed #b9c8e2; }
.step-card { position: relative; overflow: hidden; height: 100%; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); transition: transform .3s, box-shadow .3s, border-color .3s; }
.step-card:hover { transform: translateY(-3px); border-color: rgba(47, 111, 222, .35); box-shadow: 0 22px 44px -20px rgba(16, 24, 40, .2); }
.step-card .num { position: absolute; top: 14px; right: 20px; margin: 0; font-size: 3.25rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: transparent; -webkit-text-stroke: 1px #d6e2f6; }
.step-card .step-icon { box-shadow: none; }
.step-card .step-icon { margin-bottom: 18px; }

/* ---------- why / lists ---------- */
.check-list { display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--c-text); }
.check-list .icon { width: 20px; height: 20px; margin-top: 3px; color: var(--accent); stroke-width: 2.2; }
.dark .check-list .icon { color: #4d88f0; }
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.why-grid .card { padding: 24px; }

/* ---------- CTA band ---------- */

/* ---------- filters ---------- */
.filters { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 36px; }
.filter-group { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-btn { min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--c-border); background: var(--c-card); color: var(--c-text); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; transition: all .18s; }
.filter-btn:hover { border-color: var(--accent); }
.filter-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.search { position: relative; display: block; flex: 0 1 320px; min-width: 220px; width: 100%; max-width: 360px; }
.search .icon { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--c-muted); pointer-events: none; }
.search input { width: 100%; min-height: 46px; padding: 0 16px 0 42px; border: 1px solid var(--c-border); border-radius: 10px; background: var(--c-card); color: var(--c-text); font: inherit; font-size: .95rem; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 111, 222, .2); }
.empty-note { display: none; padding: 40px 0; text-align: center; color: var(--c-muted); }
[data-filter-item][hidden] { display: none !important; }

/* ---------- team ---------- */
.member { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.avatar { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 4.2; background: radial-gradient(80% 80% at 50% 30%, #12303c, #07161b); color: #4d88f0; overflow: hidden; }
.avatar span { font-size: 3.5rem; font-weight: 700; letter-spacing: -.02em; opacity: .85; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar .flag { position: absolute; left: 12px; top: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(3, 11, 12, .75); border: 1px solid #284752; color: #b9c9ce; font-size: .6875rem; font-weight: 600; }
.member-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 24px; }
.member-body h3 { margin-bottom: 2px; font-size: 1.125rem; }
.member-role { font-size: .875rem; font-weight: 600; color: var(--c-link); margin-bottom: 10px; }
.member-links { display: flex; gap: 8px; margin-top: 16px; position: relative; z-index: 2; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--c-border); color: var(--c-muted); transition: all .18s; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn .icon { width: 18px; height: 18px; }
.member .link-arrow { margin-top: 14px; }
.profile-head { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; align-items: center; }
.profile-head .avatar { border-radius: var(--radius); aspect-ratio: 1; border: 1px solid var(--dark-border); }
.profile-role { color: var(--accent-soft); font-weight: 600; margin-bottom: 8px; }
.profile-meta { display: flex; align-items: center; gap: 8px; color: #9db0b7; margin-bottom: 16px; }
.profile-meta .icon { width: 18px; height: 18px; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.skill-tags li { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .875rem; font-weight: 500; }
.surface .skill-tags li { background: #fff; }
.profile .profile-role { color: var(--c-link); }
.profile .profile-meta { color: var(--c-muted); }
.profile .profile-layout { margin-top: 56px; }
.profile-sub { margin: 48px 0 20px; }
.founders { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 22px; color: var(--c-muted); font-size: .9375rem; }
.founders strong { color: var(--c-text); font-size: 1rem; }
.founders ul { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.founders li { display: inline-flex; align-items: center; gap: 6px; }
.founders .icon { width: 16px; height: 16px; color: var(--accent); stroke-width: 2.4; }
.page-hero .founders { color: #cdd8dc; }
.page-hero .founders strong { color: #fff; }
.page-hero .founders .icon { color: #7fabff; }
.timeline { margin-top: 16px; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 22px 24px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
.timeline span { color: var(--muted); font-size: .9rem; }

/* ---------- prose / blog ---------- */
.prose { max-width: 70ch; font-size: 1.0625rem; }
.prose h2 { margin-top: 2em; font-size: 1.625rem; }
.prose h3 { margin-top: 1.6em; }
.prose h4 { margin-top: 1.4em; font-size: 1.0625rem; }
.prose p, .prose li { color: #374151; }
.prose ul { list-style: disc; padding-left: 1.4em; margin-bottom: 1em; }
.prose ol { list-style: decimal; padding-left: 1.4em; margin-bottom: 1em; }
.prose li { margin-bottom: .4em; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 20px; color: #9db0b7; font-size: .9rem; }
.post .post-meta { margin: 0 0 20px; color: var(--c-muted); }
.prose.post > h2 { margin-top: 0; font-size: clamp(1.75rem, 1.25rem + 1.8vw, 2.5rem); }
.prose.post .lead { max-width: none; }
.cover { display: grid; place-items: center; aspect-ratio: 16 / 9; background: radial-gradient(70% 90% at 70% 20%, rgba(47, 111, 222, .35), transparent 70%), linear-gradient(160deg, #0b1d24, #04100f); border-bottom: 1px solid var(--c-border); color: #6ea0ff; }
.cover .icon { width: 56px; height: 56px; stroke-width: 1.3; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius-sm); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 14px 20px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .2s; margin-top: -4px; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq details > div { padding: 0 20px 18px; color: var(--c-muted); }
.faq details > div p { margin: 0; }
.narrow { max-width: 780px; margin-inline: auto; }

/* ---------- forms / contact ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: start; }
.form-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 40px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 24px 48px -28px rgba(16, 24, 40, .18); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .875rem; font-weight: 600; color: var(--text); }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--text); background: #fbfcfe; border: 1px solid #d6dce5; border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 111, 222, .2); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--err); }
.err { min-height: 0; font-size: .8125rem; color: var(--err); font-weight: 500; }
.err:empty { display: none; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; font-weight: 400 !important; color: #374151 !important; }
.check input { width: 20px; height: 20px; min-height: 0; margin-top: 2px; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { display: none; margin-top: 20px; padding: 14px 16px; border-radius: 10px; font-size: .95rem; }
.form-status.show { display: block; }
.form-status.ok { background: #ecfdf3; border: 1px solid #a7e3bd; color: #0f5f2d; }
.form-status.bad { background: #fef2f2; border: 1px solid #f5b5b5; color: #8f1d1d; }
.info-card { background: radial-gradient(90% 60% at 100% 0%, rgba(47, 111, 222, .22), transparent 60%), var(--dark); border-color: var(--dark-border); border-radius: 18px; color: var(--light); padding: 36px; --c-text: var(--light); --c-muted: #9db0b7; --c-link: var(--accent-soft); }
.info-card:hover { transform: none; box-shadow: none; border-color: var(--dark-border); }
.contact-info { display: grid; gap: 22px; margin: 24px 0; }
.info-item { display: flex; gap: 16px; align-items: flex-start; }
.info-item .icon-box { margin: 0; width: 44px; height: 44px; flex: none; }
.info-item strong { display: block; font-size: .8125rem; color: #9db0b7; font-weight: 600; margin-bottom: 2px; }
.info-item a, .info-item span { color: #fff; font-weight: 500; word-break: break-word; }
.social { display: flex; gap: 10px; }
.social a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; border: 1px solid #284752; color: #cdd8dc; }
.social a:hover { color: #fff; border-color: var(--accent); }
.social .icon { width: 18px; height: 18px; }
.legal-doc { margin-top: 40px; }
.legal-doc + .legal-doc { margin-top: 64px; padding-top: 56px; border-top: 1px solid var(--border); }
.legal-doc > h2 { margin-bottom: .6em; }
.legal-doc .prose > h3:first-child { margin-top: 0; }
.updated { color: var(--muted); font-size: .9rem; }
.notfound { text-align: center; padding: 40px 0; }
.notfound .big { font-size: clamp(5rem, 18vw, 9rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--accent); }
.notfound .btn-row { justify-content: center; }
.callout { padding: 18px 20px; border: 1px solid var(--c-border); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--c-card); color: var(--c-muted); font-size: .9375rem; }

/* ---------- footer ---------- */
.site-footer { position: relative; background: var(--dark); color: #a9b8be; padding: 80px 0 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1.15fr 1fr 1fr 1.35fr; gap: 40px; padding-bottom: 56px; }
.site-footer img { height: 68px; width: auto; margin-bottom: 18px; }
.site-footer h4 { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 20px; }
.site-footer li { margin-bottom: 10px; font-size: .9375rem; }
.site-footer a { color: #a9b8be; transition: color .18s; }
.site-footer a:hover { color: #fff; }
.tagline { color: #d6e0e3; font-weight: 500; margin-bottom: 20px; }
.contact-lines li { display: flex; gap: 10px; align-items: flex-start; }
.contact-lines .icon { width: 18px; height: 18px; margin-top: 3px; color: #4d88f0; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 22px 0 26px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .875rem; color: #8ea2a9; }
.footer-bottom a { color: #b3c2c8; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.to-top .icon { width: 16px; height: 16px; }
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #16a34a; color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.wa-float:hover { background: #15803d; color: #fff; }
.cookie { position: fixed; left: 20px; bottom: 20px; z-index: 60; display: none; width: min(400px, calc(100% - 40px)); padding: 18px 20px; gap: 14px; flex-direction: column; align-items: stretch; background: rgba(8, 22, 26, .96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--dark-border); border-radius: 12px; color: #cdd8dc; font-size: .875rem; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.cookie.show { display: flex; }
.cookie p { margin: 0; line-height: 1.55; }
.cookie .btn-row { gap: 10px; }
.cookie .btn { flex: 1; }
.cookie a { color: var(--accent-soft); }

/* ---------- page entrance ---------- */
@keyframes kai-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes kai-in-visual { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
.hero-copy > *, .page-hero .container > *, .page-hero .hero-split > div > * { animation: kai-in .7s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(2), .page-hero .container > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3), .page-hero .container > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4), .page-hero .container > :nth-child(4) { animation-delay: .24s; }
.hero-copy > :nth-child(5), .page-hero .container > :nth-child(5) { animation-delay: .32s; }
.hero-copy > :nth-child(6), .page-hero .container > :nth-child(6) { animation-delay: .4s; }
.page-hero .hero-split > div:last-child { animation: kai-in-visual .9s cubic-bezier(.2, .7, .2, 1) .2s both; }
.page-hero .hero-split > div > * { animation: none; }
.page-hero .hero-split > div:first-child > * { animation: kai-in .7s cubic-bezier(.2, .7, .2, 1) both; }
.page-hero .hero-split > div:first-child > :nth-child(2) { animation-delay: .1s; }
.page-hero .hero-split > div:first-child > :nth-child(3) { animation-delay: .18s; }
.page-hero .hero-split > div:first-child > :nth-child(4) { animation-delay: .26s; }
.page-hero .hero-split > div:first-child > :nth-child(5) { animation-delay: .34s; }
.hero-visual { animation: kai-in-visual 1s cubic-bezier(.2, .7, .2, 1) .25s both; }
.pillars { animation: kai-in .8s ease .45s both; }
/* on the home page, hold the entrance until the loading screen starts to fade */
html.loading:not(.loaded) .hero-copy > *, html.loading:not(.loaded) .hero-visual, html.loading:not(.loaded) .pillars { animation-play-state: paused; }
/* page-to-page: a short cross-fade between pages where supported (Chrome, Edge, Safari 18.2+);
   other browsers simply swap pages. The dark html background means any gap is never white. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }

/* ---------- motion ---------- */
html:not(.no-js) .reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
html:not(.no-js) .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @view-transition { navigation: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html:not(.no-js) .reveal { opacity: 1; transform: none; }
  .card:hover { transform: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .nav-link { padding: 0 10px; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .sticky { position: static; }
}
@media (max-width: 1024px) {
  :root { --header-h: 64px; }
  .menu-toggle { display: grid; margin-left: auto; }
  .header-cta { margin-left: auto; }
  .header-cta + .menu-toggle { margin-left: 0; }
  .brand img { height: 42px; }
  .nav { position: fixed; inset: var(--header-h) 0 0 0; z-index: 49; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 16px var(--gutter) 40px; background: var(--dark); overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .28s ease, visibility .28s; }
  .menu-open .nav { transform: none; visibility: visible; }
  .menu-open { overflow: hidden; }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { min-height: 56px; padding: 0 4px; font-size: 1.0625rem; border-bottom: 1px solid rgba(255, 255, 255, .06); border-radius: 0; }
  .nav-link[aria-current]::after { display: none; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; border: 0; background: transparent; box-shadow: none; padding: 0 0 8px 12px; }
  .dropdown a { padding: 12px 8px; }
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { margin: 0 auto; max-width: 620px; }
  .page-hero .hero-split, .profile-head, .contact-layout, .profile-layout, .svc-intro, .svc-details { grid-template-columns: 1fr; }
  .svc-visual .scene { margin: 0 auto; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .steps.timeline .step::after { display: none; }
  .steps.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-head .avatar { max-width: 280px; }
}
@media (max-width: 1024px) and (min-width: 641px) {
  .page-hero .hero-visual-col { max-width: 560px; }
}

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .section { padding: 60px 0; }
  .section.tight { padding: 44px 0; }
  .section-head { margin-bottom: 32px; }
  .head-row { margin-bottom: 32px; align-items: flex-start; }
  .grid-2, .grid-3, .grid-4, .why-grid, .steps, .steps.six, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .grid { gap: 16px; }
  .header-inner { gap: 10px; }
  .brand img { height: 38px; }
  .header-cta { min-height: 40px; padding: 0 14px; font-size: .875rem; }
  .menu-toggle { width: 42px; height: 42px; }
  .hero { padding: 36px 0 48px; }
  .hero .lead { margin-bottom: 28px; }
  .hero .btn-row .btn { flex: 1 1 100%; }
  .hero-visual { margin: 0 -8px; }
  .page-hero { padding: 40px 0 48px; }
  .trust { padding: 32px 0; }
  .trust-row { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; gap: 28px; padding: 4px var(--gutter) 10px; margin-inline: calc(-1 * var(--gutter)); scrollbar-width: none; }
  .trust-row::-webkit-scrollbar { display: none; }
  .trust-row a { white-space: nowrap; }
  .steps.timeline { row-gap: 0; }
  .steps.timeline .step { display: grid; grid-template-columns: 48px 1fr; gap: 0 16px; padding-bottom: 28px; }
  .steps.timeline .step .step-icon { grid-row: span 2; margin: 0; }
  .steps.timeline .step:not(:last-child)::after { display: block; top: 52px; bottom: 4px; left: 23px; right: auto; border-top: 0; border-left: 1.5px dashed #b9c8e2; }
  .step .num { margin-bottom: 2px; }
  .form-card { padding: 22px 18px; }
  .form-card .btn { width: 100%; }
  .info-card { padding: 24px 20px; }
  .filters { margin-bottom: 24px; }
  .filter-group { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; scrollbar-width: none; width: calc(100% + 2 * var(--gutter)); }
  .filter-group::-webkit-scrollbar { display: none; }
  .filter-btn { white-space: nowrap; flex: none; }
  .search { max-width: none; flex-basis: 100%; }
  .footer-grid { gap: 32px; padding-bottom: 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .card { padding: 22px; }
  .tcard { padding: 0; }
  .wa-float { right: 12px; bottom: 12px; width: 52px; height: 52px; }
  .cookie { left: 10px; bottom: 10px; width: calc(100% - 20px); }
}

/* ---------- misc additions ---------- */
.hero-shot { border: 1px solid var(--dark-border); border-radius: 12px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
.section:not(.dark) .hero-shot { box-shadow: 0 18px 40px rgba(17, 24, 39, .14); }
@media (max-width: 640px) { .hero-shot { box-shadow: none; } }
[hidden] { display: none !important; }
.page-hero + .section { padding-top: 72px; }
@media (max-width: 640px) { .page-hero + .section { padding-top: 44px; } }

/* home: services in one row */
.section-head.wide { max-width: 860px; }
.section-head.wide h2 { max-width: none; text-wrap: balance; }
.services-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.services-row .service-card { padding: 22px 18px; }
.services-row .service-card h3 { font-size: 1rem; hyphens: auto; overflow-wrap: anywhere; }
.services-row .service-card p { font-size: .875rem; }
.center-cta { display: flex; justify-content: center; margin-top: 48px; }
@media (min-width: 1101px) { .section-head.wide h2 { white-space: nowrap; font-size: clamp(2rem, 1.2rem + 1.6vw, 2.5rem); } }
@media (max-width: 1100px) { .services-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px) { .services-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .services-row { grid-template-columns: 1fr; } .center-cta { margin-top: 32px; } .center-cta .btn { width: 100%; } }

/* home: templates in one row */
.templates-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.templates-row .tcard-body { padding: 20px 18px 22px; }
.templates-row .tcard-body h3 { font-size: 1.125rem; }
.templates-row .tcard-actions { gap: 8px; }
.templates-row .tcard-actions .btn { padding: 0 14px; }
@media (max-width: 1100px) { .templates-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .templates-row { grid-template-columns: 1fr; gap: 16px; } }
.templates-row .chips { gap: 6px; }
.templates-row .chip { padding: 3px 8px; font-size: .6875rem; }
/* fewer than four templates: wider cards, centred */
.templates-row.few { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 880px; margin-inline: auto; }
@media (max-width: 640px) { .templates-row.few { grid-template-columns: 1fr; } }
.templates-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* real screenshots in cards: fill the 8:5 frame from the top-left (the sidebar and header) */
.shot.real { object-fit: cover; object-position: left top; }
.shot.real.centred { object-position: center; }  /* phone covers: keep all three phones in frame */
.check-list.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
@media (max-width: 640px) { .check-list.cols-2 { grid-template-columns: 1fr; } }

/* home: Ideas / Code / Growth band */
.pillars { background: var(--surface); border-bottom: 1px solid var(--border); padding: 40px 0; }
.pillars-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; position: relative; }
.pillar { display: flex; align-items: flex-start; gap: 16px; position: relative; }
.pillar:not(:last-child)::after { content: ""; position: absolute; right: -12px; top: 8px; bottom: 8px; border-right: 1px solid #d5dce6; }
.pillar-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 12px; background: #fff; border: 1px solid #d5dce6; color: var(--accent); }
.pillar h2 { font-size: 1.125rem; margin: 0 0 4px; letter-spacing: -.01em; }
.pillar p { margin: 0; font-size: .9375rem; color: var(--muted); }
@media (max-width: 900px) { .pillars-row { grid-template-columns: 1fr; gap: 20px; } .pillar:not(:last-child)::after { display: none; } .pillars { padding: 32px 0; } }

/* ---------- preloader (home page) ---------- */
.preloader { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: var(--dark); transition: opacity .45s ease, visibility .45s ease; }
html.loading .preloader { display: flex; }
html.loading { overflow: hidden; }
.preloader.done { opacity: 0; visibility: hidden; }
.preloader-inner { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 24px; }
.preloader-inner img { width: clamp(150px, 42vw, 200px); height: auto; margin-bottom: 18px; }
.preloader-inner p { margin: 0; color: #d6e0e3; font-size: clamp(1.125rem, 4.6vw, 1.5rem); font-weight: 500; letter-spacing: -.01em; }
.spinner { align-self: center; width: 40px; height: 40px; margin-top: 36px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .12); border-top-color: var(--accent); animation: kai-spin .85s linear infinite; }
@keyframes kai-spin { to { transform: rotate(360deg); } }

/* footer brand block: logo centred over the tagline */
.footer-brand { display: flex; flex-direction: column; align-items: center; text-align: center; width: fit-content; max-width: 100%; }
.footer-brand a { display: block; line-height: 0; }
.footer-brand img { margin-bottom: 14px; }
.footer-brand .tagline { margin-bottom: 20px; }
@media (max-width: 1100px) { .footer-brand { align-items: flex-start; text-align: left; } }

/* ---------- mobile refinements (phones) ---------- */
@media (hover: none) {
  .card:hover, .card:focus-within, .step-card:hover, .btn-primary:hover { transform: none; }
  .tcard:hover .shot-wrap .shot { transform: none; }
}
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  h2 { font-size: 1.625rem; }
  .lead { font-size: 1rem; line-height: 1.65; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 28px; }
  .eyebrow { margin-bottom: 14px; }

  /* header */
  .brand img { height: 34px; }
  .header-cta { min-height: 40px; padding: 0 14px; font-size: .8125rem; }
  .menu-toggle { width: 40px; height: 40px; }

  /* home hero: shorter, buttons side by side, product image sooner */
  .hero { padding: 28px 0 32px; }
  .hero-grid { gap: 24px; }
  .hero h1 { font-size: clamp(1.875rem, 1rem + 4.6vw, 2.25rem); margin-bottom: 16px; }
  .hero .lead { margin-bottom: 24px; }
  .hero .eyebrow, .page-hero .eyebrow { font-size: .625rem; padding: 6px 12px 6px 10px; }
  .hero .btn-row { flex-wrap: nowrap; gap: 10px; }
  .hero .btn-row .btn { flex: 1 1 0; min-width: 0; padding: 0 10px; font-size: .9rem; }
  .hero-points { margin-top: 18px; gap: 8px 16px; font-size: .8125rem; }
  .hero-visual { margin: 0 -12px; }

  /* inner page heroes */
  .page-hero { padding: 24px 0 40px; }
  .page-hero h1 { font-size: clamp(1.75rem, 1rem + 4.2vw, 2.125rem); }
  .page-hero .hero-split { gap: 28px; }
  .breadcrumbs { margin-bottom: 18px; }
  .breadcrumbs ol { font-size: .8125rem; }

  /* Ideas / Code / Growth band */
  .pillars { padding: 24px 0; }
  .pillars-row { gap: 16px; }
  .pillar { gap: 14px; }
  .pillar-icon { width: 40px; height: 40px; border-radius: 10px; }
  .pillar h2 { font-size: 1rem; margin-bottom: 2px; }
  .pillar p { font-size: .875rem; }

  /* cards that open with an icon chip become compact rows: icon beside the text */
  .services-row, .why-grid { gap: 10px; }
  .card:has(> .icon-chip:first-child) { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 16px; }
  .card:has(> .icon-chip:first-child) > .icon-chip { grid-row: span 2; width: 40px; height: 40px; margin: 0; border-radius: 10px; }
  .card:has(> .icon-chip:first-child) > .icon-chip .icon { width: 20px; height: 20px; }
  .card:has(> .icon-chip:first-child) h3 { font-size: .9375rem; margin: 0 0 4px; overflow-wrap: normal; }
  .card:has(> .icon-chip:first-child) p { font-size: .8125rem; line-height: 1.55; }
  .card:has(> .icon-chip:first-child) .card-arrow { top: 50%; right: 12px; margin-top: -15px; }
  .service-card { padding-right: 44px !important; }
  .grid:has(> .card > .icon-chip:first-child) { gap: 10px; }

  /* process step cards: icon beside the text */
  .step-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 16px 16px 16px; }
  .step-card .step-icon { grid-row: span 2; width: 44px; height: 44px; margin: 0; }
  .step-card h3 { margin: 2px 0 4px; font-size: .9375rem; }
  .step-card p { font-size: .8125rem; }
  .step-card .num { top: 10px; right: 14px; font-size: 2rem; }
  .steps.six, .steps:has(.step-card) { gap: 10px; }

  /* team cards: two per row */
  .grid:has(> .member) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card.member { padding: 0; }
  .member-body { padding: 14px 14px 16px; }
  .member .link-arrow { white-space: nowrap; }
  .member-body h3 { font-size: .9375rem; }
  .member-role { font-size: .75rem; margin-bottom: 6px; }
  .member-body p { font-size: .8125rem; line-height: 1.5; }
  .member .link-arrow { font-size: .8125rem; margin-top: 10px; }
  .member-links { margin-top: 10px; }
  .avatar span { font-size: 2.25rem; }
  .avatar .flag { left: 8px; top: 8px; font-size: .625rem; padding: 2px 8px; }

  /* template and project cards become swipeable carousels */
  .templates-row, .work-row, .gallery-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); overscroll-behavior-x: contain; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 16px; scrollbar-width: none; }
  .templates-row::-webkit-scrollbar, .work-row::-webkit-scrollbar, .gallery-row::-webkit-scrollbar { display: none; }
  .templates-row > .tcard, .work-row > .tcard, .gallery-row > * { flex: 0 0 84%; scroll-snap-align: start; }
  .center-cta { margin-top: 20px; }
  .head-row { margin-bottom: 24px; gap: 16px; }

  /* process */
  .steps.timeline .step { padding-bottom: 22px; }

  /* CTA */

  /* footer: two columns of links */
  .site-footer { padding-top: 48px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; padding-bottom: 32px; }
  .footer-grid > :first-child, .footer-grid > :last-child { grid-column: 1 / -1; }
  .site-footer img { height: 52px; }
  .site-footer h4 { margin-bottom: 14px; }
  .site-footer li { font-size: .875rem; margin-bottom: 9px; }
  .footer-bottom { padding: 18px 0 22px; font-size: .8125rem; }

  /* cookie notice */
  .cookie { padding: 14px; gap: 10px; font-size: .8125rem; }
  .cookie .btn { min-height: 40px; }
}
@media (max-width: 360px) {
  .hero .btn-row { flex-wrap: wrap; }
  .hero .btn-row .btn { flex: 1 1 100%; }
}

/* ---------- page-hero illustrations ---------- */
.page-hero .scene { display: block; width: 100%; height: auto; max-width: 600px; margin-left: auto; }
.page-hero .hero-visual { margin-right: -8px; }
.page-hero .scene.photo { width: auto; max-width: 100%; max-height: 460px; border-radius: 20px; border: 1px solid rgba(122, 167, 255, .2); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .7), 0 0 60px -10px rgba(47, 111, 222, .28); }
@media (max-width: 1024px) { .page-hero .scene { margin: 0 auto; max-width: 520px; } }
@media (max-width: 640px) { .page-hero .scene { max-width: 340px; } .page-hero .scene.photo { max-height: 320px; border-radius: 16px; } .page-hero .hero-split { gap: 20px; } }

/* ---------- case study ---------- */
.browser-frame { overflow: hidden; border-radius: 14px; border: 1px solid rgba(122, 167, 255, .25); background: #0a161b; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .7), 0 0 70px -12px rgba(47, 111, 222, .35); }
.browser-bar { display: flex; gap: 6px; padding: 10px 12px; background: #0b1b21; border-bottom: 1px solid var(--dark-border); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a4651; }
.browser-frame img { display: block; width: 100%; height: auto; }
.facts-band { background: var(--dark); border-bottom: 1px solid rgba(255, 255, 255, .06); padding: 0 0 48px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border-radius: 16px; border: 1px solid var(--dark-border); background: var(--dark-border); }
.fact { padding: 18px 20px; background: #061115; }
.facts.lead-wide .fact:first-child { grid-column: span 2; }
.fact dt { margin-bottom: 4px; font-size: .6875rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7fabff; }
.fact dd { margin: 0; font-size: .875rem; line-height: 1.5; color: #d6e0e3; }
.focus-card { padding: 32px; }
.focus-card h3 { margin-bottom: 18px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
.gallery-item { margin: 0; }
.gallery-open { display: block; width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: #fff; cursor: zoom-in; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 18px 36px -24px rgba(16, 24, 40, .25); transition: transform .3s, box-shadow .3s, border-color .3s; }
.gallery-open img { display: block; width: 100%; height: auto; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.gallery-open:hover { transform: translateY(-3px); border-color: rgba(47, 111, 222, .45); box-shadow: 0 26px 48px -24px rgba(16, 24, 40, .35); }
.gallery-open:hover img { transform: scale(1.02); }
.gallery-item figcaption { margin-top: 14px; font-size: .9rem; line-height: 1.55; color: var(--muted); }
.gallery-item figcaption strong { display: block; margin-bottom: 2px; font-size: 1rem; color: var(--text); }
.features .feature { padding: 28px; }
.feature-list { display: grid; gap: 8px; margin-top: 4px; }
.feature-list li { position: relative; padding-left: 16px; font-size: .9rem; line-height: 1.55; color: var(--c-muted); }
.feature-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .7; }
.feature-list strong { color: var(--c-text); font-weight: 600; }
.roles { display: grid; gap: 14px; }
.role { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: center; padding: 20px 22px; }
.role-tag { justify-self: start; padding: 6px 12px; border-radius: 999px; background: rgba(47, 111, 222, .16); border: 1px solid rgba(122, 167, 255, .3); color: #9dbdff; font-size: .8125rem; font-weight: 700; }
.role p { margin: 0; }
.stack { margin-top: 24px; padding: 28px 32px; }
.stack dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 8px 0 0; }
.stack-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: .9375rem; }
.stack-row dt { font-weight: 600; color: var(--text); }
.stack-row dd { margin: 0; color: var(--muted); }
.results { display: grid; gap: 12px; }
.result { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; background: #fff; border: 1px solid var(--border); border-radius: 14px; font-weight: 500; }
.result .icon { width: 22px; height: 22px; padding: 3px; margin-top: 1px; border-radius: 50%; color: #fff; background: var(--accent); stroke-width: 2.6; }
.lightbox { width: min(1200px, 94vw); max-width: none; max-height: 94vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(3, 11, 12, .88); backdrop-filter: blur(6px); }
.lightbox figure { margin: 0; }
.lightbox img { display: block; width: 100%; height: auto; max-height: 82vh; object-fit: contain; border-radius: 12px; background: #fff; }
.lightbox figcaption { margin-top: 12px; text-align: center; color: #d6e0e3; font-size: .9375rem; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: rgba(8, 22, 26, .85); color: #fff; cursor: pointer; }
.lb-btn:hover { border-color: var(--accent-soft); }
.lb-close { top: -54px; right: 0; }
.lb-prev, .lb-next { top: calc(41vh - 22px); }
.lb-prev { left: -58px; }
.lb-prev .icon { transform: rotate(180deg); }
.lb-next { right: -58px; }
@media (max-width: 1024px) { .stack dl { grid-template-columns: 1fr; } .lb-prev { left: 8px; } .lb-next { right: 8px; } }
@media (max-width: 640px) {
  .facts-band { padding-bottom: 32px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { padding: 14px; }
  .facts.lead-wide .fact:first-child { grid-column: 1 / -1; }
  .facts:not(.lead-wide) .fact:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .focus-card { padding: 22px; }
  .gallery { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px; scrollbar-width: none; }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery-item { flex: 0 0 86%; scroll-snap-align: start; }
  .gallery-item figcaption { font-size: .8125rem; }
  .features .feature { padding: 20px; display: block !important; }
  .features .feature > .icon-chip { margin-bottom: 14px !important; }
  .role { grid-template-columns: 1fr; gap: 10px; padding: 16px; }
  .stack { padding: 20px; }
  .stack-row { grid-template-columns: 1fr; gap: 2px; font-size: .875rem; }
  .result { padding: 14px 16px; font-size: .9375rem; }
}

.story { padding: 32px; }
.story .eyebrow { margin-bottom: 12px; }
.story p { margin: 0; font-size: 1rem; line-height: 1.7; color: var(--text); }
.codes { padding: 8px 24px; overflow-x: auto; }
.codes table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.codes th, .codes td { padding: 14px 12px 14px 0; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.codes thead th { font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.codes tbody tr:last-child > * { border-bottom: 0; }
.codes tbody th { font-weight: 600; }
.codes code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8125rem; padding: 3px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); color: var(--accent-600); }
.security { margin-top: 64px; padding-top: 56px; border-top: 1px solid var(--dark-border); }
@media (max-width: 640px) { .story { padding: 22px; } .codes { padding: 4px 16px; } .security { margin-top: 40px; padding-top: 36px; } }

/* phone project screenshots */
.phone-cover { overflow: hidden; border-radius: 18px; border: 1px solid rgba(122, 167, 255, .22); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .7), 0 0 70px -12px rgba(47, 111, 222, .35); }
.phone-cover img { display: block; width: 100%; height: auto; }
.gallery.phones { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px 20px; }
.gallery.phones .gallery-open { border-radius: 22px; padding: 6px; background: #0a161b; border-color: #1f3a45; }
.gallery.phones .gallery-open img { border-radius: 16px; }
.gallery.phones .gallery-item figcaption { font-size: .8125rem; }
.lightbox.tall { width: min(420px, 92vw); }
.gallery.phones.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 28px; max-width: 980px; margin-inline: auto; }
@media (max-width: 1100px) { .gallery.phones, .gallery.phones.cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .gallery.phones .gallery-item { flex: 0 0 62%; } }
.gallery.phones .shot { aspect-ratio: 750 / 1324; height: auto; }

/* About page: jump links under the hero, FAQ under the process steps */
.jump-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.jump-links a { padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .03); color: #cdd8dc; font-size: .875rem; font-weight: 600; transition: border-color .18s, color .18s, background .18s; }
.jump-links a:hover { text-decoration: none; color: #fff; border-color: rgba(122, 167, 255, .6); background: rgba(122, 167, 255, .08); }
.process-faq { margin-top: 72px; }
.process-faq .section-head { margin-bottom: 20px; }
@media (max-width: 640px) { .jump-links { margin-top: 20px; } .jump-links a { padding: 7px 13px; font-size: .8125rem; } .process-faq { margin-top: 48px; } }

/* ---------- services page: one section per service ---------- */
.svc-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.svc-intro .lead + .lead { margin-top: -.4em; font-size: 1rem; }
.svc-intro .btn-row { margin-top: 28px; }
.svc-visual .scene { display: block; width: 100%; height: auto; max-width: 560px; margin-left: auto; border-radius: 20px; }
.svc-visual .scene:not(.photo) { background: var(--dark); }
.svc-visual .scene.photo { width: auto; max-width: 100%; max-height: 420px; border: 1px solid rgba(122, 167, 255, .2); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .5); }
.svc-templates { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; font-size: .9rem; color: var(--c-muted); }
.svc-templates span { margin-right: 4px; }
.svc-templates .chip { font-size: .8125rem; padding: 5px 14px; color: var(--c-link); }
.svc-sub { margin: 72px 0 20px; }
.svc-details { gap: 56px; margin-top: 64px; align-items: start; }
.svc-details h3, .svc-faq h3 { margin-bottom: 20px; }
.svc-steps { display: grid; gap: 18px; }
.svc-steps li { display: flex; gap: 16px; align-items: flex-start; }
.svc-steps .num { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--c-border); background: var(--c-card); color: var(--c-link); font-size: .8125rem; font-weight: 700; }
.svc-steps strong { display: block; margin-bottom: 2px; }
.svc-steps p { margin: 0; color: var(--c-muted); }
.svc-faq { max-width: 780px; margin-top: 64px; }
@media (max-width: 640px) { .svc-sub { margin-top: 56px; } .svc-details, .svc-faq { margin-top: 48px; } .svc-visual .scene.photo { max-height: 300px; border-radius: 16px; } }

/* ---------- centred layout: page heroes, section heads and articles share one centre line; long-form copy is justified ---------- */
.page-hero.plain .container { text-align: center; }
.page-hero.plain::before { background: radial-gradient(45% 70% at 50% 40%, rgba(47, 111, 222, .2), transparent 70%); }
.page-hero.plain .breadcrumbs ol, .page-hero.plain .btn-row, .page-hero.plain .jump-links,
.section-head .founders, .section-head .founders ul, .page-hero.plain .founders, .page-hero.plain .founders ul { justify-content: center; }
.section-head { margin-inline: auto; text-align: center; }
.section-head .lead { margin-inline: auto; }
.section-head .filters { text-align: left; }
.split .section-head { margin-inline: 0; text-align: left; }
.prose, .updated, .legal-doc { max-width: 70ch; margin-inline: auto; }
.legal-doc .prose { max-width: none; }
.prose.post > .eyebrow, .prose.post > h2, .legal-doc > h2, .updated { display: block; text-align: center; }
.prose.post .eyebrow::before { display: none; }
.prose.post .post-meta { justify-content: center; }
@media (min-width: 641px) { .prose p, .prose li { text-align: justify; hyphens: auto; } }
