/* ==========================================================================
   Joseph Nwakaji — Portfolio
   Design tokens → base → layout → components → sections → motion
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  --bg: #09090d;
  --bg-raised: #101017;
  --surface: #14141c;
  --surface-2: #1b1b25;
  --border: rgb(255 255 255 / 0.08);
  --border-strong: rgb(255 255 255 / 0.16);

  --text: #f5f5f7;
  --text-muted: #a3a3b2;
  --text-faint: #8a8a99; /* ≥4.5:1 on --bg */

  --violet: #8b5cf6;
  --violet-strong: #7c3aed;
  --violet-soft: rgb(139 92 246 / 0.14);
  --pink: #ec4899;
  --pink-soft: rgb(236 72 153 / 0.14);
  --success: #34d399;

  --gradient: linear-gradient(100deg, #a78bfa 0%, #c084fc 45%, #f472b6 100%);

  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --container: 1180px;
  --gutter: 16px;
  --header-h: 72px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-tap-highlight-color: rgb(139 92 246 / 0.2);
}

@media (pointer: fine) {
  html { overscroll-behavior: none; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  touch-action: manipulation;
}

/* faint grid texture behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }

h1, h2, h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

::selection { background: rgb(139 92 246 / 0.4); color: #fff; }

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}

main:focus { outline: none; } /* programmatic focus target from skip link only */

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 600;
  font-size: 0.975rem;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-primary {
  background: var(--violet-strong);
  color: #fff;
  box-shadow: 0 0 0 1px rgb(167 139 250 / 0.35) inset, 0 10px 30px -10px rgb(124 58 237 / 0.7);
}
.btn-primary:hover {
  background: var(--violet);
  box-shadow: 0 0 0 1px rgb(196 181 253 / 0.5) inset, 0 14px 40px -10px rgb(139 92 246 / 0.85);
}

.btn-ghost {
  background: rgb(255 255 255 / 0.04);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgb(255 255 255 / 0.09);
  border-color: rgb(255 255 255 / 0.28);
}

.btn-sm { min-height: 40px; padding: 0 18px; font-size: 0.9rem; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 1.05rem; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.04);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.icon-btn:hover { background: rgb(255 255 255 / 0.1); border-color: rgb(255 255 255 / 0.3); }

/* ---------- Shared bits ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c4b5fd;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgb(52 211 153 / 0.18);
}

.card {
  position: relative;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-raised) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-list li,
.chip-list .chip {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 0.03);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: rgb(9 9 13 / 0.78);
  border-bottom-color: var(--border);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--gradient);
  color: #120a24;
  font-size: 0.85rem;
  font-weight: 800;
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav-list { display: flex; gap: 4px; }
.nav-list a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-list a:hover { color: var(--text); background: rgb(255 255 255 / 0.06); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgb(255 255 255 / 0.04);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 960px) {
  .nav-toggle { display: grid; }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px var(--gutter) 24px;
    background: rgb(9 9 13 / 0.97);
    border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s;
  }
  .site-header:has(.nav.is-open) { background: rgb(9 9 13 / 0.97); border-bottom-color: var(--border); }
  .nav-list { flex-direction: column; gap: 2px; }
  .nav-list a { padding: 12px 14px; font-size: 1.05rem; color: var(--text); }
  .nav-cta { min-height: 48px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 48px) 0 56px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 900px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40% 45% at 72% 30%, rgb(139 92 246 / 0.32), transparent 70%),
    radial-gradient(30% 35% at 88% 55%, rgb(236 72 153 / 0.18), transparent 70%),
    radial-gradient(35% 40% at 15% 10%, rgb(124 58 237 / 0.14), transparent 70%);
}

.hero-inner {
  display: grid;
  gap: 56px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero { padding: calc(var(--header-h) + 72px) 0 96px; }
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; gap: 64px; }
}

.hero-title {
  font-size: clamp(2.4rem, 1.4rem + 4.6vw, 4.6rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.032em;
}

.hero-lead {
  margin-top: 24px;
  max-width: 36rem;
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.15rem);
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-muted);
}
.hero-proof strong {
  margin-right: 6px;
  font-size: 1.15rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
  .hero-actions .btn { flex: 1 1 100%; }
}

/* portrait + floating cards */
.hero-visual {
  position: relative;
  width: min(100%, 440px);
  margin-inline: auto;
  padding: 0 12px;
}

.portrait {
  position: relative;
  aspect-ratio: 706 / 767;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(160deg, rgb(196 181 253 / 0.6), rgb(255 255 255 / 0.06) 40%, rgb(244 114 182 / 0.5));
  box-shadow: 0 40px 100px -30px rgb(139 92 246 / 0.55);
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 1px);
}

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 260px;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: rgb(16 16 23 / 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px -16px rgb(0 0 0 / 0.6);
  font-size: 0.85rem;
  line-height: 1.3;
}
.float-card strong { display: block; font-weight: 600; }
.float-card small { display: block; color: var(--text-muted); font-size: 0.78rem; }

.float-card--top { top: 10%; left: -8px; animation: float-in 0.8s var(--ease) 0.3s both; }
.float-card--bottom { bottom: 8%; right: -8px; animation: float-in 0.8s var(--ease) 0.5s both; }

.float-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--violet-soft);
  color: #c4b5fd;
}
.float-stat {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 36px;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--pink-soft);
  color: #f9a8d4;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 960px) {
  .float-card--top { left: -48px; }
  .float-card--bottom { right: -40px; }
}

@media (max-width: 400px) {
  .float-card { max-width: 210px; font-size: 0.8rem; }
  .float-card small { font-size: 0.72rem; }
}

@keyframes float-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Marquee ---------- */
.marquee-section {
  position: relative;
  border-block: 1px solid var(--border);
  background: rgb(255 255 255 / 0.015);
}
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 48px;
  padding: 22px 24px;
  animation: marquee 40s linear infinite;
}
.marquee-track li {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-faint);
  white-space: nowrap;
}
.marquee-track li::before {
  content: "◆";
  margin-right: 48px;
  color: rgb(139 92 246 / 0.6);
  font-size: 0.6rem;
  vertical-align: 2px;
}
.marquee:hover .marquee-track,
.marquee-section.is-paused .marquee-track { animation-play-state: paused; }

.marquee-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--bg-raised);
  color: var(--text-muted);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.marquee-toggle:hover { color: var(--text); border-color: rgb(255 255 255 / 0.3); }
.marquee-toggle .icon { width: 14px; height: 14px; }
.marquee-toggle .icon-play { display: none; fill: currentColor; stroke: none; }
.marquee-toggle[aria-pressed="true"] .icon-pause { display: none; }
.marquee-toggle[aria-pressed="true"] .icon-play { display: block; }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section--tight { padding: 24px 0; }

@media (min-width: 960px) {
  .section { padding: 120px 0; }
}

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head--row { max-width: none; display: grid; gap: 20px; }
@media (min-width: 860px) {
  .section-head--row { grid-template-columns: 1fr 1fr; align-items: end; }
  .section-head--row .section-lead { justify-self: end; max-width: 26rem; }
}

.section-title {
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.1rem);
  font-weight: 750;
}

.section-lead {
  margin-top: 18px;
  font-size: 1.05rem;
  color: var(--text-muted);
}
.section-head--row .section-lead { margin-top: 0; }

/* ---------- Problem ---------- */
.problem-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 768px) {
  .problem-grid { grid-template-columns: repeat(3, 1fr); }
}
.problem-card { padding: 28px; }
.problem-card h3 { margin: 18px 0 10px; font-size: 1.3rem; }
.problem-card p { color: var(--text-muted); }
.problem-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #f9a8d4;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 768px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card--wide { grid-column: span 2; }
}
@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(60% 80% at 0% 0%, rgb(139 92 246 / 0.12), transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.service-card:hover { border-color: rgb(139 92 246 / 0.4); transform: translateY(-3px); }
.service-card:hover::after { opacity: 1; }

.service-card h3 { font-size: 1.3rem; }
.service-card p { color: var(--text-muted); }
.service-card .chip-list { margin-top: auto; padding-top: 8px; }

.service-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgb(139 92 246 / 0.3);
  border-radius: 14px;
  background: var(--violet-soft);
  color: #c4b5fd;
  font-size: 1.3rem;
}

/* ---------- Work ---------- */
.work-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 700px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .work-grid { grid-template-columns: repeat(3, 1fr); }
}

.work-card {
  height: 100%;
}
.work-button {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-raised) 100%);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.work-button:hover { border-color: rgb(139 92 246 / 0.45); transform: translateY(-4px); }
.work-button:focus-visible { outline-offset: 4px; border-radius: var(--radius); }

.work-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 0.6s var(--ease);
}
.work-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgb(9 9 13 / 0.65));
}
.work-button:hover .work-media img { transform: scale(1.04); }

.play-badge {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgb(124 58 237 / 0.9);
  color: #fff;
  font-size: 1.3rem;
  box-shadow: 0 0 0 8px rgb(139 92 246 / 0.22), 0 14px 30px -8px rgb(0 0 0 / 0.6);
  transform: translate(-50%, -50%);
  transition: transform 0.3s var(--ease);
}
.play-badge .icon { fill: currentColor; stroke: none; margin-left: 3px; }
.work-button:hover .play-badge { transform: translate(-50%, -50%) scale(1.08); }

.work-category {
  position: absolute;
  z-index: 1;
  left: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgb(9 9 13 / 0.75);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text);
}

.work-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 22px;
  min-width: 0;
}
.work-title { font-size: 1.12rem; letter-spacing: -0.02em; }
.work-summary {
  color: var(--text-muted);
  font-size: 0.93rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.work-body .chip-list { margin-top: auto; padding-top: 6px; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  gap: 1px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}
@media (min-width: 600px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
}
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 6px;
  padding: 28px 24px;
  background: var(--bg);
}
.stat dd {
  margin: 0;
  font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat dt { font-size: 0.9rem; color: var(--text-muted); }

/* ---------- Process ---------- */
.process {
  display: grid;
  gap: 16px;
  counter-reset: step;
}
@media (min-width: 700px) {
  .process { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .process { grid-template-columns: repeat(4, 1fr); }
}
.process-step { padding: 28px 24px; }
.process-step h3 { margin: 22px 0 10px; font-size: 1.2rem; }
.process-step p { color: var(--text-muted); font-size: 0.95rem; }
.step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgb(139 92 246 / 0.4);
  background: var(--violet-soft);
  color: #c4b5fd;
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ---------- Stack ---------- */
.stack-wrap {
  display: grid;
  gap: 40px;
  padding: 32px 24px;
  overflow: hidden;
}
@media (min-width: 960px) {
  .stack-wrap { grid-template-columns: 0.9fr 1.1fr; padding: 56px; gap: 56px; align-items: center; }
}
.stack-wrap::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 480px;
  height: 480px;
  background: radial-gradient(closest-side, rgb(236 72 153 / 0.14), transparent);
  pointer-events: none;
}
.industries {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.93rem;
  color: var(--text-muted);
}
.industries span { color: var(--text); font-weight: 600; }

.stack-list {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stack-list li {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 0.03);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.stack-list li:hover { border-color: rgb(139 92 246 / 0.5); color: var(--text); background: var(--violet-soft); }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  overflow: hidden;
  padding: 64px 24px;
  border: 1px solid rgb(139 92 246 / 0.35);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #17122a 0%, var(--bg-raised) 100%);
  text-align: center;
}
@media (min-width: 768px) {
  .cta { padding: 96px 48px; }
}
.cta-glow {
  position: absolute;
  inset: -40% 0 auto;
  height: 520px;
  background: radial-gradient(45% 55% at 50% 30%, rgb(139 92 246 / 0.35), transparent 70%);
  pointer-events: none;
}
.cta > :not(.cta-glow) { position: relative; }
.cta-title {
  max-width: 760px;
  margin-inline: auto;
  font-size: clamp(2rem, 1.3rem + 3vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.cta-lead {
  max-width: 34rem;
  margin: 20px auto 0;
  font-size: 1.08rem;
  color: var(--text-muted);
}
.cta-actions { margin-top: 36px; display: flex; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a {
  display: inline-block;
  padding: 6px 0;
  color: var(--text-muted);
  font-size: 0.93rem;
  transition: color 0.2s var(--ease);
}
.footer-links a:hover { color: var(--text); }
.footer-note { width: 100%; font-size: 0.85rem; color: var(--text-faint); }

.footer-social { display: flex; gap: 10px; }
.footer-social .icon { width: 18px; height: 18px; }

@media (max-width: 767px) {
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); } /* room for floating WhatsApp button */
}

/* ---------- Contact links (CTA) ---------- */
.contact-label {
  margin-top: 48px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.contact-links {
  display: grid;
  gap: 12px;
  max-width: 980px;
  margin: 18px auto 0;
  text-align: left;
}
@media (min-width: 600px) {
  .contact-links { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .contact-links { grid-template-columns: repeat(4, 1fr); }
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: rgb(255 255 255 / 0.03);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.contact-link:hover { border-color: rgb(139 92 246 / 0.5); background: var(--violet-soft); transform: translateY(-2px); }
.contact-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--violet-soft);
  color: #c4b5fd;
  font-size: 1.15rem;
}
.contact-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.contact-text strong { font-weight: 600; }
.contact-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.contact-link--whatsapp { border-color: rgb(37 211 102 / 0.45); }
.contact-link--whatsapp .contact-icon { background: rgb(37 211 102 / 0.14); color: #4ade80; }
.contact-link--whatsapp:hover { border-color: rgb(37 211 102 / 0.75); background: rgb(37 211 102 / 0.08); }

/* ---------- Floating WhatsApp button ---------- */
.wa-float {
  position: fixed;
  z-index: 40;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  min-width: 56px;
  justify-content: center;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: #25d366;
  color: #052e16; /* dark text on WhatsApp green for contrast */
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 12px 30px -8px rgb(37 211 102 / 0.55), 0 4px 12px rgb(0 0 0 / 0.4);
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.wa-float:hover { background: #3be07a; transform: translateY(-2px); }
.wa-float .icon { width: 24px; height: 24px; stroke-width: 2; }
.wa-float-text { display: none; }
@media (min-width: 768px) {
  .wa-float { padding: 0 22px 0 18px; }
  .wa-float-text { display: inline; }
}

/* ---------- Airtable case studies ---------- */
.case-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 800px) {
  .case-grid { grid-template-columns: repeat(2, 1fr); }
}
.case-card { height: 100%; }
.case-button {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-raised) 100%);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.case-button:hover { border-color: rgb(139 92 246 / 0.45); transform: translateY(-4px); }
.case-button:focus-visible { outline-offset: 4px; border-radius: var(--radius); }

.case-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: #f4f4f6; /* Airtable screens are light; avoids a dark flash while loading */
}
.case-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 0.6s var(--ease);
}
.case-button:hover .case-media img { transform: scale(1.03); }
.case-video-tag {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: var(--radius-pill);
  background: rgb(9 9 13 / 0.85);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text);
}
.case-video-tag .icon { width: 12px; height: 12px; fill: currentColor; stroke: none; }

.case-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px 24px;
  min-width: 0;
}
.case-industry {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f9a8d4;
}
.case-name { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.case-teaser { color: var(--text-muted); font-size: 0.95rem; }
.case-content .chip-list { padding-top: 4px; }
.case-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  font-weight: 600;
  font-size: 0.93rem;
  color: #c4b5fd;
}
.case-cta .icon { transition: transform 0.2s var(--ease); }
.case-button:hover .case-cta .icon { transform: translateX(3px); }

/* case modal */
.case-modal { width: min(1040px, calc(100% - 2 * var(--gutter))); overflow-y: auto; }
.case-modal .video-modal-inner { padding-top: 0; }
.case-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 -16px 18px;
  padding: 16px;
  background: rgb(16 16 23 / 0.94);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
@media (min-width: 768px) {
  .case-modal-head { margin: 0 -24px 22px; padding: 18px 24px; }
}
.case-modal-industry { margin-bottom: 6px; font-size: 0.72rem; color: #f9a8d4; }
.case-modal-title { font-size: 1.4rem; }

.case-story { display: grid; gap: 12px; }
@media (min-width: 860px) {
  .case-story { grid-template-columns: repeat(3, 1fr); }
}
.case-block {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 0.02);
}
.case-block h3 {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c4b5fd;
}
.case-block p { color: var(--text-muted); font-size: 0.93rem; }
.case-block--outcome { border-color: rgb(139 92 246 / 0.35); background: var(--violet-soft); }
.case-block--outcome p { color: var(--text); }

.case-video { margin-top: 20px; }

.case-gallery-title { margin: 32px 0 14px; font-size: 1.1rem; }
.case-gallery { display: grid; gap: 22px; }
.case-gallery figure { margin: 0; }
.case-gallery a {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f4f4f6;
  transition: border-color 0.2s var(--ease);
}
.case-gallery a:hover { border-color: rgb(139 92 246 / 0.5); }
.case-gallery img { width: 100%; }
.case-gallery figcaption { margin-top: 8px; font-size: 0.85rem; color: var(--text-faint); }

/* ---------- Reviews ---------- */
.text-link {
  color: #c4b5fd;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgb(196 181 253 / 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s var(--ease), color 0.2s var(--ease);
}
.text-link:hover { color: #ddd6fe; text-decoration-color: currentColor; }

.featured-review {
  margin: 0 0 20px;
  padding: 32px 24px;
  border-color: rgb(139 92 246 / 0.3);
  background:
    radial-gradient(60% 120% at 100% 0%, rgb(139 92 246 / 0.14), transparent 60%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg-raised) 100%);
}
@media (min-width: 768px) {
  .featured-review { padding: 48px 56px; }
}
.quote-mark { width: 40px; height: 40px; fill: rgb(167 139 250 / 0.5); margin-bottom: 18px; }
.featured-review blockquote { margin: 0; }
.featured-review blockquote p {
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
  line-height: 1.55;
  letter-spacing: -0.01em;
}
.featured-review blockquote p + p { margin-top: 14px; }
.featured-review figcaption {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  line-height: 1.35;
}
.featured-review figcaption strong { display: block; font-weight: 600; }
.featured-review figcaption small { display: block; color: var(--text-muted); font-size: 0.86rem; }
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient);
  color: #120a24;
  font-weight: 800;
  font-size: 0.9rem;
}

.review-grid { columns: 1; column-gap: 20px; }
@media (min-width: 700px) { .review-grid { columns: 2; } }
@media (min-width: 1080px) { .review-grid { columns: 3; } }
.review-card {
  break-inside: avoid;
  margin-bottom: 20px;
  padding: 24px;
}
.review-card figure { margin: 0; }
.review-card blockquote { margin: 14px 0 16px; }
.review-card blockquote p { font-size: 0.98rem; }
.review-card figcaption { font-size: 0.85rem; color: var(--text-muted); line-height: 1.45; }
.review-source {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: rgb(52 211 153 / 0.12);
  color: #6ee7b7;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
.review-date { color: var(--text-faint); white-space: nowrap; }
.stars { display: inline-flex; gap: 3px; color: #fbbf24; }
.stars svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Video modal ---------- */
.video-modal {
  width: min(1100px, calc(100% - 2 * var(--gutter)));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--text);
  overscroll-behavior: contain;
  box-shadow: 0 40px 120px -20px rgb(0 0 0 / 0.8);
}
.video-modal::backdrop {
  background: rgb(5 5 8 / 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.video-modal[open] { animation: modal-in 0.3s var(--ease); }

.video-modal-inner { padding: 16px; }
@media (min-width: 768px) { .video-modal-inner { padding: 20px 24px 24px; } }

.video-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.video-modal-title {
  min-width: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.video-frame {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}
.video-frame video { width: 100%; height: 100%; object-fit: contain; }
.video-modal-summary { margin-top: 14px; color: var(--text-muted); font-size: 0.95rem; }

body:has(.video-modal[open]) { overflow: hidden; }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; row-gap: 12px; }
  .marquee-track [aria-hidden="true"],
  .marquee-toggle { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
