/* Montserrat (variable, Latin subset), self-hosted. Licence: assets/fonts/OFL.txt */
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/Montserrat-Variable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b0e11;
  --bg-soft: #12161a;
  --ink: #f2f2f0;
  --ink-2: #b4b8bc;
  --ink-3: #7c8186;
  --line: #23282d;
  --card: #12161a;
  --blue: #4f8df5;
  --blue-soft: #a9d0ff;
  --blue-glow: rgba(79,141,245,.16);
  --max: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: var(--blue); color: #fff; }
/* Keyboard focus: blue ring, shown only when moving with the keyboard (not on mouse clicks). */
:focus-visible { outline: 2px solid var(--blue-soft); outline-offset: 3px; }
.btn:focus-visible { outline-offset: 4px; }
img { display: block; max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Wordmark (recreates the logo in live text) */
.mark { display: inline-flex; align-items: center; gap: .32em; text-decoration: none; line-height: 1; }
.mark .sh { font-weight: 900; font-size: 1.9em; letter-spacing: -.02em; }
.mark .cw { font-weight: 300; font-size: .74em; letter-spacing: .04em; line-height: 1.05; }

/* Nav */
header.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
header.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav .mark { font-size: 18px; }
.nav ul { display: flex; gap: 32px; list-style: none; }
.nav ul a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: color .15s; }
.nav ul a:hover { color: var(--blue-soft); }
/* Current section (set by site.js) */
.nav ul a { position: relative; }
.nav ul a.active { color: var(--ink); }
.nav ul a::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 8px var(--blue); transform: translateX(-50%) scale(0);
  transition: transform .25s ease;
}
.nav ul a.active::after { transform: translateX(-50%) scale(1); }

/* Headline: words rise in one after another on load */
.headline .w { display: inline-block; }
.js .headline .w {
  opacity: 0; transform: translateY(.35em); filter: blur(8px);
  animation: word-in .9s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay: calc(var(--i) * 120ms + 120ms);
}
@keyframes word-in { to { opacity: 1; transform: none; filter: blur(0); } }

/* Phone menu (button only shows on small screens when JavaScript runs) */
.menu-btn { display: none; }
.menu-btn .bars { position: relative; width: 18px; height: 10px; }
.menu-btn .bars span {
  position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .25s ease, top .25s ease, bottom .25s ease;
}
.menu-btn .bars span:first-child { top: 0; }
.menu-btn .bars span:last-child { bottom: 0; }
.nav.open .menu-btn .bars span:first-child { top: 4px; transform: rotate(45deg); }
.nav.open .menu-btn .bars span:last-child { bottom: 4px; transform: rotate(-45deg); }

/* Hero */
.hero {
  position: relative; overflow: hidden; padding: 120px 0 112px;
  /* Glow centre sits near the top-right corner at every width; size scales down on small screens */
  --glow-x: calc(100% - 70px); --glow-y: 70px; --glow-size: min(860px, 160vw);
}
.hero::before {
  content: ""; position: absolute; pointer-events: none;
  width: var(--glow-size); height: var(--glow-size); border-radius: 50%;
  left: var(--glow-x); top: var(--glow-y); transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(55,130,255,.30) 0, rgba(50,125,255,.24) 22%, rgba(55,80,235,.11) 43%, rgba(70,50,200,.04) 58%, rgba(40,40,160,0) 70%);
  animation: drift 26s ease-in-out infinite;
}
/* Slow wander around its spot, like shifting light */
@keyframes drift {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  30%      { transform: translate(-56%, -46%) scale(1.06); }
  65%      { transform: translate(-47%, -44%) scale(.96); }
}
.hero::after, .contact::after {
  content: ""; position: absolute; pointer-events: none; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: .05; mix-blend-mode: overlay;
}
.hero::after {
  -webkit-mask-image: radial-gradient(circle calc(var(--glow-size) * .6) at var(--glow-x) var(--glow-y), #000, transparent 75%);
          mask-image: radial-gradient(circle calc(var(--glow-size) * .6) at var(--glow-x) var(--glow-y), #000, transparent 75%);
}
.hero .wrap { position: relative; }
.eyebrow {
  font-size: 12px; font-weight: 500; letter-spacing: .34em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(44px, 8vw, 96px);
  font-weight: 800; line-height: 1.02; letter-spacing: -.035em;
  max-width: 12ch;
}
.hero h1 .accent, .contact h2 span {
  font-weight: 300;
  background: linear-gradient(100deg, var(--blue-soft), var(--blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* Extra room so the blue fill reaches letter tails (y, g) */
  padding-bottom: .12em; margin-bottom: -.12em;
}
.eyebrow::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); margin-right: 14px; vertical-align: middle; box-shadow: 0 0 12px var(--blue); }
.hero p.lede {
  margin-top: 32px; max-width: 560px;
  font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); line-height: 1.6;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--ink); transition: transform .15s, background .15s, color .15s;
}
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.ghost { color: var(--ink); }
.btn:hover { transform: translateY(-1px); }
.btn.primary:hover { background: var(--blue-soft); border-color: var(--blue-soft); }
.btn.ghost:hover { border-color: var(--blue); color: var(--blue-soft); }

.pillars {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
  margin-top: 96px; padding-top: 28px; border-top: 1px solid var(--line);
  font-size: 12px; letter-spacing: .34em; text-transform: uppercase; color: var(--ink-3);
}
.pillars i { font-style: normal; color: var(--blue); }

/* Sections */
section { padding: 104px 0; }
section.soft { background: var(--bg-soft); }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 40px; margin-bottom: 56px; }
.sec-head h2 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.sec-head p { max-width: 420px; color: var(--ink-2); }

/* Product cards */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.product {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  padding: 40px; min-height: 460px;
  transition: transform .25s, box-shadow .25s;
}
.product:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -24px rgba(0,0,0,.7); }
.product::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent);
}
/* Soft light that follows the cursor (position set by site.js) */
.product::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--spot), transparent 60%);
  opacity: 0; transition: opacity .3s ease;
}
.product:hover::after { opacity: 1; }
.product > *:not(.glow) { position: relative; z-index: 1; }
.fusion  { --spot: rgba(140, 70, 235, .16); }
.snippet { --spot: rgba(45, 135, 255, .16); }
.product .glow {
  position: absolute; right: -120px; top: -120px; width: 340px; height: 340px; border-radius: 50%;
  background: var(--accent); opacity: .09; filter: blur(40px); pointer-events: none;
}
.product .logo { height: 72px; display: flex; align-items: center; margin-bottom: 32px; }
.product .logo img { height: 100%; width: auto; }
.product .logo img.app { height: 96px; margin-left: -10px; }
.product .tag { font-size: 11px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); }
.product h3 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 14px; }
.product p { color: var(--ink-2); }
.product ul { list-style: none; margin: 22px 0 0; display: grid; gap: 8px; font-size: 15px; color: var(--ink-2); }
.product ul li { display: flex; gap: 10px; }
.product ul li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: .65em; }
.product .foot { margin-top: auto; padding-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.product .link { font-weight: 600; font-size: 15px; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.product .link span { transition: transform .2s; }
.product:hover .link span { transform: translateX(4px); }
.product .note { font-size: 13px; color: var(--ink-3); }
.stats { display: flex; gap: 28px; }
.stats b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); line-height: 1.1; }
.stats small { font-size: 12px; color: var(--ink-3); }

.fusion { --accent: linear-gradient(90deg, #a310af, #7813d1 40%, #118cd1); }
.fusion .glow { background: #7813d1; }
.snippet { --accent: linear-gradient(90deg, #6a5cff, #1a7cff 55%, #3fb4ff); }
.snippet .glow { background: #1a7cff; }

/* Disciplines */
.disciplines { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.discipline { padding: 40px 32px 8px 0; }
.discipline + .discipline { padding-left: 32px; border-left: 1px solid var(--line); }
.discipline .num { font-size: 13px; font-weight: 600; color: var(--blue); letter-spacing: .1em; }
.discipline h3 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 18px 0 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.discipline p { color: var(--ink-2); font-size: 16px; }
.pill { font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-3); }

/* Approach */
/* Oversized, faint SH from the logo behind the studio section */
#studio { position: relative; overflow: hidden; }
#studio .wrap { position: relative; }
.bg-mark {
  position: absolute; right: -3vw; top: 50%; transform: translateY(-50%) scaleX(1.05);
  font-weight: 900; font-size: clamp(240px, 44vw, 640px); line-height: .8; letter-spacing: -.03em;
  background: linear-gradient(160deg, rgba(79,141,245,.10), rgba(255,255,255,.025) 60%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  pointer-events: none; user-select: none;
}
.approach { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.approach h2 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.approach .copy p { color: var(--ink-2); font-size: 18px; }
.approach .copy p + p { margin-top: 18px; }
.values { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.values div { border-top: 2px solid; border-image: linear-gradient(90deg, var(--blue), var(--blue-soft)) 1; padding-top: 14px; }
.values b { display: block; font-weight: 700; }
.values span { font-size: 14px; color: var(--ink-3); }

/* Contact */
.contact { position: relative; overflow: hidden; text-align: center; padding: 128px 0; }
.contact::before {
  content: ""; position: absolute; pointer-events: none; left: 50%; bottom: -300px;
  width: 900px; height: 600px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse, rgba(55,130,255,.28) 0, rgba(50,125,255,.22) 20%, rgba(55,80,235,.10) 40%, rgba(70,50,200,.04) 54%, rgba(40,40,160,0) 66%);
}
.contact::after {
  -webkit-mask-image: radial-gradient(ellipse 520px 320px at 50% 100%, #000, transparent 80%);
          mask-image: radial-gradient(ellipse 520px 320px at 50% 100%, #000, transparent 80%);
}
.contact .wrap { position: relative; }
.contact h2 { font-size: clamp(36px, 6vw, 72px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.contact p { color: var(--ink-2); margin: 20px auto 36px; max-width: 480px; }
.contact .actions { justify-content: center; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 40px 0; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
footer .mark { font-size: 15px; }
footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
footer nav a, footer small { font-size: 13px; color: var(--ink-3); text-decoration: none; }
footer nav a:hover { color: var(--blue-soft); }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero::before { animation: none; }
  .js .headline .w { opacity: 1; transform: none; filter: none; animation: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 860px) {
  .products, .approach { grid-template-columns: 1fr; }
  .approach { gap: 28px; }
  .disciplines { grid-template-columns: 1fr; }
  .discipline, .discipline + .discipline { padding: 32px 0; border-left: 0; }
  .discipline + .discipline { border-top: 1px solid var(--line); }
  .nav ul { gap: 20px; }
}
@media (max-width: 560px) {
  .nav ul { gap: 18px; }
  .js .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-right: -6px;
    background: none; border: 1px solid var(--line); border-radius: 12px;
    color: var(--ink); cursor: pointer;
  }
  .js .nav ul {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 4px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -20px rgba(0,0,0,.8);
  }
  .js .nav.open ul { display: flex; }
  .js .nav.open { border-bottom-color: var(--line); background: var(--bg); }
  .js .nav ul a { display: block; padding: 16px 0; font-size: 18px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); }
  .js .nav ul li:last-child a { border-bottom: 0; }
  .js .nav ul a::after { display: none; }
  .js .nav ul a.active { color: var(--blue-soft); }
  .wrap { padding: 0 16px; }
  .hero { padding: 72px 0 80px; }
  .pillars { margin-top: 64px; letter-spacing: .24em; }
  section { padding: 80px 0; }
  .product { padding: 28px; min-height: 0; }
  .values { grid-template-columns: 1fr; }
}

/* Text pages (privacy etc.) */
.page { padding: 96px 0 112px; }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.page .updated { margin-top: 14px; font-size: 14px; color: var(--ink-3); }
.page h2 { margin: 48px 0 12px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.page p, .page li { color: var(--ink-2); }
.page p + p { margin-top: 14px; }
.page ul { margin: 12px 0 0 20px; display: grid; gap: 6px; }
.page a { color: var(--blue-soft); }
.placeholder { color: var(--ink-3); font-style: italic; }

/* 404 page */
.not-found { min-height: calc(100vh - 72px - 120px); display: flex; align-items: center; }
.not-found .wrap { width: 100%; }
