/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: #000;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #333;
}

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #ffffff;
  --surface: #f5f5f5;
  --text:    #000000;
  --muted:   #555555;
  --accent:  #000000;
  --border:  #d4d4d4;
  --nav-h:   60px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: clip;
  /* iOS Safari: prevent text auto-scaling on rotation */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  /* Stop the bounce-white overscroll on iOS so the dark hero feels seamless */
  overscroll-behavior-y: none;
}

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

/* ─── Container ─────────────────────────────────────────────── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── Navigation ─────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background 0.4s ease, border-color 0.4s ease;
}

/* ─── Nav: dark/galaxy state when over hero ─────────────────── */
nav.nav-dark {
  background: rgba(5, 5, 8, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
nav.nav-dark .nav-logo { color: #ffffff; }
nav.nav-dark .nav-links a { color: rgba(200, 200, 210, 0.75); }
nav.nav-dark .nav-links a:hover,
nav.nav-dark .nav-links a.active { color: #ffffff; }
nav.nav-dark .nav-links a::after { background: #ffffff; }
nav.nav-dark .hamburger span { background: #ffffff; }

nav .container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--text);
  transition: width 0.25s cubic-bezier(0.22,1,0.36,1);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger | 44pt tap target via padding, 28px visual bars */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: opacity 0.2s ease;
}
.hamburger:active { opacity: 0.6; }

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Sections ───────────────────────────────────────────────── */
section {
  padding: 5rem 0;
  scroll-margin-top: var(--nav-h);
}

section.surface { background: var(--surface); }

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* About section: section-label gets a draw-in underline anchor */
#about .section-label {
  position: relative;
  display: inline-block;
  padding-bottom: 0.45rem;
}
#about .section-label::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1) 0.2s;
}
#about .section-label.visible::after,
#about .reveal.visible.section-label::after {
  transform: scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
  #about .section-label::after { transform: scaleX(1); transition: none; }
}

/* About cursor-follow spotlight (desktop hover-capable only) */
#about {
  position: relative;
}
#about::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--ax, -9999px) var(--ay, -9999px),
    rgba(0, 0, 0, 0.04), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  #about:hover::before { opacity: 1; }
}
#about .container { position: relative; z-index: 1; }

.section-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 3rem;
}

/* ─── Hero (animation only) ─────────────────────────────────── */
#hero {
  min-height: 100dvh;
  height: 100vh;
  display: block;
  position: relative;
  overflow: hidden;
  background: #050508;
  isolation: isolate;
}

#heroAnim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  pointer-events: none;
  /* Dimmed so the kinetic headline reads as primary content */
  opacity: 0.45;
}

/* Soft vignette so edges sink to true black */
.hero-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(5, 5, 8, 0.55) 80%,
    #050508 100%
  );
}

/* Custom cursor inside the hero — desktop pointer devices only */
.hero-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px; /* center on the (left, top) coords set in JS */
  border-radius: 50%;
  background: #ffffff;
  mix-blend-mode: difference;
  pointer-events: none;
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              opacity   0.3s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0;
  z-index: 5;
  will-change: left, top, transform;
}
.hero-cursor.is-active {
  opacity: 1;
  transform: scale(1);
}
.hero-cursor.is-active::after {
  content: '';
  position: absolute;
  inset: -28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.25), transparent 60%);
  mix-blend-mode: normal;
}
@media (hover: none), (max-width: 900px) {
  .hero-cursor { display: none; }
}

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(60px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeRight {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── Scroll Reveal ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(70px);
  transition: opacity 0.9s cubic-bezier(0.22,1,0.36,1), transform 0.9s cubic-bezier(0.22,1,0.36,1);
}
.reveal.visible { opacity: 1; transform: none; }

.reveal-left {
  opacity: 0;
  transform: translateX(-70px);
  transition: opacity 0.9s cubic-bezier(0.22,1,0.36,1), transform 0.9s cubic-bezier(0.22,1,0.36,1);
}
.reveal-left.visible { opacity: 1; transform: none; }

.reveal-right {
  opacity: 0;
  transform: translateX(70px);
  transition: opacity 0.9s cubic-bezier(0.22,1,0.36,1), transform 0.9s cubic-bezier(0.22,1,0.36,1);
}
.reveal-right.visible { opacity: 1; transform: none; }

.reveal-scale {
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.85s cubic-bezier(0.22,1,0.36,1), transform 0.85s cubic-bezier(0.22,1,0.36,1);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* ─── Intro Curtain (first-visit hello screen) ───────────────── */
/* Curtain covers the whole viewport. Wordmark letters reveal in
   sequence (--i * 50ms), then the curtain itself lifts upward.
   The body.intro-running flag locks scroll for the ~1.7s sequence. */
body.intro-running {
  overflow: hidden;
  height: 100dvh;
}
body.intro-running #hero {
  opacity: 0;
}
body.intro-done #hero {
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.intro-curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transform: translateY(0);
  will-change: transform;
}
.intro-curtain-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 0 1.5rem;
  text-align: center;
}
.intro-wordmark {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: clamp(2.4rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
  color: #fff;
  display: inline-flex;
  flex-wrap: nowrap;
  overflow: hidden;
  padding: 0.2em 0;
}
.intro-letter {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  will-change: transform, opacity;
}
.intro-space { display: inline-block; width: 0.4em; }
.intro-tag {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.7s,
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.7s;
}

/* Play state: letters slide in on a staggered timeline */
.intro-curtain.intro-play .intro-letter {
  animation: intro-letter-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i, 0) * 50ms + 80ms);
}
.intro-curtain.intro-play .intro-tag {
  opacity: 1;
  transform: translateY(0);
}

@keyframes intro-letter-rise {
  to { transform: translateY(0); opacity: 1; }
}

/* Lift state: whole curtain wipes up off-screen */
.intro-curtain.intro-lift {
  transform: translateY(-100%);
  transition: transform 0.7s cubic-bezier(0.77, 0, 0.175, 1);
}

@media (prefers-reduced-motion: reduce) {
  .intro-curtain { display: none; }
}

/* ─── View Transitions API (cross-document page morphs) ──────── */
/* Native browser-driven fade-morph between pages. Chrome 111+,
   Safari 18+, Firefox 134+. Older browsers full-page-reload. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.77, 0, 0.175, 1);
}
::view-transition-old(root) {
  animation-name: vt-fade-out;
}
::view-transition-new(root) {
  animation-name: vt-fade-in;
}
@keyframes vt-fade-out {
  to { opacity: 0; transform: translateY(-12px); }
}
@keyframes vt-fade-in {
  from { opacity: 0; transform: translateY(12px); }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.01s;
  }
}

/* ─── Hero scroll-exit (blur + scale driven by --hero-exit) ──── */
#hero {
  filter: blur(calc(var(--hero-exit, 0) * 8px));
  transform: scale(calc(1 - var(--hero-exit, 0) * 0.05));
}
@media (max-width: 768px) {
  #hero {
    filter: blur(calc(var(--hero-exit, 0) * 6px));
  }
}
@media (prefers-reduced-motion: reduce) {
  #hero { filter: none !important; transform: none !important; }
}

/* ─── Ripple ─────────────────────────────────────────────────── */
.ripple {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transform: translate(-50%,-50%) scale(0);
  pointer-events: none;
  animation: rippleOut 0.55s ease-out forwards;
}
@keyframes rippleOut {
  to { transform: translate(-50%,-50%) scale(40); opacity: 0; }
}

/* ─── Card spotlight (legacy — kept for any .service-card elsewhere) ── */

/* ─── Button ─────────────────────────────────────────────────── */
@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
  50%       { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.10),
                          0 0 30px rgba(255, 255, 255, 0.08); }
}

@keyframes btn-shimmer {
  0%   { transform: translateX(-120%) skewX(-15deg); }
  100% { transform: translateX(220%) skewX(-15deg); }
}

.btn {
  display: inline-block;
  background: transparent;
  color: #ffffff;
  padding: 1rem 2.2rem;
  min-height: 44px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.06em;
  position: relative;
  overflow: hidden;
  z-index: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  animation: btn-pulse 2.8s ease-in-out 1.8s infinite;
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.22s ease,
              letter-spacing 0.22s ease,
              background 0.22s ease,
              color 0.22s ease,
              border-color 0.22s ease,
              opacity 0.12s ease;
}

/* Diagonal shimmer stripe */
.btn::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  width: 40%;
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(-120%) skewX(-15deg);
  transition: none;
  pointer-events: none;
  z-index: 1;
}

.btn:hover {
  background: #ffffff;
  color: #050508;
  border-color: #ffffff;
  transform: translateY(-5px) scale(1.06);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.2),
              0 16px 40px rgba(255, 255, 255, 0.15),
              0 4px 10px rgba(255, 255, 255, 0.10);
  letter-spacing: 0.1em;
  animation: none;
}

.btn:hover::before {
  animation: btn-shimmer 0.55s cubic-bezier(0.22,1,0.36,1) forwards;
}

.btn:active {
  transform: scale(0.97);
  opacity: 0.9;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
  transition-duration: 0.08s;
}

/* ─── Hero bottom fade ───────────────────────────────────────── */
.hero-fade-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 160px;
  background: linear-gradient(to bottom,
    rgba(5, 5, 8, 0) 0%,
    rgba(5, 5, 8, 0.4) 30%,
    #f5f5f5 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* ─── Hero kinetic headline (SplitText per-char rise) ────────── */
.hero-headline {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  text-align: center;
  pointer-events: none;
  width: min(92vw, 880px);
  padding: 0 1.5rem;
  color: #fff;
}
.hero-headline-eyebrow {
  font: 600 0.7rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 1.5rem;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1) 1.7s,
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 1.7s;
}
body.intro-done .hero-headline-eyebrow {
  opacity: 1;
  transform: none;
}
.hero-headline-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(3.2rem, 9vw, 6.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
  color: #fff;
}
.hero-headline-line {
  display: block;
  overflow: hidden;
  padding: 0.15em 0;
}
.hero-headline-line em {
  font-style: italic;
  background: linear-gradient(110deg, #ec4899 0%, #f9a8d4 35%, #c084fc 65%, #ec4899 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: hero-headline-sweep 9s linear infinite;
}
@keyframes hero-headline-sweep {
  to { background-position: 220% 0; }
}
.hero-headline-char {
  display: inline-block;
  transform: translateY(115%);
  opacity: 0;
  will-change: transform, opacity;
}
body.intro-done .hero-headline-char {
  animation: hero-headline-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(1.7s + var(--char-i, 0) * 35ms);
}
@keyframes hero-headline-rise {
  to { transform: translateY(0); opacity: 1; }
}
.hero-headline-sub {
  font: 400 clamp(0.9rem, 1.4vw, 1.05rem)/1.5 'Inter', system-ui, sans-serif;
  letter-spacing: -0.005em;
  color: rgba(255, 255, 255, 0.6);
  max-width: 32ch;
  margin: 1.5rem auto 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) 2.8s,
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 2.8s;
}
body.intro-done .hero-headline-sub {
  opacity: 1;
  transform: none;
}
/* The headline blurs along with the rest of the hero on scroll exit */
#hero .hero-headline {
  /* uses the same --hero-exit var as the canvas */
  opacity: calc(1 - var(--hero-exit, 0) * 1.4);
}
@media (max-width: 768px) {
  .hero-headline-title { font-size: clamp(2.4rem, 13vw, 4.5rem); }
  .hero-headline-eyebrow { font-size: 0.6rem; margin-bottom: 1rem; }
  .hero-headline-sub { font-size: 0.9rem; margin-top: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-headline-char { transform: none; opacity: 1; animation: none !important; }
  .hero-headline-eyebrow, .hero-headline-sub { transform: none; opacity: 1; transition: none; }
  .hero-headline-line em { animation: none; }
}

/* ─── Hero procedural mockup (AI chat loop) ──────────────────── */
.hero-mockup {
  position: absolute;
  right: clamp(1.5rem, 4vw, 3.5rem);
  bottom: clamp(8rem, 14vh, 11rem);
  width: clamp(220px, 22vw, 320px);
  z-index: 3;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1) 1.6s,
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 1.6s;
  pointer-events: none;
}
body.intro-done .hero-mockup,
body:not(.intro-running) .hero-mockup {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.hero-mockup-frame {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(20, 20, 24, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}
.hero-mockup-frame::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 11px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 50%, rgba(255,255,255,0.06));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.hero-mockup-chrome {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hero-mockup-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.hero-mockup-dot:nth-child(1) { background: #ff5f57; }
.hero-mockup-dot:nth-child(2) { background: #febc2e; }
.hero-mockup-dot:nth-child(3) { background: #28c840; }
.hero-mockup-url {
  flex: 1;
  text-align: center;
  font: 500 0.55rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}
.hero-mockup-body {
  padding: 0.85rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: clamp(120px, 14vh, 170px);
}
.hero-mockup-msg {
  display: flex;
  gap: 0.4rem;
  font-size: 0.7rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.hero-mockup-msg.is-shown { opacity: 1; transform: none; }
.hero-mockup-msg-user { justify-content: flex-end; }
.hero-mockup-msg-user .hero-mockup-msg-bubble {
  background: #ec4899;
  color: #fff;
  border-radius: 12px 12px 2px 12px;
  padding: 0.4rem 0.65rem;
  max-width: 80%;
}
.hero-mockup-msg-ai .hero-mockup-msg-bubble {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px 12px 12px 12px;
  padding: 0.4rem 0.65rem;
  max-width: 85%;
}
.hero-mockup-msg-avatar {
  flex: 0 0 22px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, #500724);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.hero-mockup-msg-avatar svg { width: 12px; height: 12px; }
/* Blinking cursor while AI is "typing" */
.hero-mockup-msg-ai .hero-mockup-msg-bubble.is-typing::after {
  content: '';
  display: inline-block;
  width: 0.45em;
  height: 0.9em;
  background: rgba(255,255,255,0.7);
  margin-left: 0.1em;
  vertical-align: -0.1em;
  animation: hero-mockup-caret 0.9s steps(2) infinite;
}
@keyframes hero-mockup-caret {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Hide the mockup on mobile to keep the hero clean and battery happy */
@media (max-width: 768px) {
  .hero-mockup { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-mockup { transition: none; }
  .hero-mockup-msg-ai .hero-mockup-msg-bubble.is-typing::after { animation: none; }
}

/* ─── About ──────────────────────────────────────────────────── */
.about-bio {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.8;
  margin-top: 1.5rem;
}

.about-panel { display: none; }
.about-panel.is-active { display: block; }

/* ─── About — kinetic typography ─────────────────────────────── */
.about-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

/* Word stagger — set --i in JS, fades in via .reveal.visible */
.about-bio [data-word],
.about-title [data-word] {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em);
  transition:
    opacity   .55s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i, 0) * 28ms),
    transform .55s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i, 0) * 28ms);
}
.reveal.visible [data-word] { opacity: 1; transform: none; }

/* ─── About Stats ───────────────────────────────────────────── */
.about-stats {
  display: flex;
  gap: 3.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat-num {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2.4rem;
  font-weight: 400;
  display: block;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-num::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--muted);
  margin-left: 2px;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── Section Divider ───────────────────────────────────────── */
.section-divider {
  display: flex;
  justify-content: center;
  padding: 0;
}

.divider-line {
  width: 60px;
  height: 1px;
  background: var(--border);
  transform: scaleX(0);
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-scale.visible .divider-line {
  transform: scaleX(1);
}

/* ─── Services (pinned horizontal scroll-stack) ─────────────── */
.svc-section {
  background: var(--surface);
  color: var(--text);
  position: relative;
  padding: 0;
}

.svc-pin {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  padding: 0;
}

.svc-meta {
  position: absolute;
  top: calc(var(--nav-h) + 2.5rem);
  left: clamp(1.5rem, 4vw, 4rem);
  z-index: 3;
  width: clamp(260px, 26vw, 360px);
  pointer-events: none;
}
.svc-meta .section-label { color: var(--muted); margin-bottom: 0.5rem; pointer-events: auto; }
.svc-meta .section-title {
  color: var(--text);
  margin: 0 0 1rem;
  pointer-events: auto;
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1;
  overflow: hidden;
  padding-bottom: 0.15em;
}
.svc-meta .section-title [data-word] { display: inline-block; }
.svc-meta-lede {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 280px;
  margin-bottom: 2rem;
  pointer-events: auto;
}

.svc-progress {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  pointer-events: auto;
}
.svc-progress-count {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.svc-progress-sep { margin: 0 0.25em; opacity: 0.5; }
.svc-progress-track {
  flex: 1;
  height: 1px;
  background: var(--border);
  overflow: hidden;
  position: relative;
}
.svc-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--text);
  transition: width 0.18s linear;
}

/* Horizontal viewport that the track translates inside of */
.svc-viewport {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + 1rem);
  padding-bottom: 2rem;
  overflow: hidden;
}

.svc-track {
  display: flex;
  align-items: stretch;
  gap: 1px;
  background: var(--border);
  padding-left: clamp(320px, 32vw, 460px);
  padding-right: clamp(80px, 10vw, 160px);
  will-change: transform;
}

.svc-card {
  flex: 0 0 clamp(360px, 36vw, 480px);
  min-height: min(68vh, 560px);
  background: var(--bg);
  padding: clamp(2rem, 2.6vw, 2.75rem);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}
.svc-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(260px circle at var(--mx, -9999px) var(--my, -9999px), rgba(0,0,0,0.07), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.svc-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}
.svc-card.is-active { background: #fafafa; }
.svc-card.is-active::after { transform: scaleX(1); }
.svc-card:hover { background: #fafafa; }

/* Chapter divider cards (01 Web Services / 02 App Services) */
.svc-card--divider {
  flex: 0 0 clamp(280px, 22vw, 360px);
  background: var(--surface);
  justify-content: center;
  padding: clamp(2rem, 2.6vw, 2.75rem);
}
.svc-card--divider::before,
.svc-card--divider::after { display: none; }
.svc-divider-num {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 1rem;
}
.svc-divider-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 1.25rem;
}
.svc-divider-lede {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 240px;
}

/* Feature card (02/02 Front End & UI) gets the canvas FX accent */
.svc-card-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.svc-card--feature:hover .svc-card-fx,
.svc-card--feature.is-active .svc-card-fx { opacity: 1; }

/* Mobile fallback: vertical stack, no pin, no transform */
@media (max-width: 899px) {
  .svc-pin {
    height: auto;
    min-height: 0;
    padding: 5rem 0 4rem;
  }
  .svc-meta {
    position: relative;
    top: 0;
    left: 0;
    width: auto;
    padding: 0 1.5rem 2.5rem;
  }
  .svc-meta-lede { display: none; }
  .svc-progress { display: none; }
  .svc-viewport {
    position: relative;
    inset: auto;
    padding: 0 1.5rem;
    overflow: visible;
  }
  .svc-track {
    flex-direction: column;
    gap: 1px;
    padding: 0;
    transform: none !important;
    background: var(--border);
    border: 1px solid var(--border);
  }
  .svc-card {
    flex: 0 0 auto;
    min-height: auto;
  }
  .svc-card--divider {
    flex: 0 0 auto;
    text-align: left;
  }
  .svc-divider-title { font-size: clamp(2rem, 8vw, 2.6rem); }
}

/* ─── Contact ────────────────────────────────────────────────── */

.contact-email {
  display: inline-block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.01em;
  position: relative;
  padding-bottom: 4px;
  margin-bottom: 1.75rem;
  transition: opacity 0.2s;
}

.contact-email::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.contact-email:hover {
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
}

.contact-email:hover::after { transform: scaleX(1); }

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-icon-link {
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.social-icon-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* ─── Contact Section (Dark Immersive) ───────────────────────── */
@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.contact-section {
  background: #050508;
  color: #ffffff;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.contact-fade-top {
  height: 120px;
  background: linear-gradient(to bottom, var(--bg), #050508);
  pointer-events: none;
}

.contact-fade-bottom {
  height: 80px;
  background: linear-gradient(to bottom, #050508, var(--text));
  pointer-events: none;
}

/* Film grain overlay */
.contact-bg-grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
  animation: grainShift 0.4s steps(3) infinite;
}

@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-2px, 2px); }
  66%  { transform: translate(2px, -1px); }
  100% { transform: translate(-1px, -2px); }
}

/* Section-level ambient spotlight */
.contact-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background: radial-gradient(
    800px circle at var(--cx, 50%) var(--cy, 50%),
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.01) 40%,
    transparent 70%
  );
  transition: opacity 0.5s;
}

.contact-section:hover .contact-spotlight { opacity: 1; }

/* Container */
#contact .container {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 4rem 1.5rem 5rem;
}

#contact .section-label {
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.5rem;
}

#contact .section-title {
  color: #ffffff;
  margin-bottom: 0.75rem;
}

#contact .section-subtitle {
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 2.5rem;
  font-size: 1rem;
}

/* ── Glassmorphism Card ─────────────────────────────────────── */
.contact-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 14px;
  padding: 2.5rem 2rem;
  margin-bottom: 2.5rem;
  z-index: 1;
}

/* Rotating conic-gradient border — outer layer */
.contact-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.02) 20%,
    rgba(255, 255, 255, 0.14) 45%,
    rgba(255, 255, 255, 0.02) 70%,
    rgba(255, 255, 255, 0.1) 100%
  );
  z-index: -2;
  animation: borderRotate 8s linear infinite;
}

/* Dark fill inside — the 1px gap reveals the rotating border */
.contact-card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  background: rgba(8, 8, 12, 0.92);
  z-index: -1;
}

@keyframes borderRotate {
  to { --border-angle: 360deg; }
}

/* Card mouse-tracking spotlight */
.contact-card-spotlight {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background: radial-gradient(
    400px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.07),
    transparent 70%
  );
  transition: opacity 0.3s;
}

.contact-card:hover .contact-card-spotlight { opacity: 1; }

/* ── Form ───────────────────────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  text-align: left;
  position: relative;
  z-index: 1;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.contact-section .form-group input,
.contact-section .form-group select,
.contact-section .form-group textarea {
  font-family: 'Inter', system-ui, sans-serif;
  /* 16px minimum kills iOS Safari auto-zoom on focus */
  font-size: 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  /* 1rem vertical = ~44pt total tap height with border */
  padding: 1rem 1.1rem;
  width: 100%;
  display: block;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.contact-section .form-group input::placeholder,
.contact-section .form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

.contact-section .form-group input:focus,
.contact-section .form-group select:focus,
.contact-section .form-group textarea:focus {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05),
              0 0 24px rgba(255, 255, 255, 0.03);
}

.contact-section .form-group select {
  background-color: rgba(255, 255, 255, 0.04);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.contact-section .form-group select option,
.contact-section .form-group select optgroup {
  background: #1a1a1e;
  color: #ffffff;
}

.contact-section .form-group textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.6;
}

/* Submit button — ghost style from .btn, stretched full width */
.contact-card .btn {
  align-self: stretch;
  text-align: center;
  width: 100%;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.contact-card .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  animation: none;
}

/* ── Success State ──────────────────────────────────────────── */
.contact-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.contact-success[hidden] { display: none; }

.contact-success svg {
  color: #ffffff;
  margin-bottom: 0.5rem;
}

/* Animated SVG draw-in */
.contact-success svg circle {
  stroke-dasharray: 63;
  stroke-dashoffset: 63;
}

.contact-success svg polyline {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
}

.contact-success.visible svg circle {
  animation: drawStroke 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.contact-success.visible svg polyline {
  animation: drawStroke 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.55s forwards;
}

@keyframes drawStroke {
  to { stroke-dashoffset: 0; }
}

.contact-success-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: #ffffff;
  opacity: 0;
}

.contact-success-sub {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
  opacity: 0;
}

.contact-success.visible .contact-success-title {
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.75s forwards;
}

.contact-success.visible .contact-success-sub {
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.95s forwards;
}

/* ── Social Icons (dark theme) ──────────────────────────────── */
.contact-section .contact-socials {
  margin-top: 0;
}

.contact-section .social-icon-link {
  color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.12);
}

.contact-section .social-icon-link:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #050508;
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.1);
}

/* ── Contact Mobile ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .contact-card { padding: 1.75rem 1.25rem; }
  .contact-fade-top { height: 80px; }
  .contact-fade-bottom { height: 60px; }
  .contact-bg-grain { display: none; }
  .svc-card-num  { font-size: .72rem; }
  .svc-card-cta  { font-size: .8rem; }
}

/* ─── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--text);
  color: #888;
  text-align: center;
  padding: 1.5rem 1.5rem max(1.5rem, env(safe-area-inset-bottom));
  font-size: 0.8rem;
}

/* ─── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    height: calc(100dvh - var(--nav-h));
    /* Account for iOS home-indicator on the bottom + dynamic-island top */
    padding: 2rem 1.5rem max(2rem, env(safe-area-inset-bottom));
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    list-style: none;
    z-index: 99;
    pointer-events: none;
    /* If link list exceeds viewport, allow scroll inside drawer */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .nav-links.open {
    display: flex;
    pointer-events: auto;
  }

  body.nav-open { overflow: hidden; }

  .nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: opacity 0.12s ease;
  }
  .nav-links a:active { opacity: 0.6; }

  .about-stats { gap: 2rem; flex-wrap: wrap; }
  .stat-num { font-size: 1.8rem; }

  .about-title { font-size: clamp(2rem, 8vw, 2.8rem); }
  .about-bio { font-size: 1rem; line-height: 1.7; }

  /* Services (mobile: cards expanded inline; no hover/tap toggle) */
  .svc-card { padding: 1.75rem 1.5rem; }
  .svc-card-title { font-size: 1.4rem; }
  .svc-card-body {
    opacity: 1;
    max-height: none;
    margin-top: 0.5rem;
  }
  /* Hide shine sweep on mobile — too easy to retrigger and feels twitchy */
  .svc-card-shine { display: none; }
  .svc-card-fx { display: none; }

  section { padding: 4rem 0; }

  /* Prevent horizontal overflow from side reveals */
  .reveal-left  { transform: translateY(50px); }
  .reveal-right { transform: translateY(50px); }
  .reveal-left.visible, .reveal-right.visible { transform: none; }

  /* Dark nav overlay on mobile */
  nav.nav-dark .nav-links {
    background: #050508;
  }

  /* No lift/scale on touch devices, keep ghost style */
  .btn:hover {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.65);
    transform: none;
    box-shadow: none;
    letter-spacing: 0.06em;
    animation: btn-pulse 2.8s ease-in-out 1.8s infinite;
  }

  /* Prevent long email from overflowing */
  .contact-email {
    word-break: break-all;
    font-size: 0.95rem;
  }
}

/* ─── Floating Contact Button ────────────────────────────────── */
.float-contact-wrap {
  position: fixed;
  /* env() clears the iOS home indicator; max() falls back gracefully */
  bottom: max(2rem, calc(env(safe-area-inset-bottom) + 1rem));
  right: max(2rem, env(safe-area-inset-right));
  z-index: 999;
  display: flex;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.6);
  transform-origin: bottom right;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.float-contact-wrap.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .float-contact-wrap {
    transform: none;
    transition: opacity 0.2s ease;
  }
  .float-contact-wrap.visible { transform: none; }
}

.float-contact-wrap::before {
  content: '';
  position: absolute;
  inset: -6px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  animation: floatPulseRing 2.5s ease-out infinite;
}

@keyframes floatPulseRing {
  0%   { transform: scale(1);    opacity: 0.5; }
  100% { transform: scale(1.45); opacity: 0; }
}

.float-contact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* 1.1rem vertical + line-height puts us at ~44px height */
  padding: 1.1rem 1.6rem;
  min-height: 44px;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  transition: transform 0.25s, box-shadow 0.25s, opacity 0.15s;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.float-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.float-contact:active {
  transform: scale(0.97);
  opacity: 0.85;
  transition-duration: 0.08s;
}

.float-contact svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  flex-shrink: 0;
}

.float-contact::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  transition: left 0.5s ease;
  pointer-events: none;
}

.float-contact:hover::after {
  left: 160%;
}

@media (max-width: 900px) {
  .float-contact-wrap {
    bottom: max(1.2rem, calc(env(safe-area-inset-bottom) + 0.5rem));
    right: max(1.2rem, env(safe-area-inset-right));
  }
  .float-contact {
    padding: 0.7rem 1.1rem;
    min-height: 0;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    gap: 0.4rem;
  }
  .float-contact svg { width: 12px; height: 12px; }
}

/* ── Photography ─────────────────────────────────────────── */
.photo-wall-wrap {
  max-width: 1600px;
  margin: 2.5rem auto 0;
  padding: 0 1rem;
}
.photo-wall {
  column-count: 4;
  column-gap: 6px;
}
.pw-item {
  position: relative;
  overflow: hidden;
  margin: 0 0 6px;
  break-inside: avoid;
  background: var(--surface);
  display: block;
  width: 100%;
  animation: pwIn 0.7s cubic-bezier(0.22,1,0.36,1) both;
}
.pw-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22,1,0.36,1), filter 0.4s ease;
  filter: saturate(0.95);
}
.pw-item:hover img {
  transform: scale(1.06);
  filter: saturate(1.1);
}
.pw-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s ease;
  pointer-events: none;
}
.pw-item:hover::after { background: rgba(0,0,0,0.08); }

.pw-item:nth-child(1)  { animation-delay: 0.02s; }
.pw-item:nth-child(2)  { animation-delay: 0.06s; }
.pw-item:nth-child(3)  { animation-delay: 0.10s; }
.pw-item:nth-child(4)  { animation-delay: 0.14s; }
.pw-item:nth-child(5)  { animation-delay: 0.18s; }
.pw-item:nth-child(6)  { animation-delay: 0.22s; }
.pw-item:nth-child(7)  { animation-delay: 0.26s; }
.pw-item:nth-child(8)  { animation-delay: 0.30s; }
.pw-item:nth-child(9)  { animation-delay: 0.34s; }
.pw-item:nth-child(10) { animation-delay: 0.38s; }
.pw-item:nth-child(11) { animation-delay: 0.42s; }
.pw-item:nth-child(12) { animation-delay: 0.46s; }
.pw-item:nth-child(13) { animation-delay: 0.50s; }
.pw-item:nth-child(14) { animation-delay: 0.54s; }
.pw-item:nth-child(15) { animation-delay: 0.58s; }
.pw-item:nth-child(16) { animation-delay: 0.62s; }
.pw-item:nth-child(17) { animation-delay: 0.66s; }
.pw-item:nth-child(18) { animation-delay: 0.70s; }
.pw-item:nth-child(n+19) { animation-delay: 0.74s; }

@keyframes pwIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
  .photo-wall { column-count: 3; }
}
@media (max-width: 600px) {
  .photo-wall { column-count: 2; column-gap: 4px; }
  .pw-item { margin-bottom: 4px; }
}

/* ─── Testimonials (pinned scroll-stack) ───────────────────── */
.ts-section {
  position: relative;
  background: var(--bg);
  color: var(--text);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ts-pin {
  position: relative;
  height: 100vh;
  min-height: 640px;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: clamp(4rem, 8vh, 6rem) 1.5rem;
  box-sizing: border-box;
}

.ts-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.ts-spotlight {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px circle at var(--cx, 50%) var(--cy, 50%),
      rgba(0, 0, 0, 0.05), transparent 60%),
    radial-gradient(1200px circle at calc(20% + var(--prog, 0) * 60%) 50%,
      rgba(0, 0, 0, 0.04), transparent 70%);
  transition: background 0.8s linear;
}

.ts-header {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}
.ts-header .section-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}
.ts-header .section-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: clamp(1.8rem, 3.2vw, 2.3rem);
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 0.6rem;
  line-height: 1.15;
}
.ts-header .section-subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin: 0;
}

.ts-progress {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--muted);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.ts-progress-count {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.ts-progress-sep { opacity: 0.45; }
.ts-progress-bar {
  position: relative;
  display: inline-block;
  width: 84px;
  height: 1px;
  background: rgba(0, 0, 0, 0.15);
}
.ts-progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--text);
  transition: width 0.25s linear;
}

.ts-stack {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  min-height: 360px;
}

.ts-card {
  position: absolute;
  inset: 0;
  margin: auto;
  height: fit-content;
  padding: clamp(2rem, 4.5vw, 3.5rem) clamp(1.75rem, 4vw, 3.25rem);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  will-change: transform, opacity;
}

.ts-mark {
  position: absolute;
  top: -2rem;
  left: 1rem;
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(8rem, 18vw, 16rem);
  line-height: 1;
  color: rgba(0, 0, 0, 0.06);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.ts-quote {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1.2rem, 1.9vw, 1.7rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* Shrink long-quote cards a bit so meta always fits */
.ts-card[data-ts-slide="2"] .ts-quote {
  font-size: clamp(1.05rem, 1.55vw, 1.4rem);
  line-height: 1.55;
}

.ts-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 0.038s);
  will-change: opacity, transform;
}
.ts-card.is-active .ts-word {
  opacity: 1;
  transform: translateY(0);
}

/* Emphasized phrases — just bold, no underline */
.ts-emph {
  font-weight: 700;
  color: var(--text);
}

.ts-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.ts-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
}
.ts-role {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Mobile + reduced-motion: vertical stack, no pin */
@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .ts-pin {
    height: auto !important;
    min-height: 0 !important;
    position: static !important;
    padding: clamp(4rem, 8vw, 6rem) 1.25rem;
  }
  .ts-progress { display: none; }
  .ts-stack {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 760px;
    min-height: 0;
  }
  .ts-card {
    position: relative !important;
    inset: auto !important;
    max-height: none;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  .ts-quote { font-size: clamp(1.35rem, 5vw, 1.9rem); }
  .ts-card .ts-word,
  .ts-card.is-visible .ts-word {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ts-spotlight { transition: none; }
}

/* ─── Unified Light Theme (overrides for sections below hero) ── */
/* The hero stays dark to host the canvas animation; the nav
   goes dark while the hero is in view (default nav.nav-dark
   styles in the base section above handle that). */

/* ─── Services — editorial card content ──────────────────────── */
.svc-card-num {
  font-size: .7rem;
  letter-spacing: .22em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}
.svc-card h4.svc-card-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: .6rem 0 1rem;
  color: var(--text);
  position: relative;
  z-index: 1;
}
.svc-card h4.svc-card-title em {
  font-style: normal;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  color: var(--muted);
  font-size: 1em;
}
.svc-card-lede {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}
.svc-card-body {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.75;
  margin-top: auto;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  transition: opacity   .35s cubic-bezier(0.22, 1, 0.36, 1),
              max-height .45s cubic-bezier(0.22, 1, 0.36, 1);
}
.svc-card:hover .svc-card-body,
.svc-card:focus-within .svc-card-body,
.svc-card.is-active .svc-card-body {
  opacity: 1;
  max-height: 240px;
}
/* Divider cards have no body, skip the reveal slot */
.svc-card--divider .svc-card-body { display: none; }

/* Shine sweep — Elite UI pattern 4 */
.svc-card-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 70%);
  transform: translateX(-110%);
  transition: transform .9s cubic-bezier(0.22, 1, 0.36, 1);
  mix-blend-mode: overlay;
}
.svc-card:hover .svc-card-shine,
.svc-card:focus-within .svc-card-shine { transform: translateX(110%); }

/* Arrow-slide CTA — Elite UI pattern 6 */
.svc-card-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  padding: .85rem 0;
  min-height: 44px;
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  position: relative;
  z-index: 4;
  align-self: flex-start;
  transition: transform .25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.svc-card-cta:active {
  opacity: 0.7;
  transform: scale(0.97);
  transition-duration: 0.08s;
}
.svc-card-cta-label {
  position: relative;
}
.svc-card-cta-label::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(0.22, 1, 0.36, 1);
}
.svc-card-cta:hover .svc-card-cta-label::after,
.svc-card-cta:focus-visible .svc-card-cta-label::after {
  transform: scaleX(1);
}
.svc-card-cta-arrow {
  display: inline-block;
  transition: transform .35s cubic-bezier(0.22, 1, 0.36, 1);
}
.svc-card-cta:hover .svc-card-cta-arrow,
.svc-card-cta:focus-visible .svc-card-cta-arrow {
  transform: translateX(8px);
}
.svc-card-cta:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
  border-radius: 2px;
}
.svc-card:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

/* ─── Contact (light, with animated card restored) ──────────── */
.contact-section {
  background: var(--bg);
  color: var(--text);
  padding: 6rem 0 5rem;
  border-top: 1px solid var(--border);
}
#contact .section-label { color: var(--muted); }
#contact .section-title { color: var(--text); }
#contact .section-subtitle { color: var(--muted); }

/* Subtle dark-on-light spotlight on the section */
.contact-spotlight {
  background: radial-gradient(
    800px circle at var(--cx, 50%) var(--cy, 50%),
    rgba(0, 0, 0, 0.04),
    rgba(0, 0, 0, 0.015) 40%,
    transparent 70%
  );
}

/* Card — restore rotating animated border in light tones */
.contact-card {
  background: transparent;
  border: none;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.18);
}
.contact-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    rgba(0, 0, 0, 0.18) 0%,
    rgba(0, 0, 0, 0.04) 20%,
    rgba(0, 0, 0, 0.22) 45%,
    rgba(0, 0, 0, 0.04) 70%,
    rgba(0, 0, 0, 0.18) 100%
  );
  z-index: -2;
  animation: borderRotate 8s linear infinite;
  display: block;
}
.contact-card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  background: #ffffff;
  z-index: -1;
  display: block;
}

/* Card cursor spotlight — dark on light */
.contact-card-spotlight {
  background: radial-gradient(
    400px circle at var(--mx, 50%) var(--my, 50%),
    rgba(0, 0, 0, 0.05),
    transparent 70%
  );
}

/* Form fields — light theme */
.form-group label { color: var(--muted); }
.contact-section .form-group input,
.contact-section .form-group select,
.contact-section .form-group textarea {
  color: var(--text);
  background: #fafafa;
  border-color: var(--border);
}
.contact-section .form-group input::placeholder,
.contact-section .form-group textarea::placeholder {
  color: #a8a8a8;
}
.contact-section .form-group input:focus,
.contact-section .form-group select:focus,
.contact-section .form-group textarea:focus {
  border-color: var(--text);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}
.contact-section .form-group select {
  background-color: #fafafa;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
.contact-section .form-group select option,
.contact-section .form-group select optgroup {
  background: #ffffff;
  color: var(--text);
}

/* Submit button — solid black on light card */
.contact-card .btn {
  background: var(--text);
  color: #ffffff;
  border-color: var(--text);
  animation: none;
}
.contact-card .btn:hover {
  background: #ffffff;
  color: var(--text);
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08),
              0 16px 40px rgba(0, 0, 0, 0.15);
}
.contact-card .btn:active {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Success state */
.contact-success svg { color: var(--text); }
.contact-success-title { color: var(--text); }
.contact-success-sub { color: var(--muted); }

/* Social icons — dark on light */
.contact-section .social-icon-link {
  color: var(--muted);
  border-color: var(--border);
  background: #ffffff;
}
.contact-section .social-icon-link:hover {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ─── Inquiry form — floating labels + microinteractions ────── */
.ff-float {
  position: relative;
  gap: 0;
}

.contact-section .form-group.ff-float input,
.contact-section .form-group.ff-float select,
.contact-section .form-group.ff-float textarea {
  padding-top: 1.55rem;
  padding-bottom: 0.55rem;
}

.contact-section .form-group.ff-float textarea {
  padding-top: 1.7rem;
}

.ff-float > label {
  position: absolute;
  left: 1rem;
  top: 1rem;
  margin: 0;
  pointer-events: none;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  background: transparent;
  transform-origin: 0 0;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.32s ease,
              opacity 0.2s ease;
  z-index: 2;
}

/* Float on focus or when field has content */
.ff-float input:not(:placeholder-shown) ~ label,
.ff-float input:focus ~ label,
.ff-float textarea:not(:placeholder-shown) ~ label,
.ff-float textarea:focus ~ label,
.ff-float select:focus ~ label,
.ff-float.ff-select.ff-has-value > label,
.ff-float.ff-select:focus-within > label {
  transform: translateY(-0.7rem) scale(0.72);
  color: var(--text);
}

/* Underline accent */
.ff-line {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 2;
}
.ff-float:focus-within .ff-line { transform: scaleX(1); }

/* Inline error */
.ff-error {
  display: block;
  min-height: 0;
  margin: 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.2;
  color: #8a4040;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.ff-error:not(:empty) {
  opacity: 1;
  transform: translateY(0);
  margin-top: 0.4rem;
}
.contact-section .form-group input.has-error,
.contact-section .form-group select.has-error,
.contact-section .form-group textarea.has-error {
  border-color: #b66;
}

/* Service chip */
.ff-chip {
  position: absolute;
  right: 2.6rem;
  top: 50%;
  transform: translateY(-50%) scale(0.9);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 2;
}
.ff-chip[hidden] { display: none; }
.ff-chip.is-in {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* Magnetic submit prep */
.contact-card .btn {
  position: relative;
  overflow: hidden;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              border-radius 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.25s ease,
              color 0.25s ease,
              border-color 0.25s ease,
              transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s ease;
  will-change: width, border-radius, transform;
}
.contact-card .btn .btn-label {
  display: inline-block;
  transition: opacity 0.2s ease;
}
.contact-card .btn .btn-check {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  opacity: 0;
  transition: opacity 0.18s ease 0.05s;
  color: #ffffff;
}
.contact-card .btn .btn-check[hidden] { display: none; }

/* Loading state — collapse to circle + spinner */
.contact-card .btn.is-loading {
  width: 52px !important;
  border-radius: 999px;
  pointer-events: none;
  padding: 0;
  align-self: center;
}
.contact-card .btn.is-loading .btn-label { opacity: 0; }
.contact-card .btn.is-loading::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* Success state — keep circle, swap to checkmark */
.contact-card .btn.is-success {
  width: 52px !important;
  border-radius: 999px;
  pointer-events: none;
  padding: 0;
  align-self: center;
  background: var(--text);
  color: #ffffff;
  border-color: var(--text);
}
.contact-card .btn.is-success .btn-label { opacity: 0; }
.contact-card .btn.is-success::after { display: none; }
.contact-card .btn.is-success .btn-check { opacity: 1; }

/* Reduced-motion overrides */
@media (prefers-reduced-motion: reduce) {
  .ff-float > label { transition: none; }
  .ff-line { display: none; }
  .ff-chip { transition: none; }
  .contact-card .btn,
  .contact-card .btn .btn-label,
  .contact-card .btn .btn-check { transition: none; }
  .contact-card .btn.is-loading {
    width: 100% !important;
    border-radius: 6px;
    padding: 0.85rem 1.5rem;
  }
  .contact-card .btn.is-loading::after { display: none; }
  .contact-card .btn.is-loading .btn-label { opacity: 1; }
  .contact-card .btn.is-success {
    width: 100% !important;
    border-radius: 6px;
    padding: 0.85rem 1.5rem;
  }
  .contact-card .btn.is-success .btn-label { opacity: 1; }
  .contact-card .btn.is-success .btn-check { opacity: 0; }
}

/* Mobile — keep chip out of the way of dropdown chevron */
@media (max-width: 600px) {
  .ff-chip { display: none; }
}

/* Mobile — hero fills exactly the viewport above the marquee */
@media (max-width: 768px) {
  #hero {
    height:     calc(100dvh - var(--marquee-h));
    min-height: calc(100dvh - var(--marquee-h));
  }
}

/* ─── About Bio Accent Words (animated underline draw) ──────── */
.bio-accent {
  color: #1a1a1a;
  font-weight: 700;
  position: relative;
  background: linear-gradient(120deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.06) 100%);
  background-repeat: no-repeat;
  background-size: 0% 0.35em;
  background-position: 0 88%;
  padding: 0 0.1em;
  transition: background-size .9s cubic-bezier(0.22, 1, 0.36, 1)
              calc(var(--accent-i, 0) * 120ms + .35s);
}
.reveal.visible .bio-accent { background-size: 100% 0.35em; }

/* ─── Services Marquee (fixed height for hero math) ────────── */
:root { --marquee-h: 60px; }
.marquee {
  position: relative;
  overflow: hidden;
  background: var(--text);
  color: #ffffff;
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--text);
  height: var(--marquee-h);
  padding: 0;
  display: flex;
  align-items: center;
}

.marquee-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 2.5rem;
  white-space: nowrap;
  /* --marquee-speed default 1; mobile scroll-velocity may boost it briefly */
  animation: marqueeScroll calc(25s / var(--marquee-speed, 1)) linear infinite;
  transition: animation-duration 0.4s ease;
}
/* Desktop: pause on hover for "now I can read it" UX */
@media (hover: hover) {
  .marquee:hover .marquee-track {
    animation-play-state: paused;
  }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; transform: translateX(0); }
}

.marquee-item {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  flex-shrink: 0;
}

.marquee-dot {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (max-width: 600px) {
  :root { --marquee-h: 52px; }
  .marquee-item { font-size: 0.8rem; letter-spacing: 0.08em; }
  .marquee-track { gap: 1.75rem; animation-duration: 18s; }
}

/* ─── Scroll-driven Hero exit ────────────────────────────────
   Driven by --hero-progress on <html> (set in script.js).
   Range 0 → 1 across .hero-stage. The canvas reads this same
   variable through getComputedStyle. */
:root { --hero-progress: 0; }

.hero-stage {
  position: relative;
  height: 180vh;
}

.hero-stage > #hero {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 100vh;
}

.about-rise { /* legacy hook still on the about container; static now */ }

/* Mobile: hero fills viewport-minus-marquee, no sticky pin. */
@media (max-width: 768px) {
  .hero-stage { height: auto; }
  .hero-stage > #hero {
    position: static;
    height:     calc(100dvh - var(--marquee-h));
    min-height: calc(100dvh - var(--marquee-h));
  }
}

/* Reduced motion: collapse to a static calm state. */
@media (prefers-reduced-motion: reduce) {
  .hero-stage { height: auto; }
  .hero-stage > #hero {
    position: static;
    height: auto;
    min-height: 100vh;
  }
  .hero-cursor { display: none; }

  /* About + Services: kill all transitions, force final visible state */
  .about-bio [data-word],
  .about-title [data-word],
  .bio-accent,
  .svc-card-shine,
  .svc-card-cta,
  .svc-card-cta-arrow,
  .svc-card-cta-label::after,
  .svc-card-body { transition: none !important; }

  .about-bio [data-word],
  .about-title [data-word] { opacity: 1 !important; transform: none !important; }
  .bio-accent { background-size: 100% 0.35em !important; }
  .svc-card-shine { display: none; }
  .svc-card-body { opacity: 1 !important; max-height: none !important; }
  .svc-card-fx { display: none !important; }

}

/* ─── Home Logo Lockup (replaces former Selected Work slideshow) ───── */
#portfolio.home-logos {
  background: #0a0a0a;
  color: #fff;
  padding: clamp(5rem, 10vw, 8rem) 0;
  text-align: center;
}

.home-logos-meta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid #1f1f1f;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.015);
}
.home-logos-eyebrow {
  font: 600 0.65rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
}
.home-logos-divider {
  width: 1px; height: 12px; background: #2a2a2a;
}
.home-logos-count {
  font: 500 0.65rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #888;
  font-variant-numeric: tabular-nums;
}

.home-logos-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 auto 1.25rem;
  max-width: 18ch;
}
.home-logos-lede {
  font: 400 1rem/1.65 'Inter', system-ui, sans-serif;
  color: #888;
  max-width: 52ch;
  margin: 0 auto 3rem;
}

.home-logos-row {
  list-style: none;
  padding: 0;
  margin: 0 auto 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  max-width: 1100px;
}
.home-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.home-logo span {
  font: 600 0.78rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.home-logo:hover,
.home-logo:focus-visible {
  border-color: var(--brand-fg);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-2px);
  outline: none;
}
.home-logo:hover span,
.home-logo:focus-visible span {
  color: var(--brand-fg);
}

.home-logos-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.75rem;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #fff;
  color: #0a0a0a;
  text-decoration: none;
  font: 600 0.82rem/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.home-logos-cta span:last-child {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.home-logos-cta:hover,
.home-logos-cta:focus-visible {
  background: transparent;
  color: #fff;
  outline: none;
}
.home-logos-cta:hover span:last-child {
  transform: translateX(6px);
}

@media (max-width: 640px) {
  #portfolio.home-logos { padding: 4rem 0; }
  .home-logos-row { gap: 0.6rem; margin-bottom: 2.25rem; }
  .home-logo { padding: 0.7rem 1.1rem; }
  .home-logo span { font-size: 0.7rem; letter-spacing: 0.12em; }
}

/* ─── Work page (work.html) ─────────────────────────────────── */
.work-body { background: #0a0a0a; color: #fff; }

.work-intro {
  padding: calc(var(--nav-h) + 4rem) 0 clamp(3rem, 6vw, 5rem);
  text-align: center;
}
.work-intro-meta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid #1f1f1f;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.015);
}
.work-intro-eyebrow {
  font: 600 0.65rem/1 'Inter', sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
}
.work-intro-divider { width: 1px; height: 12px; background: #2a2a2a; }
.work-intro-count {
  font: 500 0.65rem/1 'Inter', sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #888;
  font-variant-numeric: tabular-nums;
}
.work-intro-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(3.5rem, 9vw, 7rem);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0 auto 1.25rem;
}
.work-intro-lede {
  font: 400 1.05rem/1.65 'Inter', sans-serif;
  color: #888;
  max-width: 56ch;
  margin: 0 auto;
}

/* Bento Hero */
.work-bento-wrap {
  padding: clamp(2rem, 4vw, 4rem) clamp(1rem, 4vw, 3rem) clamp(4rem, 8vw, 7rem);
}
.work-bento {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  gap: clamp(0.75rem, 1.2vw, 1rem);
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(180px, 22vw);
  grid-template-areas:
    "wl wl wl ob ob sr"
    "wl wl wl mg mg sr"
    "op op op mg mg mt"
    "op op op nb nb mt";
}
.work-tile-whiteline  { grid-area: wl; }
.work-tile-outback    { grid-area: ob; }
.work-tile-mechgas    { grid-area: mg; }
.work-tile-mighty     { grid-area: mt; }
.work-tile-opulence   { grid-area: op; }
.work-tile-northbound { grid-area: nb; }
.work-tile-seenrank   {
  grid-area: sr;
  background:
    radial-gradient(120% 100% at 80% 0%, rgba(236, 72, 153, 0.28), transparent 60%),
    radial-gradient(120% 100% at 0% 100%, rgba(159, 18, 57, 0.35), transparent 65%),
    #0a0610;
}

.work-bento {
  perspective: 1200px;
}
.work-tile {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: #111;
  isolation: isolate;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: preserve-3d;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
/* When a tile is being tilted, use a snappier transition for the
   rotateX/Y so the tilt follows the cursor in real time, but keep
   the pop-in transition intact via JS class toggle. */
.work-tile[data-tilting="1"] {
  transition: transform 0.18s ease-out, opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Inner shine that tracks the cursor (driven by --tx, --ty in JS) */
.work-tile-shine {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(180px circle at var(--tx, 50%) var(--ty, 50%),
    rgba(255, 255, 255, 0.18), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
  mix-blend-mode: screen;
}
.work-tile[data-tilting="1"] .work-tile-shine { opacity: 1; }
@media (hover: none), (prefers-reduced-motion: reduce) {
  .work-tile-shine { display: none; }
}
/* Pop-in stagger (uses .reveal + --i set by initWorkTileReveal) */
.work-tile.tile-pre {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.work-tile.tile-in {
  opacity: 1;
  transform: none;
}
.work-tile:active {
  transform: scale(0.98);
  transition-duration: 0.08s;
}
@media (prefers-reduced-motion: reduce) {
  .work-tile.tile-pre { opacity: 1; transform: none; transition: none; }
}
.work-tile-art {
  position: absolute; inset: 0;
  display: block; width: 100%; height: 100%;
  z-index: 1;
}
.work-tile-art img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  display: block;
  filter: grayscale(0.55) brightness(0.7);
  transition: filter 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-tile-overlay {
  position: absolute; inset: 0;
  z-index: 2;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(0, 0, 0, 0.1) 100%
  );
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Brand-color glow pulse on hover (uses each tile's --brand-fg) */
.work-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(80% 60% at 50% 100%, var(--brand-fg, #fff), transparent 65%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-tile:hover::after,
.work-tile:focus-visible::after {
  opacity: 0.18;
}
.work-tile-meta {
  position: absolute;
  z-index: 3;
  left: clamp(1rem, 2vw, 1.75rem);
  right: clamp(1rem, 2vw, 1.75rem);
  bottom: clamp(1rem, 2vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.work-tile-tag {
  font: 600 0.65rem/1 'Inter', sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-fg);
  opacity: 0.9;
}
.work-tile-title {
  font: 600 clamp(1.1rem, 1.8vw, 1.6rem)/1.15 'Inter', sans-serif;
  letter-spacing: -0.015em;
  margin: 0;
  color: #fff;
}
.work-tile:hover .work-tile-art img,
.work-tile:focus-visible .work-tile-art img {
  filter: grayscale(0) brightness(0.85);
  transform: scale(1.04);
}
.work-tile:hover,
.work-tile:focus-visible {
  outline: none;
  transform: translateY(-3px);
}

@media (max-width: 900px) {
  .work-bento {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(220px, 38vw);
    grid-template-areas:
      "wl wl"
      "ob mg"
      "mt op"
      "nb sr";
  }
}
@media (max-width: 560px) {
  .work-bento {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(220px, 50vw);
    grid-template-areas: "wl" "ob" "mg" "mt" "op" "nb" "sr";
  }
}

/* Case studies */
.work-case {
  background: var(--brand-bg);
  color: #fff;
  padding: clamp(4rem, 9vw, 8rem) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  scroll-margin-top: var(--nav-h);
}
.work-case-inner {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.work-case-head {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.work-case-index {
  font: 600 0.7rem/1 'Inter', sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  font-variant-numeric: tabular-nums;
}
.work-case-tag {
  font: 600 0.75rem/1.2 'Inter', sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-fg);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.work-case-tag::before {
  content: '';
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--brand-fg);
  opacity: 0.85;
}
.work-case-title {
  font: 600 clamp(2.2rem, 4.5vw, 3.6rem)/1.06 'Inter', sans-serif;
  letter-spacing: -0.025em;
  color: var(--brand-fg);
  margin: 0;
}
.work-case-chips {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.work-case-chips li {
  font: 500 0.7rem/1 'Inter', sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.work-case-chips .chip-glyph {
  display: inline-flex;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.work-case-chips .chip-glyph svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--brand-fg, currentColor);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Per-tech hover animations */
.work-case-chips li:hover .chip-glyph.chip-react svg { animation: chip-react-spin 1.2s linear infinite; }
.work-case-chips li:hover .chip-glyph.chip-vite svg  { animation: chip-vite-pulse 0.8s ease-in-out infinite; }
.work-case-chips li:hover .chip-glyph.chip-supabase svg { animation: chip-supabase-bolt 0.9s ease-in-out infinite; }
.work-case-chips li:hover .chip-glyph.chip-stripe svg   { animation: chip-stripe-slide 1s ease-in-out infinite; }
.work-case-chips li:hover .chip-glyph.chip-cron svg     { animation: chip-cron-tick 1.4s steps(8) infinite; }
.work-case-chips li:hover .chip-glyph.chip-ai svg       { animation: chip-ai-pulse 1.6s ease-in-out infinite; }

@keyframes chip-react-spin { to { transform: rotate(360deg); } }
@keyframes chip-vite-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.18); }
}
@keyframes chip-supabase-bolt {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50%      { opacity: 0.4; transform: translateY(-1px); }
}
@keyframes chip-stripe-slide {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(2px); }
}
@keyframes chip-cron-tick { to { transform: rotate(360deg); } }
@keyframes chip-ai-pulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; transform: scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .work-case-chips li:hover .chip-glyph svg { animation: none !important; }
}

.work-case-hero {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45),
              0 0 0 1px rgba(255, 255, 255, 0.05);
  margin-bottom: 2.25rem;
}
.work-case-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}
.work-case-hero.is-empty {
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(60% 80% at 80% 10%, rgba(236, 72, 153, 0.22), transparent 70%),
    radial-gradient(50% 70% at 10% 100%, rgba(159, 18, 57, 0.25), transparent 70%),
    linear-gradient(135deg, #1a0a14 0%, #0d0710 100%);
}
.work-case-hero.is-empty::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 16%;
  bottom: 16%;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.work-case-body p {
  font: 400 1.02rem/1.7 'Inter', sans-serif;
  color: rgba(255, 255, 255, 0.78);
  max-width: 60ch;
  margin: 0 0 1.25rem;
}
.work-case-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.6rem 0;
  min-height: 44px;
  font: 600 0.82rem/1 'Inter', sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid var(--brand-fg);
  transition: gap 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.12s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.work-case-cta:active {
  opacity: 0.7;
  transform: scale(0.98);
  transition-duration: 0.08s;
}
.work-case-cta:hover,
.work-case-cta:focus-visible {
  gap: 1rem;
  outline: none;
}

@media (max-width: 1024px) {
  .work-case-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .work-case-head {
    position: static;
    top: auto;
  }
}

/* ─── Case-study shared visual layer (all case studies) ──────── */

/* Brand-color-aware ambient background using --brand-fg */
.work-case {
  position: relative;
  overflow: hidden;
}
.work-case::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}
.work-case .work-case-inner { position: relative; z-index: 1; }

/* Title gets a subtle wash using --brand-fg | works for any color */
.work-case .work-case-title {
  position: relative;
  display: inline-block;
}
.work-case .work-case-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.4em;
  width: 56px;
  height: 2px;
  background: var(--brand-fg);
  opacity: 0.55;
}

/* Chips: hover lift, brand-tinted border using current color */
.work-case .work-case-chips li {
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease;
}
.work-case .work-case-chips li:hover {
  transform: translateY(-3px);
  border-color: var(--brand-fg);
  color: #fff;
}

/* Hero placeholder gets a soft brand-tinted shadow halo */
.work-case .work-case-hero {
  position: relative;
}
.work-case .work-case-hero img {
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-case .work-case-hero:hover img {
  transform: scale(1.025);
}

/* Body kicker (pull-quote opener), brand-aware */
.case-kicker {
  font: 400 clamp(1.4rem, 2.2vw, 1.85rem)/1.4 'Instrument Serif', Georgia, serif;
  font-style: italic;
  color: #fff;
  max-width: 60ch;
  margin: 0 0 1.75rem;
  letter-spacing: -0.01em;
}
.case-kicker strong {
  font-style: normal;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  color: var(--brand-fg);
  letter-spacing: 0;
}

.work-case .work-case-body p em {
  font-style: italic;
  color: #f5f5f5;
}
.work-case .work-case-body p strong {
  color: #fff;
  font-weight: 600;
}

/* Stats grid */
.case-stats {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 3rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}
.case-stat {
  background: rgba(0, 0, 0, 0.35);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  transition: background 0.35s ease;
}
.case-stat:hover {
  background: rgba(255, 255, 255, 0.03);
}
.case-stat-num {
  font: 600 clamp(2rem, 3.4vw, 2.6rem)/1 'Instrument Serif', Georgia, serif;
  font-style: italic;
  color: var(--brand-fg);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.case-stat-sub {
  font: 600 0.45em/1 'Inter', sans-serif;
  font-style: normal;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.05em;
  margin-left: 0.15em;
  vertical-align: 0.3em;
}
.case-stat-label {
  font: 500 0.72rem/1.4 'Inter', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

/* Section heading inside the body */
.case-section-heading {
  font: 600 0.72rem/1 'Inter', sans-serif;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brand-fg);
  margin: 2.5rem 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.case-section-heading::before {
  content: '';
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--brand-fg);
}

/* Pipeline list (numbered steps) */
.case-pipeline {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.case-pipeline-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.1rem 1.25rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 2px solid var(--brand-fg);
  border-radius: 4px;
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.case-pipeline-step:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}
.case-pipeline-num {
  font: 600 1.4rem/1 'Instrument Serif', Georgia, serif;
  font-style: italic;
  color: var(--brand-fg);
  font-variant-numeric: tabular-nums;
}
.case-pipeline-step div {
  font: 400 0.95rem/1.65 'Inter', sans-serif;
  color: rgba(255, 255, 255, 0.78);
  max-width: 60ch;
}
.case-pipeline-step strong {
  color: #fff;
  font-weight: 600;
  display: inline;
  margin-right: 0.3em;
}

/* Reveal-state for case-study elements (uses existing IO) */
.work-case .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-case .reveal.visible {
  opacity: 1;
  transform: none;
}

/* ─── Case study cursor overlay (live preview) ──────────────── */
/* A small procedural cursor moves across the case-study hero image
   through 3-4 hotspots, then clicks at the final stop (ripple) and
   the cycle restarts. Reads data-case-cursor="x,y|x,y|x,y|x,y" %. */
.work-case-hero .case-cursor {
  position: absolute;
  top: 0; left: 0;
  width: 22px; height: 22px;
  color: #fff;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
  will-change: top, left, opacity;
}
.work-case-hero[data-cursor-active] .case-cursor {
  opacity: 1;
}
.work-case-hero .case-cursor svg {
  width: 100%; height: 100%; display: block;
}
.work-case-hero .case-cursor-ripple {
  position: absolute;
  top: 0; left: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--brand-fg, #fff);
  background: rgba(255,255,255,0.18);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  will-change: top, left, opacity, transform;
}
.work-case-hero .case-cursor-ripple.is-firing {
  animation: case-cursor-click 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes case-cursor-click {
  0%   { opacity: 0.9; transform: translate(-50%, -50%) scale(0.4); }
  100% { opacity: 0;   transform: translate(-50%, -50%) scale(3.5); }
}

/* Hide cursor overlay on mobile and reduced-motion */
@media (max-width: 768px) {
  .work-case-hero .case-cursor,
  .work-case-hero .case-cursor-ripple { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .work-case-hero .case-cursor,
  .work-case-hero .case-cursor-ripple { display: none; }
}

/* SVG connector line that draws itself as the stats grid scrolls in */
.case-stats-connector {
  position: absolute;
  left: 0; right: 0;
  bottom: -22px;
  width: 100%;
  height: 24px;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}
.case-stats {
  position: relative;
}
.case-stats-connector path {
  fill: none;
  stroke: var(--brand-fg, #fff);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.7;
  stroke-dasharray: var(--stat-line-length, 1000);
  stroke-dashoffset: var(--stat-line-length, 1000);
  transition: stroke-dashoffset 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.2s;
}
.case-stats.is-drawn .case-stats-connector path {
  stroke-dashoffset: 0;
}
.case-stats-connector circle {
  fill: var(--brand-fg, #fff);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.case-stats.is-drawn .case-stats-connector circle {
  opacity: 0.9;
}
.case-stats.is-drawn .case-stats-connector circle:nth-of-type(1) { transition-delay: 0.5s; }
.case-stats.is-drawn .case-stats-connector circle:nth-of-type(2) { transition-delay: 0.85s; }
.case-stats.is-drawn .case-stats-connector circle:nth-of-type(3) { transition-delay: 1.2s; }
.case-stats.is-drawn .case-stats-connector circle:nth-of-type(4) { transition-delay: 1.5s; }
@media (prefers-reduced-motion: reduce) {
  .case-stats-connector path {
    stroke-dashoffset: 0;
    transition: none;
  }
  .case-stats-connector circle { opacity: 0.9; transition: none; }
}
@media (max-width: 768px) {
  .case-stats-connector { display: none; }
}

/* Stats stagger | cells pop in sequence */
.case-stats.visible .case-stat:nth-child(1) { animation: case-pop 0.6s 0.05s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.case-stats.visible .case-stat:nth-child(2) { animation: case-pop 0.6s 0.15s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.case-stats.visible .case-stat:nth-child(3) { animation: case-pop 0.6s 0.25s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.case-stats.visible .case-stat:nth-child(4) { animation: case-pop 0.6s 0.35s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
@keyframes case-pop {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

/* ─── SeenRank-specific overlays (in addition to shared layer) ── */
.work-case-seenrank {
  background:
    radial-gradient(70% 50% at 100% 0%, rgba(236, 72, 153, 0.10), transparent 60%),
    radial-gradient(60% 50% at 0% 100%, rgba(168, 85, 247, 0.08), transparent 65%),
    var(--brand-bg);
}
.work-case-seenrank::before {
  background-image:
    linear-gradient(rgba(236, 72, 153, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 72, 153, 0.04) 1px, transparent 1px);
  opacity: 0.6;
}

/* Title: animated multi-stop gradient sweep */
.work-case-seenrank .work-case-title {
  background: linear-gradient(110deg, #ec4899 0%, #f9a8d4 35%, #c084fc 65%, #ec4899 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: sr-title-sweep 9s linear infinite;
}
.work-case-seenrank .work-case-title::after { display: none; }
@keyframes sr-title-sweep { to { background-position: 220% 0; } }

/* Conic-gradient ring around the hero */
.work-case-seenrank .work-case-hero {
  box-shadow:
    0 30px 80px rgba(236, 72, 153, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}
.work-case-seenrank .work-case-hero::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(236, 72, 153, 0.6) 60deg,
    transparent 120deg,
    transparent 240deg,
    rgba(192, 132, 252, 0.55) 300deg,
    transparent 360deg
  );
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: sr-hero-spin 14s linear infinite;
  pointer-events: none;
}
@keyframes sr-hero-spin { to { transform: rotate(1turn); } }

/* Inline engine name tints (SeenRank only) */
.sr-engine {
  font-weight: 600;
  color: #fff;
  padding: 0 0.15em;
  border-radius: 3px;
  white-space: nowrap;
  transition: background 0.3s ease;
}
.sr-engine-chatgpt   { background: rgba(16, 163, 127, 0.18); color: #6ee7b7; }
.sr-engine-claude    { background: rgba(204, 120, 92, 0.18); color: #f9b893; }
.sr-engine-perplexity{ background: rgba(34, 211, 238, 0.16); color: #67e8f9; }
.sr-engine-google    { background: rgba(96, 165, 250, 0.16); color: #93c5fd; }

.work-case-seenrank .work-case-body p strong:not(.sr-engine) {
  color: #fff;
  font-weight: 600;
}

.work-case-seenrank .case-pipeline-step:hover {
  background: rgba(236, 72, 153, 0.06);
  border-color: rgba(236, 72, 153, 0.25);
}

@media (max-width: 768px) {
  .case-stats { grid-template-columns: repeat(2, 1fr); }
  .case-stat { padding: 1.25rem 1rem; gap: 0.4rem; }
  .case-stat-num { font-size: clamp(1.6rem, 9vw, 2.1rem); }
  .case-stat-label {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-wrap: balance;
  }
  .case-pipeline-step { grid-template-columns: 36px 1fr; gap: 0.85rem; padding: 1rem 0.85rem; }
  .case-pipeline-num { font-size: 1.1rem; }
  .case-pipeline-step div { font-size: 0.9rem; line-height: 1.55; }
  .case-section-heading { margin: 2rem 0 1.2rem; font-size: 0.68rem; letter-spacing: 0.22em; }
  .case-kicker { font-size: clamp(1.2rem, 5.5vw, 1.5rem); }
  /* Engine tints stay readable at small sizes */
  .sr-engine { padding: 0 0.2em; }
}

@media (max-width: 480px) {
  /* Narrow-phone: switch stats to 1-col so each label has full width.
     Stacks the number left of the label as a horizontal row instead
     of vertical, so the section stays compact. */
  .case-stats { grid-template-columns: 1fr; }
  .case-stat {
    flex-direction: row;
    align-items: baseline;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
  }
  .case-stat-num {
    font-size: clamp(1.75rem, 8vw, 2.2rem);
    flex: 0 0 auto;
    min-width: 3.4ch;
  }
  .case-stat-label {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    line-height: 1.35;
    flex: 1;
  }
  /* <br> replacement happens in JS on narrow viewports so labels
     flow as sentences instead of stacking. See initCaseStatLabelBr. */
  .work-case .work-case-body p { font-size: 0.95rem; }

  /* Tech chips + iOS platform pill: tighter so they fit naturally */
  .work-case-chips {
    gap: 0.4rem;
  }
  .work-case-chips li {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    padding: 0.4rem 0.65rem;
    gap: 0.3rem;
  }
  .work-case-chips .chip-glyph {
    width: 10px;
    height: 10px;
  }
  .work-case-platforms {
    margin-top: 0.4rem;
  }
  .work-case-platform {
    font-size: 0.6rem;
    padding: 0.35rem 0.7rem 0.35rem 0.6rem;
    letter-spacing: 0.08em;
  }
  /* Case-study title can use clamp; tighten line-height for tall titles */
  .work-case-title {
    line-height: 1.02;
  }
}

@media (max-width: 380px) {
  .case-stat { padding: 0.9rem 1rem; gap: 0.75rem; }
  .case-stat-num { font-size: 1.7rem; min-width: 3ch; }
  .case-stat-label { font-size: 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .work-case-seenrank .work-case-title,
  .work-case-seenrank .work-case-hero::after { animation: none !important; }
  .case-stats .case-stat { animation: none !important; }
}

/* Footer CTA */
.work-footer-cta {
  padding: clamp(5rem, 10vw, 9rem) 0;
  text-align: center;
  background: #0a0a0a;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.work-footer-cta-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 auto 1rem;
  max-width: 22ch;
}
.work-footer-cta-lede {
  font: 400 1.02rem/1.65 'Inter', sans-serif;
  color: #888;
  margin: 0 auto 2.5rem;
  max-width: 50ch;
}
.work-footer-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.05rem 1.85rem;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #fff;
  color: #0a0a0a;
  text-decoration: none;
  font: 600 0.82rem/1 'Inter', sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-footer-cta-btn span:last-child {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-footer-cta-btn:hover,
.work-footer-cta-btn:focus-visible {
  background: transparent;
  color: #fff;
  outline: none;
  transform: translateY(-2px);
}
.work-footer-cta-btn:hover span:last-child {
  transform: translateX(6px);
}



/* ─── Showcase nav link (HALON external) ─────────────────────── */
.nav-link-demo {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-link-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7ce6df;
  box-shadow: 0 0 6px #7ce6df;
  display: inline-block;
}

/* ── SeenRank Promo ────────────────────────────────────────── */
.seenrank-promo {
  position: relative;
  padding: 5rem 0;
  background: #050508;
  color: #ffffff;
  overflow: hidden;
  isolation: isolate;
}
.seenrank-promo-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(236, 72, 153, 0.18), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(159, 18, 57, 0.15), transparent 65%);
  pointer-events: none;
  z-index: -1;
}
.seenrank-promo-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3rem;
}
.seenrank-promo-copy {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.seenrank-promo-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f9a8d4;
  width: fit-content;
}
.seenrank-promo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ec4899;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.7);
  animation: seenrankPulse 2.4s ease-in-out infinite;
}
@keyframes seenrankPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.55; }
}
.seenrank-promo-title {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  color: #ffffff;
}
.seenrank-promo-title em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: #ec4899;
}
.seenrank-promo-lede {
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
  max-width: 46ch;
  margin: 0;
}
.seenrank-promo-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0.25rem 0 0;
}
.seenrank-promo-chips li {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}
.seenrank-promo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.seenrank-promo-cta-primary,
.seenrank-promo-cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.3rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.seenrank-promo-cta-primary {
  background: #ec4899;
  color: #ffffff;
  box-shadow: 0 8px 24px -8px rgba(236, 72, 153, 0.55);
}
.seenrank-promo-cta-primary:hover {
  background: #f472b6;
  transform: translateY(-3px);
  box-shadow: 0 14px 32px -8px rgba(236, 72, 153, 0.65);
}
.seenrank-promo-cta-ghost {
  background: transparent;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.seenrank-promo-cta-ghost:hover {
  background: #ffffff;
  color: #050508;
  border-color: #ffffff;
  transform: translateY(-3px);
}
.seenrank-promo-visual {
  position: relative;
  border-radius: 14px;
  background: linear-gradient(180deg, #0d0d12 0%, #08080c 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.seenrank-promo-visual::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  padding: 1px;
  background: conic-gradient(from 180deg at 50% 50%,
    rgba(236, 72, 153, 0.35),
    rgba(255, 255, 255, 0.04),
    rgba(236, 72, 153, 0.25),
    rgba(255, 255, 255, 0.04));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}
.seenrank-promo-mark {
  position: absolute;
  top: -14px;
  left: -14px;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  box-shadow: 0 12px 24px -8px rgba(159, 18, 57, 0.55);
  z-index: 2;
}
.seenrank-promo-shot {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, #1a0a14 0%, #0d0710 100%);
  aspect-ratio: 16 / 10;
  width: 100%;
}
.seenrank-promo-shot::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 80% 10%, rgba(236, 72, 153, 0.22), transparent 70%),
    radial-gradient(50% 70% at 10% 100%, rgba(159, 18, 57, 0.25), transparent 70%);
  pointer-events: none;
}
.seenrank-promo-shot::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 18%;
  bottom: 18%;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 1px rgba(236, 72, 153, 0.08) inset,
    0 20px 40px -16px rgba(0, 0, 0, 0.6);
}
.seenrank-promo-shot img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.seenrank-promo-shot.is-empty::before,
.seenrank-promo-shot.is-empty::after {
  /* keep skeleton visible if image fails */
}

/* ─── SeenRank procedural animated demo ───────────────────── */
/* Replaces the static screenshot with a fake browser window that
   types into form fields, clicks the CTA, and reveals a verdict
   panel. Pure CSS+JS, no .mp4. Loops every ~15s. */
.sr-demo {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: #fafafa;
  color: #1a1a1a;
  font-family: 'Inter', system-ui, sans-serif;
  /* Portrait-leaning aspect so the full form + verdict fit without
     cropping. Width capped by parent grid column. */
  aspect-ratio: 5 / 6;
  width: 100%;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
  box-shadow:
    0 0 0 1px rgba(236, 72, 153, 0.18) inset,
    0 30px 60px -24px rgba(0, 0, 0, 0.7);
  isolation: isolate;
  contain: layout paint;
}
@media (max-width: 880px) {
  .sr-demo { aspect-ratio: 5 / 5.6; max-width: 100%; }
}
.sr-demo::after {
  /* subtle pink wash for atmosphere */
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 70% at 80% 0%, rgba(236, 72, 153, 0.08), transparent 60%),
    radial-gradient(50% 70% at 0% 100%, rgba(168, 85, 247, 0.06), transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.sr-demo-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  background: #ececec;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: relative;
  z-index: 1;
}
.sr-demo-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #d4d4d4;
}
.sr-demo-dot:nth-child(1) { background: #ff5f57; }
.sr-demo-dot:nth-child(2) { background: #febc2e; }
.sr-demo-dot:nth-child(3) { background: #28c840; }
.sr-demo-url {
  flex: 1;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #777;
  padding: 0.15rem 0.6rem;
  background: #fff;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.06);
  margin-left: 0.5rem;
}
.sr-demo-body {
  position: relative;
  z-index: 1;
  padding: clamp(0.75rem, 1.8vw, 1.1rem) clamp(0.9rem, 2.2vw, 1.4rem);
  height: calc(100% - 28px);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow: hidden;
}
.sr-demo-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #555;
  background: #fff;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  align-self: flex-start;
  border: 1px solid rgba(0,0,0,0.05);
}
.sr-demo-pulse-dot {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #ec4899;
  box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.6);
  animation: sr-demo-pulse 1.6s ease-out infinite;
}
@keyframes sr-demo-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.55); }
  100% { box-shadow: 0 0 0 8px rgba(236, 72, 153, 0); }
}
.sr-demo-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(0.95rem, 2vw, 1.3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #0a0a0a;
  margin: 0;
}
.sr-demo-lede {
  font-size: clamp(0.6rem, 1.1vw, 0.72rem);
  color: #666;
  margin: 0 0 0.3rem;
  line-height: 1.4;
}
.sr-demo-label {
  display: block;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 0.25rem;
}
.sr-demo-input {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 5px;
  padding: 0.45rem 0.6rem;
  font-size: clamp(0.6rem, 1.1vw, 0.72rem);
  color: #1a1a1a;
  min-height: 1.6rem;
  transition: border-color 0.25s ease;
}
.sr-demo-input.is-active {
  border-color: #ec4899;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
}
.sr-demo-input-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
}
.sr-demo-caret {
  display: none;
  width: 1px;
  height: 0.9em;
  background: #ec4899;
  margin-left: 1px;
  animation: sr-demo-caret-blink 0.9s steps(2) infinite;
}
.sr-demo-input.is-active .sr-demo-caret { display: inline-block; }
@keyframes sr-demo-caret-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
.sr-demo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.sr-demo-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  margin-top: auto;
  background: #ec4899;
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: clamp(0.6rem, 1.1vw, 0.72rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.sr-demo-cta.is-pulsing {
  animation: sr-demo-cta-pulse 0.8s ease-in-out infinite;
}
@keyframes sr-demo-cta-pulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35); }
  50%      { transform: scale(1.04); box-shadow: 0 8px 22px rgba(236, 72, 153, 0.55); }
}
.sr-demo-cta.is-loading {
  background: #db2777;
  color: rgba(255,255,255,0.85);
  pointer-events: none;
}
.sr-demo-cta.is-loading span:first-child::after {
  content: '...';
  display: inline-block;
  width: 1.2em;
  text-align: left;
  animation: sr-demo-loading-dots 1.2s steps(4, end) infinite;
}
@keyframes sr-demo-loading-dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* Verdict overlay slides up from below after the form is submitted */
.sr-demo-verdict {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #0a0610;
  color: #fff;
  padding: clamp(0.9rem, 2.2vw, 1.4rem) clamp(1rem, 2.5vw, 1.6rem);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1),
              opacity 0.4s ease;
}
.sr-demo-verdict.is-shown {
  transform: translateY(0);
  opacity: 1;
}
.sr-demo-verdict::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 80% 0%, rgba(236, 72, 153, 0.18), transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(168, 85, 247, 0.12), transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.sr-demo-verdict > * { position: relative; z-index: 1; }
.sr-demo-verdict-title {
  font-size: clamp(0.65rem, 1.2vw, 0.78rem);
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  margin: 0 0 0.25rem;
}
.sr-demo-verdict-title strong { color: #fff; font-weight: 600; }
.sr-demo-verdict-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.sr-demo-engine {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left-width: 3px;
  border-radius: 4px;
  font-size: clamp(0.6rem, 1.1vw, 0.72rem);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.sr-demo-verdict.is-shown .sr-demo-engine {
  opacity: 1;
  transform: none;
}
.sr-demo-verdict.is-shown .sr-demo-engine:nth-child(1) { transition-delay: 0.18s; }
.sr-demo-verdict.is-shown .sr-demo-engine:nth-child(2) { transition-delay: 0.30s; }
.sr-demo-verdict.is-shown .sr-demo-engine:nth-child(3) { transition-delay: 0.42s; }
.sr-demo-engine.sr-engine-chatgpt    { border-left-color: #10a37f; }
.sr-demo-engine.sr-engine-claude     { border-left-color: #cc785c; }
.sr-demo-engine.sr-engine-perplexity { border-left-color: #22d3ee; }
.sr-demo-engine-name { color: #f5f5f5; font-weight: 500; }
.sr-demo-engine-status {
  font-weight: 600;
  font-size: 0.92em;
  letter-spacing: 0.02em;
}
.sr-status-good { color: #6ee7b7; }
.sr-status-bad  { color: #fda4af; }
.sr-demo-verdict-foot {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.6rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sr-demo-verdict-score {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  line-height: 1;
  color: #ec4899;
  font-variant-numeric: tabular-nums;
}
.sr-demo-verdict-pct { font-size: 0.55em; color: rgba(255,255,255,0.55); }
.sr-demo-verdict-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

@media (prefers-reduced-motion: reduce) {
  .sr-demo-pulse-dot,
  .sr-demo-cta.is-pulsing,
  .sr-demo-cta.is-loading span:first-child::after,
  .sr-demo-caret {
    animation: none !important;
  }
  .sr-demo-verdict { transform: translateY(0); opacity: 1; }
  .sr-demo-verdict .sr-demo-engine { opacity: 1; transform: none; }
}
@media (max-width: 880px) {
  .seenrank-promo {
    padding: 4rem 0;
  }
  .seenrank-promo-inner {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .seenrank-promo-mark {
    width: 56px;
    height: 56px;
    top: -12px;
    left: -12px;
  }
  .seenrank-promo-actions {
    gap: 0.6rem;
  }
  .seenrank-promo-cta-primary,
  .seenrank-promo-cta-ghost {
    flex: 1;
    justify-content: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .seenrank-promo-dot {
    animation: none;
  }
}

.apple-glyph {
  width: 0.95em;
  height: 0.95em;
  max-width: 1em;
  max-height: 1em;
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: -0.12em;
}

.work-case-platforms {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.work-case-platform {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: 600 0.7rem/1 'Inter', sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-fg);
  padding: 0.45rem 0.8rem 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.work-case-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.work-case-ctas .work-case-cta {
  margin-top: 0;
}
.work-case-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.home-logo-has-platform {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.home-logo-platform {
  opacity: 0.7;
  transition: opacity 200ms ease;
}
.home-logo-has-platform:hover .home-logo-platform {
  opacity: 1;
}

/* Mobile minimal homepage (max-width 768px)
   Hides desktop sections; shows plain hero + services list + form */

.hero-mobile { display: none; }

@media (max-width: 768px) {
  #heroAnim,
  .hero-vignette,
  .hero-cursor,
  .hero-mockup,
  .hero-fade-bottom,
  .hero-headline {
    display: none !important;
  }

  #hero {
    min-height: auto;
    height: auto;
    padding: 6rem 1.25rem 4rem;
    position: static;
    background: #050508;
  }

  .hero-mobile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    max-width: 100%;
  }

  .hero-mobile-title {
    font-size: clamp(2rem, 8vw, 2.6rem);
    line-height: 1.15;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.01em;
  }

  .hero-mobile-sub {
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.7);
    margin: 0;
  }

  .hero-mobile-cta {
    display: inline-block;
    background: #fff;
    color: #050508;
    padding: 1rem 1.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    min-height: 48px;
    margin-top: 0.5rem;
    -webkit-tap-highlight-color: transparent;
  }

  .marquee,
  #about,
  #portfolio,
  .seenrank-promo,
  .float-contact-wrap,
  .nav-links li:has(.nav-link-demo) {
    display: none !important;
  }

  .svc-section {
    background: #050508 !important;
    color: #fff !important;
  }
  .svc-section h1,
  .svc-section h2,
  .svc-section h3,
  .svc-section h4,
  .svc-section h5,
  .svc-section p { color: #fff !important; }
  #services .svc-pin { padding: 3rem 1.25rem 2rem; }
  #services .svc-meta-lede,
  #services .svc-progress { display: none; }
  #services .svc-meta .section-label { color: rgba(255,255,255,0.5) !important; }
  #services .svc-meta .section-title { color: #fff !important; }

  .svc-track {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
  }

  .svc-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 1.25rem 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    min-height: auto !important;
    width: 100% !important;
  }

  .svc-card-num,
  .svc-card-shine,
  .svc-card-body { display: none !important; }

  .svc-card-title {
    font-size: 1.15rem !important;
    line-height: 1.3;
    margin: 0 0 0.35rem !important;
    color: #fff;
  }

  .svc-card-lede {
    font-size: 0.95rem !important;
    line-height: 1.45;
    color: rgba(255,255,255,0.65) !important;
    margin: 0 0 0.6rem !important;
  }

  .svc-card-cta {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
  }

  .svc-card--divider {
    background: transparent !important;
    border: none !important;
    padding: 2rem 0 0.5rem !important;
  }
  .svc-card--divider .svc-divider-num { display: none; }
  .svc-card--divider .svc-divider-title {
    font-size: 0.7rem !important;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255,255,255,0.5) !important;
    margin: 0 !important;
  }
  .svc-card--divider .svc-divider-title br { display: none; }
  .svc-card--divider .svc-divider-title::after { content: " Services"; }
  .svc-card--divider .svc-divider-lede { display: none; }

  .svc-card--feature canvas { display: none !important; }

  #contact .section-label,
  #contact .section-subtitle { display: none; }
  #contact .section-title { font-size: 1.6rem; margin-bottom: 1.25rem; }
  #contact .contact-card { padding: 1.25rem; }

  .ts-section {
    background: #050508 !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.08) !important;
  }
  .ts-section .section-label { color: rgba(255,255,255,0.5) !important; }
  .ts-section .section-title,
  .ts-section .ts-name { color: #fff !important; }
  .ts-section .section-subtitle,
  .ts-section .ts-role { color: rgba(255,255,255,0.65) !important; }
  .ts-card {
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    color: #fff !important;
  }
  .ts-quote { color: #fff !important; }
  .ts-emph { color: #fff !important; }
}


/* ─── Quote CTA (replaces former pricing/offer sections) ─── */
.quote-cta-section {
  position: relative;
  background: #0a0a0a;
  color: #fff;
  padding: 7rem 0 8rem;
  overflow: hidden;
}

.quote-cta {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 0 1.5rem;
}

.quote-cta-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #7ce6df;
  margin-bottom: 1.25rem;
}

.quote-cta-title {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.1;
  font-weight: 600;
  margin: 0 0 1.25rem;
  color: #fff;
}

.quote-cta-lede {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #cfcfcf;
  max-width: 560px;
  margin: 0 auto 2.25rem;
}

.quote-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.25rem;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid #fff;
  border-radius: 2px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.quote-cta-btn:hover,
.quote-cta-btn:focus-visible {
  background: transparent;
  color: #fff;
  outline: none;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .quote-cta-section { padding: 5rem 0 6rem; }
  .quote-cta-btn { width: 100%; }
}
