/* martinknapic.com: design system */
:root {
  --bg: #0A0E14;
  --bg-2: #0F1520;
  --surface: #131A27;
  --line: rgba(255, 255, 255, .08);
  --text: #E8EEF5;
  --muted: #94A3B8;
  --cyan: #00D9FF;
  --amber: #FF8A3D;
  --sage: #6B8F71;
  --sage-bright: #8DB594;
  --r: 12px;
  --r-sm: 8px;
  --glow-cyan: 0 0 0 1px rgba(0, 217, 255, .35), 0 0 32px rgba(0, 217, 255, .22);
  --glow-amber: 0 0 0 1px rgba(255, 138, 61, .35), 0 0 32px rgba(255, 138, 61, .22);
  --strong: #fff;
  --soft: #C5CFDB;
  --sub: #C9D4E2;
  --hover: rgba(255, 255, 255, .06);
  --faint: rgba(255, 255, 255, .03);
  --nav-bg: rgba(10, 14, 20, .72);
  --copy-shadow: 0 1px 18px rgba(7, 10, 16, .85);
  --on-cyan: #021015;
  color-scheme: dark;
  --head: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
}

/* Light theme: same layout and accents, darker accent shades for contrast on a pale background. */
:root[data-theme="light"] {
  --bg: #F7F8FA;
  --bg-2: #ECEFF4;
  --surface: #FFFFFF;
  --line: rgba(15, 22, 32, .12);
  --text: #0F1620;
  --muted: #4A5870;
  --cyan: #007F9C;
  --amber: #C2540A;
  --sage: #4F7A57;
  --sage-bright: #3B6A44;
  --glow-cyan: 0 0 0 1px rgba(0, 127, 156, .35), 0 8px 32px rgba(0, 127, 156, .18);
  --glow-amber: 0 0 0 1px rgba(194, 84, 10, .35), 0 8px 32px rgba(194, 84, 10, .16);
  --strong: #0A0E14;
  --soft: #2F3C50;
  --sub: #2F3C50;
  --hover: rgba(15, 22, 32, .06);
  --faint: rgba(15, 22, 32, .03);
  --nav-bg: rgba(247, 248, 250, .78);
  --copy-shadow: 0 1px 14px rgba(247, 248, 250, .9);
  --on-cyan: #fff;
  color-scheme: light;
}

@view-transition { navigation: auto; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
::view-transition-old(root) { animation: .25s ease both vt-out; }
::view-transition-new(root) { animation: .35s ease both vt-in; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.65 var(--body); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.08; margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cyan); color: #000; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 64px;
  background: var(--nav-bg); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand { justify-self: start; }
.nav-icons { justify-self: end; display: flex; gap: 6px; align-items: center; }
.nav-icons a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); color: var(--muted); transition: color .2s, background .2s; }
.nav-icons a:hover, .theme-toggle:hover { color: var(--text); background: var(--hover); }
.ico { width: 22px; height: 22px; }
.theme-toggle { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); cursor: pointer; transition: color .2s, background .2s; }
.theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .moon { display: block; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.15rem var(--head); text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; flex: none; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }
.brand i { font-style: normal; font-weight: 500; color: var(--muted); }
.brand span { white-space: nowrap; }
@media (max-width: 420px) { .brand { gap: 8px; font-size: 1.02rem; } .brand-mark { width: 26px; height: 26px; } }
.brand b { color: var(--cyan); }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav ul a { display: block; padding: 8px 14px; border-radius: var(--r-sm); text-decoration: none; color: var(--muted); font-size: .95rem; font-weight: 500; transition: color .2s, background .2s; }
.nav ul a:hover, .nav ul a[aria-current] { color: var(--text); background: var(--hover); }
.nav ul a.cta { color: #04130a; background: var(--sage-bright); font-weight: 600; }
.nav ul a.cta:hover { background: #a3cfaa; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: var(--r-sm); padding: 8px 12px; font: inherit; cursor: pointer; }
@media (max-width: 820px) {
  .nav .wrap { display: flex; }
  .brand { margin-right: auto; }
  .nav-toggle { display: block; }
  .nav ul { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg-2); padding: 12px var(--gutter) 20px; border-bottom: 1px solid var(--line); display: none; }
  .nav ul.open { display: flex; }
  .nav ul a { padding: 14px 8px; }
}

/* ---------- Buttons / tags ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: var(--r); font: 600 1rem var(--head); text-decoration: none; border: 1px solid transparent; transition: transform .2s, box-shadow .25s, background .2s; cursor: pointer; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: linear-gradient(120deg, var(--cyan), #5ee7ff); color: var(--on-cyan); box-shadow: 0 0 28px rgba(0, 217, 255, .35); }
.btn.primary:hover { box-shadow: 0 0 44px rgba(0, 217, 255, .55); }
.btn.linkedin { background: #0A66C2; color: #fff; box-shadow: 0 0 28px rgba(10, 102, 194, .4); }
.btn.linkedin:hover { background: #0B73DA; box-shadow: 0 0 44px rgba(10, 102, 194, .6); }
.btn .ico { width: 20px; height: 20px; }
.btn.secondary { background: rgba(107, 143, 113, .16); border-color: var(--sage); color: var(--sage-bright); }
.btn.secondary:hover { background: rgba(107, 143, 113, .28); }
.tag { display: inline-block; font: 600 .72rem var(--head); letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; background: rgba(107, 143, 113, .18); color: var(--sage-bright); border: 1px solid rgba(107, 143, 113, .4); }
.eyebrow { font: 600 .8rem var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); margin-bottom: 14px; display: block; }
.eyebrow.amber { color: var(--amber); }

/* ---------- Hero ---------- */
.hero { position: relative; height: max(100svh, 680px); padding: 64px 0 0; }
.stage { position: relative; height: 100%; overflow: hidden; isolation: isolate;
  background: radial-gradient(70% 90% at 78% 40%, rgba(0, 217, 255, .10), transparent 65%), radial-gradient(50% 60% at 10% 100%, rgba(255, 138, 61, .12), transparent 70%), var(--bg); }
/* Layer 0: swap-able background. Drop a <video class="hero-video"> inside .hero-bg and remove the canvas. */
.hero-bg { position: absolute; inset: -4% 0; z-index: -1; will-change: transform; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#net { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-portrait { position: absolute; right: 3%; bottom: 0; height: 100%; aspect-ratio: 1050 / 1235; z-index: -2; pointer-events: none; isolation: isolate;
  -webkit-mask-image: radial-gradient(ellipse 50% 68% at 48% 44%, #000 25%, transparent 76%); mask-image: radial-gradient(ellipse 50% 68% at 48% 44%, #000 25%, transparent 76%);
  opacity: 0; animation: portrait-in 2s ease .6s forwards; }
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05) brightness(.85) contrast(1.15); opacity: .5; }
.hero-portrait::after { content: ""; position: absolute; inset: 0; mix-blend-mode: color; background: linear-gradient(130deg, rgba(0, 217, 255, .22), rgba(255, 138, 61, .26)); }
[data-theme="light"] .hero-portrait img { filter: grayscale(1) contrast(1.05) brightness(1.15); opacity: .38; }
@keyframes portrait-in { to { opacity: 1; } }
.plus { display: none; position: absolute; width: 14px; height: 14px; color: var(--muted); z-index: 2; }
.plus::before, .plus::after { content: ""; position: absolute; background: currentColor; }
.plus::before { left: 6px; top: 0; width: 1px; height: 14px; } .plus::after { top: 6px; left: 0; height: 1px; width: 14px; }
.plus.tl { top: 62px; left: 0; } .plus.tr { top: 62px; right: 0; } .plus.bl { bottom: 0; left: 0; } .plus.br { bottom: 0; right: 0; }
.stage > .ui { position: absolute; z-index: 1; pointer-events: none; }
.hero-top { top: clamp(20px, 3vw, 36px); left: clamp(20px, 3vw, 40px); right: clamp(20px, 3vw, 40px); display: flex; justify-content: space-between; gap: 32px; align-items: flex-start; }
.hero-copy { max-width: 720px; text-shadow: var(--copy-shadow); }
.hero-role { font: 500 clamp(.8rem, 1.2vw, .95rem) var(--head); letter-spacing: .2em; text-transform: uppercase; color: var(--amber); display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hero-role::before { content: ""; width: 28px; height: 1px; background: var(--amber); }
.hero-value { font: 600 clamp(1.3rem, 2.2vw, 1.85rem) var(--head); line-height: 1.22; letter-spacing: -.015em; color: var(--strong); margin: 0 0 14px; }
.hero-sub { max-width: 600px; color: var(--sub); font-size: clamp(.92rem, 1.2vw, 1.05rem); line-height: 1.5; margin: 0 0 14px; }
.hero-avail { display: flex; align-items: center; gap: 10px; margin: 0; font: 500 clamp(.78rem, 1vw, .88rem) var(--head); letter-spacing: .02em; color: var(--sage-bright); }
.hero-avail::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--sage-bright); box-shadow: 0 0 10px var(--sage-bright); }
.hero-name { left: clamp(16px, 2.6vw, 40px); bottom: clamp(48px, 8vh, 84px); font-size: clamp(3.2rem, 11vw, 12rem); font-weight: 700; line-height: .82; letter-spacing: -.055em; text-transform: uppercase; }
.hero-name .word { display: block; overflow: hidden; padding: .04em .06em .1em 0; }
.ch { display: inline-block; color: var(--strong); transform: translateY(105%); animation: rise 1s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--i) * 50ms + .15s);
  --p: 0; transition: color .25s, text-shadow .25s, translate .3s; translate: 0 calc(var(--p) * -.06em);
  color: color-mix(in srgb, var(--cyan) calc(var(--p) * 100%), var(--strong)); text-shadow: 0 0 calc(var(--p) * .3em) rgba(0, 217, 255, calc(var(--p) * .7)); }
.ch.o { color: color-mix(in srgb, var(--amber) calc(var(--p) * 100%), var(--strong)); text-shadow: 0 0 calc(var(--p) * .3em) rgba(255, 138, 61, calc(var(--p) * .7)); }
@keyframes rise { to { transform: none; } }
.hero-bottom { left: clamp(20px, 3vw, 40px); right: clamp(20px, 3vw, 40px); bottom: clamp(20px, 3vw, 36px); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.hero-bottom .hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; pointer-events: auto; }
.hero-bottom .btn { border-radius: 999px; padding: 13px 24px; }
.scrollhint { display: flex; align-items: center; gap: 12px; font: 500 .72rem var(--head); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.scrollhint i { width: 1px; height: 34px; background: linear-gradient(var(--cyan), transparent); transform-origin: top; animation: hint 2.2s ease-in-out infinite; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 767px) {
  .hero { padding: 64px 0 0; height: max(100svh, 720px); }
  .hero-top { flex-direction: column; gap: 12px; }
  .hero-role { margin-bottom: 10px; }
  .hero-value { font-size: 1.2rem; margin-bottom: 10px; }
  .hero-sub { font-size: .88rem; max-width: 100%; margin-bottom: 10px; }
  .hero-name { font-size: 16vw; bottom: 40px; }
  .hero-bottom .hero-ctas { flex-wrap: nowrap; gap: 8px; width: 100%; }
  .hero-bottom .btn { flex: 1; justify-content: center; white-space: nowrap; }
  .scrollhint { display: none; }
  .hero-bottom .btn { padding: 12px 8px; font-size: .84rem; }
  .plus { display: none; }
  .hero-portrait { width: 104%; height: auto; right: -2%; bottom: auto; top: 8%; }
  .hero-portrait img { opacity: .3; }
}

/* ---------- Hero focus nodes ---------- */
.hero-nodes { right: 3%; bottom: 0; height: 100%; aspect-ratio: 1050 / 1235; z-index: 1; }
.hnode { --c: var(--cyan); position: absolute; left: var(--x); top: var(--y); width: 14px; height: 14px; margin: -7px 0 0 -7px; display: block; pointer-events: auto; color: var(--text); text-decoration: none; border-radius: 50%; cursor: pointer; }
.hnode.amber { --c: var(--amber); }
.hnode::before { content: ""; position: absolute; inset: -16px; border-radius: 50%; }
.hn-dot { position: absolute; inset: 0; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px color-mix(in srgb, var(--c) 70%, transparent); transition: transform .3s; }
.hn-ring { position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--c); opacity: .35; transform: scale(1.9); animation: breathe 3.6s ease-out infinite; animation-delay: calc(var(--i) * -.9s); transition: transform .4s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
@keyframes breathe { 0% { transform: scale(1); opacity: .65; } 100% { transform: scale(2.8); opacity: 0; } }
.hnode:hover .hn-dot, .hnode:focus-visible .hn-dot { transform: scale(1.25); }
.hnode:hover .hn-ring, .hnode:focus-visible .hn-ring { animation: none; transform: scale(2.7); opacity: .7; }
.hnode:focus-visible { outline: none; }
.hnode:focus-visible .hn-dot { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--c), 0 0 16px var(--c); }
.hn-label { position: absolute; display: block; text-shadow: var(--copy-shadow); }
.hnode.below .hn-label { top: 26px; left: 50%; transform: translateX(-50%); text-align: center; }
.hnode.below-l .hn-label { top: 26px; right: -7px; text-align: right; }
.hnode.below-r .hn-label { top: 26px; left: -7px; text-align: left; }
.hnode.below-l .hn-label small { margin-right: 0; margin-left: auto; }
.hnode.below-r .hn-label small { margin-left: 0; }
.hnode.right .hn-label { left: 26px; top: 50%; transform: translateY(-50%); text-align: left; }
.hn-label b { display: block; white-space: nowrap; font: 600 clamp(.9rem, 1.15vw, 1.05rem) var(--head); letter-spacing: -.01em; color: var(--strong); }
.hn-label small { display: block; width: max-content; max-width: 210px; margin: 4px auto 0; font: 400 .8rem/1.4 var(--body); color: var(--sub); opacity: 0; transform: translateY(-4px); transition: opacity .3s, transform .3s; }
.hnode.right .hn-label small { margin-left: 0; }
.hnode:hover .hn-label small, .hnode:focus-visible .hn-label small { opacity: 1; transform: none; }
.hnode:hover .hn-label b, .hnode:focus-visible .hn-label b { color: var(--c); }
.hnode.minor { opacity: .72; width: 10px; height: 10px; margin: -5px 0 0 -5px; }
.hnode.minor .hn-label b { font-size: clamp(.82rem, 1vw, .95rem); }
.hnode.minor:hover, .hnode.minor:focus-visible { opacity: 1; }
.hnode.right.minor .hn-label { left: 22px; }

@media (max-width: 767px) {
  #net { display: none; }
  /* the four nodes become tappable chips: tap to reveal the proof line, tap again to go to the section */
  .hero-nodes { left: 16px; right: 16px; top: auto; bottom: calc(40px + 30vw + 14px); width: auto; height: auto; aspect-ratio: auto; display: flex; flex-wrap: wrap; gap: 8px; }
  .hnode, .hnode.minor { position: static; left: auto; top: auto; width: auto; height: auto; margin: 0; opacity: 1; display: flex; flex-direction: column; border-radius: 999px; padding: 8px 14px 8px 30px; position: relative;
    background: color-mix(in srgb, var(--bg) 72%, transparent); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); backdrop-filter: blur(8px); }
  .hnode::before { display: none; }
  .hn-dot { inset: auto; left: 12px; top: 15px; width: 8px; height: 8px; }
  .hn-ring { display: none; }
  .hn-label, .hnode.below .hn-label, .hnode.below-l .hn-label, .hnode.below-r .hn-label, .hnode.right .hn-label { position: static; transform: none; text-align: left; text-shadow: none; }
  .hn-label b, .hnode.minor .hn-label b { font-size: .88rem; white-space: normal; }
  .hn-label small, .hnode.right .hn-label small, .hnode.below-l .hn-label small { width: auto; max-width: none; margin: 0; max-height: 0; opacity: 0; overflow: hidden; transform: none; transition: max-height .35s ease, opacity .3s, margin .3s; }
  .hnode.open { flex-basis: 100%; border-radius: 16px; background: color-mix(in srgb, var(--bg) 86%, transparent); }
  .hnode.open .hn-label small { max-height: 6em; opacity: 1; margin-top: 4px; }
  .hnode.open .hn-label small::after { content: " Tap again to open."; color: var(--c); }
}
@media (min-width: 768px) and (max-width: 1000px) { .hnode[data-k="ai"] { --x: 34% !important; --y: 63% !important; } }

/* ---------- Sections ---------- */
section { position: relative; }
.sec { --pt: clamp(72px, 10vw, 128px); padding: var(--pt) 0; }
/* menu jumps: land the section title just under the fixed nav instead of below the section's top padding */
.sec[id] { scroll-margin-top: calc(24px - var(--pt)); }
.sec.diag-top[id] { --pt: calc(clamp(72px, 10vw, 128px) + clamp(24px, 4vw, 64px)); }
.sec-head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head h2 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 14px; }
.sec-head p { color: var(--muted); font-size: 1.1rem; }
/* diagonal dividers */
.diag-top { clip-path: polygon(0 clamp(24px, 4vw, 64px), 100% 0, 100% 100%, 0 100%); margin-top: calc(-1 * clamp(24px, 4vw, 64px)); padding-top: calc(clamp(72px, 10vw, 128px) + clamp(24px, 4vw, 64px)); }
.diag-bot { clip-path: polygon(0 0, 100% 0, 100% calc(100% - clamp(24px, 4vw, 64px)), 0 100%); padding-bottom: calc(clamp(72px, 10vw, 128px) + clamp(24px, 4vw, 64px)); }
.alt { background: var(--bg-2); }

/* credibility strip */
.strip { background: var(--bg-2); border-block: 1px solid var(--line); }
.strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 40px 20px; text-align: center; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat-n { font: 700 clamp(2.4rem, 5vw, 3.8rem) var(--head); letter-spacing: -.03em; background: linear-gradient(120deg, var(--cyan), var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat-l { color: var(--muted); font-size: .92rem; margin-top: 4px; }
@media (max-width: 760px) {
  .strip .wrap { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat { padding: 28px 12px; }
}

/* industries */
.industries { padding: 28px 0; }
.industries .wrap { display: flex; align-items: baseline; gap: 20px; }
.industries-l { flex: none; font: 600 .75rem var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.pills li { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--faint); color: var(--soft); font-size: .88rem; line-height: 1.4; }
@media (max-width: 760px) { .industries .wrap { flex-direction: column; gap: 12px; } }

/* case study grid */
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.card {
  grid-column: span 2; position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 28px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; transition: transform .3s, box-shadow .3s, border-color .3s; overflow: hidden;
}
.card.lead { grid-column: span 3; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--cyan), var(--amber)); opacity: .0; transition: opacity .3s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--glow-cyan); border-color: transparent; }
.card:nth-child(even):hover { box-shadow: var(--glow-amber); }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 1.7rem; }
.card .meta { color: var(--muted); font-size: .88rem; }
.card .metric { font: 700 2.4rem var(--head); color: var(--cyan); letter-spacing: -.03em; line-height: 1; }
.card:nth-child(even) .metric { color: var(--amber); }
.card .metric small { display: block; font: 400 .85rem var(--body); color: var(--muted); letter-spacing: 0; margin-top: 6px; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }
.card .more { margin-top: auto; font: 600 .92rem var(--head); color: var(--sage-bright); }
.card:hover .more { color: var(--text); }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } .card, .card.lead { grid-column: span 1; } .card.lead { grid-column: span 2; } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } .card, .card.lead { grid-column: span 1; } }

/* areas */
.areas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.area { --a: var(--cyan); position: relative; overflow: hidden; padding: 28px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; transition: transform .3s, box-shadow .3s, border-color .3s; scroll-margin-top: 90px; }
.area[data-k="growth"] { --a: var(--amber); }
.area[data-k="data"] { --a: var(--sage-bright); }
.area[data-k="ai"] { --a: var(--cyan); }
.area::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--a); transition: width .9s cubic-bezier(.2, .8, .2, 1) .2s; }
.area[data-k="ai"]::before { background: linear-gradient(90deg, var(--cyan), var(--amber)); }
.area.in::before { width: 64px; }
.area:hover::before { width: 100%; transition-delay: 0s; }
.area::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--a) 16%, transparent), transparent 62%); }
.area:hover::after { opacity: 1; }
.area:hover, .area:target { transform: translateY(-5px); border-color: color-mix(in srgb, var(--a) 45%, transparent); box-shadow: 0 10px 40px color-mix(in srgb, var(--a) 16%, transparent); }
.area > * { position: relative; z-index: 1; }
.area-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.area-n { font: 600 .78rem var(--head); letter-spacing: .16em; color: var(--a); }
.area h3 { font-size: 1.5rem; }
.art { width: 132px; height: auto; color: var(--a); flex: none; overflow: visible; }
.art * { transform-box: view-box; }
/* 01 product operations: a release moving along a track */
.art-ops .track { stroke: currentColor; stroke-opacity: .3; stroke-width: 2; }
.art-ops .node { fill: var(--surface); stroke: currentColor; stroke-width: 2; animation: node-lit 4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.art-ops .n1 { animation-delay: 1.2s; } .art-ops .n2 { animation-delay: 2.4s; } .art-ops .n3 { animation-delay: 3.6s; }
.art-ops .packet { fill: currentColor; animation: packet 4s cubic-bezier(.5, 0, .5, 1) infinite; filter: drop-shadow(0 0 5px currentColor); }
@keyframes packet { 0% { transform: translateX(0); } 90%, 100% { transform: translateX(128px); } }
@keyframes node-lit { 0%, 20%, 100% { fill: var(--surface); transform: scale(1); } 6% { fill: currentColor; transform: scale(1.35); } }
/* 02 growth: bars rise, trend draws in */
.art-growth .bar { fill: currentColor; fill-opacity: .55; transform-origin: bottom; transform-box: fill-box; transform: scaleY(0); transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.area.in .art-growth .bar { transform: scaleY(1); }
.art-growth .b0 { transition-delay: .3s; } .art-growth .b1 { transition-delay: .4s; } .art-growth .b2 { transition-delay: .5s; } .art-growth .b3 { transition-delay: .6s; } .art-growth .b4 { transition-delay: .7s; } .art-growth .b5 { transition-delay: .8s; fill-opacity: .9; }
.art-growth .trend { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s ease 1s; }
.area.in .art-growth .trend { stroke-dashoffset: 0; }
.area:hover .art-growth .bar { animation: bar-up 1.1s ease-in-out infinite alternate; }
.area:hover .art-growth .b1 { animation-delay: .1s; } .area:hover .art-growth .b2 { animation-delay: .2s; } .area:hover .art-growth .b3 { animation-delay: .3s; } .area:hover .art-growth .b4 { animation-delay: .4s; } .area:hover .art-growth .b5 { animation-delay: .5s; }
@keyframes bar-up { to { transform: scaleY(.82); } }
/* 03 data and platform: data flowing between nodes */
.art-data .links line { stroke: currentColor; stroke-opacity: .8; stroke-width: 1.8; stroke-dasharray: .2 .2; animation: flow 2.6s linear infinite; }
.art-data .links line:nth-child(even) { animation-duration: 3.4s; animation-direction: reverse; }
@keyframes flow { to { stroke-dashoffset: -.4; } }
.art-data .hub { fill: currentColor; animation: pulse 2.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.art-data .dot { fill: var(--surface); stroke: currentColor; stroke-width: 2; }
@keyframes pulse { 50% { transform: scale(1.3); opacity: .75; } }
/* 04 AI tools and agents: agents orbiting a core */
.art-ai .ring { fill: none; stroke: currentColor; stroke-opacity: .22; stroke-width: 1; stroke-dasharray: 2 4; }
.art-ai .core { fill: var(--cyan); animation: pulse 2.6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.art-ai .sat { fill: var(--amber); }
.art-ai .o1 { transform-origin: 80px 40px; animation: spin 7s linear infinite; }
.art-ai .o2 { transform-origin: 80px 40px; animation: spin 11s linear infinite reverse; }
.art-ai .o3 { transform-origin: 80px 40px; animation: spin 16s linear infinite; }
.art-ai .o3 .sat { fill: var(--cyan); }
@keyframes spin { to { transform: rotate(360deg); } }
.area:hover .art-ops .packet { animation-duration: 2s; }
.area:hover .art-ops .node { animation-duration: 2s; }
.area:hover .art-ai .o1 { animation-duration: 3.5s; } .area:hover .art-ai .o2 { animation-duration: 5.5s; } .area:hover .art-ai .o3 { animation-duration: 8s; }
.area:hover .art-data .links line { animation-duration: 1.2s; }
.area p { color: var(--muted); margin: 0; font-size: .98rem; }
.area-link { margin-top: auto; padding-top: 6px; font: 600 .92rem var(--head); color: var(--sage-bright); text-decoration: none; }
.area-link:hover { color: var(--text); }
.proof { margin-top: auto; padding-top: 6px; display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; font-size: .9rem; }
.proof span { font: 600 .7rem var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.proof b { color: var(--sage-bright); font-weight: 500; }
.proof a { color: var(--sage-bright); text-decoration: none; font-weight: 500; }
.proof a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 960px) { .areas { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .areas { grid-template-columns: 1fr; } }

/* timeline */
.timeline { position: relative; margin-left: 8px; padding-left: 36px; border-left: 2px solid transparent; border-image: linear-gradient(to bottom, var(--cyan), var(--amber), transparent) 1; }
.tl-item { position: relative; padding-bottom: 44px; }
.tl-item::before { content: ""; position: absolute; left: -44px; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.tl-item:nth-child(even)::before { border-color: var(--amber); box-shadow: 0 0 14px var(--amber); }
.tl-when { font: 600 .82rem var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tl-item h3 { font-size: 1.5rem; margin: 4px 0 6px; }
.tl-item h3 span { color: var(--muted); font-weight: 500; }
.tl-item p { color: var(--muted); max-width: min(100%, 980px); margin: 0; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag.closed { background: rgba(255, 138, 61, .14); color: var(--amber); border-color: rgba(255, 138, 61, .4); }

/* building with AI */
.build-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.build-card { padding: 32px; border-radius: var(--r); border: 1px solid var(--line); background: linear-gradient(160deg, rgba(0, 217, 255, .07), var(--surface) 55%); display: flex; flex-direction: column; gap: 14px; transition: transform .3s, box-shadow .3s; }
.build-card:nth-child(even) { background: linear-gradient(160deg, rgba(255, 138, 61, .08), var(--surface) 55%); }
.build-card:hover { transform: translateY(-5px); box-shadow: var(--glow-cyan); }
.build-card:nth-child(even):hover { box-shadow: var(--glow-amber); }
.build-card h3 { font-size: 1.8rem; }
.build-card p { color: var(--muted); margin: 0; }
.links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.links a { font: 600 .95rem var(--head); color: var(--sage-bright); text-decoration: none; }
.links a:hover { color: var(--text); }
.stack { display: flex; gap: 8px; flex-wrap: wrap; }
.stack span { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--faint); color: var(--soft); font-size: .85rem; line-height: 1.4; }
.shipped { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.shipped li { position: relative; padding-left: 20px; color: var(--soft); font-size: .95rem; line-height: 1.5; }
.shipped li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 2px; background: var(--cyan); }
.feature { margin-bottom: 20px; padding: 36px; border-radius: var(--r); border: 1px solid var(--line); background: linear-gradient(160deg, rgba(255, 138, 61, .09), var(--surface) 55%); display: grid; gap: 32px; }
.feature-head { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.feature-head .tag { align-self: flex-start; }
.feature-head h3 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.feature-head p { color: var(--soft); margin: 0; font-size: 1.05rem; }
.feature-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.feature-col { display: flex; flex-direction: column; gap: 10px; }
.feature-col h4 { font-size: 1.15rem; color: var(--cyan); }
.feature-col p { margin: 0; color: var(--muted); font-size: .95rem; }
.feature-col .shipped { margin-top: 4px; }
@media (max-width: 900px) { .feature { padding: 24px; } .feature-cols { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 680px) { .build-grid { grid-template-columns: 1fr; } }
.systems-head { margin: clamp(40px, 6vw, 64px) 0 20px; }
.systems { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.system { padding: 24px 0 0; border-top: 2px solid transparent; border-image: linear-gradient(90deg, var(--cyan), var(--amber)) 1; display: flex; flex-direction: column; gap: 10px; }
.system h3 { font-size: 1.25rem; }
.system p { color: var(--muted); margin: 0; font-size: .95rem; }
@media (max-width: 900px) { .systems { grid-template-columns: 1fr; } }
@media (max-width: 1000px) { .build-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .build-grid { grid-template-columns: 1fr; } }

/* testimonials */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote { margin: 0; padding: 28px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 22px; transition: box-shadow .3s, transform .3s; }
.quote:hover { transform: translateY(-4px); box-shadow: var(--glow-cyan); }
.quote blockquote { margin: 0; position: relative; }
.quote blockquote::before { content: "\201C"; display: block; font: 700 3.2rem/0.7 var(--head); color: var(--cyan); margin-bottom: 6px; }
.quote p { margin: 0; color: var(--soft); font-size: .98rem; line-height: 1.65; }
.quote figcaption { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.quote figcaption div { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.quote figcaption strong { font: 600 1rem var(--head); }
.quote figcaption span { color: var(--muted); font-size: .88rem; }
.quote figcaption em { font-style: normal; color: var(--amber); font-size: .78rem; letter-spacing: .04em; margin-top: 2px; }
.avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font: 700 .95rem var(--head); letter-spacing: .02em; color: var(--strong);
  background: linear-gradient(135deg, rgba(0, 217, 255, .28), rgba(255, 138, 61, .32)); border: 1px solid var(--line); }
.inline-link { color: var(--sage-bright); text-decoration: none; border-bottom: 1px solid rgba(141, 181, 148, .4); }
.inline-link:hover { color: var(--text); border-color: var(--text); }
/* spotlight (JS-enhanced; the grid above is the no-JS fallback) */
.spot { display: none; }
html:not(.no-js) .spot { display: block; }
html:not(.no-js) .quotes { display: none; }
.spot .filters { margin-bottom: 36px; }
.spot-stage { min-height: 300px; display: flex; flex-direction: column; justify-content: center; max-width: 880px; transition: opacity .25s ease, transform .25s ease; }
.spot-stage.swap { opacity: 0; transform: translateY(8px); }
.spot-pull { font: 500 clamp(1.4rem, 2.8vw, 2.1rem) / 1.3 var(--head); letter-spacing: -.015em; margin: 0 0 22px; }
.spot-pull::before { content: "\201C"; color: var(--cyan); }
.spot-pull::after { content: "\201D"; color: var(--cyan); }
.spot-more { align-self: flex-start; background: none; border: 0; padding: 0; margin: 0 0 24px; color: var(--sage-bright); font: 600 .92rem var(--head); cursor: pointer; border-bottom: 1px solid rgba(141, 181, 148, .4); }
.spot-more:hover { color: var(--text); border-color: var(--text); }
.spot-full { margin: 0 0 24px; padding-left: 18px; border-left: 2px solid var(--cyan); color: var(--soft); font-size: 1rem; line-height: 1.7; max-width: 720px; }
.spot-who { display: flex; align-items: center; gap: 16px; }
.spot-who .avatar { width: 64px; height: 64px; font-size: 1.1rem; }
.spot-who div { display: flex; flex-direction: column; line-height: 1.35; }
.spot-who strong { font: 600 1.1rem var(--head); }
.spot-who span { color: var(--muted); font-size: .95rem; }
.spot-who em { font-style: normal; color: var(--amber); font-size: .8rem; letter-spacing: .04em; margin-top: 2px; }
.spot-rail { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.spot-rail button { position: relative; width: 56px; height: 56px; padding: 0; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer; opacity: .5; transition: opacity .25s, transform .25s, border-color .25s; }
.spot-rail button:hover { opacity: .85; }
.spot-rail button[aria-current="true"] { opacity: 1; transform: scale(1.1); border-color: var(--cyan); }
.spot-rail button .avatar { width: 100%; height: 100%; }
.spot-bar { height: 2px; margin-top: 22px; background: var(--line); border-radius: 1px; overflow: hidden; max-width: 880px; }
.spot-bar i { display: block; height: 100%; width: 0; background: var(--cyan); }
@media (max-width: 640px) { .spot-stage { min-height: 380px; justify-content: flex-start; } .spot-rail { gap: 10px; } .spot-rail button { width: 48px; height: 48px; } }
@media (max-width: 1000px) { .quotes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .quotes { grid-template-columns: 1fr; } }

/* blog */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 500 .9rem var(--body); cursor: pointer; transition: all .2s; }
.chip:hover { color: var(--text); border-color: var(--sage); }
.chip[aria-pressed="true"] { background: rgba(107, 143, 113, .22); color: var(--sage-bright); border-color: var(--sage); }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post { text-decoration: none; padding: 26px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; transition: transform .3s, box-shadow .3s; }
.post:hover { transform: translateY(-4px); box-shadow: var(--glow-cyan); }
.post[hidden] { display: none; }
.post h3 { font-size: 1.25rem; line-height: 1.25; }
.post p { color: var(--muted); font-size: .95rem; margin: 0; }
.post .row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 6px; font-size: .85rem; color: var(--muted); }
.soon { color: var(--amber); font-weight: 600; }
@media (max-width: 960px) { .posts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .posts { grid-template-columns: 1fr; } }

/* contact / footer */
.contact { text-align: center; }
.contact h2 { font-size: clamp(2.2rem, 6vw, 4rem); margin-bottom: 18px; }
.contact p { color: var(--muted); max-width: 560px; margin: 0 auto 30px; }
.contact .hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
footer { border-top: 1px solid var(--line); padding: 32px 0; background: var(--bg); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { text-decoration: none; color: var(--muted); font-weight: 500; }
footer a:hover { color: var(--cyan); }
footer small { color: var(--muted); }

/* ---------- Case study pages ---------- */
.cs-hero { padding: 132px 0 56px; position: relative; overflow: hidden; }
.cs-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 70% at 20% 0%, rgba(0, 217, 255, .16), transparent 70%), radial-gradient(40% 60% at 90% 20%, rgba(255, 138, 61, .12), transparent 70%); }
.crumbs { font-size: .9rem; margin-bottom: 22px; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--cyan); }
.cs-hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); margin-bottom: 12px; }
.cs-hero .meta { color: var(--amber); font: 500 1.2rem var(--head); margin-bottom: 28px; }
.tldr { padding: 28px 30px; border-radius: var(--r); background: var(--surface); border: 1px solid rgba(0, 217, 255, .3); box-shadow: 0 0 40px rgba(0, 217, 255, .08); max-width: 820px; }
.tldr h2 { font: 600 .8rem var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); margin-bottom: 10px; }
.tldr p { font-size: 1.15rem; margin: 0; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-top: 28px; max-width: 900px; }
.metric-box { padding: 20px; border-radius: var(--r); border: 1px solid var(--line); background: var(--faint); }
.metric-box strong { display: block; font: 700 2.2rem var(--head); letter-spacing: -.03em; color: var(--cyan); line-height: 1.1; }
.metric-box:nth-child(even) strong { color: var(--amber); }
.metric-box span { color: var(--muted); font-size: .9rem; }
.cs-body { padding: 40px 0 80px; }
.cs-sec { display: grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 44px 0; border-top: 1px solid var(--line); }
.cs-sec h2 { font-size: 1.6rem; color: var(--text); }
.cs-sec h2 span { display: block; font: 600 .78rem var(--head); letter-spacing: .16em; color: var(--amber); margin-bottom: 6px; }
.cs-sec .copy { max-width: 700px; }
.cs-sec .copy p, .cs-sec .copy li { color: var(--soft); }
.cs-sec ul { padding-left: 20px; margin: 0; } .cs-sec li { margin-bottom: .7em; }
.cs-sec li::marker { color: var(--cyan); }
.draft-note { font-size: .85rem; color: var(--muted); border-left: 2px solid var(--amber); padding-left: 12px; margin-top: 18px; }
.cs-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 48px 0 0; border-top: 1px solid var(--line); }
.cs-nav a { padding: 24px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: transform .25s, box-shadow .25s; }
.cs-nav a:hover { transform: translateY(-4px); box-shadow: var(--glow-cyan); }
.cs-nav small { color: var(--muted); display: block; margin-bottom: 4px; }
.cs-nav strong { font: 600 1.3rem var(--head); }
.cs-nav a:last-child { text-align: right; }
@media (max-width: 760px) { .cs-sec { grid-template-columns: 1fr; gap: 14px; } .cs-hero { padding-top: 104px; } }

/* ---------- Reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .ch { transform: none; }
  .hero-portrait { opacity: 1; }
  .hn-ring { transform: scale(1.9); opacity: .35; }
}
