/* ============================================================
   LeadFlow Media — www.leadflow-media.com
   Signature system: "The Flow" — a moving current (blue → violet
   → cyan), grain-textured surfaces, glass-glow product chrome.
   Fonts: Bricolage Grotesque (display) + Archivo (body) +
   JetBrains Mono (labels/numbers). All verified latin-ext (č š ž).
   ============================================================ */

:root {
  --paper: #faf9f6;
  --paper-soft: #f2efe8;
  --ink: #12151c;
  --ink-soft: #3c4350;
  --muted: #6b7280;
  --line: #e5e0d5;

  --accent: #3357ff;
  --accent-2: #8b5cf6;
  --accent-3: #22d3ee;
  --accent-deep: #1e3fd1;
  --accent-soft: #eef0ff;
  --flow-gradient: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%);

  --night: #05070d;
  --night-2: #0a0e1a;
  --glow: #6c8bff;
  --glow-2: #a78bfa;
  --glow-3: #67e8f9;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-line: rgba(255, 255, 255, 0.11);
  --night-text: #e2e6f3;
  --night-muted: #8a92ac;

  --radius: 18px;
  --radius-lg: 28px;
  --wrap: 1120px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-display: "Bricolage Grotesque", "Archivo", sans-serif;
  --font-body: "Archivo", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow-card: 0 1px 2px rgba(18, 21, 28, 0.04), 0 14px 36px -18px rgba(18, 21, 28, 0.15);
  --shadow-card-hover: 0 2px 4px rgba(18, 21, 28, 0.05), 0 28px 54px -20px rgba(51, 87, 255, 0.18);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  /* no overflow-x here -- html already clips horizontal overflow (line above).
     Having it on BOTH html and body breaks position:sticky: the header's
     nearest-scrolling-ancestor calculation locks onto body (which never
     actually scrolls) instead of html (which does), so it just tracks the
     page scroll 1:1 instead of sticking. Confirmed via getBoundingClientRect
     before/after removing this line. */
  position: relative;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }
ul, ol { padding-left: 1.2em; }

/* Film grain: steps() jitter makes it read as film, not texture */
body::before {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 8s steps(8) infinite;
}
@keyframes grain-shift {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1.5%); }
  50% { transform: translate(1.5%, -2%); }
  75% { transform: translate(-1.5%, -1.5%); }
}

/* View transitions: free 250ms cross-fade on every page navigation */
@view-transition { navigation: auto; }
body::after {
  content: "";
  position: fixed;
  top: -20%; left: 50%;
  width: 1400px; height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(51, 87, 255, 0.05), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ---------- Typography ---------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 630;
  line-height: 1.25; /* tighter causes descenders (p, j) on one line to visually collide with the next line's text */
  letter-spacing: -0.025em;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 6.1vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.1; }
h3 { font-size: 1.35rem; line-height: 1.28; font-weight: 650; letter-spacing: -0.01em; }
.lead { font-size: clamp(1.08rem, 1.8vw, 1.3rem); color: var(--ink-soft); line-height: 1.6; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--flow-gradient);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.7);
}
.showcase .eyebrow::before, .cta-band .eyebrow::before { box-shadow: 0 0 10px rgba(103, 232, 249, 0.8); }
.accent-i {
  font-style: italic;
  background: var(--flow-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.09em; /* italic overhang otherwise clips the last glyph */
  padding-bottom: 0.16em; /* descenders (p, j) otherwise clip flat against the box edge */
  padding-top: 0.16em; /* tall ascenders (l, b, d, h, k) otherwise clip flat at the top, same issue as descenders */
  margin-right: -0.04em;
  margin-bottom: -0.16em;
  margin-top: -0.16em;
  /* when the span wraps, every line fragment needs the overhang padding */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.muted { color: var(--muted); }
.grad-num {
  font-family: var(--font-display);
  background: var(--flow-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 15px 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.4s var(--ease-out-quint), box-shadow 0.4s var(--ease-out-quint), background 0.2s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
/* shine sweep — primary CTAs only */
.btn-primary::after {
  content: "";
  position: absolute; top: 0; left: -150%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.btn-primary:hover::after { left: 150%; }
.btn-primary {
  background: var(--flow-gradient);
  color: #fff;
  box-shadow: 0 12px 28px -10px rgba(51, 87, 255, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 38px -12px rgba(139, 92, 246, 0.55); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-2px); }
.btn-light {
  background: #fff;
  color: var(--night);
  box-shadow: 0 10px 30px -8px rgba(167, 139, 250, 0.4);
}
.btn-light:hover { transform: translateY(-2px); color: var(--night); box-shadow: 0 16px 40px -10px rgba(103, 232, 249, 0.5); }
.btn-arrow { transition: transform 0.18s ease; }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 246, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 224, 213, 0.7);
}
/* header color flips instantly: transitions here freeze mid-blend when they
   race the cross-document view transition (observed live, twice) */
/* header adapts while the dark hero is under it */
.site-header.on-dark {
  background: rgba(5, 7, 13, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.site-header.on-dark .logo,
.site-header.on-dark .nav a:not(.btn) { color: var(--night-text); }
.site-header.on-dark .nav a:not(.btn):hover,
.site-header.on-dark .nav a[aria-current="page"]:not(.btn) { color: #fff; }
.site-header.on-dark .nav-toggle span,
.site-header.on-dark .nav-toggle span::before,
.site-header.on-dark .nav-toggle span::after { background: var(--night-text); }
.header-in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.4rem;
  color: var(--ink);
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: 3px;
}
.logo img { height: 46px; width: auto; display: block; }
.site-header.on-dark .logo img,
.site-footer .logo img { filter: brightness(0) invert(1); } /* navy wordmark → white on dark */
.logo .dot { color: var(--accent); }
.logo:hover { color: var(--ink); }
.logo::after {
  content: "";
  position: absolute;
  left: 1px; bottom: -2px;
  width: 34px; height: 2.5px;
  border-radius: 2px;
  background: var(--flow-gradient);
  background-size: 200% 100%;
  animation: flow-pulse 3.5s ease-in-out infinite;
}
.site-footer .logo::after { bottom: -4px; }
@keyframes flow-pulse {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.98rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
/* .nav a's (.nav, a) specificity otherwise beats .btn-primary's (.btn-primary)
   specificity and silently forces the dark --ink-soft nav-link color onto the
   button text instead of its intended white -- text reads as invisible
   against the gradient background until hover happens to shift it enough
   to become perceptible. */
.nav .btn, .nav .btn:hover, .nav .btn[aria-current="page"] { color: #fff; }
.nav .btn { padding: 11px 22px; font-size: 0.93rem; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 42px;
  height: 42px;
  position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  position: absolute;
  left: 9px;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: all 0.22s ease;
}
.nav-toggle span { top: 20px; }
.nav-toggle span::before { top: -7px; left: 0; }
.nav-toggle span::after { top: 7px; left: 0; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: rotate(45deg); top: 0; }
.nav-open .nav-toggle span::after { transform: rotate(-45deg); top: 0; }

/* ---------- Hero (cosmic) ---------- */
.hero-cosmic {
  position: relative;
  overflow: hidden;
  background: var(--night);
  color: var(--night-text);
  min-height: min(92vh, 940px);
  display: grid;
  align-items: center;
  margin-top: -72px;
  padding: calc(72px + clamp(90px, 12vh, 150px)) 0 clamp(120px, 16vh, 200px);
}
/* line-height 1.6 (not the sitewide h1 1.25): when this h1's long italic gradient
   spans wrap across 2+ lines, box-decoration-break:clone gives each wrapped line
   fragment its own ascender/descender padding, and at 1.25 that padding is taller
   than the gap between lines -- adjacent fragments' padding boxes overlap and
   Chromium clips whichever glyph pokes into the shared region (confirmed via
   getClientRects(): fragments overlapped by ~11px at 1.25, safely negative at 1.6) */
.hero-cosmic h1 { color: #fff; margin-bottom: 26px; max-width: 18ch; line-height: 1.6; }
.hero-cosmic h1 .w-light { font-variation-settings: "wght" 340; font-weight: 340; }
.hero-cosmic h1 .w-bold { font-variation-settings: "wght" 720; font-weight: 720; }
/* Two independent copies of "povpraševanj v posel" (identical text) instead of one
   element with a media-query override -- .tail-desktop is nowrap and shown above the
   site's 680px mobile breakpoint (measured: this phrase needs ~420px to fit on one
   line at the h1's clamped font-size floor, comfortably inside desktop/tablet widths);
   .tail-mobile wraps normally and is shown below it. Only one is ever in layout at a
   time (display:none removes a box from flow entirely), so they can't interfere with
   each other. line-height:1.6 above protects both equally against ascender clipping
   regardless of which one is showing or where it wraps. */
.tail-desktop {
  white-space: nowrap;
  /* Literal match to what Bor set and approved in the design playground (uniform
     padding, all sides -- not reinterpreted). */
  padding: 12px;
}
.tail-mobile {
  display: none;
  /* Literal match to what Bor set and approved in the design playground (uniform
     padding, all sides -- not reinterpreted). */
  padding: 6px;
}
@media (max-width: 680px) {
  .tail-desktop { display: none; }
  .tail-mobile { display: inline; }
}
.hero-cosmic .lead { color: var(--night-muted); max-width: 560px; margin-bottom: 38px; }
.hero-cosmic .lead-intro { margin-bottom: 14px; }
.hero-cosmic .hero-points { margin: 0 0 34px; max-width: 560px; }
.hero-cosmic .eyebrow { color: var(--glow-3); }
.hero-in { position: relative; z-index: 6; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 34px; }
.hero-trust { display: flex; align-items: center; gap: 12px; color: var(--night-muted); font-size: 0.85rem; font-family: var(--font-mono); }

/* orb field */
.orb-field { position: absolute; inset: 0; isolation: isolate; pointer-events: none; }
.orb-field::after {
  content: "";
  position: absolute; inset: 0; z-index: 5;
  background:
    linear-gradient(90deg, var(--night) 0%, rgba(5, 7, 13, 0.88) 42%, rgba(5, 7, 13, 0.4) 64%, transparent 76%),
    radial-gradient(ellipse 52% 50% at 80% 54%, transparent 20%, var(--night) 86%);
}
.orb {
  position: absolute;
  top: 54%; left: 82%;
  width: min(38vw, 460px); aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  isolation: isolate;
  will-change: transform;
}
.orb__core {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 35% 32%, var(--glow) 0%, var(--accent) 40%, transparent 72%),
    conic-gradient(from var(--orb-angle, 0deg), var(--accent-2), var(--accent), var(--accent-3), var(--accent-2));
  mix-blend-mode: screen;
  filter: blur(6px) saturate(135%);
  /* dissolve the edge so it reads as light, not a planet */
  -webkit-mask-image: radial-gradient(circle, #000 30%, rgba(0, 0, 0, 0.5) 52%, transparent 70%);
  mask-image: radial-gradient(circle, #000 30%, rgba(0, 0, 0, 0.5) 52%, transparent 70%);
  animation: orb-spin 22s linear infinite;
}
.orb__halo {
  position: absolute; inset: -26%; border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 60%);
  filter: blur(40px);
  opacity: 0.34;
  mix-blend-mode: plus-lighter;
  animation: orb-pulse 7s ease-in-out infinite;
}
.orb__ring {
  position: absolute; inset: -8%; border-radius: 50%;
  box-shadow:
    0 0 40px 6px rgba(108, 139, 255, 0.28),
    0 0 90px 18px rgba(167, 139, 250, 0.15),
    0 0 150px 50px rgba(103, 232, 249, 0.08);
  animation: orb-pulse 7s ease-in-out infinite reverse;
}
@property --orb-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes orb-spin { to { --orb-angle: 360deg; } }
@keyframes orb-pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.05); opacity: 0.58; }
}

/* homepage hero visual: generated neon data-flow, replaces the CSS orb (subpages still use .orb above) */
.data-flow {
  position: absolute;
  top: 0;
  right: 12%;
  width: min(46vw, 700px);
  height: 100%;
  object-fit: cover;
  object-position: right center;
  mix-blend-mode: screen; /* dark PNG background becomes invisible against .hero-cosmic's dark bg, no visible box edge */
  opacity: 1;
  filter: saturate(1.1);
  /* feather the raster edge to transparent so the canvas boundary never shows, only the glow reads -- full-bleed panel, not a framed square */
  mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 68%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 68%, transparent 100%);
}

/* ambient chat bubbles: scattered around a light section's background,
   Sentient-style -- independent glimpses of the agent working (each makes
   sense alone: a sender label + a concrete event), deliberately NOT aligned
   or sequenced. Sit at z-index 0 under .wrap (z-index 1), so cards cover
   them where they'd collide. */
.has-ambient { position: relative; }
.ambient-field { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.amb-bubble {
  position: absolute;
  max-width: 230px;
  padding: 12px 16px;
  border-radius: 14px 14px 14px 4px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  font-family: var(--font-body);
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--ink-soft);
  opacity: 0.85;
  animation: amb-drift 16s ease-in-out infinite;
}
.amb-bubble:nth-child(even) { border-radius: 14px 14px 4px 14px; }
.amb-bubble .amb-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--flow-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 4px;
}
@keyframes amb-drift {
  0%, 100% { transform: rotate(var(--rot, 0deg)) translate(0, 0); }
  50% { transform: rotate(var(--rot, 0deg)) translate(7px, -13px); }
}

/* choreographed load: backdrop → eyebrow → headline → lead → CTA */
.stagger-in > * { opacity: 0; transform: translateY(22px); animation: rise 0.9s var(--ease-out-expo) forwards; }
.stagger-in > *:nth-child(1) { animation-delay: 0.08s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.34s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.46s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.56s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Floating ambient chat bubbles (decorative texture) */
.float-bubble {
  position: absolute;
  pointer-events: none;
  opacity: 0.55;
  filter: drop-shadow(0 8px 20px rgba(51, 87, 255, 0.08));
  animation: bubble-drift 16s ease-in-out infinite;
}
.float-bubble svg { display: block; }
.float-bubble.fb-1 { top: 6%; left: 2%; width: 92px; animation-duration: 15s; }
.float-bubble.fb-2 { top: 62%; left: -2%; width: 70px; animation-duration: 19s; animation-delay: -4s; }
.float-bubble.fb-3 { top: 12%; right: 4%; width: 78px; animation-duration: 17s; animation-delay: -8s; }
.float-bubble.fb-4 { top: 70%; right: 2%; width: 60px; animation-duration: 21s; animation-delay: -2s; }
.float-bubble.fb-5 { bottom: 4%; left: 20%; width: 54px; animation-duration: 14s; animation-delay: -6s; opacity: 0.35; }
.float-bubble.fb-6 { top: 40%; left: 8%; width: 44px; animation-duration: 18s; animation-delay: -10s; opacity: 0.3; }
@keyframes bubble-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(10px, -16px) rotate(-2deg); }
  66% { transform: translate(-8px, 10px) rotate(2deg); }
}
.section-float { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }

/* ---------- Logo marquee ---------- */
.logos { padding: 26px 0 60px; position: relative; z-index: 1; }
.logos-label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}
.marquee { overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 64px; width: max-content; animation: marquee 30s linear infinite; align-items: center; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.marquee-item img {
  height: 46px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  mix-blend-mode: multiply; /* melts white PNG boxes into the paper bg */
  transition: transform 0.3s var(--ease-out-quint);
}
.marquee-item:hover img { transform: scale(1.08); }
.marquee-item img.logo-white { filter: invert(1) brightness(0.35); } /* white-on-transparent marks */
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(70px, 10vh, 120px) 0; position: relative; z-index: 1; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head .lead { margin-top: 18px; }
.center { text-align: center; }
.center .section-head { margin-left: auto; margin-right: auto; }

/* ---------- Dark showcase bands ---------- */
.showcase {
  background: radial-gradient(1200px 600px at 75% -10%, rgba(139, 92, 246, 0.16), transparent 60%), radial-gradient(900px 500px at 10% 110%, rgba(34, 211, 238, 0.1), transparent 60%), var(--night);
  color: var(--night-text);
  padding: clamp(90px, 12vh, 140px) 0;
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 2.4%, 100% 0, 100% 100%, 0 100%);
  margin-top: -1px;
}
.showcase h2, .showcase h3 { color: #fff; }
.showcase .eyebrow { color: var(--glow-3); }
.showcase .lead { color: var(--night-muted); }
.showcase p { color: var(--night-muted); }
.showcase strong { color: var(--night-text); }
.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
  background: radial-gradient(circle at 35% 35%, var(--glow-3), var(--glow-2) 45%, var(--accent) 70%, transparent 78%);
  animation: blob-drift 14s ease-in-out infinite alternate;
}
@keyframes blob-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, -30px) scale(1.12); }
}
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.showcase-copy h2 { margin-bottom: 22px; }
.showcase-copy p { margin-bottom: 16px; }
.showcase-points { list-style: none; padding: 0; margin: 26px 0 30px; }
.showcase-points li {
  padding: 10px 0 10px 34px;
  position: relative;
  color: var(--night-text);
}
.showcase-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(103, 232, 249, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.55);
  box-shadow: 0 0 12px rgba(103, 232, 249, 0.4);
}
.showcase-points li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 21px;
  width: 8px;
  height: 5px;
  border-left: 1.6px solid var(--glow-3);
  border-bottom: 1.6px solid var(--glow-3);
  transform: rotate(-45deg);
}

/* ---------- iPhone 3D frame ---------- */
.phone-stage {
  display: flex;
  justify-content: center;
  position: relative;
  perspective: 1200px;
}
.phone-3d {
  position: relative;
  animation: phone-sway 9s ease-in-out infinite;
}
/* tilt only where a real pointer exists */
@media (hover: hover) {
  .phone-3d {
    transform-style: preserve-3d;
    transform: rotateY(var(--tilt-y, -8deg)) rotateX(var(--tilt-x, 2deg));
    transition: transform 0.6s var(--ease-out-quint);
  }
  .phone-3d.tilting { transition: transform 0.15s ease-out; animation-play-state: paused; }
}
@keyframes phone-sway {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}
/* ===== Device frame — built to spec, all numbers relative to --w ===== */
.device {
  --w: 320px;
  width: var(--w);
  height: calc(var(--w) * 2.05);
  border-radius: calc(var(--w) * 0.175);
  padding: calc(var(--w) * 0.0125);
  background: linear-gradient(145deg, #6b6f76, #3a3d42 30%, #23252a 70%, #4a4d53);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 2;
}
.bezel {
  background: #000;
  border-radius: calc(var(--w) * 0.16);
  padding: calc(var(--w) * 0.028);
  height: 100%;
  position: relative;
  z-index: 1;
}
.screen {
  background: #000;
  border-radius: calc(var(--w) * 0.135);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}
/* dynamic island: floats ON the screen, content scrolls behind it */
.island {
  position: absolute;
  top: calc(var(--w) * 0.028);
  left: 50%;
  translate: -50% 0;
  width: calc(var(--w) * 0.32);
  height: calc(var(--w) * 0.094);
  border-radius: 999px;
  background: #000;
  z-index: 5;
}
.screen-glare {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.07), transparent 40%);
}
/* side buttons: thin divs behind the rim edge */
.d-btn {
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #4c4f56, #26282d 30%, #191b1f 70%, #33363c);
  z-index: 0;
}
.d-action { left: -3px; top: 18%; height: calc(var(--w) * 0.06); }
.d-vol-1 { left: -3px; top: 28%; height: calc(var(--w) * 0.14); }
.d-vol-2 { left: -3px; top: calc(28% + var(--w) * 0.14 + 10px); height: calc(var(--w) * 0.14); }
.d-power { right: -3px; top: 30%; height: calc(var(--w) * 0.24); }
.sms-header {
  padding: 48px 16px 12px;
  text-align: center;
  background: rgba(22, 24, 29, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.sms-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--flow-gradient);
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  font-family: var(--font-mono);
}
.sms-name { font-size: 0.78rem; color: #e5eaf3; font-weight: 500; }
.sms-time { font-size: 0.68rem; color: #808a9d; text-align: center; padding: 12px 0 4px; font-family: var(--font-mono); }
.sms-thread {
  flex: 1;
  padding: 6px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  justify-content: flex-end;
}
.bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 0.86rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.bubble.shown { opacity: 1; transform: none; }
.bubble.lead-msg { align-self: flex-start; background: #26292f; color: #e8ecf3; border-bottom-left-radius: 6px; }
.bubble.agent-msg { align-self: flex-end; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-bottom-right-radius: 6px; }
.bubble.typing { padding: 13px 16px; }
.typing-dots { display: inline-flex; gap: 4px; }
.typing-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9aa4b5;
  animation: tdot 1.1s infinite ease-in-out;
}
.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes tdot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
.phone-caption {
  text-align: center;
  margin-top: 30px;
  color: var(--night-muted);
  font-size: 0.92rem;
  position: relative;
  z-index: 2;
}
.phone-caption strong { color: var(--glow-3); }
/* grounding mist under the phone, like fog on a dark stage */
.phone-ground-glow {
  position: absolute;
  bottom: -44px;
  left: 50%;
  width: 460px;
  height: 110px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(200, 215, 255, 0.16), transparent 70%),
    radial-gradient(closest-side, rgba(139, 92, 246, 0.28), transparent 78%);
  filter: blur(18px);
  z-index: 1;
}

/* ---------- Slack panel ---------- */
.slack-panel {
  background: #14161d;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 0 90px -28px rgba(139, 92, 246, 0.45);
  font-size: 0.9rem;
  transform: perspective(1200px) rotateY(6deg);
}
.slack-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #e8ecf3;
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.slack-top .win-dots { display: flex; gap: 6px; margin-right: 8px; }
.slack-top .win-dots i { width: 10px; height: 10px; border-radius: 50%; }
.slack-top .win-dots i:nth-child(1) { background: #ff5f57; }
.slack-top .win-dots i:nth-child(2) { background: #febc2e; }
.slack-top .win-dots i:nth-child(3) { background: #28c840; }
.slack-msgs { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.slack-msg { display: flex; gap: 12px; opacity: 0; transform: translateY(10px); transition: opacity 0.4s ease, transform 0.4s ease; }
.slack-msg.shown { opacity: 1; transform: none; }
.slack-ava {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
}
.slack-ava.human { background: #7c5cbf; }
.slack-ava.bot { background: var(--flow-gradient); }
.slack-body { color: #c9d1e0; line-height: 1.5; }
.slack-body .who { color: #fff; font-weight: 700; margin-right: 8px; }
.slack-body .when { color: #6f7a90; font-size: 0.75rem; font-family: var(--font-mono); }
.slack-body .tag { color: var(--glow-3); }
.slack-body ul { margin: 8px 0 0; padding-left: 18px; color: #aab4c8; }
.slack-body li { margin: 3px 0; }

/* ---------- Custom SVG icon chips (replaces emoji) ---------- */
.icon-chip {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(155deg, #fff, var(--accent-soft));
  box-shadow: inset 0 0 0 1px rgba(51, 87, 255, 0.14), 0 8px 18px -10px rgba(51, 87, 255, 0.35);
}
.icon-chip svg { width: 24px; height: 24px; stroke: var(--accent); }
.showcase .icon-chip, .cta-band .icon-chip {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.28), 0 8px 18px -10px rgba(103, 232, 249, 0.35);
}
.showcase .icon-chip svg, .cta-band .icon-chip svg { stroke: var(--glow-3); }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  position: relative;
  overflow: hidden;
}
.card:hover, .win-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card-hover); }
/* cursor spotlight -- also drives .win-card (partnerji.html): main.js already runs the
   pointermove listener against ".card, .win-card" and sets --mx/--my, but .win-card never
   defined these pseudo-elements to consume them, so the JS was silently doing nothing */
.card::before, .win-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(51, 87, 255, 0.09), transparent 65%);
  pointer-events: none;
}
.card:hover::before, .win-card:hover::before { opacity: 1; }
/* travelling gradient border beam */
@property --beam { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.card::after, .win-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--beam), transparent 0 68%, rgba(51, 87, 255, 0.7) 78%, rgba(139, 92, 246, 0.85) 84%, rgba(34, 211, 238, 0.7) 90%, transparent 98% 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: beam-spin 2.6s linear infinite paused;
  pointer-events: none;
}
.card:hover::after, .win-card:hover::after { opacity: 1; animation-play-state: running; }
@keyframes beam-spin { to { --beam: 360deg; } }
.card h3 { margin: 18px 0 10px; }
.card p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Steps / ladder ---------- */
/* margin-top gives the flow line real breathing room below the section head --
   without it the line sat ~20px under the headline and read as clutter
   (Bor's feedback, confirmed via live screenshot 2026-07-12) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; position: relative; margin-top: 84px; }
/* the flow line: draws itself across the ladder when it enters view */
.steps::before {
  content: "";
  position: absolute;
  top: -52px;
  left: 3%;
  right: 3%;
  height: 2.5px;
  border-radius: 3px;
  background: var(--flow-gradient);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.55);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.6s var(--ease-out-expo) 0.25s;
  opacity: 0.75;
}
.steps.in-view::before { transform: scaleX(1); }
/* single-column explainer variant (demo page): the 3-col flow line makes no
   sense there and was drawing straight through the phone caption above it */
.steps-plain { margin-top: 0; }
.steps-plain::before { display: none; }
@media (max-width: 960px) { .steps::before { display: none; } .steps { margin-top: 0; } }
.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 30px;
  position: relative;
  box-shadow: var(--shadow-card);
}
/* oversized outline numeral as a graphic object, escaping the card's top edge */
.step-n {
  position: absolute;
  top: -0.3em;
  right: 18px;
  font-family: var(--font-display);
  font-size: clamp(5rem, 8vw, 7.5rem);
  font-weight: 750;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent-2);
  opacity: 0.35;
  pointer-events: none;
  z-index: 1;
}
.step > *:not(.step-n) { position: relative; z-index: 2; }
.step h3 { margin-bottom: 6px; }
.step .price { font-family: var(--font-mono); background: var(--flow-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; font-size: 0.98rem; margin-bottom: 12px; }
.step p { color: var(--ink-soft); font-size: 0.97rem; }
.step.step-hot { border-color: transparent; box-shadow: 0 0 0 1.5px var(--accent-2), var(--shadow-card-hover); }
.step-badge {
  position: absolute;
  top: -13px;
  left: 28px;
  background: var(--flow-gradient);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}

/* ---------- Case studies ---------- */
.case-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px 34px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.case-num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 650;
  line-height: 1;
  background: var(--flow-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.case-what { font-weight: 600; color: var(--ink); }
.case-co { color: var(--muted); font-size: 0.9rem; font-family: var(--font-mono); }
/* flip variant: click turns the number over to reveal WHAT was built.
   Both faces share one grid cell so the card's height = the taller face
   (no absolute positioning, no clipped content). */
.case-card.flip {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  perspective: 1200px;
  cursor: pointer;
  display: block;
}
.case-card.flip .flip-inner {
  display: grid;
  transform-style: preserve-3d;
  transition: transform 0.75s var(--ease-out-quint);
  height: 100%;
}
.case-card.flip .face {
  grid-area: 1 / 1;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  padding: 38px 34px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.case-card.flip .face.front {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.case-card.flip .face.back {
  background: radial-gradient(500px 260px at 80% -20%, rgba(139, 92, 246, 0.25), transparent 60%), var(--night);
  border: 1px solid rgba(167, 139, 250, 0.3);
  color: var(--night-muted);
  transform: rotateY(180deg);
  justify-content: center;
}
.case-card.flip .face.back h3 { color: #fff; }
.case-card.flip .face.back p { font-size: 0.95rem; }
.case-card.flip .back-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--glow-3);
}
.case-card.flip.flipped .flip-inner { transform: rotateY(180deg); }
.case-card.flip:hover .face.front { box-shadow: var(--shadow-card-hover); }
.flip-hint {
  margin-top: auto;
  padding-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
}
.case-quote {
  border-left: 3px solid;
  border-image: var(--flow-gradient) 1;
  padding: 6px 0 6px 18px;
  font-style: italic;
  color: var(--ink-soft);
  margin-top: 14px;
}

/* ---------- About teaser ---------- */
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.about-photo { border-radius: var(--radius-lg); box-shadow: var(--shadow-card-hover); }
/* rotating flow ring behind the portrait */
@property --ring { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.photo-ring { position: relative; border-radius: var(--radius-lg); }
.photo-ring::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: calc(var(--radius-lg) + 9px);
  padding: 2px;
  background: conic-gradient(from var(--ring), transparent 0 55%, var(--accent) 70%, var(--accent-2) 80%, var(--accent-3) 88%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: ring-spin 7s linear infinite;
  opacity: 0.8;
}
@keyframes ring-spin { to { --ring: 360deg; } }
.photo-ring img { display: block; border-radius: var(--radius-lg); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 30px 0; }
.photo-slot {
  aspect-ratio: 4/5;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  background: var(--paper-soft);
  border: 1.5px dashed var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}
.photo-slot { transition: transform 0.25s var(--ease-out-quint), box-shadow 0.25s ease; }
.photo-slot:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s var(--ease-out-quint); }
.photo-slot:hover img { transform: scale(1.06); }
.photo-slot .caption {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 16px 6px 8px;
  margin: 0 -10px -10px;
  background: linear-gradient(to top, rgba(5, 7, 13, 0.82), transparent);
  color: #fff;
}

/* ---------- Event photo (mastermind / conference group shots) ---------- */
.event-photo { margin: 24px 0 30px; }
.event-photo img { width: 100%; display: block; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.event-photo figcaption { margin-top: 10px; font-size: 0.88rem; color: var(--muted); text-align: center; font-family: var(--font-mono); }

/* ---------- Final CTA band ---------- */
.cta-band {
  background: radial-gradient(900px 400px at 50% 120%, rgba(103, 232, 249, 0.2), transparent 65%), radial-gradient(700px 400px at 15% -10%, rgba(139, 92, 246, 0.18), transparent 60%), var(--night);
  color: #fff;
  text-align: center;
  padding: clamp(90px, 12vh, 140px) 0;
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 2.4%, 100% 100%, 0 100%);
  margin-top: -1px;
}
.cta-band h2 { color: #fff; margin-bottom: 18px; }
.cta-band .lead { color: var(--night-muted); max-width: 620px; margin: 0 auto 36px; }
/* breathing glow on the closing CTA */
.cta-band .btn-primary { animation: cta-breathe 3.6s ease-in-out infinite; }
@keyframes cta-breathe {
  0%, 100% { box-shadow: 0 12px 28px -10px rgba(51, 87, 255, 0.55); }
  50% { box-shadow: 0 14px 52px -6px rgba(139, 92, 246, 0.8); }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--night);
  color: var(--night-muted);
  padding: 70px 0 36px;
  font-size: 0.92rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 46px; margin-bottom: 50px; }
.site-footer .logo { color: #fff; margin-bottom: 14px; display: inline-block; }
.site-footer h4 { color: #fff; font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.09em; margin-bottom: 16px; font-weight: 500; }
.site-footer a { color: var(--night-muted); display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.claude-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--night-text);
  margin-top: 18px;
}
.claude-badge .spark {
  background: var(--flow-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  animation: spark-twinkle 2.8s ease-in-out infinite;
}
@keyframes spark-twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.8; }
  50% { transform: scale(1.35) rotate(20deg); opacity: 1; }
}
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 26px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: #5c6580;
  line-height: 1.8;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  filter: blur(7px);
  transition: opacity 0.85s var(--ease-out-expo), transform 0.85s var(--ease-out-expo), filter 0.85s var(--ease-out-expo);
}
.reveal.in { opacity: 1; transform: none; filter: blur(0); }

/* ---------- Scroll-driven enhancements (desktop only: on touch, content
   shifting during scroll reads as jank, not craft) ---------- */
@supports (animation-timeline: view()) {
  @media (max-width: 960px) {
    .step-n, .showcase .orb, .case-num, .phone-stage {
      animation: none;
    }
  }
  /* the big outline numerals drift up slightly as their card scrolls through */
  .step-n {
    animation: numeral-drift linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
  @keyframes numeral-drift {
    from { translate: 0 26px; }
    to { translate: 0 -26px; }
  }
  /* showcase orbs drift with scroll for depth */
  .showcase .orb {
    animation: orb-scroll-drift linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
  @keyframes orb-scroll-drift {
    from { transform: translateY(70px) scale(0.96); }
    to { transform: translateY(-70px) scale(1.04); }
  }
  /* case-study numbers scale in as they enter */
  .case-num {
    animation: num-pop linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
  @keyframes num-pop {
    from { opacity: 0; transform: translateY(20px) scale(0.92); }
    to { opacity: 1; transform: none; }
  }
  /* phone rises against scroll inside its section */
  .phone-stage {
    animation: stage-drift linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
  @keyframes stage-drift {
    from { translate: 0 46px; }
    to { translate: 0 -46px; }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .stagger-in > * { opacity: 1; transform: none; }
}

/* ---------- Consent bar ---------- */
.consent {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--ink);
  color: #dbe1ec;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
  max-width: min(92vw, 560px);
}
.consent a { color: var(--glow-3); }
.consent button {
  background: #fff;
  color: var(--ink);
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ---------- Blog ---------- */
.post-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.post-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: block;
  color: var(--ink);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); color: var(--ink); }
.post-card .date { color: var(--muted); font-size: 0.85rem; font-family: var(--font-mono); }
.post-card h3 { margin: 10px 0 12px; }
.post-card p { color: var(--ink-soft); font-size: 0.97rem; }
.post-card .more { color: var(--accent); font-weight: 600; font-size: 0.95rem; }
.article { padding: clamp(56px, 8vh, 90px) 0; }
.article h1 { font-size: clamp(2.2rem, 4.6vw, 3.3rem); margin: 14px 0 22px; }
.article .post-meta { color: var(--muted); font-size: 0.92rem; font-family: var(--font-mono); }
.article-body { margin-top: 40px; }
.article-body h2 { font-size: 1.7rem; margin: 44px 0 16px; }
.article-body h3 { margin: 32px 0 12px; }
.article-body p { margin-bottom: 18px; color: var(--ink-soft); }
.article-body ul, .article-body ol { margin: 0 0 18px; color: var(--ink-soft); }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--ink); }
.article-sig { margin-top: 36px; font-style: italic; color: var(--ink-soft); }

/* ---------- Cal embed ---------- */
.cal-holder {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  min-height: 620px;
  padding: 8px;
}

/* ---------- Page hero (subpages) ---------- */
.page-hero { padding: clamp(60px, 9vh, 100px) 0 clamp(30px, 4vh, 50px); }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); margin-bottom: 20px; }
.page-hero .lead { max-width: 680px; }

/* ---------- Cosmic sub-hero: the homepage treatment, scaled for subpages ---------- */
.hero-sub {
  min-height: 0;
  padding: calc(72px + clamp(64px, 9vh, 104px)) 0 clamp(76px, 10vh, 120px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2.2vw), 0 100%);
}
.hero-sub h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); max-width: 19ch; }
.hero-sub .lead { max-width: 640px; margin-bottom: 0; }
.hero-sub .orb {
  width: min(34vw, 400px);
  top: 60%;
  left: 84%;
}
.hero-sub .data-flow {
  top: 50%;
  right: 8%;
  width: min(30vw, 420px);
  height: auto;
  aspect-ratio: 1;
  translate: 0 -50%;
}
.hero-sub .orb-field::after {
  background:
    linear-gradient(90deg, var(--night) 0%, rgba(5, 7, 13, 0.72) 36%, transparent 64%),
    radial-gradient(ellipse 46% 62% at 84% 60%, transparent 18%, var(--night) 84%);
}
.hero-sub .hero-ctas { margin-top: 34px; margin-bottom: 0; }
/* dark-hero variant of the about layout */
.hero-sub .about-grid { align-items: center; }
.hero-sub .about-photo {
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.8), 0 0 70px -18px rgba(108, 139, 255, 0.4);
}
@media (max-width: 680px) {
  .hero-sub { clip-path: none; }
  .hero-sub .orb { display: none; }
  .hero-sub .data-flow { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  /* lighter reveals on mobile: no blur (GPU cost), shorter travel */
  .reveal {
    filter: none;
    transform: translateY(16px);
    transition-duration: 0.5s;
  }
  .reveal.in { filter: none; }
  /* static grain on mobile: the steps() jitter repaints a 200% fixed layer */
  body::before { animation: none; inset: 0; }
  /* box-shadow animation repaints every frame */
  .cta-band .btn-primary { animation: none; }
  .showcase-grid, .about-grid { grid-template-columns: 1fr; }
  .cards, .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { gap: 40px; }
  .about-photo { max-width: 340px; }
  .orb { top: 30%; left: 78%; width: 68vw; }
  .orb__halo { filter: blur(28px); }
  .data-flow { width: 92vw; opacity: 0.8; }
  .ambient-field { display: none; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .marquee-track { animation-duration: 16s; }
  /* safety only: break a word rather than overflow the viewport */
  h1 { overflow-wrap: break-word; }
  /* iPhone mockup: full assembly (frame+buttons+floor shadow) shrinks as one unit.
     Also fixes the iOS rubber-band overscroll the 3D tilt's paint bounds triggered. */
  .phone-tilt {
    transform: rotateY(-17deg) rotateX(4deg) rotateZ(-1.5deg) scale(0.72) !important;
    transform-origin: top center;
    margin-bottom: -172px;
  }
  .cards, .cards-2, .steps, .post-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .nav {
    position: fixed;
    inset: 72px 0 auto 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 50px -20px rgba(18, 21, 28, 0.2);
    display: none;
  }
  .nav-open .nav { display: flex; }
  .nav-toggle { display: block; }
  .device { --w: 272px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .showcase, .cta-band { clip-path: none; }
}
