/* Deepak Shebani, personal site. Night Globe look. */

:root {
  --ink: #06080b;
  --ink-2: #0c1016;
  --bone: #ece7dc;
  --bone-dim: rgba(236, 231, 220, 0.62);
  --bone-faint: rgba(236, 231, 220, 0.12);
  --slate: #8a93a3;
  --teal: #37d6c3;
  --amber: #f2b544;
  --lilac: #b79cff;
  --coral: #ff8f6b;
  --mint: #9ef0a8;
  --accent: var(--teal);
  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --gutter: clamp(20px, 4vw, 72px);
  --max: 1440px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; margin: 0; line-height: 1; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

/* Motion hide-until-reveal (only once JS confirmed GSAP loaded) */
html.has-motion [data-motion-text],
html.has-motion [data-reveal],
html.has-motion [data-reveal-item],
html.has-motion [data-image-reveal] { visibility: hidden; }

.motion-line-mask, .motion-word-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.motion-line, .motion-word { display: inline-block; will-change: transform, opacity; }

/* Preloader */
.preloader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--ink);
  display: grid; place-content: center; gap: 18px;
  transform: translate3d(0, 0, 0);
}
.preloader__word { font-family: var(--display); font-weight: 600; font-size: clamp(28px, 5vw, 56px); letter-spacing: -0.03em; color: var(--bone); opacity: 0; }
.preloader__bar { width: clamp(120px, 20vw, 260px); height: 1px; background: var(--bone-faint); overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 100%; background: var(--bone); transform: scaleX(0); transform-origin: left; }
html.loaded .preloader { display: none; }

/* Cursor */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 9999;
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--bone);
  mix-blend-mode: difference;
  pointer-events: none;
  display: grid; place-items: center;
  will-change: transform;
}
.cursor span {
  position: absolute;
  font: 500 11px/1 var(--body);
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.55);
}
.cursor.is-label { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
.cursor.is-label span { opacity: 1; }
@media (prefers-reduced-motion: reduce), (pointer: coarse) { .cursor { display: none; } }
html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }

/* Top bar */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  font-size: 14px;
  mix-blend-mode: difference;
  color: #fff;
}
.topbar__name { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; font-size: 16px; }
.topbar__nav { display: flex; gap: 26px; }
.topbar__nav a, .topbar__cta { display: inline-block; opacity: 0.78; transition: opacity 0.35s var(--ease); }
.topbar__nav a:hover, .topbar__cta:hover { opacity: 1; }
.topbar__cta { padding: 8px 14px; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 999px; }

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: 0 var(--gutter) clamp(40px, 7vh, 96px);
  overflow: clip;
  isolation: isolate;
}
.hero__globe, .hero__globe-fallback {
  position: absolute;
  right: clamp(-20vw, -8vw, 0px);
  top: 50%;
  width: min(92vh, 72vw);
  height: min(92vh, 72vw);
  transform: translateY(-50%);
  z-index: -1;
}
.hero__globe-fallback { object-fit: contain; }
.hero__glow {
  position: absolute; z-index: -2;
  right: 8vw; top: 50%;
  width: min(70vh, 60vw); height: min(70vh, 60vw);
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 28%, transparent) 0%, transparent 62%);
  filter: blur(40px);
  transition: background 1.2s var(--ease);
}
.hero__content { max-width: 920px; }
.hero__intro { font-size: 14px; color: var(--bone-dim); margin-bottom: 22px; }
.hero__name {
  font-size: clamp(64px, 13vw, 190px);
  font-weight: 650;
  font-variation-settings: "wdth" 88, "opsz" 96;
  line-height: 0.88;
  letter-spacing: -0.045em;
}
.hero__line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__word { display: inline-block; will-change: transform; }
.hero__roll {
  display: flex; align-items: center; gap: 0.35em;
  font-family: var(--display);
  font-size: clamp(26px, 3.6vw, 48px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 28px 0 20px;
}
.hero__roll-static { color: var(--bone-dim); line-height: 1.15; }
.hero__roll-word { position: relative; display: inline-block; height: 1.15em; overflow: hidden; min-width: 7.2em; color: var(--accent); transition: color 0.9s var(--ease); }
.hero__roll-word span { position: absolute; left: 0; top: 0; white-space: nowrap; line-height: 1.15; will-change: transform; }
.hero__pitch { max-width: 36ch; font-size: clamp(17px, 1.5vw, 21px); color: var(--bone-dim); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__scroll {
  position: absolute; right: var(--gutter); bottom: clamp(40px, 7vh, 96px);
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--bone-dim);
}
.hero__scroll span { display: block; width: 36px; height: 1px; background: var(--bone-dim); transform-origin: left; animation: scrollline 2.2s var(--ease) infinite; }
@keyframes scrollline { 0% { transform: scaleX(0); } 50% { transform: scaleX(1); } 100% { transform: scaleX(0); transform-origin: right; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 15px; font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
  will-change: transform;
}
.btn--solid { background: var(--bone); color: var(--ink); }
.btn--solid:hover { background: #fff; }
.btn--ghost { border-color: rgba(236, 231, 220, 0.35); color: var(--bone); }
.btn--ghost:hover { border-color: var(--bone); }

/* Proof */
.proof { padding: clamp(48px, 8vh, 96px) var(--gutter); border-top: 1px solid var(--bone-faint); }
.proof__list { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px clamp(24px, 3vw, 56px); }
.proof__list li { display: grid; gap: 10px; }
.proof__list strong {
  font-family: var(--display); font-weight: 600; letter-spacing: -0.04em;
  font-size: clamp(48px, 6vw, 92px); line-height: 0.9;
  font-variant-numeric: tabular-nums;
}
.proof__list li > span { font-size: 15px; color: var(--bone-dim); max-width: 30ch; }

/* About */
.about {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(48px, 8vh, 96px) var(--gutter);
  display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: clamp(32px, 6vw, 96px); align-items: center;
}
.about__photo { margin: 0; border-radius: 50%; overflow: clip; aspect-ratio: 1; max-width: 420px; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08) brightness(1.02); }
.about__text h2 { font-size: clamp(30px, 4vw, 56px); font-weight: 550; line-height: 1.04; margin-bottom: 28px; max-width: 18ch; }
.about__text p { max-width: 58ch; color: var(--bone-dim); margin-bottom: 18px; font-size: 17px; }

/* Pillars */
.pillars { }
.pillar { position: relative; padding: clamp(56px, 9vh, 110px) var(--gutter) clamp(32px, 6vh, 72px); border-top: 1px solid var(--bone-faint); }
.pillar--automation { --accent: var(--teal); }
.pillar--ads { --accent: var(--amber); }
.pillar--web { --accent: var(--lilac); }
.pillar__head { max-width: var(--max); margin: 0 auto clamp(28px, 5vh, 56px); display: grid; grid-template-columns: 1fr 2fr; gap: 24px; align-items: end; }
.pillar__index { grid-column: 1 / -1; font-size: 13px; color: var(--bone-dim); }
.pillar__head h2 { font-size: clamp(56px, 10vw, 150px); font-weight: 650; letter-spacing: -0.045em; line-height: 0.9; color: var(--accent); font-variation-settings: "wdth" 85; }
.pillar__head p { max-width: 44ch; color: var(--bone-dim); font-size: 18px; justify-self: end; }

/* Sticky stack */
.stack { max-width: var(--max); margin: 0 auto; display: grid; gap: 24px; }
.card {
  position: sticky; top: clamp(80px, 12vh, 130px);
  display: grid; grid-template-columns: 1.15fr 1fr;
  min-height: min(58vh, 540px);
  background: var(--ink-2);
  border: 1px solid var(--bone-faint);
  border-radius: 20px;
  overflow: clip;
  transform-origin: center top;
  will-change: transform;
  transition: border-color 0.5s var(--ease);
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.card__media { margin: 0; overflow: clip; background: #000; }
.card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.9s var(--ease); }
.card__media--square img { object-position: center 30%; }
.card__media--fit { background: #f3eee3; display: grid; place-items: center; }
.card__media--fit img { object-fit: contain; height: auto; max-height: 100%; }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: clamp(28px, 3.4vw, 52px); display: grid; align-content: end; gap: 18px; }
.card__body h3 { font-size: clamp(26px, 2.6vw, 38px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; }
.card__body p { color: var(--bone-dim); max-width: 48ch; font-size: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: 12.5px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--bone-faint); color: var(--bone-dim); }

/* Text cards with drawn charts */
.card--text { cursor: default; }
.card__chart {
  display: flex; align-items: flex-end; gap: 6%;
  padding: clamp(36px, 5vw, 72px);
  background: radial-gradient(120% 90% at 20% 110%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%), #000;
}
.card__chart > span { flex: 1; height: var(--h); background: var(--accent); opacity: 0.85; border-radius: 3px 3px 0 0; transform-origin: bottom; transform: scaleY(0); }
.card.is-in .card__chart > span { animation: grow 1.1s var(--ease) forwards; }
.card.is-in .card__chart > span:nth-child(2) { animation-delay: 0.08s; } .card.is-in .card__chart > span:nth-child(3) { animation-delay: 0.16s; } .card.is-in .card__chart > span:nth-child(4) { animation-delay: 0.24s; } .card.is-in .card__chart > span:nth-child(5) { animation-delay: 0.32s; } .card.is-in .card__chart > span:nth-child(6) { animation-delay: 0.40s; } .card.is-in .card__chart > span:nth-child(7) { animation-delay: 0.48s; }
@keyframes grow { to { transform: scaleY(1); } }
.card__chart--line svg { width: 100%; height: 100%; overflow: visible; }
.card__chart--line path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 520; stroke-dashoffset: 520; }
.card.is-in .card__chart--line path { animation: draw 1.6s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.card__chart--split { gap: 14%; padding-inline: clamp(60px, 10vw, 140px); }
.card__chart--grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 12px; align-items: stretch; }
.card__chart--grid i { border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 10px; opacity: 0; transform: translateY(12px); }
.card.is-in .card__chart--grid i { animation: pop 0.8s var(--ease) forwards; }
.card.is-in .card__chart--grid i:nth-child(2) { animation-delay: 0.07s; } .card.is-in .card__chart--grid i:nth-child(3) { animation-delay: 0.14s; } .card.is-in .card__chart--grid i:nth-child(4) { animation-delay: 0.21s; } .card.is-in .card__chart--grid i:nth-child(5) { animation-delay: 0.28s; } .card.is-in .card__chart--grid i:nth-child(6) { animation-delay: 0.35s; }
.card__chart--grid i:nth-child(1) { background: color-mix(in srgb, var(--accent) 18%, transparent); }
@keyframes pop { to { opacity: 1; transform: none; } }

/* Minis */
.minis { max-width: var(--max); margin: clamp(24px, 4vh, 40px) auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0; border-top: 1px solid var(--bone-faint); }
.minis li { padding: 14px 20px 14px 0; border-bottom: 1px solid var(--bone-faint); display: grid; gap: 6px; }
.minis strong { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.minis span { color: var(--bone-dim); font-size: 15px; }

/* More */
.more { padding: clamp(56px, 9vh, 110px) var(--gutter); border-top: 1px solid var(--bone-faint); }
.more__head { max-width: var(--max); margin: 0 auto clamp(32px, 6vh, 72px); display: grid; grid-template-columns: 1fr 2fr; gap: 24px; align-items: end; }
.more__head h2 { font-size: clamp(44px, 7vw, 110px); font-weight: 650; letter-spacing: -0.04em; line-height: 0.9; }
.more__head p { color: var(--bone-dim); font-size: 18px; justify-self: end; }
.more__list { max-width: var(--max); margin: 0 auto; border-top: 1px solid var(--bone-faint); }
.more__list li { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--bone-faint); }
.more__list h3 { font-size: clamp(20px, 2vw, 28px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.more__list p { color: var(--bone-dim); max-width: 64ch; }

/* Skills */
.skills { padding: clamp(56px, 9vh, 110px) var(--gutter); border-top: 1px solid var(--bone-faint); }
.skills__head { max-width: var(--max); margin: 0 auto clamp(28px, 4vh, 48px); display: grid; gap: 28px; }
.skills__head h2 { font-size: clamp(36px, 5.5vw, 84px); font-weight: 650; letter-spacing: -0.035em; line-height: 0.95; }
.skills__filters { display: flex; flex-wrap: wrap; gap: 8px; }
.skills__filters button { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--bone-faint); color: var(--bone-dim); font-size: 14px; transition: color 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease); will-change: transform; }
.skills__filters button:hover { color: var(--bone); border-color: rgba(236, 231, 220, 0.4); }
.skills__filters button.is-active { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.wall { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 10px; }
.wall li {
  padding: 11px 16px; border-radius: 999px;
  border: 1px solid var(--bone-faint);
  font-family: var(--display); font-weight: 500; font-size: 16px; letter-spacing: -0.01em;
  transition: opacity 0.5s var(--ease), border-color 0.5s var(--ease), color 0.5s var(--ease), transform 0.5s var(--ease);
}
.wall li[data-group="automation"] { --g: var(--teal); }
.wall li[data-group="ads"] { --g: var(--amber); }
.wall li[data-group="web"] { --g: var(--lilac); }
.wall li[data-group="dash"] { --g: var(--coral); }
.wall li[data-group="agents"] { --g: var(--mint); }
.wall li[data-group="sales"], .wall li[data-group="video"], .wall li[data-group="data"] { --g: var(--bone); }
.wall.is-filtered li { opacity: 0.18; }
.wall.is-filtered li.is-on { opacity: 1; border-color: color-mix(in srgb, var(--g) 70%, transparent); color: var(--g); }
.creds { max-width: var(--max); margin: clamp(48px, 8vh, 96px) auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; border-top: 1px solid var(--bone-faint); padding-top: 32px; }
.creds h3 { font-size: 20px; font-weight: 600; margin-bottom: 12px; }
.creds p { color: var(--bone-dim); font-size: 15.5px; margin-bottom: 6px; }

/* Contact takeover */
.contact {
  position: relative;
  background: var(--bone); color: var(--ink);
  padding: clamp(64px, 12vh, 140px) var(--gutter) 32px;
  border-radius: 32px 32px 0 0;
  overflow: clip;
}
.contact__inner { max-width: var(--max); margin: 0 auto; display: grid; gap: 28px; }
.contact__lead { font-size: clamp(17px, 1.6vw, 22px); max-width: 44ch; color: rgba(6, 8, 11, 0.7); }
.contact__mail { display: block; }
.contact__mail-line { display: block; overflow: hidden; }
.contact__mail-line span {
  display: block;
  font-family: var(--display); font-weight: 650; letter-spacing: -0.05em; line-height: 0.88;
  font-size: clamp(64px, 16vw, 240px);
  font-variation-settings: "wdth" 85;
  transition: transform 0.9s var(--ease), letter-spacing 0.9s var(--ease);
}
.contact__mail:hover .contact__mail-line span { letter-spacing: -0.035em; }
.contact__links { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 16px; font-weight: 500; }
.contact__links a { display: inline-block; border-bottom: 1px solid rgba(6, 8, 11, 0.3); padding-bottom: 2px; transition: border-color 0.35s var(--ease); will-change: transform; }
.contact__links a:hover { border-color: var(--ink); }
.contact__foot { margin-top: clamp(40px, 8vh, 96px); font-size: 13px; color: rgba(6, 8, 11, 0.55); }

/* Responsive */
@media (max-width: 1024px) {
  .proof__list { grid-template-columns: repeat(2, 1fr); }
  .card { grid-template-columns: 1fr; min-height: 0; }
  .card__media { aspect-ratio: 16 / 10; }
  .card__media--square { aspect-ratio: 16 / 10; }
  .card__chart { min-height: 220px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .topbar__nav { display: none; }
  .topbar__cta { padding: 7px 12px; white-space: nowrap; font-size: 13px; }
  .hero { align-items: end; padding-bottom: 72px; }
  .hero__globe, .hero__globe-fallback { right: -30vw; top: 32%; width: 110vw; height: 110vw; opacity: 0.75; }
  .hero__glow { right: -10vw; top: 32%; }
  .hero__name { font-size: clamp(56px, 19vw, 110px); }
  .hero__roll { font-size: 24px; }
  .hero__scroll { display: none; }
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 200px; }
  .pillar__head, .more__head { grid-template-columns: 1fr; }
  .pillar__head p, .more__head p { justify-self: start; }
  .card { position: relative; top: auto; }
  .more__list li { grid-template-columns: 1fr; gap: 10px; }
  .creds { grid-template-columns: 1fr; }
  .contact { border-radius: 20px 20px 0 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html.has-motion [data-motion-text], html.has-motion [data-reveal], html.has-motion [data-reveal-item], html.has-motion [data-image-reveal] { visibility: visible; }
  .hero__scroll span { animation: none; transform: none; }
  .card { position: relative; top: auto; }
  .card__chart > span { transform: none; }
  .card__chart--line path { stroke-dashoffset: 0; }
  .card__chart--grid i { opacity: 1; transform: none; }
  * { transition-duration: 0.01ms !important; }
}
html.no-motion [data-motion-text], html.no-motion [data-reveal], html.no-motion [data-reveal-item], html.no-motion [data-image-reveal] { visibility: visible !important; }
html.no-motion .card { position: relative; top: auto; }
html.no-motion .card__chart > span { transform: none; }
html.no-motion .card__chart--line path { stroke-dashoffset: 0; }
html.no-motion .card__chart--grid i { opacity: 1; transform: none; }

/* Device frames: desktop window + phone overlapping, both real screenshots */
.card__media--device { position: relative; padding: clamp(22px, 3vw, 44px) 0 0 clamp(22px, 3vw, 44px); background: radial-gradient(120% 90% at 0% 100%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 60%), #000; overflow: clip; }
.device { display: block; }
.device--desktop { position: relative; border-radius: 12px 0 0 0; overflow: clip; background: #111; box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08); transform: translate3d(0,0,0); transition: transform 1s var(--ease); }
.device__bar { display: flex; gap: 6px; padding: 10px 12px; background: #1a1d22; }
.device__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.device--desktop img { width: 100%; height: auto; object-fit: cover; object-position: top; }
.device--phone { position: absolute; right: 6%; bottom: -6%; width: 26%; border-radius: 22px; overflow: clip; background: #000; box-shadow: 0 30px 60px rgba(0,0,0,0.7), 0 0 0 6px #15181d, 0 0 0 7px rgba(255,255,255,0.12); transform: translate3d(0, 18px, 0) rotate(-3deg); transition: transform 1s var(--ease); }
.device--phone img { width: 100%; height: auto; display: block; object-fit: cover; aspect-ratio: 9 / 19.5; object-position: top; }
.card:hover .device--desktop { transform: translate3d(0, -8px, 0); }
.card:hover .device--phone { transform: translate3d(0, 0, 0) rotate(-1deg); }
.card:hover .card__media--device img { transform: none; }
@media (max-width: 1024px) {
  .card__media--device { aspect-ratio: auto; padding-right: 0; }
  .device--phone { width: 28%; bottom: -4%; }
}

/* Dashboards gallery */
.gallery { --accent: var(--coral); position: relative; padding: clamp(56px, 9vh, 110px) 0 clamp(32px, 6vh, 72px); border-top: 1px solid var(--bone-faint); overflow: clip; }
.gallery__head { max-width: var(--max); margin: 0 auto clamp(24px, 4vh, 40px); padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr 2fr; gap: 24px; align-items: end; }
.gallery__head .pillar__index { grid-column: 1 / -1; }
.gallery__head h2 { font-size: clamp(56px, 10vw, 150px); font-weight: 650; letter-spacing: -0.045em; line-height: 0.9; color: var(--accent); font-variation-settings: "wdth" 85; }
.gallery__head p { max-width: 46ch; color: var(--bone-dim); font-size: 18px; justify-self: end; }
.gallery__pin { position: relative; }
.gallery__track { display: flex; gap: clamp(20px, 3vw, 40px); padding: 6px var(--gutter) 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery__arrows { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: end; }
.gallery__arrows button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--bone-faint); color: var(--bone); font-size: 18px; transition: border-color 0.35s var(--ease), background 0.35s var(--ease); will-change: transform; }
.gallery__arrows button:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.shot { margin: 0; width: min(58vw, 820px); flex: none; display: grid; gap: 14px; scroll-snap-align: start; }
.shot .device--desktop { border-radius: 14px; box-shadow: 0 40px 100px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.08); }
.shot .device--desktop img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.shot figcaption { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr; gap: 16px; align-items: start; }
.shot strong { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; }
.shot span:not(.device):not(.device__bar) { color: var(--bone-dim); font-size: 15px; max-width: 60ch; }
.gallery__how { max-width: var(--max); margin: clamp(28px, 5vh, 56px) auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gallery__how li { display: grid; gap: 8px; padding-top: 20px; border-top: 1px solid var(--bone-faint); }
.gallery__how strong { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.gallery__how span { color: var(--bone-dim); font-size: 15px; }
@media (max-width: 760px) {
  .gallery__head { grid-template-columns: 1fr; }
  .gallery__head p { justify-self: start; }
  .gallery__track { overflow-x: auto; width: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 12px; }
  .shot { width: 84vw; scroll-snap-align: start; }
  .shot figcaption { grid-template-columns: 1fr; gap: 6px; }
  .gallery__how { grid-template-columns: 1fr; }
}


/* Scroll progress */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 200; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: background 0.9s var(--ease); }

/* Marquee */
.marquee { overflow: clip; border-top: 1px solid var(--bone-faint); padding: 18px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 0; width: max-content; will-change: transform; }
.marquee__track span { font-family: var(--display); font-weight: 500; font-size: clamp(16px, 1.4vw, 20px); letter-spacing: -0.01em; color: var(--bone-dim); padding: 0 28px; position: relative; white-space: nowrap; }
.marquee__track span::after { content: ""; position: absolute; right: -3px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transform: translateY(-50%); opacity: 0.8; transition: background 0.9s var(--ease); }

/* Card stat */
.card__stat { display: flex; align-items: baseline; gap: 10px; color: var(--accent); }
.card__stat strong { font-family: var(--display); font-weight: 650; font-size: clamp(34px, 3.4vw, 54px); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.card__stat span { font-size: 14px; color: var(--bone-dim); }

/* Card 3D tilt */
.card { transform-style: preserve-3d; }
.card__body, .card__media { transform: translateZ(0); }

/* Agents */
.agents { --accent: var(--mint); position: relative; padding: clamp(56px, 9vh, 110px) var(--gutter) clamp(32px, 6vh, 72px); border-top: 1px solid var(--bone-faint); overflow: clip; }
.agents__head { max-width: var(--max); margin: 0 auto clamp(28px, 5vh, 56px); display: grid; grid-template-columns: 1fr 2fr; gap: 24px; align-items: end; }
.agents__head .pillar__index { grid-column: 1 / -1; }
.agents__head h2 { font-size: clamp(56px, 10vw, 150px); font-weight: 650; letter-spacing: -0.045em; line-height: 0.9; color: var(--accent); font-variation-settings: "wdth" 85; }
.agents__head p { max-width: 50ch; color: var(--bone-dim); font-size: 18px; justify-self: end; }
.agents__stage { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.net { position: relative; aspect-ratio: 1; max-width: 560px; width: 100%; margin: 0 auto; }
.net__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.net__svg line { stroke: rgba(236, 231, 220, 0.22); stroke-width: 1.2; }
.net::before { content: ""; position: absolute; left: 50%; top: 50%; width: 46%; height: 46%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); filter: blur(20px); pointer-events: none; }
.net__svg .packet { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.net__svg .ring { fill: none; stroke: rgba(236, 231, 220, 0.08); stroke-dasharray: 2 8; }
.net__nodes { position: absolute; inset: 0; }
.node { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: grid; place-items: center; gap: 8px; will-change: transform; cursor: default; }
.node__dot { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 1.5px solid var(--accent); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); transition: transform 0.5s var(--ease), background 0.5s var(--ease); position: relative; }
.node__dot::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); opacity: 0; animation: ping 2.6s var(--ease) infinite; animation-delay: var(--d, 0s); }
@keyframes ping { 0% { transform: scale(0.5); opacity: 0.9; } 100% { transform: scale(1.6); opacity: 0; } }
.node__label { font-family: var(--display); font-weight: 500; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; color: var(--bone); background: rgba(6, 8, 11, 0.7); padding: 4px 9px; border-radius: 999px; border: 1px solid var(--bone-faint); backdrop-filter: blur(6px); transition: border-color 0.4s var(--ease), color 0.4s var(--ease); }
.node__hint { position: absolute; top: calc(100% + 6px); width: 190px; font-size: 13px; line-height: 1.35; color: var(--bone-dim); text-align: center; opacity: 0; transform: translateY(4px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); pointer-events: none; }
.node:hover .node__hint, .node.is-active .node__hint { opacity: 1; transform: none; }
.node:hover .node__dot, .node.is-active .node__dot { transform: scale(1.3); background: var(--accent); }
.node:hover .node__label, .node.is-active .node__label { border-color: var(--accent); color: var(--accent); }
.node--core .node__dot { width: 26px; height: 26px; background: var(--accent); box-shadow: 0 0 30px color-mix(in srgb, var(--accent) 60%, transparent); }
.node--core .node__label { font-size: 15px; }

.term { background: #0a0d12; border: 1px solid var(--bone-faint); border-radius: 16px; overflow: clip; font-family: ui-monospace, "Cascadia Mono", "JetBrains Mono", Menlo, monospace; font-size: 13.5px; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.term__bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: #10141b; border-bottom: 1px solid var(--bone-faint); }
.term__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.term__bar span { margin-left: 8px; color: var(--bone-dim); font-size: 12.5px; }
.term__log { padding: 18px 18px 22px; display: grid; gap: 10px; }
.term__log li { display: grid; grid-template-columns: 46px 110px 1fr; gap: 12px; align-items: baseline; color: var(--bone-dim); opacity: 0; transform: translateY(6px); }
.term__log li.is-on { opacity: 1; transform: none; transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
.term__log b { font-weight: 500; color: rgba(236,231,220,0.4); }
.term__log em { font-style: normal; color: var(--accent); }
.term__wait { color: var(--bone); }
.term__cursor { display: inline-block; width: 8px; height: 14px; background: var(--bone); vertical-align: -2px; animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

.crews { max-width: var(--max); margin: clamp(28px, 5vh, 56px) auto 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.crew { display: grid; gap: 10px; padding-top: 20px; border-top: 1px solid var(--bone-faint); align-content: start; }
.crew h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.crew p { color: var(--bone-dim); font-size: 15px; }

@media (max-width: 1024px) {
  .agents__stage { grid-template-columns: 1fr; }
  .crews { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 760px) {
  .agents__head { grid-template-columns: 1fr; }
  .agents__head p { justify-self: start; }
  .net { max-width: 92vw; }
  .node__label { font-size: 11.5px; padding: 3px 7px; }
  .node__hint { display: none; }
  .term { font-size: 12px; }
  .term__log li { grid-template-columns: 40px 86px 1fr; gap: 8px; }
  .crews { grid-template-columns: 1fr; }
  .card__stat strong { font-size: 32px; }
}
html.no-motion .term__log li { opacity: 1; transform: none; }
html.no-motion .progress { display: none; }

/* Overflow safety: no section may widen the page */
.hero, .marquee, .proof, .about, .pillar, .more, .skills, .contact, .agents, .gallery { overflow-x: clip; }
.card__media--desktop-only { padding-right: 0; padding-bottom: 0; display: grid; align-items: end; }
.card__media--desktop-only .device--desktop { height: 100%; display: flex; flex-direction: column; }
.card__media--desktop-only .device--desktop img { flex: 1; min-height: 0; height: 100%; object-fit: cover; object-position: top; }
.card__media--desktop-only .device--desktop { border-radius: 12px 0 0 0; }

/* Skip link */
.skip { position: fixed; top: 8px; left: 8px; z-index: 300; padding: 10px 14px; background: var(--bone); color: var(--ink); border-radius: 8px; transform: translateY(-200%); transition: transform 0.3s var(--ease); }
.skip:focus { transform: none; }

/* Phone menu */
.topbar__menu { display: none; align-items: center; gap: 8px; font-size: 14px; padding: 8px 12px; border: 1px solid rgba(255,255,255,0.5); border-radius: 999px; color: #fff; }
.topbar__menu span { display: block; width: 14px; height: 1.5px; background: currentColor; position: relative; }
.topbar__menu span + span { margin-left: -22px; transform: translateY(5px); }
.menu { position: fixed; inset: 0; z-index: 150; background: var(--ink); display: grid; grid-template-rows: 1fr auto; padding: 96px var(--gutter) 32px; transform: translateY(-100%); visibility: hidden; }
.menu.is-open { visibility: visible; }
.menu__nav { display: grid; align-content: start; gap: 6px; }
.menu__nav a { font-family: var(--display); font-weight: 600; font-size: clamp(40px, 11vw, 64px); letter-spacing: -0.035em; line-height: 1.05; padding: 6px 0; border-bottom: 1px solid var(--bone-faint); }
.menu__foot { display: grid; gap: 10px; font-size: 15px; color: var(--bone-dim); }
html.menu-open { overflow: hidden; }
@media (max-width: 760px) {
  .topbar__menu { display: inline-flex; }
  .topbar__cta { display: none; }
  html.menu-open .topbar { mix-blend-mode: normal; }
}

@media (max-width: 760px) {
  .shot { width: 84vw; }
  .gallery__arrows { display: none; }
}

/* Work: tabs + grid (replaces the three chapters) */
.work { padding: clamp(56px, 9vh, 110px) var(--gutter) clamp(32px, 6vh, 72px); border-top: 1px solid var(--bone-faint); overflow-x: clip; }
.work__head { max-width: var(--max); margin: 0 auto clamp(24px, 4vh, 40px); display: grid; grid-template-columns: auto 1fr; gap: 16px 40px; align-items: end; }
.work__head h2 { font-size: clamp(56px, 9vw, 140px); font-weight: 650; letter-spacing: -0.045em; line-height: 0.9; font-variation-settings: "wdth" 85; }
.work__tabs { display: flex; gap: 8px; justify-self: end; flex-wrap: wrap; }
.work__tabs button { padding: 11px 18px; border-radius: 999px; border: 1px solid var(--bone-faint); color: var(--bone-dim); font-family: var(--display); font-weight: 500; font-size: 16px; transition: color 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease); will-change: transform; }
.work__tabs button:hover { color: var(--bone); border-color: rgba(236,231,220,0.4); }
.work__tabs button.is-active { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.work__lead { grid-column: 1 / -1; color: var(--bone-dim); font-size: 18px; max-width: 60ch; min-height: 1.6em; }
.work__panel { max-width: var(--max); margin: 0 auto; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid .card { position: relative; top: auto; grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 0; }
.grid .card__media { aspect-ratio: 16 / 10; }
.grid .card__media--device { padding: 18px 0 0 18px; }
.grid .device--phone { width: 30%; bottom: -8%; }
.grid .card__chart { aspect-ratio: 16 / 10; padding: 28px; }
.grid .card__body { padding: 22px 22px 24px; gap: 12px; align-content: start; }
.grid .card__body h3 { font-size: 22px; }
.grid .card__body p { font-size: 15px; }
.grid .card__stat strong { font-size: 34px; }
.grid .tags li { font-size: 12px; padding: 5px 9px; }
.work .minis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 18px; }
.work .minis li { padding: 12px 16px 12px 0; }
.work .minis strong { font-size: 16px; }
.work .minis span { font-size: 14px; }
@media (max-width: 1024px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .work__head { grid-template-columns: 1fr; }
  .work__tabs { justify-self: start; }
  .grid { grid-template-columns: 1fr; }
}
/* And more: compact 5-up */
.more__list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; border-top: 0; }
.more__list li { grid-template-columns: 1fr; gap: 8px; padding: 18px 0 0; border-bottom: 0; border-top: 1px solid var(--bone-faint); }
.more__list h3 { font-size: 18px; }
.more__list p { font-size: 14.5px; }
@media (max-width: 1024px) { .more__list { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .more__list { grid-template-columns: 1fr 1fr; gap: 14px; } }

/* Grid blowout guard: tracks never grow past 1fr because of wide images */
.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid > .card, .card__media, .card__body, .device, .shot, .crew, .more__list li, .proof__list li { min-width: 0; }
.card__media img, .device img { max-width: 100%; min-width: 0; }
.more__list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.crews { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gallery__how { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.proof__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .crews { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .proof__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .grid, .crews, .gallery__how { grid-template-columns: minmax(0, 1fr); }
  .more__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Top bar gets a glass background once the page is scrolled */
.topbar { transition: background 0.4s var(--ease), padding 0.4s var(--ease); }
.topbar.is-scrolled { mix-blend-mode: normal; background: rgba(6, 8, 11, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(236, 231, 220, 0.08); }

/* Work accent follows the active tab, never the hero timer */
.work[data-pillar-section="automation"] { --accent: var(--teal); }
.work[data-pillar-section="ads"] { --accent: var(--amber); }
.work[data-pillar-section="web"] { --accent: var(--lilac); }

/* Skills: compact grouped rows */
.skills { padding: clamp(48px, 8vh, 88px) var(--gutter); }
.skills__wrap { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.skills__side h2 { font-size: clamp(32px, 4vw, 56px); font-weight: 650; letter-spacing: -0.035em; line-height: 0.95; margin-bottom: 14px; }
.skills__side > p { color: var(--bone-dim); font-size: 15.5px; max-width: 34ch; }
.skills .creds { grid-template-columns: 1fr; gap: 18px; margin-top: 28px; padding-top: 22px; }
.skills .creds h3 { font-size: 15px; margin-bottom: 6px; }
.skills .creds p { font-size: 14px; margin-bottom: 3px; }
.groups { display: grid; }
.group { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px 0; border-top: 1px solid var(--bone-faint); }
.group:last-child { border-bottom: 1px solid var(--bone-faint); }
.group h3 { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; padding-top: 5px; color: var(--bone); }
.group h3 i { width: 8px; height: 8px; border-radius: 50%; background: var(--g, var(--bone-dim)); box-shadow: 0 0 10px var(--g, transparent); flex: none; }
.group ul { display: flex; flex-wrap: wrap; gap: 6px; }
.group li { font-family: var(--display); font-weight: 500; font-size: 13.5px; letter-spacing: -0.01em; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--bone-faint); color: var(--bone-dim); transition: color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease); }
.group:hover li { color: var(--bone); }
.group li:hover { color: var(--g, var(--bone)); border-color: color-mix(in srgb, var(--g, var(--bone)) 70%, transparent); transform: translateY(-2px); }
.group[data-group="automation"] { --g: var(--teal); }
.group[data-group="agents"] { --g: var(--mint); }
.group[data-group="ads"] { --g: var(--amber); }
.group[data-group="web"] { --g: var(--lilac); }
.group[data-group="dash"] { --g: var(--coral); }
@media (max-width: 1024px) { .skills__wrap { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .group { grid-template-columns: 1fr; gap: 8px; } .group li { font-size: 12.5px; padding: 5px 9px; } }

/* Polish: each chapter carries a faint glow of its colour */
.work, .agents, .gallery, .more, .skills, .proof, .about { position: relative; }
.work::before, .agents::before, .gallery::before, .more::before, .skills::before, .proof::before {
  content: ""; position: absolute; z-index: -1; right: -10vw; top: -10vh; width: 50vw; height: 60vh; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%);
  filter: blur(30px);
}
.more::before, .skills::before, .proof::before { --accent: var(--bone); opacity: 0.35; }
.proof__list strong { background: linear-gradient(180deg, var(--bone) 55%, color-mix(in srgb, var(--bone) 55%, var(--accent)) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.about__photo { box-shadow: 0 0 0 1px var(--bone-faint), 0 0 60px color-mix(in srgb, var(--accent) 18%, transparent); transition: box-shadow 1.2s var(--ease); }
.more__list h3 { display: flex; align-items: center; gap: 9px; }
.more__list h3::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bone-dim); flex: none; transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.more__list li:hover h3::before { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.more__list li { transition: transform 0.5s var(--ease); }
.more__list li:hover { transform: translateY(-3px); }
.grid .card { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
.grid .card:hover { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.shot .device--desktop:hover { transform: translateY(-6px); }
@media (min-width: 761px) and (max-width: 1024px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid .card:nth-child(3):last-child { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .grid .card:nth-child(3):last-child .card__media { aspect-ratio: auto; } }

/* Salesforce card: animated Flow */
.card__chart--flow { padding: 0; display: block; }
.flow { width: 100%; height: 100%; display: block; color: var(--accent); font-family: var(--body); }
.flow__path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; opacity: 0.55; stroke-dasharray: 400; stroke-dashoffset: 400; }
.flow__path--fault { stroke: #ff7a7a; stroke-dasharray: 5 6; opacity: 0.7; }
.card.is-in .flow__path { animation: flowdraw 1.2s var(--ease) forwards; }
.card.is-in .flow__path:nth-of-type(2) { animation-delay: 0.25s; } .card.is-in .flow__path:nth-of-type(3) { animation-delay: 0.35s; } .card.is-in .flow__path:nth-of-type(4) { animation-delay: 0.45s; } .card.is-in .flow__path:nth-of-type(5) { animation-delay: 0.8s; }
@keyframes flowdraw { to { stroke-dashoffset: 0; } }
.flow__pkt { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); opacity: 0; }
.card.is-in .flow__pkt { opacity: 1; transition: opacity 0.6s 1.2s; }
.flow__pkt--fault { fill: #ff7a7a; filter: drop-shadow(0 0 6px #ff7a7a); }
.flow__node rect, .flow__node path { fill: #0c1118; stroke: rgba(236, 231, 220, 0.18); stroke-width: 1.2; }
.flow__node text { fill: var(--bone); font-size: 14px; font-weight: 500; text-anchor: middle; }
.flow__node--trigger rect { fill: color-mix(in srgb, var(--accent) 16%, #0c1118); stroke: var(--accent); }
.flow__node--decision path { fill: color-mix(in srgb, var(--accent) 10%, #0c1118); stroke: color-mix(in srgb, var(--accent) 70%, transparent); }
.flow__node--fault rect { stroke: rgba(255, 122, 122, 0.6); fill: rgba(255, 122, 122, 0.08); }
.flow__node--fault text { fill: #ff9f9f; font-size: 13px; }
.flow__node { opacity: 0; transform: translateY(6px); }
.card.is-in .flow__node { animation: pop 0.7s var(--ease) forwards; }
.card.is-in .flow__node:nth-of-type(2) { animation-delay: 0.15s; } .card.is-in .flow__node:nth-of-type(3) { animation-delay: 0.3s; } .card.is-in .flow__node:nth-of-type(4) { animation-delay: 0.4s; } .card.is-in .flow__node:nth-of-type(5) { animation-delay: 0.5s; } .card.is-in .flow__node:nth-of-type(6) { animation-delay: 0.8s; }
.flow__label { fill: var(--bone); font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.flow__label--dim { fill: var(--bone-dim); font-family: var(--body); font-size: 12.5px; font-weight: 400; }
html.no-motion .flow__path, .card.is-in .flow__path { stroke-dashoffset: 0; }
html.no-motion .flow__node { opacity: 1; transform: none; }
html.no-motion .flow__pkt { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .flow__path { stroke-dashoffset: 0; } .flow__node { opacity: 1; transform: none; } .flow__pkt { opacity: 1; } }

/* Flow: Salesforce-canvas look */
.flow__node rect { fill: #10151c; stroke: rgba(236, 231, 220, 0.16); }
.flow__node text { text-anchor: start; font-size: 13px; font-weight: 600; fill: var(--bone); }
.flow__node .flow__sub { font-size: 11.5px; font-weight: 400; fill: var(--bone-dim); }
.flow__node .flow__sub--link { fill: #7fb4ff; font-style: italic; }
.flow__ico { stroke: none !important; }
.flow__ico--start { fill: #1f9b86 !important; }
.flow__ico--update { fill: #ff5d8f !important; }
.flow__ico--get { fill: #ff5d8f !important; }
.flow__ico--assign { fill: #ff9a3c !important; }
.flow__ico--end { fill: #ff6161 !important; }
.flow__node--fault rect { fill: #d62d3a !important; stroke: none !important; }
.flow__node--fault text { fill: #fff !important; text-anchor: middle; font-size: 11px; }
.flow__path { opacity: 0.8; stroke: rgba(236, 231, 220, 0.5); }
.flow__path--fault { stroke: #ff5b66; stroke-dasharray: 6 6; opacity: 0.9; }
.flow__pkt { fill: var(--bone); filter: drop-shadow(0 0 6px var(--accent)); }
.flow__pkt--fault { fill: #ff5b66; filter: drop-shadow(0 0 6px #ff5b66); }

/* Second row in Work: two wide workflow cards */
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
.grid--2 .card--wide { grid-template-columns: 1fr; }
.grid--2 .card__chart { aspect-ratio: 16 / 9; padding: 0; display: block; }
/* n8n canvas */
.card__chart--n8n { background: #0a0e14; }
.n8n { width: 100%; height: 100%; display: block; font-family: var(--body); }
.n8n__edge { fill: none; stroke: rgba(236, 231, 220, 0.28); stroke-width: 1.6; }
.n8n__pkt { fill: #ff6d5a; filter: drop-shadow(0 0 6px #ff6d5a); opacity: 0; }
.card.is-in .n8n__pkt { opacity: 1; transition: opacity 0.5s 0.8s; }
.n8n__node rect { fill: #141a23; stroke: rgba(236, 231, 220, 0.18); stroke-width: 1.2; }
.n8n__node text { fill: var(--bone); font-size: 12.5px; font-weight: 600; text-anchor: middle; }
.n8n__node .n8n__sub { font-size: 10.5px; font-weight: 400; fill: var(--bone-dim); }
.n8n__node--trigger rect { stroke: #ff6d5a; fill: rgba(255, 109, 90, 0.12); }
.n8n__node--ai rect { stroke: var(--accent); fill: color-mix(in srgb, var(--accent) 14%, #141a23); }
.n8n__node--out rect { stroke: #ff6d5a; fill: rgba(255, 109, 90, 0.12); }
.n8n__node { opacity: 0; transform: translateY(6px); }
.card.is-in .n8n__node { animation: pop 0.7s var(--ease) forwards; }
.card.is-in .n8n__node:nth-of-type(2) { animation-delay: 0.12s; } .card.is-in .n8n__node:nth-of-type(3) { animation-delay: 0.2s; } .card.is-in .n8n__node:nth-of-type(4) { animation-delay: 0.28s; } .card.is-in .n8n__node:nth-of-type(5) { animation-delay: 0.45s; } .card.is-in .n8n__node:nth-of-type(6) { animation-delay: 0.6s; }
html.no-motion .n8n__node, html.no-motion .n8n__pkt { opacity: 1; transform: none; }
/* Ads pipeline + fan of real creatives */
.card__chart--ads { display: grid !important; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 12px; padding: 22px !important; background: radial-gradient(120% 90% at 100% 100%, rgba(255, 122, 60, 0.18), transparent 60%), #0a0e14; overflow: clip; }
.pipe { display: grid; gap: 7px; position: relative; }
.pipe::before { content: ""; position: absolute; left: 11px; top: 12px; bottom: 12px; width: 1px; background: linear-gradient(var(--accent), rgba(236,231,220,0.1)); }
.pipe li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--bone-dim); opacity: 0; transform: translateX(-8px); }
.pipe b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--ink); background: var(--accent); flex: none; position: relative; z-index: 1; }
.card.is-in .pipe li { animation: slidein 0.6s var(--ease) forwards; }
.card.is-in .pipe li:nth-child(2) { animation-delay: 0.1s; } .card.is-in .pipe li:nth-child(3) { animation-delay: 0.2s; } .card.is-in .pipe li:nth-child(4) { animation-delay: 0.3s; } .card.is-in .pipe li:nth-child(5) { animation-delay: 0.4s; } .card.is-in .pipe li:nth-child(6) { animation-delay: 0.5s; } .card.is-in .pipe li:nth-child(7) { animation-delay: 0.6s; }
@keyframes slidein { to { opacity: 1; transform: none; } }
.fan { position: relative; height: 100%; min-height: 200px; }
.fan img { position: absolute; left: 50%; bottom: 0; width: 56%; border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08); transform-origin: 50% 110%; opacity: 0; transform: translate(-50%, 10%) rotate(0deg); transition: transform 0.9s var(--ease); }
.fan img:nth-child(1) { width: 36%; }
.card.is-in .fan img { animation: fanin 1s var(--ease) forwards; }
.card.is-in .fan img:nth-child(1) { animation-delay: 0.8s; --r: -16deg; --x: -62%; }
.card.is-in .fan img:nth-child(2) { animation-delay: 0.95s; --r: 0deg; --x: -50%; }
.card.is-in .fan img:nth-child(3) { animation-delay: 1.1s; --r: 14deg; --x: -34%; }
@keyframes fanin { to { opacity: 1; transform: translate(var(--x, -50%), 0) rotate(var(--r, 0deg)); } }
.card:hover .fan img:nth-child(1) { transform: translate(-78%, -4%) rotate(-20deg); }
.card:hover .fan img:nth-child(3) { transform: translate(-18%, -4%) rotate(18deg); }
.card:hover .fan img:nth-child(2) { transform: translate(-50%, -8%) rotate(0deg); }
html.no-motion .pipe li, html.no-motion .fan img { opacity: 1; transform: translate(var(--x, -50%), 0) rotate(var(--r, 0deg)); }
@media (max-width: 1024px) { .grid--2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .card__chart--ads { grid-template-columns: 1fr; } .fan { min-height: 240px; } .grid--2 .card__chart { aspect-ratio: auto; } .card__chart--n8n { aspect-ratio: 16 / 9 !important; } }

/* Job Hunt HQ: looping office orbit */
.hq { max-width: var(--max); margin: clamp(28px, 5vh, 56px) auto 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); align-items: center; }
.hq__media { margin: 0; min-width: 0; }
.hq__media .device--desktop { border-radius: 14px; box-shadow: 0 40px 100px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.08), 0 0 80px color-mix(in srgb, var(--accent) 18%, transparent); }
.hq__video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #1f2a40; }
.hq__text { display: grid; gap: 14px; align-content: center; }
.hq__text h3 { font-size: clamp(24px, 2.4vw, 34px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; }
.hq__text > p:not(.card__stat) { color: var(--bone-dim); font-size: 16px; max-width: 46ch; }
@media (max-width: 1024px) { .hq { grid-template-columns: 1fr; } }

/* AI agents v2: relay network, human gate, crew cards */
.net__svg .ring--spin { stroke: color-mix(in srgb, var(--accent) 26%, transparent); stroke-dasharray: 3 14; transform-origin: 400px 400px; animation: netspin 46s linear infinite; }
.net__svg .ring--rev { stroke-dasharray: 1 22; animation-duration: 70s; animation-direction: reverse; }
@keyframes netspin { to { transform: rotate(360deg); } }
.net__svg .spoke { transition: stroke 0.5s var(--ease), stroke-width 0.5s var(--ease); }
.net__svg .spoke.is-live { stroke: var(--accent); stroke-width: 2; }
.node.is-done .node__dot { background: color-mix(in srgb, var(--accent) 45%, var(--ink)); }
.node.is-done .node__label { color: var(--bone-dim); }
.node--core.is-wait .node__dot { background: var(--amber); box-shadow: 0 0 34px color-mix(in srgb, var(--amber) 70%, transparent); animation: gate 1.1s ease-in-out infinite; }
.node--core.is-wait .node__label { border-color: var(--amber); color: var(--amber); }
.node--core.is-ok .node__dot { transform: scale(1.5); box-shadow: 0 0 60px var(--accent); }
@keyframes gate { 50% { transform: scale(1.35); } }
.term__prog { height: 2px; background: var(--bone-faint); }
.term__prog i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease); box-shadow: 0 0 10px var(--accent); }
.term__log li:not(.is-on) { pointer-events: none; }
.term__gate { display: flex; align-items: center; gap: 10px; }
.term__ok { font: 600 12.5px/1 var(--body); padding: 8px 16px; border-radius: 999px; border: 0; background: var(--amber); color: var(--ink); cursor: pointer; position: relative; transition: background 0.3s var(--ease); }
.term__ok::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1.5px solid var(--amber); animation: okring 1.4s var(--ease) infinite; pointer-events: none; }
@keyframes okring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.35, 1.7); opacity: 0; } }
.term__ok:hover, .term__ok:focus-visible { background: var(--bone); }
.term__done { display: none; color: var(--accent); }
.term.is-approved .term__ok { display: none; }
.term.is-approved .term__done { display: inline; }
.term.is-approved .term__prog i { background: var(--bone); }
html.no-motion .term__prog i { transform: none; }
html.no-motion .ring--spin, html.no-motion .term__ok::after { animation: none; opacity: 0; }

.crews { gap: 14px; }
.crew { position: relative; padding: 18px 18px 20px; border: 1px solid var(--bone-faint); border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent); overflow: hidden; transition: transform 0.5s var(--ease), border-color 0.5s var(--ease); }
.crew::before { content: ""; position: absolute; left: var(--mx, 50%); top: var(--my, 0%); width: 260px; height: 260px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 20%, transparent), transparent); opacity: 0; transition: opacity 0.5s var(--ease); pointer-events: none; }
.crew:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.crew:hover::before { opacity: 1; }
.crew > * { position: relative; }
.crew__team { display: flex; flex-wrap: wrap; gap: 5px; min-height: 24px; align-content: center; }
.crew__team i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--ink); animation: crewdot 2.8s var(--ease) infinite; }
.crew__team i:nth-child(3n) { animation-delay: 0.5s; } .crew__team i:nth-child(3n+1) { animation-delay: 1s; } .crew__team i:nth-child(4n) { animation-delay: 1.6s; }
@keyframes crewdot { 0%, 70%, 100% { background: var(--ink); } 35% { background: var(--accent); } }
.crew__icon { display: block; height: 24px; }
.crew__icon svg { height: 24px; width: 48px; fill: none; stroke: var(--accent); stroke-width: 1.5; overflow: visible; }
.crew__icon .b2 { fill: color-mix(in srgb, var(--accent) 30%, transparent); }
html.no-motion .crew__team i { animation: none; }
@media (max-width: 760px) {
  .crews { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding: 4px var(--gutter) 10px; scrollbar-width: none; }
  .crews::-webkit-scrollbar { display: none; }
  .crew { flex: 0 0 76vw; scroll-snap-align: center; }
  .node__hint { width: 150px; font-size: 12px; }
}
@media (min-width: 1025px) { .net { max-width: 520px; } .agents .hq, .agents .crews { margin-top: clamp(20px, 3.5vh, 36px); } }

/* AI agents: live example switcher, WhatsApp agent, voice agent */
.demos { max-width: var(--max); margin: 0 auto clamp(14px, 2.5vh, 26px); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.demos__label { font-size: 13px; color: var(--bone-dim); margin-right: 8px; display: inline-flex; align-items: center; gap: 8px; }
.demos__label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: blink 1.6s steps(2, start) infinite; }
.demos button { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--bone-faint); color: var(--bone-dim); font-family: var(--display); font-weight: 500; font-size: 15px; transition: color 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease); }
.demos button:hover { color: var(--bone); border-color: rgba(236,231,220,0.4); }
.demos button.is-active { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.agents__stage:not([hidden]) { animation: demoin 0.7s var(--ease); }
@keyframes demoin { from { opacity: 0; transform: translateY(14px); } }
html.no-motion .agents__stage, html.no-motion .demos__label::before { animation: none; }
.agents__stage[data-demo="chat"], .agents__stage[data-demo="voice"] { align-items: center; }

.phone { width: min(100%, 330px); margin: 0 auto; padding: 9px; border-radius: 38px; background: #10151a; border: 1px solid rgba(255,255,255,0.14); box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 80px color-mix(in srgb, var(--accent) 14%, transparent); }
.phone__screen { border-radius: 30px; overflow: hidden; background: #0b141a; display: grid; grid-template-rows: auto 1fr auto; height: 470px; }
.chat__head { display: flex; align-items: center; gap: 10px; padding: 13px 14px; background: #1f2c34; }
.chat__avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--ink); font: 700 12px/1 var(--display); flex: none; }
.chat__who { display: grid; gap: 2px; min-width: 0; }
.chat__who strong { font: 600 15px/1.1 var(--display); color: var(--bone); }
.chat__who small { font-size: 11.5px; color: var(--bone-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__live { margin-left: auto; font-size: 11px; color: var(--accent); display: inline-flex; align-items: center; gap: 5px; }
.chat__live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.chat__body { padding: 14px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; scrollbar-width: none; background: radial-gradient(circle at 20% 10%, rgba(255,255,255,0.03), transparent 40%), #0b141a; }
.chat__body::-webkit-scrollbar { display: none; }
.msg { max-width: 84%; padding: 8px 11px; border-radius: 12px; font-size: 14.5px; line-height: 1.35; color: #e9edef; animation: msgin 0.4s var(--ease); flex: none; }
.msg--me { align-self: flex-end; background: #005c4b; border-top-right-radius: 3px; }
.msg--them { align-self: flex-start; background: #1f2c34; border-top-left-radius: 3px; }
.msg--typing { display: inline-flex; gap: 4px; padding: 12px 13px; }
.msg--typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(233,237,239,0.6); animation: typing 1s ease-in-out infinite; }
.msg--typing i:nth-child(2) { animation-delay: 0.15s; } .msg--typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { transform: none; opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes msgin { from { opacity: 0; transform: translateY(8px) scale(0.96); } }
.chat__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 12px; background: #111b21; }
.chat__chips button { font: 500 12.5px/1 var(--body); padding: 8px 11px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent); transition: background 0.3s var(--ease), color 0.3s var(--ease), opacity 0.3s var(--ease); cursor: pointer; }
.chat__chips button:hover:not(:disabled) { background: var(--accent); color: var(--ink); }
.chat__chips button:disabled { opacity: 0.35; cursor: default; }
.chat__chips button.is-used { text-decoration: line-through; }
.term__again { margin-left: auto; font: 500 12px/1 var(--body); color: var(--bone-dim); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--bone-faint); cursor: pointer; }
.term__again:hover { color: var(--bone); border-color: rgba(236,231,220,0.4); }
.term__log--trace { min-height: 230px; align-content: start; }
.term__log--trace li, .term__log--script li { grid-template-columns: 30px 96px 1fr; }
.term__log--trace li { animation: msgin 0.4s var(--ease); }
.term__log li.is-warn em { color: var(--amber); }
.term__note { margin: 0; padding: 14px 18px 18px; border-top: 1px solid var(--bone-faint); font-family: var(--body); font-size: 14px; color: var(--bone-dim); }

.call { display: grid; justify-items: center; gap: 22px; text-align: center; padding: 10px 0; }
.call__orb { position: relative; width: clamp(130px, 16vw, 190px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 95%, white), color-mix(in srgb, var(--accent) 35%, var(--ink)) 70%); box-shadow: 0 0 80px color-mix(in srgb, var(--accent) 45%, transparent); transition: transform 0.5s var(--ease), filter 0.5s var(--ease); }
.call__orb span { position: absolute; inset: -14px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); opacity: 0; }
.call.is-playing .call__orb span { animation: ping 1.8s var(--ease) infinite; }
.call[data-who="agent"] .call__orb { transform: scale(1.08); }
.call[data-who="caller"] .call__orb { transform: scale(0.9); filter: grayscale(1) brightness(0.8); }
.call__bars { display: flex; align-items: center; gap: 4px; height: 54px; }
.call__bars i { width: 4px; height: 100%; border-radius: 2px; background: var(--accent); transform: scaleY(0.08); opacity: 0.5; transition: transform 0.4s var(--ease), opacity 0.4s var(--ease); }
.call.is-playing .call__bars i { opacity: 1; animation: callbar 0.8s ease-in-out infinite alternate; animation-delay: var(--dl, 0s); }
.call[data-who="caller"] .call__bars i { background: var(--bone); }
@keyframes callbar { from { transform: scaleY(0.1); } to { transform: scaleY(var(--h, 0.6)); } }
.call__play { font: 600 15px/1 var(--display); padding: 14px 26px; border-radius: 999px; background: var(--accent); color: var(--ink); cursor: pointer; transition: transform 0.4s var(--ease), background 0.3s var(--ease); }
.call__play:hover { transform: translateY(-2px); background: var(--bone); }
.call__meta { margin: 0; font-size: 13px; color: var(--bone-dim); max-width: 34ch; }
.term__log--script li { opacity: 0.38; transform: none; transition: opacity 0.4s var(--ease); }
.term__log--script li.is-on { opacity: 1; }
.term__log--script li.is-now { color: var(--bone); }
.term__log--script li[data-who="caller"] em { color: var(--bone); }
html.no-motion .term__log--script li { opacity: 1; }
@media (max-width: 760px) {
  .demos button { padding: 8px 12px; font-size: 14px; }
  .demos__label { width: 100%; }
  .phone__screen { height: 420px; }
  .term__log--trace { min-height: 150px; }
  .term__log--trace li, .term__log--script li { grid-template-columns: 24px 74px 1fr; }
}
.term__log--trace { max-height: 300px; overflow-y: auto; scrollbar-width: none; }
.term__log--trace::-webkit-scrollbar { display: none; }
.msg__meta { float: right; margin: 6px 0 -2px 10px; font-size: 10.5px; color: rgba(233,237,239,0.55); display: inline-flex; gap: 4px; align-items: center; }
.msg__meta b { font-weight: 400; letter-spacing: -0.2em; transition: color 0.4s var(--ease); }
.msg.is-read .msg__meta b { color: #53bdeb; }
.chat__live.is-typing { color: var(--bone); }
.chat__chips button.is-tap { background: var(--accent); color: var(--ink); transform: scale(0.94); }

/* Hero film: grey smoke loop tinted by the current accent */
.hero__film { position: absolute; inset: 0; z-index: -2; opacity: 0; transition: opacity 2s var(--ease); pointer-events: none; isolation: isolate; -webkit-mask-image: linear-gradient(90deg, transparent 18%, #000 62%); mask-image: linear-gradient(90deg, transparent 18%, #000 62%); }
.hero__film.is-on { opacity: 0.5; }
.hero__film video { width: 100%; height: 100%; object-fit: cover; object-position: right center; display: block; }
.hero__film::after { content: ""; position: absolute; inset: 0; background: var(--accent); mix-blend-mode: multiply; transition: background 1.2s var(--ease); }
@media (max-width: 760px) { .hero__film { -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 78%); mask-image: linear-gradient(180deg, #000 30%, transparent 78%); } .hero__film.is-on { opacity: 0.42; } .hero__film video { object-position: 70% center; } }
html.no-motion .hero__film { display: none; }

/* Glitch pass: tablet chapter heads stack; n8n diagram never crops on phone */
@media (max-width: 1024px) {
  .gallery__head, .agents__head { grid-template-columns: minmax(0, 1fr); }
  .gallery__head p, .agents__head p { justify-self: start; }
}
@media (max-width: 760px) {
  .card__chart--n8n { min-height: 0; aspect-ratio: auto !important; }
  .card__chart--n8n .n8n { height: auto; aspect-ratio: 640 / 360; }
}

/* Text masks: room on every side so tight letter-spacing never clips a glyph (the "s" in Dashboards) */
.motion-line-mask, .motion-word-mask { padding: 0.06em 0.09em 0.16em 0.04em; margin: -0.06em -0.09em -0.16em -0.04em; }
.hero__line { padding: 0.04em 0.06em 0.1em 0.03em; margin: -0.04em -0.06em -0.04em -0.03em; }

/* HQ block: two views of the same crew */
.hq__media { position: relative; }
.hq__switch { display: flex; gap: 6px; margin-bottom: 12px; }
.hq__switch button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--bone-faint); color: var(--bone-dim); font-family: var(--display); font-weight: 500; font-size: 14px; cursor: pointer; transition: color 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease); }
.hq__switch button:hover { color: var(--bone); border-color: rgba(236,231,220,0.4); }
.hq__switch button.is-active { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.hq__text:not([hidden]), .hq__video:not([hidden]) { animation: demoin 0.6s var(--ease); }
html.no-motion .hq__text, html.no-motion .hq__video { animation: none; }

/* Name travel: big hero name lands in the top bar on scroll */
html.has-motion .topbar__name { visibility: hidden; opacity: 0; }
.hero__name { will-change: transform, opacity; position: relative; z-index: 2; }
.hero__content > :not(.hero__name) { opacity: var(--hf, 1); }
.hero__line { will-change: transform; }
/* Phone: hero text starts near the top instead of the bottom of the screen */
@media (max-width: 760px) {
  .hero { align-items: start; min-height: 0; padding-top: 104px; padding-bottom: 56px; }
  .hero__globe, .hero__globe-fallback { top: 28%; right: -38vw; }
}

/* AI ads card: animated ad factory */
.card__chart--ads.adgen { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); gap: 8px; padding: 18px 20px 16px !important; overflow: hidden; color: var(--bone); font-family: var(--body);
  background: radial-gradient(60% 80% at 82% 62%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), radial-gradient(40% 50% at 10% 0%, rgba(255, 143, 107, 0.10), transparent 70%), #0a0e14; }
.adgen__rail { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.adgen__rail li { flex: 1; display: flex; align-items: center; }
.adgen__rail li:last-child { flex: none; }
.adgen__rail li::after { content: ""; flex: 1; height: 2px; margin: 0 4px; border-radius: 2px; background: var(--bone-faint); transition: background 0.5s var(--ease); }
.adgen__rail li:last-child::after { display: none; }
.adgen__rail i { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--bone-faint); font: 600 11.5px/1 var(--display); font-style: normal; color: var(--bone-dim); transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.adgen__rail li.is-on i { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.adgen__rail li.is-on::after { background: var(--accent); }
.adgen__rail li.is-now::after { background: linear-gradient(90deg, var(--accent), var(--bone-faint)); }
.adgen__rail li.is-now i { transform: scale(1.22); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent), 0 0 22px var(--accent); }
.adgen__label { margin: 0; font: 500 12.5px/1.2 ui-monospace, "Cascadia Mono", Menlo, monospace; color: var(--accent); }
.adgen__stage { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: 14px; align-items: center; min-height: 0; }
.adgen__left { display: grid; gap: 10px; align-content: center; min-width: 0; }
.adgen__brief { border: 1px solid var(--bone-faint); border-radius: 12px; padding: 10px 12px 12px; background: rgba(255, 255, 255, 0.035); font: 400 12.5px/1.45 ui-monospace, "Cascadia Mono", Menlo, monospace; }
.adgen__brief small { display: block; color: var(--bone-dim); font-size: 11px; margin-bottom: 5px; }
.adgen__brief p { margin: 0; min-height: 4.35em; color: var(--bone); }
.adgen__brief p.is-typing::after { content: ""; display: inline-block; width: 6px; height: 12px; margin-left: 2px; background: var(--accent); vertical-align: -1px; animation: blink 0.9s steps(2, start) infinite; }
.adgen__sizes { display: flex; gap: 6px; flex-wrap: wrap; }
.adgen__sizes span { font: 600 11px/1 var(--display); padding: 6px 9px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent); opacity: 0; transform: translateY(6px) scale(0.9); transition: opacity 0.4s var(--ease), transform 0.5s var(--ease); }
.adgen.is-sized .adgen__sizes span { opacity: 1; transform: none; }
.adgen.is-sized .adgen__sizes span:nth-child(2) { transition-delay: 0.12s; } .adgen.is-sized .adgen__sizes span:nth-child(3) { transition-delay: 0.24s; }
.adgen__ads { position: relative; height: 100%; min-height: 170px; perspective: 900px; transform: rotateY(calc(var(--tx, 0) * 10deg)) rotateX(calc(var(--ty, 0) * -8deg)); transition: transform 0.6s var(--ease); transform-style: preserve-3d; }
.adgen__ad { position: absolute; left: 50%; top: 50%; width: 47%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1); opacity: 0; clip-path: inset(0 0 100% 0 round 10px);
  transform: translate(-50%, -50%) translate(var(--x0, 0%), var(--y0, 0%)) rotate(var(--r0, 0deg)); transition: clip-path 1s var(--ease), opacity 0.3s var(--ease), transform 0.9s var(--ease); }
.adgen__ad img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adgen__ad--story { width: 30%; aspect-ratio: 9 / 16; --x0: 6%; --r0: 2deg; }
.adgen__ad--left { --x0: -5%; --r0: -3deg; }
.adgen__ad--front { --x0: 2%; --r0: 1deg; }
.adgen__ad::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 26%; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 75%, transparent)); opacity: 0; pointer-events: none; }
.adgen.is-gen .adgen__ad { opacity: 1; clip-path: inset(0 0 0 0 round 10px); }
.adgen.is-gen .adgen__ad--left { transition-delay: 0.25s; } .adgen.is-gen .adgen__ad--front { transition-delay: 0.5s; }
.adgen.is-gen:not(.is-sized) .adgen__ad::after { animation: adscan 1s var(--ease) both; }
.adgen.is-gen:not(.is-sized) .adgen__ad--left::after { animation-delay: 0.25s; } .adgen.is-gen:not(.is-sized) .adgen__ad--front::after { animation-delay: 0.5s; }
@keyframes adscan { 0% { top: -26%; opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.adgen.is-sized .adgen__ad { transition-delay: 0s; }
.adgen.is-sized .adgen__ad--story { --x0: 118%; --r0: 7deg; }
.adgen.is-sized .adgen__ad--left { --x0: -52%; --y0: 4%; --r0: -8deg; }
.adgen.is-sized .adgen__ad--front { --x0: 8%; --y0: -2%; --r0: 2deg; }
.adgen__stamp { position: absolute; right: 2%; bottom: 4%; font: 700 12px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); border: 2px solid var(--accent); border-radius: 8px; padding: 7px 10px; background: rgba(6, 8, 11, 0.8); opacity: 0; transform: rotate(-9deg) scale(1.7); transition: opacity 0.25s var(--ease), transform 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); }
.adgen.is-done .adgen__stamp { opacity: 1; transform: rotate(-9deg) scale(1); }
html.no-motion .adgen__ad, html.no-motion .adgen__sizes span, html.no-motion .adgen__stamp { transition: none; }
html.no-motion .adgen__ad::after { display: none; }
@media (max-width: 760px) {
  .card__chart--ads.adgen { min-height: 330px; padding: 16px 14px 14px !important; }
  .adgen__rail i { width: 22px; height: 22px; font-size: 11px; }
  .adgen__stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .adgen__brief p { min-height: 2.9em; }
  .adgen__left { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .adgen__ads { min-height: 180px; }
  .adgen__ad { width: 38%; } .adgen__ad--story { width: 24%; }
}
.adgen__ad { width: 42%; } .adgen__ad--story { width: 27%; }
.adgen.is-sized .adgen__ad--story { --x0: 128%; --r0: 6deg; }
.adgen.is-sized .adgen__ad--left { --x0: -70%; --y0: 4%; --r0: -7deg; }
.adgen.is-sized .adgen__ad--front { --x0: -14%; --y0: -2%; --r0: 1deg; }
.adgen__stamp { right: 0; bottom: 2%; z-index: 3; }
@media (max-width: 760px) { .adgen__ad { width: 38%; } .adgen__ad--story { width: 24%; } }
.adgen__ai { position: absolute; left: 0; top: 0; z-index: 3; font: 600 10.5px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; background: rgba(6, 8, 11, 0.75); border: 1px solid var(--bone-faint); color: var(--bone-dim); }
.adgen__ai::before { content: "\2726"; margin-right: 5px; color: var(--accent); }

/* Open menu: top bar stays above it so the Close button is always reachable */
html.menu-open .topbar { z-index: 200; mix-blend-mode: normal; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: transparent; }
html.menu-open .topbar__menu { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.adgen__ai { left: auto; right: 0; top: -30px; }
@media (max-width: 760px) { .adgen__ai { top: -4px; } }

/* AI ads card v3: one-line brief, big 3D coverflow of the ads, fast */
.adgen__rail li::after, .adgen__rail i { transition-duration: 0.22s; }
.adgen__stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 10px; align-items: stretch; }
.adgen__left { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.adgen__brief { flex: 1 1 260px; min-width: 0; display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 999px; }
.adgen__brief small { margin: 0; flex: none; color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.adgen__brief small::after { content: " >"; }
.adgen__brief p { min-height: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.adgen__sizes { flex: none; flex-wrap: nowrap; }
.adgen__sizes span { opacity: 0.45; transform: none; padding: 6px 9px; transition: opacity 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease); white-space: nowrap; }
.adgen.is-sized .adgen__sizes span { opacity: 0.45; transition-delay: 0s !important; }
.adgen.is-sized .adgen__sizes span.is-cur { opacity: 1; background: var(--accent); color: var(--ink); }
.adgen__ads { container-type: inline-size; min-height: 190px; perspective: 1100px; }
.adgen__ad, .adgen__ad--story { width: auto; height: 94%; aspect-ratio: 1; border-radius: 12px; opacity: 0; clip-path: inset(0 0 100% 0 round 12px); cursor: pointer;
  transform: translate(-50%, -50%) translateX(var(--px, 0)) rotateY(var(--ry, 0deg)) scale(var(--sc, 1)); filter: brightness(var(--br, 1));
  transition: transform 0.38s cubic-bezier(0.3, 1.2, 0.4, 1), filter 0.3s var(--ease), clip-path 0.35s var(--ease), opacity 0.2s var(--ease); }
.adgen__ad--story { aspect-ratio: 9 / 16; }
.adgen__ad[data-pos="c"] { --px: 0cqw; --ry: 0deg; --sc: 1; --br: 1; z-index: 3; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 50px color-mix(in srgb, var(--accent) 30%, transparent); }
.adgen__ad[data-pos="l"] { --px: -29cqw; --ry: 34deg; --sc: 0.72; --br: 0.5; z-index: 1; }
.adgen__ad[data-pos="r"] { --px: 29cqw; --ry: -34deg; --sc: 0.72; --br: 0.5; z-index: 1; }
.adgen.is-gen .adgen__ad { opacity: 1; clip-path: inset(0 0 0 0 round 12px); }
.adgen.is-gen .adgen__ad--left, .adgen.is-gen .adgen__ad--front, .adgen.is-sized .adgen__ad { transition-delay: 0s; }
.adgen.is-gen .adgen__ad[data-pos="l"] { transition-delay: 0.08s; } .adgen.is-gen .adgen__ad[data-pos="r"] { transition-delay: 0.16s; }
.adgen.is-sized .adgen__ad[data-pos] { transition-delay: 0s; }
.adgen.is-gen:not(.is-sized) .adgen__ad::after { animation-duration: 0.55s; animation-delay: 0s; }
.adgen.is-sized .adgen__ad--story, .adgen.is-sized .adgen__ad--left, .adgen.is-sized .adgen__ad--front { --x0: 0%; --y0: 0%; --r0: 0deg; }
.adgen__stamp { right: 1%; bottom: 3%; z-index: 4; transition-duration: 0.18s, 0.32s; }
.adgen__ai { top: 0; right: 0; z-index: 4; }
@media (max-width: 760px) {
  .card__chart--ads.adgen { min-height: 360px; }
  .adgen__left { grid-template-columns: none; }
  .adgen__brief { flex-basis: 100%; border-radius: 12px; }
  .adgen__brief p { white-space: normal; }
  .adgen__ads { min-height: 210px; }
  .adgen__ad, .adgen__ad--story { width: auto; }
  .adgen__ad[data-pos="l"] { --px: -31cqw; } .adgen__ad[data-pos="r"] { --px: 31cqw; }
  .adgen__ai { top: 0; }
}

/* Ads card, cinema cut */
.card__chart.cine { position: relative; display: block !important; padding: 0 !important; overflow: hidden; background: #05070a; color: var(--bone); font-family: var(--body); isolation: isolate; container-type: inline-size; min-height: 300px; }
.cine__bg { position: absolute; inset: -18%; background: center / cover no-repeat; filter: blur(34px) saturate(1.5) brightness(0.62); opacity: 0; transition: opacity 0.7s var(--ease); z-index: 0; transform: translateZ(0); }
.cine__bg.is-on { opacity: 1; }
.cine:not(.is-gen) .cine__bg { opacity: 0; }
.cine__vig { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(70% 62% at 50% 50%, transparent 30%, rgba(3, 4, 6, 0.82) 100%), linear-gradient(180deg, #05070a 0, #05070a 9%, transparent 22%, transparent 76%, #05070a 91%, #05070a 100%); }
.cine__hud { position: absolute; left: 0; right: 0; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.cine__ticks { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.cine__ticks li { width: 18px; height: 3px; border-radius: 2px; background: rgba(236, 231, 220, 0.2); transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.cine__ticks li.is-on { background: var(--accent); }
.cine__ticks li.is-now { box-shadow: 0 0 10px var(--accent); }
.cine__label { margin: 0; font: 500 11.5px/1 ui-monospace, "Cascadia Mono", Menlo, monospace; letter-spacing: 0.04em; color: var(--bone-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cine__ai { margin: 0 0 0 auto; flex: none; font: 600 10px/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; border: 1px solid rgba(236, 231, 220, 0.22); color: var(--bone-dim); }
.cine__ai::before { content: "\2726"; margin-right: 5px; color: var(--accent); }
.cine__title { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 0 6%; pointer-events: none; opacity: 0; transform: scale(1.06); filter: blur(10px); transition: opacity 0.35s var(--ease), transform 0.6s var(--ease), filter 0.45s var(--ease); }
.cine.is-title .cine__title { opacity: 1; transform: none; filter: none; }
.cine__title strong { font: 700 clamp(26px, 8.5cqw, 58px)/0.95 var(--display); letter-spacing: -0.035em; font-variation-settings: "wdth" 84; text-transform: uppercase; background: linear-gradient(100deg, var(--bone) 30%, var(--accent) 50%, var(--bone) 70%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.cine.is-title .cine__title strong { animation: cinesheen 1.3s linear both; }
@keyframes cinesheen { from { background-position: 120% 0; } to { background-position: -40% 0; } }
.cine__title p { margin: 0; font: 500 12.5px/1.3 ui-monospace, "Cascadia Mono", Menlo, monospace; letter-spacing: 0.06em; color: var(--bone-dim); text-transform: uppercase; }
.cine__ads { position: absolute; left: 0; right: 0; top: 14%; bottom: 17%; z-index: 3; perspective: 1100px; transform: rotateY(calc(var(--tx, 0) * 9deg)) rotateX(calc(var(--ty, 0) * -7deg)); transition: transform 0.6s var(--ease); transform-style: preserve-3d; }
.cine__ad { position: absolute; left: 50%; top: 50%; height: 100%; aspect-ratio: 1; border-radius: 12px; cursor: pointer; opacity: 0;
  transform: translate(-50%, -50%) translateX(var(--px, 0)) rotateY(var(--ry, 0deg)) scale(var(--sc, 1.18)); filter: blur(var(--bl, 16px)) brightness(var(--br, 1));
  transition: transform 0.42s cubic-bezier(0.3, 1.15, 0.4, 1), filter 0.42s var(--ease), opacity 0.3s var(--ease); -webkit-box-reflect: below 5px linear-gradient(transparent 72%, rgba(0, 0, 0, 0.28)); }
.cine__ad--story { aspect-ratio: 9 / 16; }
.cine__ad img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 12px; }
.cine__ad::after { content: ""; position: absolute; inset: 0; border-radius: 12px; pointer-events: none; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.34) 50%, transparent 62%) -160% 0 / 260% 100% no-repeat; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.cine.is-gen .cine__ad { opacity: 1; }
.cine.is-gen .cine__ad[data-pos="c"] { --px: 0cqw; --ry: 0deg; --sc: 1; --bl: 0px; --br: 1; z-index: 3; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.75); }
.cine.is-gen .cine__ad[data-pos="l"] { --px: -30cqw; --ry: 38deg; --sc: 0.7; --bl: 1.5px; --br: 0.42; z-index: 1; }
.cine.is-gen .cine__ad[data-pos="r"] { --px: 30cqw; --ry: -38deg; --sc: 0.7; --bl: 1.5px; --br: 0.42; z-index: 1; }
.cine.is-gen .cine__ad[data-pos="c"]::after { animation: cinesweep 0.8s 0.12s var(--ease) both; }
@keyframes cinesweep { from { background-position: -160% 0; } to { background-position: 260% 0; } }
.cine__stamp { position: absolute; right: 4%; bottom: 2%; z-index: 6; margin: 0; font: 700 12px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); border: 2px solid var(--accent); border-radius: 8px; padding: 7px 10px; background: rgba(6, 8, 11, 0.82); opacity: 0; transform: rotate(-9deg) scale(1.7); transition: opacity 0.18s var(--ease), transform 0.32s cubic-bezier(0.2, 1.6, 0.4, 1); }
.cine.is-done .cine__stamp { opacity: 1; transform: rotate(-9deg) scale(1); }
.cine__reel { position: absolute; left: 16px; right: 16px; bottom: 11px; z-index: 5; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; opacity: 0; transition: opacity 0.4s var(--ease); }
.cine.is-gen .cine__reel { opacity: 1; }
.cine__reel li { display: grid; gap: 5px; }
.cine__reel b { font: 600 10.5px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(236, 231, 220, 0.45); transition: color 0.3s var(--ease); }
.cine__reel i { display: block; height: 2px; border-radius: 2px; background: rgba(236, 231, 220, 0.18); overflow: hidden; position: relative; }
.cine__reel i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.cine__reel li.is-seen i::after { transform: scaleX(1); }
.cine__reel li.is-cur b { color: var(--bone); }
.cine__reel li.is-cur i::after { transition: transform 0.85s linear; }
html.no-motion .cine__ad, html.no-motion .cine__stamp, html.no-motion .cine__bg { transition: none; }
html.no-motion .cine__ad::after { animation: none !important; }
@media (max-width: 760px) {
  .card__chart.cine { min-height: 340px; aspect-ratio: auto !important; }
  .cine__ads { top: 15%; bottom: 18%; }
  .cine__ticks li { width: 12px; }
  .cine.is-gen .cine__ad[data-pos="l"] { --px: -33cqw; } .cine.is-gen .cine__ad[data-pos="r"] { --px: 33cqw; }
}

/* DS logo: fixed in the corner, outside the blended top bar so its colours stay true. Stroke colour follows --accent. */
.dslogo { position: fixed; left: calc(var(--gutter) - 4px); top: 11px; z-index: 201; width: 38px; height: 38px; display: block; transition: transform 0.5s var(--ease), filter 0.5s var(--ease), top 0.4s var(--ease); --accent: var(--teal); }
.dslogo svg { width: 100%; height: 100%; display: block; overflow: visible; }
.dslogo:hover { transform: scale(1.12) rotate(-4deg); filter: drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 60%, transparent)); }
.dslogo__d { fill: var(--bone); }
.dslogo__s { fill: none; stroke-width: 50; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.dslogo__s.dslogo__s--gap { stroke: var(--ink); stroke-width: 76; }
.dslogo stop { transition: stop-color 1.1s var(--ease); }
html.has-motion .dslogo:not(.is-in) .dslogo__d { clip-path: inset(0 100% 0 0); }
html.has-motion .dslogo:not(.is-in) .dslogo__s { stroke-dashoffset: 1; }
.dslogo.is-in .dslogo__d { animation: ds-wipe 0.6s var(--ease) both; }
.dslogo.is-in .dslogo__s--up { animation: ds-draw 0.5s 0.3s cubic-bezier(0.5, 0, 0.8, 0.6) both; }
.dslogo.is-in .dslogo__s--lo { animation: ds-draw 0.55s 0.78s var(--ease) both; }
.dslogo.is-in .dslogo__mark { animation: ds-pop 0.5s 1.25s var(--ease); transform-origin: 256px 256px; transform-box: view-box; }
@keyframes ds-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes ds-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ds-pop { 40% { transform: translate(-36px, 0) scale(1.07); } }
.topbar { padding-left: calc(var(--gutter) + 46px); }
html.no-motion .dslogo * { animation: none !important; }
@media (max-width: 760px) { .dslogo { width: 34px; height: 34px; top: 13px; } .topbar { padding-left: calc(var(--gutter) + 42px); } }

/* DS logo, 3D: stacked layers = thickness; the stack tilts with the cursor and spins */
.dslogo { perspective: 320px; width: 42px; height: 42px; top: 9px; }
.dslogo:hover { transform: none; filter: none; }
.dslogo__3d { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateY(calc(var(--tx, 0) * 46deg + -14deg)) rotateX(calc(var(--ty, 0) * -34deg + 8deg)); transition: transform 0.5s var(--ease); will-change: transform; }
.dslogo__3d svg { position: absolute; inset: 0; transform: translateZ(4px); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 35%, transparent)); }
.dslogo__3d svg.dslogo__side { transform: translateZ(calc(4px - var(--i) * 0.95px)); filter: brightness(0.42) saturate(1.2); }
.dslogo.is-in .dslogo__3d { animation: ds-spin 1.5s 0.2s var(--ease) both; }
.dslogo.is-spin .dslogo__3d { animation: ds-spin 1.1s var(--ease) both; }
.dslogo.is-idle .dslogo__3d { animation: ds-sway 6s ease-in-out infinite alternate; }
@keyframes ds-spin { from { transform: rotateY(-374deg) rotateX(8deg); } to { transform: rotateY(-14deg) rotateX(8deg); } }
@keyframes ds-sway { from { transform: rotateY(-26deg) rotateX(10deg); } to { transform: rotateY(22deg) rotateX(-6deg); } }
html.no-motion .dslogo__3d { animation: none !important; }
@media (max-width: 760px) { .dslogo { width: 38px; height: 38px; top: 11px; } }

/* DS logo v2: outlined D (reads as a D at any size) with the S tube hooked through it */
.dslogo__d { fill: none; stroke: var(--bone); stroke-width: 54; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; clip-path: none !important; }
.dslogo__s { stroke-width: 52; }
.dslogo__s.dslogo__s--gap { stroke-width: 80; }
html.has-motion .dslogo:not(.is-in) .dslogo__d { stroke-dashoffset: 1; }
.dslogo.is-in .dslogo__d { animation: ds-draw 0.7s var(--ease) both; }
@keyframes ds-pop { 40% { transform: translate(-34px, 0) scale(1.07); } }

/* DS logo v3: the glass serif render. Black drops out with screen blending; hue follows the accent. */
.dslogo { width: 58px; height: 58px; top: 2px; left: calc(var(--gutter) - 10px); perspective: 420px; mix-blend-mode: screen; --hue: 0deg; }
.dslogo__3d { transform: rotateY(calc(var(--tx, 0) * 40deg)) rotateX(calc(var(--ty, 0) * -30deg)); }
.dslogo__3d img { width: 100%; height: 100%; display: block; border-radius: 50%; filter: hue-rotate(var(--hue)) saturate(1.25) brightness(1.2) contrast(1.08); transition: filter 1.1s var(--ease); -webkit-mask-image: radial-gradient(closest-side, #000 82%, transparent 100%); mask-image: radial-gradient(closest-side, #000 82%, transparent 100%); }
.dslogo__shine { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; mix-blend-mode: screen; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.5) 50%, transparent 60%) -160% 0 / 260% 100% no-repeat; opacity: 0.9; }
.dslogo.is-in .dslogo__shine, .dslogo.is-spin .dslogo__shine { animation: ds-shine 1.2s 0.5s var(--ease) both; }
.dslogo:hover .dslogo__3d img { filter: hue-rotate(var(--hue)) saturate(1.5) brightness(1.5) contrast(1.08); }
@keyframes ds-shine { from { background-position: -160% 0; } to { background-position: 260% 0; } }
@keyframes ds-spin { from { transform: rotateY(-360deg) scale(0.6); opacity: 0; } 30% { opacity: 1; } to { transform: rotateY(0deg) scale(1); opacity: 1; } }
@keyframes ds-sway { from { transform: rotateY(-22deg) rotateX(8deg); } to { transform: rotateY(22deg) rotateX(-6deg); } }
.topbar { padding-left: calc(var(--gutter) + 56px); }
@media (max-width: 760px) { .dslogo { width: 50px; height: 50px; top: 5px; left: calc(var(--gutter) - 8px); } .topbar { padding-left: calc(var(--gutter) + 48px); } }

/* DS logo v4: handwriting reveal. A mask stroke "writes" the D then the S; a light pen leads it. */
.dslogo__3d svg { position: static; display: block; width: 100%; height: 100%; transform: none; overflow: visible; border-radius: 50%;
  filter: hue-rotate(var(--hue)) saturate(1.25) brightness(1.2) contrast(1.08); transition: filter 1.1s var(--ease); }
.dslogo:hover .dslogo__3d svg { filter: hue-rotate(var(--hue)) saturate(1.5) brightness(1.5) contrast(1.08); }
.dslogo__w { fill: none; stroke: #fff; stroke-width: 80; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.dslogo__pen { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 0.07 1; stroke-dashoffset: 0.07; opacity: 0; filter: drop-shadow(0 0 6px #7ff) drop-shadow(0 0 14px #3dc); }
html.has-motion .dslogo:not(.is-in) .dslogo__all { opacity: 0; }
.dslogo.is-in .dslogo__3d { animation: none; }
.dslogo.is-in .dslogo__all { animation: ds-all 2.05s linear both; }
.dslogo.is-in .dslogo__w--1 { animation: ds-draw 0.32s 0.05s ease-in both; }
.dslogo.is-in .dslogo__w--2 { animation: ds-draw 0.5s 0.37s ease-in-out both; }
.dslogo.is-in .dslogo__w--3 { animation: ds-draw 0.8s 0.92s ease-in-out both; }
.dslogo.is-in .dslogo__pen--1 { animation: ds-pen 0.32s 0.05s ease-in both; }
.dslogo.is-in .dslogo__pen--2 { animation: ds-pen 0.5s 0.37s ease-in-out both; }
.dslogo.is-in .dslogo__pen--3 { animation: ds-pen 0.8s 0.92s ease-in-out both; }
.dslogo.is-in .dslogo__shine { animation: ds-shine 1.1s 1.75s var(--ease) both; }
@keyframes ds-all { 0%, 88% { opacity: 0; } 100% { opacity: 1; } }
@keyframes ds-pen { 0% { stroke-dashoffset: 0.07; opacity: 1; } 95% { opacity: 1; } 100% { stroke-dashoffset: -1; opacity: 0; } }
html.no-motion .dslogo__all { opacity: 1; } html.no-motion .dslogo__pen { display: none; }

/* Load-in: a big DS is written in the middle of the screen, then flies to the corner logo */
.preloader__word { display: none; }
.preloader { background: radial-gradient(42% 38% at 50% 44%, #0b1a1c 0%, var(--ink) 70%); overflow: hidden; }   /* the scaled smoke must not hang below the curtain while it slides away */
.plogo { position: fixed; left: 0; right: 0; top: 0; bottom: 12vh; margin: auto; width: min(52vw, 280px); height: min(52vw, 280px); z-index: 400; pointer-events: none; mix-blend-mode: screen; will-change: transform; animation: plogo-bye 0.5s 7s forwards; }
.plogo::before { content: ""; position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(closest-side, rgba(55, 214, 195, 0.22), transparent 70%); animation: plogo-glow 1.4s ease-out both; }
.plogo svg { position: relative; width: 100%; height: 100%; display: block; overflow: visible; filter: saturate(1.25) brightness(1.2) contrast(1.08); }
.plogo__w { fill: none; stroke: #fff; stroke-width: 80; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.plogo__pen { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 0.07 1; stroke-dashoffset: 0.07; opacity: 0; filter: drop-shadow(0 0 6px #7ff) drop-shadow(0 0 16px #3dc); }
.plogo__all { animation: ds-all 1.5s linear both; }
.plogo__w--1 { animation: ds-draw 0.25s 0.12s ease-in both; }
.plogo__w--2 { animation: ds-draw 0.4s 0.37s ease-in-out both; }
.plogo__w--3 { animation: ds-draw 0.6s 0.8s ease-in-out both; }
.plogo__pen--1 { animation: ds-pen 0.25s 0.12s ease-in both; }
.plogo__pen--2 { animation: ds-pen 0.4s 0.37s ease-in-out both; }
.plogo__pen--3 { animation: ds-pen 0.6s 0.8s ease-in-out both; }
@keyframes plogo-glow { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }
@keyframes plogo-bye { to { opacity: 0; visibility: hidden; } }
html.no-motion .plogo { display: none; }
html.has-motion .dslogo.is-ready:not(.is-in) .dslogo__all { opacity: 1; }
.plogo { z-index: 10001; }
/* placement: big logo dead centre with the loading line just under it; corner logo centred on the top bar's text line, also when the bar shrinks */
.plogo { bottom: 0; }
.preloader__bar { transform: translateY(calc(min(26vw, 140px) + 26px)); }
.dslogo { top: -1px; }
html:has(.topbar.is-scrolled) .dslogo { top: -7px; }
@media (max-width: 760px) { .dslogo { top: 3px; } html:has(.topbar.is-scrolled) .dslogo { top: -3px; } }
.dslogo { top: 9px; }
html:has(.topbar.is-scrolled) .dslogo { top: 3px; }
@media (max-width: 760px) { .dslogo { top: 13px; } html:has(.topbar.is-scrolled) .dslogo { top: 7px; } }

/* Writing motion v2: the pen follows each letter's centre line. D stem, D bowl, a short lift, then the S in one stroke. */
.plogo__w, .dslogo__w { stroke-width: 50; }
.plogo__pen, .dslogo__pen { stroke-dasharray: 0.1 1; stroke-dashoffset: 0.1; }
.plogo__all { animation: ds-all2 2.05s linear both; }
.plogo__w--1 { animation: ds-draw 0.3s 0.15s cubic-bezier(0.5, 0, 0.9, 0.7) both; }
.plogo__w--2 { animation: ds-draw 0.5s 0.45s cubic-bezier(0.35, 0, 0.3, 1) both; }
.plogo__w--3 { animation: ds-draw 0.8s 1.08s cubic-bezier(0.45, 0, 0.25, 1) both; }
.plogo__pen--1 { animation: ds-pen2 0.3s 0.15s cubic-bezier(0.5, 0, 0.9, 0.7) both; }
.plogo__pen--2 { animation: ds-pen2 0.5s 0.45s cubic-bezier(0.35, 0, 0.3, 1) both; }
.plogo__pen--3 { animation: ds-pen2 0.8s 1.08s cubic-bezier(0.45, 0, 0.25, 1) both; }
.plogo svg { animation: plogo-pop 0.5s 1.82s var(--ease) both; }
.plogo::after { content: ""; position: absolute; inset: 0; border-radius: 50%; mix-blend-mode: screen; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.55) 50%, transparent 60%) -160% 0 / 260% 100% no-repeat; animation: ds-shine 0.7s 1.75s var(--ease) both; }
.dslogo.is-in .dslogo__all { animation: ds-all2 2.05s linear both; }
.dslogo.is-in .dslogo__w--1 { animation: ds-draw 0.3s 0.05s cubic-bezier(0.5, 0, 0.9, 0.7) both; }
.dslogo.is-in .dslogo__w--2 { animation: ds-draw 0.5s 0.35s cubic-bezier(0.35, 0, 0.3, 1) both; }
.dslogo.is-in .dslogo__w--3 { animation: ds-draw 0.8s 0.98s cubic-bezier(0.45, 0, 0.25, 1) both; }
.dslogo.is-in .dslogo__pen--1 { animation: ds-pen2 0.3s 0.05s cubic-bezier(0.5, 0, 0.9, 0.7) both; }
.dslogo.is-in .dslogo__pen--2 { animation: ds-pen2 0.5s 0.35s cubic-bezier(0.35, 0, 0.3, 1) both; }
.dslogo.is-in .dslogo__pen--3 { animation: ds-pen2 0.8s 0.98s cubic-bezier(0.45, 0, 0.25, 1) both; }
@keyframes ds-all2 { 0%, 84% { opacity: 0; } 100% { opacity: 1; } }
@keyframes ds-pen2 { 0% { stroke-dashoffset: 0.1; opacity: 0; } 12% { opacity: 1; } 90% { opacity: 1; } 100% { stroke-dashoffset: -1; opacity: 0; } }
@keyframes plogo-pop { 0% { transform: scale(1); } 45% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* Crazy motion: electric flicker while writing, then a burst (rings, sparks, flash) and a fast 3D spin before the flight */
.plogo { perspective: 900px; }
.plogo svg { animation: plogo-flicker 1.75s 0.1s steps(1, end) both, plogo-spin 0.68s 1.86s cubic-bezier(0.3, 0.9, 0.3, 1) both; transform-style: preserve-3d; }
.plogo__ring { position: absolute; inset: 8%; border-radius: 50%; border: 2px solid #5ff0de; box-shadow: 0 0 24px #37d6c3, inset 0 0 24px rgba(55, 214, 195, 0.5); opacity: 0; transform: scale(0.2); animation: plogo-ring 0.85s 1.84s cubic-bezier(0.1, 0.7, 0.2, 1) both; }
.plogo__ring--2 { border-color: #b6f7bd; animation-delay: 1.98s; animation-duration: 1s; }
.plogo__flash { position: absolute; inset: -60%; border-radius: 50%; background: radial-gradient(closest-side, rgba(190, 255, 245, 0.85), rgba(55, 214, 195, 0.25) 35%, transparent 70%); opacity: 0; animation: plogo-flash 0.5s 1.82s ease-out both; }
.plogo__spark { position: absolute; left: 50%; top: 50%; width: 3px; height: 16px; margin: -8px 0 0 -1.5px; border-radius: 2px; background: linear-gradient(#fff, #37d6c3); box-shadow: 0 0 8px #5ff0de; opacity: 0; transform: rotate(var(--a)) translateY(-30px) scale(var(--s));
  animation: plogo-spark 0.75s calc(1.84s + var(--t)) cubic-bezier(0.1, 0.8, 0.2, 1) both; }
.plogo.is-flying .plogo__ring, .plogo.is-flying .plogo__flash, .plogo.is-flying .plogo__spark, .plogo.is-flying::before { display: none; }
.plogo.is-flying svg { animation: none; filter: saturate(1.4) brightness(1.5) contrast(1.08) drop-shadow(0 0 18px #37d6c3); }
@keyframes plogo-flicker { 0% { filter: saturate(1.25) brightness(2.2) contrast(1.1); } 6% { filter: saturate(1.25) brightness(0.8); } 12% { filter: saturate(1.25) brightness(1.9); } 20% { filter: saturate(1.25) brightness(1.1); } 48% { filter: saturate(1.25) brightness(1.8); } 54% { filter: saturate(1.25) brightness(1.05); } 80% { filter: saturate(1.25) brightness(1.7); } 86%, 100% { filter: saturate(1.25) brightness(1.2) contrast(1.08); } }
@keyframes plogo-spin { 0% { transform: rotateY(0deg) scale(1); } 45% { transform: rotateY(200deg) scale(1.32); } 100% { transform: rotateY(360deg) scale(1); } }
@keyframes plogo-ring { 0% { opacity: 1; transform: scale(0.2); border-width: 6px; } 100% { opacity: 0; transform: scale(3.4); border-width: 1px; } }
@keyframes plogo-flash { 0% { opacity: 0; transform: scale(0.3); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.2); } }
@keyframes plogo-spark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(-30px) scale(var(--s)); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) scale(0.2); } }

/* Intro fixes: nothing shows before its cue; no square edge on the spinning logo */
.plogo__ring, .plogo__spark { animation-fill-mode: forwards; }
.plogo svg { -webkit-mask-image: radial-gradient(closest-side, #000 80%, transparent 100%); mask-image: radial-gradient(closest-side, #000 80%, transparent 100%); }
/* Smoke at the entry: the hero's own smoke clip, tinted teal, plus soft puffs that roll out from behind the logo */
.preloader__smoke { position: absolute; inset: 0; overflow: hidden; pointer-events: none; isolation: isolate; -webkit-mask-image: radial-gradient(60% 55% at 50% 50%, #000 20%, transparent 78%); mask-image: radial-gradient(60% 55% at 50% 50%, #000 20%, transparent 78%); }
.preloader__smoke video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: smoke-in 1.2s 0.15s ease-out forwards; }
.preloader__smoke::after { content: ""; position: absolute; inset: 0; background: #37d6c3; mix-blend-mode: multiply; }
.puff { position: absolute; left: 50%; top: 50%; width: min(70vw, 520px); aspect-ratio: 1; margin: calc(min(70vw, 520px) / -2) 0 0 calc(min(70vw, 520px) / -2); border-radius: 50%; background: radial-gradient(closest-side, rgba(200, 255, 245, 0.5), rgba(120, 220, 205, 0.2) 45%, transparent 72%); filter: blur(26px); opacity: 0; animation: puff 2.2s 0.05s ease-out forwards; }
.puff--2 { animation-delay: 0.3s; --px: -34%; --py: 12%; }
.puff--3 { animation-delay: 0.6s; --px: 30%; --py: -14%; }
@keyframes smoke-in { to { opacity: 0.85; } }
@keyframes puff { 0% { opacity: 0; transform: translate(0, 6%) scale(0.25); } 30% { opacity: 0.9; } 100% { opacity: 0; transform: translate(var(--px, 8%), var(--py, -18%)) scale(1.9) rotate(40deg); } }
html.no-motion .preloader__smoke { display: none; }

/* Cinematic finish: slow push-in on the smoke, a vignette, and a wide lens streak when the logo ignites */
.preloader::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(75% 70% at 50% 50%, transparent 45%, rgba(0, 0, 0, 0.7) 100%); }
.preloader__smoke { animation: smoke-push 3.2s ease-out both; }
.preloader__smoke video { filter: contrast(1.35) brightness(1.25); }
.preloader__bar { position: relative; z-index: 2; }
.plogo__flare { position: absolute; left: 50%; top: 50%; width: 260vw; height: 3px; margin: -1.5px 0 0 -130vw; border-radius: 3px; opacity: 0; background: linear-gradient(90deg, transparent, rgba(95, 240, 222, 0.0) 30%, #dffff9 50%, rgba(95, 240, 222, 0.0) 70%, transparent); box-shadow: 0 0 22px 4px rgba(55, 214, 195, 0.7); animation: plogo-flare 0.9s 1.8s cubic-bezier(0.1, 0.7, 0.2, 1) forwards; }
.plogo.is-flying .plogo__flare { display: none; }
@keyframes smoke-push { from { transform: scale(1.0); } to { transform: scale(1.14); } }
@keyframes plogo-flare { 0% { opacity: 0; transform: scaleX(0.05); } 18% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1.15); } }
/* smoke swirls around the logo, never over it: a clear dark core in the middle */
.preloader__smoke { -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 0, transparent min(14vw, 96px), #000 min(40vw, 300px), #000 44%, transparent 76%); mask-image: radial-gradient(circle at 50% 50%, transparent 0, transparent min(14vw, 96px), #000 min(40vw, 300px), #000 44%, transparent 76%); }
@keyframes smoke-in { to { opacity: 0.62; } }
.puff { background: radial-gradient(closest-side, rgba(200, 255, 245, 0.28), rgba(120, 220, 205, 0.12) 45%, transparent 72%); }
/* movie-scene framing: letterbox bars over the intro */
.preloader::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(180deg, #000 0, #000 11vh, transparent 11vh, transparent calc(100% - 11vh), #000 calc(100% - 11vh), #000 100%); }

/* Real 3D turn: a short clip of the glass logo rotating, shown in place of the still for a moment */
.plogo__turn { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.18s linear; filter: saturate(1.25) brightness(1.2) contrast(1.08); -webkit-mask-image: radial-gradient(closest-side, #000 80%, transparent 100%); mask-image: radial-gradient(closest-side, #000 80%, transparent 100%); }
.plogo.is-turning .plogo__turn { opacity: 1; }
.plogo.is-turning svg { opacity: 0; transition: opacity 0.18s linear; }
.plogo svg { transition: opacity 0.18s linear; }
html.no-motion .plogo__turn { display: none; }

/* Scene order: smoke first, slowly; then the DS is written (everything on the big logo starts 0.9 s later) */
.preloader__smoke video { animation: smoke-in 1.7s 0s ease-out forwards; }
.puff { animation-duration: 2.8s; }
.plogo::before { animation-delay: 0.9s; }
.plogo__all { animation-delay: 0.9s; }
.plogo__w--1, .plogo__pen--1 { animation-delay: 1.05s; }
.plogo__w--2, .plogo__pen--2 { animation-delay: 1.35s; }
.plogo__w--3, .plogo__pen--3 { animation-delay: 1.98s; }
.plogo svg { animation-delay: 1s, 2.76s; }
.plogo::after { animation-delay: 2.65s; }
.plogo__ring { animation-delay: 2.74s; } .plogo__ring--2 { animation-delay: 2.88s; }
.plogo__flash { animation-delay: 2.72s; }
.plogo__flare { animation-delay: 2.7s; }
.plogo__spark { animation-delay: calc(2.74s + var(--t)); }
/* The smoke plays from the first paint; the logo's own animations wait for the script's start signal so both halves stay in sync */
html:not(.intro-go) .plogo, html:not(.intro-go) .plogo *, html:not(.intro-go) .plogo::before, html:not(.intro-go) .plogo::after { animation-play-state: paused !important; }

/* Timing v3: writing starts 0.5 s after the start signal (the smoke is already rolling from first paint) */
.plogo::before { animation-delay: 0.5s; }
.plogo__all { animation-delay: 0.5s; }
.plogo__w--1, .plogo__pen--1 { animation-delay: 0.65s; }
.plogo__w--2, .plogo__pen--2 { animation-delay: 0.95s; }
.plogo__w--3, .plogo__pen--3 { animation-delay: 1.58s; }
.plogo svg { animation-delay: 0.6s, 2.36s; }
.plogo::after { animation-delay: 2.25s; }
.plogo__ring { animation-delay: 2.34s; } .plogo__ring--2 { animation-delay: 2.48s; }
.plogo__flash { animation-delay: 2.32s; }
.plogo__flare { animation-delay: 2.3s; }
.plogo__spark { animation-delay: calc(2.34s + var(--t)); }

/* Glitch fix: a fully-offset dash with round caps still paints a dot at the path end, which leaked a circle of the logo before the writing began */
.plogo__w, .dslogo__w { stroke-linecap: butt; }
/* The big name never rides up under the corner logo: keep clear space above it and scale it to the window height too */
.hero { padding-top: 112px; }
.hero__name { font-size: clamp(56px, min(13vw, 20vh), 190px); }
@media (max-width: 760px) { .hero__name { font-size: clamp(52px, min(19vw, 15vh), 110px); } }

/* Writing v4, two layers: the D is written whole from its own image (stem, then bowl); after a beat the S is written from the full logo and cuts across the D; then the full logo takes over. */
.plogo__w, .dslogo__w { stroke-width: 54; stroke: #fff; fill: none; stroke-dasharray: 1; stroke-dashoffset: 1; stroke-linecap: butt; }
.plogo__donly { animation: ds-dout 2.25s 0.5s linear both; }
.plogo__all { animation: ds-all3 2.25s 0.5s linear both; }
.plogo__w--1, .plogo__pen--1 { animation-duration: 0.32s; animation-delay: 0.65s; }
.plogo__w--2, .plogo__pen--2 { animation-duration: 0.55s; animation-delay: 0.97s; }
.plogo__w--3, .plogo__pen--3 { animation-duration: 0.85s; animation-delay: 1.7s; }
.plogo svg { animation-duration: 1.95s, 0.68s; animation-delay: 0.6s, 2.66s; }
.plogo::after { animation-delay: 2.55s; }
.plogo__ring { animation-delay: 2.64s; } .plogo__ring--2 { animation-delay: 2.78s; }
.plogo__flash { animation-delay: 2.62s; }
.plogo__flare { animation-delay: 2.6s; }
.plogo__spark { animation-delay: calc(2.64s + var(--t)); }
.dslogo__donly { opacity: 0; }
.dslogo.is-in .dslogo__donly { animation: ds-dout 2.25s linear both; }
.dslogo.is-in .dslogo__all { animation: ds-all3 2.25s linear both; }
.dslogo.is-in .dslogo__w--1, .dslogo.is-in .dslogo__pen--1 { animation-duration: 0.32s; animation-delay: 0.15s; }
.dslogo.is-in .dslogo__w--2, .dslogo.is-in .dslogo__pen--2 { animation-duration: 0.55s; animation-delay: 0.47s; }
.dslogo.is-in .dslogo__w--3, .dslogo.is-in .dslogo__pen--3 { animation-duration: 0.85s; animation-delay: 1.2s; }
.dslogo.is-in .dslogo__shine { animation-delay: 2.05s; }
@keyframes ds-all3 { 0%, 86% { opacity: 0; } 100% { opacity: 1; } }
@keyframes ds-dout { 0%, 86% { opacity: 1; } 100% { opacity: 0; } }
html.no-motion .dslogo__donly { opacity: 0; }

/* Site-wide polish: light sweeps, a living accent line per chapter, chips that pop in */
.card { position: relative; }
.grid .card::after, .crew::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, 0.09) 50%, transparent 58%) -170% 0 / 270% 100% no-repeat; }
.grid .card:hover::after, .crew:hover::after { animation: sweep 0.9s var(--ease); }
@keyframes sweep { from { background-position: -170% 0; } to { background-position: 270% 0; } }
.btn { position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%) -170% 0 / 270% 100% no-repeat; }
.btn:hover::after { animation: sweep 0.7s var(--ease); }
.work, .agents, .gallery, .more, .skills { border-top-color: transparent; }
.work::after, .agents::after, .gallery::after, .more::after, .skills::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--bone-faint) 15%, var(--accent) 50%, var(--bone-faint) 85%, transparent) 0 0 / 200% 100%; animation: linedrift 7s linear infinite; opacity: 0.8; }
@keyframes linedrift { from { background-position: 100% 0; } to { background-position: -100% 0; } }
html.has-motion .group li { opacity: 0; transform: translateY(10px) scale(0.92); }
html.has-motion .group.is-in li { opacity: 1; transform: none; transition: opacity 0.45s var(--ease), transform 0.55s cubic-bezier(0.2, 1.5, 0.4, 1), border-color 0.3s var(--ease), color 0.3s var(--ease); transition-delay: calc(var(--i, 0) * 45ms), calc(var(--i, 0) * 45ms), 0s, 0s; }
.group li:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent, var(--teal)) 60%, transparent); color: var(--bone); transition-delay: 0s !important; }
.proof__list li { transition: transform 0.5s var(--ease); }
.proof__list li:hover { transform: translateY(-4px); }
.proof__list li:hover strong { filter: drop-shadow(0 0 18px color-mix(in srgb, var(--teal) 55%, transparent)); }
.minis li { transition: transform 0.4s var(--ease); } .minis li:hover { transform: translateX(4px); }
html.no-motion .work::after, html.no-motion .agents::after, html.no-motion .gallery::after, html.no-motion .more::after, html.no-motion .skills::after { animation: none; }

/* Repeat visit in the same session: no writing scene, the finished logo is simply there and flies to its corner */
html.intro-quick .plogo *, html.intro-quick .plogo::before, html.intro-quick .plogo::after { animation: none !important; }
html.intro-quick .plogo__all { opacity: 1; }
html.intro-quick .plogo__donly, html.intro-quick .plogo__pen, html.intro-quick .plogo__ring, html.intro-quick .plogo__flash, html.intro-quick .plogo__flare, html.intro-quick .plogo__spark { opacity: 0; }
html.intro-quick .plogo { animation: plogo-quick 0.35s ease-out both, plogo-bye 0.5s 7s forwards; }
@keyframes plogo-quick { from { opacity: 0; } to { opacity: 1; } }

/* Hero name written word by word: letters can move on their own, glow is not clipped, and a pen of light leads each word */
.hero__ch { display: inline-block; will-change: transform, opacity, filter; }
.hero__line { overflow: visible; }
.hero__pen { position: absolute; left: 0; top: 0; width: 4px; border-radius: 4px; pointer-events: none; opacity: 0; z-index: 3;
  background: linear-gradient(180deg, transparent, #f2fffd 18%, #9ff8ec 50%, #f2fffd 82%, transparent);
  box-shadow: 0 0 12px 3px rgba(120, 255, 236, 0.85), 0 0 40px 10px rgba(55, 214, 195, 0.45); }
.hero__pen::after { content: ""; position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(230, 255, 251, 0.85), rgba(55, 214, 195, 0.25) 45%, transparent 75%); filter: blur(2px); }
html.no-motion .hero__pen { display: none; }

/* Name written in light: a glowing outline first, then the fill rises inside each letter like liquid light */
@property --f { syntax: "<percentage>"; inherits: false; initial-value: 115%; }
@property --ol { syntax: "<number>"; inherits: true; initial-value: 0; }   /* inherits so the ::before outline can read it */
.hero__name.is-writing .hero__ch { position: relative; color: transparent;
  background: linear-gradient(0deg, #ece7dc 0, #ece7dc calc(var(--f) - 16%), #a9fff2 calc(var(--f) - 5%), #ffffff var(--f), rgba(169, 255, 242, 0.35) calc(var(--f) + 3%), transparent calc(var(--f) + 8%));
  -webkit-background-clip: text; background-clip: text; }
.hero__name.is-writing .hero__ch::before { content: attr(data-ch); position: absolute; left: 0; top: 0; color: transparent; pointer-events: none;
  -webkit-text-stroke: 1.6px #8ff8ea; opacity: var(--ol); filter: drop-shadow(0 0 6px rgba(55, 214, 195, 0.95)) drop-shadow(0 0 18px rgba(55, 214, 195, 0.5)); }
.hero__spark { position: absolute; left: 0; top: 0; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; pointer-events: none; z-index: 3;
  background: #f2fffd; box-shadow: 0 0 8px 2px rgba(120, 255, 236, 0.9); }

/* Signature intro v5 (about 3 s): smoke, D written in light, S slices through with one spark, one gleam, straight glide.
   The rings, flash, lens streak, sparks burst, flicker, 3D turn clip and movie bars of the earlier scene are retired. */
.plogo__ring, .plogo__flare, .plogo__spark, .plogo__turn { display: none !important; }
.preloader::before { display: none; }
.plogo svg { animation: none; transform: none; }
.plogo::before { animation: plogo-glow 1.1s 0.2s ease-out both; }
.plogo__donly { animation: ds-dout 1.55s 0.2s linear both; }
.plogo__all { animation: ds-all3 1.55s 0.2s linear both; }
.plogo__w--1, .plogo__pen--1 { animation-duration: 0.26s; animation-delay: 0.35s; animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0.9); }
.plogo__w--2, .plogo__pen--2 { animation-duration: 0.46s; animation-delay: 0.62s; animation-timing-function: cubic-bezier(0.35, 0, 0.3, 1); }
.plogo__w--3, .plogo__pen--3 { animation-duration: 0.55s; animation-delay: 1.16s; animation-timing-function: cubic-bezier(0.55, 0, 0.2, 1); }
/* one small spark where the S crosses the D */
.plogo__flash { display: block; inset: 18%; left: 22%; top: 16%; opacity: 0; background: radial-gradient(closest-side, rgba(235, 255, 252, 0.95), rgba(95, 240, 222, 0.35) 40%, transparent 72%); animation: plogo-cross 0.45s 1.33s ease-out both; }
@keyframes plogo-cross { 0% { opacity: 0; transform: scale(0.2); } 30% { opacity: 0.9; transform: scale(0.75); } 100% { opacity: 0; transform: scale(1.25); } }
/* one gleam across the glass once the logo is whole */
.plogo::after { animation: ds-shine 0.65s 1.72s cubic-bezier(0.45, 0, 0.2, 1) both; }
.plogo.is-flying svg { filter: saturate(1.3) brightness(1.3) contrast(1.06) drop-shadow(0 0 12px rgba(55, 214, 195, 0.7)); }
.plogo.is-flying .plogo__flash { display: none; }
/* the smoke parts around the logo as it leaves */
.preloader__smoke { animation: smoke-push 2.6s ease-out both; }
html.intro-quick .plogo__flash { opacity: 0; }
/* the teal tint multiplies over black until the smoke clip paints, so no glowing ring shows before the video starts */
.preloader__smoke { background: #000; }
/* keep the glass at its resting brightness in flight: brighter turns the image's dark square into a grey disc */
.plogo.is-flying svg { filter: saturate(1.25) brightness(1.2) contrast(1.08); }
/* the gleam lights only the glass letters: the logo image itself is the mask, so no disc ever shows */
.plogo::after, .dslogo__shine { border-radius: 0;
  -webkit-mask: url(assets/logo-ds-metal.jpg) center / 100% 100% no-repeat; mask: url(assets/logo-ds-metal.jpg) center / 100% 100% no-repeat luminance; }
.plogo::after { background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.9) 50%, transparent 62%) -160% 0 / 260% 100% no-repeat; }

/* One-scene intro: no loading bar, no curtain. The smoke layer fades into the hero's own smoke. */
.preloader__bar { display: none; }
.preloader { will-change: opacity; }
.preloader__smoke { transform-origin: 50% 50%; }

/* One smoke, one scene. Before the script runs, everything but the smoke and the logo waits in the dark.
   The smoke is a touch stronger while the logo is written, then eases to its resting strength (its own 2 s transition). */
html.intro .topbar__nav a, html.intro .topbar__cta, html.intro .topbar__menu,
html.intro .hero__glow, html.intro .hero__globe-fallback, html.intro .hero__content, html.intro main > :not(.hero) { opacity: 0; }
html.intro-film .hero__film.is-on { opacity: 0.85; }
html.intro .topbar__name, html.intro .dslogo { opacity: 0; }   /* the corner name and logo wait for the big DS to land */

/* Light pen + sparks, cheap version: soft gradients instead of big box-shadows and a blur filter
   (those made the graphics card stall for about 0.25 s as the name started). Same look. */
.hero__ch { will-change: transform, opacity; }
.hero__pen { box-shadow: none; width: 4px;
  background: linear-gradient(180deg, transparent, #f2fffd 18%, #9ff8ec 50%, #f2fffd 82%, transparent); will-change: transform, opacity; }
.hero__pen::before { content: ""; position: absolute; inset: -6% -14px; border-radius: 14px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(120, 255, 236, 0.55), rgba(55, 214, 195, 0.18) 55%, transparent 100%); }
.hero__pen::after { filter: none; }
.hero__spark { box-shadow: none; width: 12px; height: 12px; margin: -6px 0 0 -6px; background: radial-gradient(closest-side, #f2fffd 0, #f2fffd 30%, rgba(120, 255, 236, 0.75) 50%, transparent 100%); will-change: transform, opacity; }


/* ---------- reference effects (5 Dec): dot matrix reveal, warped grid, rift, scramble ---------- */
@property --dot { syntax: "<length>"; inherits: false; initial-value: 0px; }
/* stepped on purpose: a dot-matrix look, and only a dozen repaints instead of sixty */
img.is-dots { -webkit-mask-image: radial-gradient(circle at center, #000 var(--dot), transparent calc(var(--dot) + 0.6px)); mask-image: radial-gradient(circle at center, #000 var(--dot), transparent calc(var(--dot) + 0.6px)); -webkit-mask-size: 9px 9px; mask-size: 9px 9px; animation: dotsIn 0.95s steps(12, end) both; }
@keyframes dotsIn { from { --dot: 0px; } to { --dot: 7px; } }
.work, .skills { position: relative; }
.fxgrid { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: clip; }
.fxgrid canvas { position: sticky; top: 0; display: block; width: 100%; }
.work > :not(.fxgrid), .skills > :not(.fxgrid) { position: relative; z-index: 1; }
.fxrift { position: fixed; left: 0; width: 100%; z-index: 30; pointer-events: none; }
html.no-motion .fxgrid, html.no-motion .fxrift { display: none; }

/* ---------- metal logo (5 Dec): polished steel DS. The old gleam was made for dark glass; on a steel body it would flash the whole mark white, so it is toned down ---------- */
.plogo::after { background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.38) 50%, transparent 58%) -160% 0 / 260% 100% no-repeat; }
.dslogo__shine { background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.3) 50%, transparent 58%) -160% 0 / 260% 100% no-repeat; }
/* steel is neutral: no hue turn (it made the metal look olive on amber sections) */
.dslogo__3d svg, .dslogo:hover .dslogo__3d svg { filter: contrast(1.06); }
/* live 3D metal canvas sits on the still logo and takes over once it has drawn */
.dslogo__live { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 50%; opacity: 0; transition: opacity 0.9s var(--ease), filter 1.1s var(--ease); filter: contrast(1.06); -webkit-mask-image: radial-gradient(closest-side, #000 82%, transparent 100%); mask-image: radial-gradient(closest-side, #000 82%, transparent 100%); }
.dslogo.is-live .dslogo__live { opacity: 1; }
.dslogo.is-live .dslogo__3d svg { opacity: 0; transition: opacity 0.9s var(--ease); }
.dslogo.is-live .dslogo__shine { display: none; }
html.no-motion .dslogo__live { display: none; }
/* liquid drag on the portrait */
.about__photo { position: relative; cursor: grab; }
.about__liquid { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; pointer-events: none; filter: grayscale(1) contrast(1.08) brightness(1.02); }
.about__photo.is-liquid .about__liquid { opacity: 1; }
html.no-motion .about__liquid { display: none; }
.dslogo.is-live .dslogo__live, .dslogo.is-live .dslogo__3d svg { transition-duration: 0.45s; }

/* ---------- no pen writing (5 Dec): the liquid metal mark arrives whole, from its top left corner, turning flat as it lands ---------- */
.plogo__pen, .dslogo__pen { display: none; }
.plogo__donly, .dslogo__donly, .dslogo.is-in .dslogo__donly { animation: none; opacity: 0; }
.plogo__all, .dslogo.is-in .dslogo__all { animation: none; opacity: 1; }
.plogo svg { transform-origin: 22% 22%;
  -webkit-mask-image: linear-gradient(135deg, #000 44%, transparent 56%), radial-gradient(closest-side, #000 92%, transparent 100%); mask-image: linear-gradient(135deg, #000 44%, transparent 56%), radial-gradient(closest-side, #000 92%, transparent 100%);
  -webkit-mask-size: 300% 300%, 100% 100%; mask-size: 300% 300%, 100% 100%; -webkit-mask-position: 0 0, 0 0; mask-position: 0 0, 0 0; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.plogo:not(.is-flying) svg { animation: logo-arrive 1.5s 0.25s cubic-bezier(0.35, 0.1, 0.2, 1) both; }
html.intro-quick .plogo svg, html.no-motion .plogo svg { animation: none !important; }
@keyframes logo-arrive {
  0% { opacity: 0; transform: perspective(700px) rotateX(-48deg) rotateY(48deg) scale(0.72); -webkit-mask-position: 100% 100%, 0 0; mask-position: 100% 100%, 0 0; }
  18% { opacity: 1; }
  100% { opacity: 1; transform: perspective(700px) rotateX(0deg) rotateY(0deg) scale(1); -webkit-mask-position: 0 0, 0 0; mask-position: 0 0, 0 0; }
}

/* ---------- solid 3D mark (5 Dec): the letters are a thick block of metal with a side wall, so the picture keeps a wider edge and the corner mark is a little larger ---------- */
.dslogo { width: 68px; height: 68px; top: 4px; }
html:has(.topbar.is-scrolled) .dslogo { top: -2px; }
@media (max-width: 760px) { .dslogo { width: 58px; height: 58px; top: 9px; } html:has(.topbar.is-scrolled) .dslogo { top: 3px; } }
.dslogo__live, .dslogo__3d img { -webkit-mask-image: radial-gradient(closest-side, #000 92%, transparent 100%); mask-image: radial-gradient(closest-side, #000 92%, transparent 100%); }
