/* ─────────────────────────────────────────────────────────────
   Sami Boutaleb — Portfolio
   Tokens mirror the original Framer site (blue #2a29ff, ink #171717, soft #f6f6f6).
   Object Sans is a licensed font: drop ObjectSans-*.woff2 into /assets/fonts
   and it takes over automatically; otherwise Plus Jakarta Sans is used.
   ───────────────────────────────────────────────────────────── */

@font-face { font-family: "Object Sans"; font-weight: 400; font-display: swap;
  src: local("Object Sans Regular"), local("ObjectSans-Regular"), url("../fonts/ObjectSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "Object Sans"; font-weight: 700; font-display: swap;
  src: local("Object Sans Bold"), local("ObjectSans-Bold"), url("../fonts/ObjectSans-Bold.woff2") format("woff2"); }
@font-face { font-family: "Object Sans"; font-weight: 900; font-display: swap;
  src: local("Object Sans Heavy"), local("ObjectSans-Heavy"), url("../fonts/ObjectSans-Heavy.woff2") format("woff2"); }

:root {
  --blue: #2a29ff;
  --blue-deep: #1d1cc9;
  --blue-soft: #ececff;
  --lavender: #efeefe;
  --cyan: #29ffff;
  --ink: #171717;
  --ink-2: #3a3a3a;
  --muted: #74747a;
  --line: #ececec;
  --soft: #f6f6f6;
  --bg: #ffffff;
  --green: #7be35a;
  --radius-xl: 40px;
  --radius-l: 28px;
  --radius-m: 18px;
  --shadow-s: 0 1px 2px rgba(23,23,23,.04), 0 4px 12px rgba(23,23,23,.04);
  --shadow-m: 0 2px 4px rgba(23,23,23,.04), 0 12px 32px rgba(23,23,23,.08);
  --shadow-l: 0 30px 80px -20px rgba(42,41,255,.25), 0 10px 30px rgba(23,23,23,.08);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --font: "Object Sans", "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.accent { color: var(--blue); }
.dot { color: var(--blue); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Grain + page fade ─────────────────────────────────────── */
.grain { pointer-events: none; position: fixed; inset: 0; z-index: 100; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
@keyframes grain { 0%,100%{transform:translate(0,0)} 20%{transform:translate(-5%,4%)} 40%{transform:translate(4%,-6%)} 60%{transform:translate(-3%,7%)} 80%{transform:translate(6%,2%)} }

.curtain { position: fixed; inset: 0; z-index: 200; background: var(--blue); pointer-events: none;
  transform: translateY(0); transition: transform .9s var(--ease-in-out); }
.curtain.is-up { transform: translateY(-101%); }
.curtain.is-down { transform: translateY(0); transition-duration: .6s; }
.curtain::after { content: ""; position: absolute; inset: 0; margin: auto; width: clamp(110px, 11vw, 150px); height: auto; aspect-ratio: 153 / 44;
  background: url("../logo-sami-white.svg") center/contain no-repeat; opacity: .9; }

/* ── Scroll progress ───────────────────────────────────────── */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 90; transform-origin: 0 50%;
  transform: scaleX(0); background: linear-gradient(90deg, var(--blue), #7a79ff); }

/* ── Reveal primitives ─────────────────────────────────────── */
[data-reveal] { opacity: 0; transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s); }
[data-reveal="scale"] { transform: scale(.94) translateY(20px); }
[data-reveal="left"] { transform: translateX(-30px); }
[data-reveal].in { opacity: 1; transform: none; filter: none; }

.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; transform: translateY(105%) rotate(4deg); opacity: 0;
  transition: transform 1s var(--ease), opacity .6s var(--ease); transition-delay: calc(var(--i) * 45ms + var(--d, 0s)); }
.split.in .w > span { transform: none; opacity: 1; }

.mask-img { clip-path: inset(12% 6% 12% 6% round 32px); transition: clip-path 1.3s var(--ease); }
.mask-img img, .mask-img video { transform: scale(1.18); transition: transform 1.6s var(--ease); }
.mask-img.in { clip-path: inset(0 0 0 0 round var(--radius-l)); }
.mask-img.in img, .mask-img.in video { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  [data-reveal], .split .w > span { opacity: 1; transform: none; filter: none; }
  .mask-img { clip-path: none; }
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn { --h: 56px; position: relative; display: inline-flex; align-items: center; gap: 14px; height: var(--h);
  padding: 0 6px 0 26px; border-radius: 999px; font-weight: 700; font-size: 17px; letter-spacing: -.01em;
  isolation: isolate; overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 30px -8px rgba(42,41,255,.55); }
.btn-primary::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.35), transparent 60%);
  opacity: 0; transition: opacity .4s; }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover { box-shadow: 0 16px 40px -8px rgba(42,41,255,.7); }
.btn .ic { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--blue); display: grid; place-items: center;
  border: 2px solid var(--blue); transition: transform .6s var(--ease); flex: none; }
.btn .ic svg { width: 14px; height: 14px; transition: transform .6s var(--ease); }
.btn:hover .ic svg { transform: rotate(45deg); }
.btn-ghost { background: var(--soft); color: var(--ink); padding: 0 28px; }
.btn-ghost:hover { background: #ededed; }
.btn-ghost .arrow-down { width: 14px; transition: transform .5s var(--ease); }
.btn-ghost:hover .arrow-down { transform: translateY(3px); }

/* ── Floating dock nav ─────────────────────────────────────── */
.dock { position: fixed; left: 50%; bottom: 22px; z-index: 80; transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 2px; padding: 6px; border-radius: 999px;
  background: rgba(30,30,32,.72); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08);
  transition: transform 1s var(--ease) .4s; }
.dock.ready { transform: translate(-50%, 0); }
.dock.hide { transform: translate(-50%, 160%); transition-delay: 0s; }
.dock a { position: relative; z-index: 1; height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px;
  color: rgba(255,255,255,.88); font-weight: 700; font-size: 15px; border-radius: 999px; transition: color .3s; white-space: nowrap; }
.dock a.home { padding: 0 14px; }
.dock a.home svg { width: 18px; height: 18px; flex: none; }
.dock a.cta { background: #fff; color: var(--ink); margin-left: 6px; padding: 0 20px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); }
.dock a.cta:hover { background: var(--cyan); }
.dock .pill { position: absolute; z-index: 0; top: 6px; height: 44px; border-radius: 999px; background: rgba(255,255,255,.12);
  opacity: 0; transition: transform .45s var(--ease), width .45s var(--ease), opacity .25s; pointer-events: none; }
.dock:hover .pill { opacity: 1; }

/* ── HERO ──────────────────────────────────────────────────── */
.hero { position: relative; padding: clamp(70px, 11vh, 120px) var(--gutter) 40px; min-height: 100svh; display: flex; flex-direction: column; align-items: center; }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-bg .blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.hero-bg .b1 { width: 520px; height: 520px; left: -140px; top: 18%; background: #d9d8ff; }
.hero-bg .b2 { width: 420px; height: 420px; right: -100px; top: 45%; background: #c9fbff; }
.hero-bg .grid { position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(ellipse at 50% 40%, #000 10%, transparent 70%); opacity: .6; }
@keyframes float1 { 50% { transform: translate(90px, -60px) scale(1.1); } }
@keyframes float2 { 50% { transform: translate(-80px, 50px) scale(.92); } }

.badge-rig { position: relative; width: min(100%, 960px); transform-origin: 50% -200px; will-change: transform;
  touch-action: none; }
.badge-rig.dropping { animation: drop 1.6s var(--ease) both; }
@keyframes drop { from { transform: translateY(-110vh); } }
.strap { position: absolute; left: 50%; bottom: 100%; width: 34px; height: 100vh; transform: translateX(-50%);
  background: linear-gradient(90deg, #1c1bd6, var(--blue) 30%, #4746ff 55%, var(--blue) 75%, #1c1bd6); }
.strap::after { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 2px, transparent 2px 6px); }
.clip { position: absolute; left: 50%; top: -34px; transform: translateX(-50%); width: 44px; height: 46px; z-index: 3;
  background: linear-gradient(180deg, #2a2a2a, #111); border-radius: 6px 6px 8px 8px;
  box-shadow: 0 6px 10px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.12); }
.clip::after { content: ""; position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); width: 24px; height: 18px;
  background: #151515; border-radius: 0 0 5px 5px; }
.slot { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); width: 50px; height: 14px; border-radius: 99px;
  background: #fff; box-shadow: inset 0 2px 3px rgba(0,0,0,.12); z-index: 2; }
.badge { position: relative; margin-top: 34px; padding: 18px 18px 0; border-radius: 48px; background: var(--soft);
  box-shadow: inset 0 0 0 1px #ebebeb, 0 40px 80px -30px rgba(23,23,23,.25), 0 2px 0 #fff inset; }
.badge::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.75) 45%, transparent 60%);
  background-size: 250% 100%; background-position: var(--shine, 120%) 0; mix-blend-mode: soft-light; }
.card { position: relative; background: #fff; border-radius: 34px; padding: 28px clamp(20px, 5vw, 56px) clamp(36px, 6vw, 64px);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 30px -10px rgba(0,0,0,.08); text-align: center; overflow: hidden; }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: clamp(20px, 3vw, 28px); }
.card-top .logo { width: 104px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); position: relative; }
.status i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: var(--green); opacity: .5; animation: ping 2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.4); opacity: .7; } 100% { transform: scale(2.2); opacity: 0; } }
.avatar { width: 92px; height: 92px; margin: 0 auto 26px; border-radius: 50%; overflow: hidden; position: relative;
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line), 0 14px 30px -8px rgba(0,0,0,.25); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 { margin: 0 auto; max-width: 15.5em; font-weight: 700; font-size: clamp(34px, 5.6vw, 66px); line-height: 1.04; letter-spacing: -.045em; }
.hero h1 .wave { display: inline-block; transform-origin: 70% 75%; animation: wave 2.6s ease-in-out 1.8s infinite; }
@keyframes wave { 0%,60%,100% { transform: rotate(0); } 10%,30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
.hero h1 .q { position: relative; white-space: nowrap; }
.hero h1 .q.blow { color: var(--blue); }
.hero h1 .q.blow svg { position: absolute; left: -2%; bottom: -.12em; width: 104%; height: .35em; overflow: visible; }
.hero h1 .q.blow path { stroke: var(--cyan); stroke-width: 6; fill: none; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400;
  transition: stroke-dashoffset 1.2s var(--ease) 1.6s; mix-blend-mode: multiply; }
.split.in .q.blow path { stroke-dashoffset: 0; }
.hero .lede { margin: 18px 0 34px; color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); }
.hero .ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.loc { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 22px 0 26px; font-size: 14px; color: var(--muted); }
.loc svg { width: 14px; color: var(--muted); }
.loc b { color: var(--ink); font-weight: 400; }
.hint { position: absolute; right: -8px; top: 38%; transform: translateX(100%); font-size: 12px; color: var(--muted); display: none; align-items: center; gap: 6px; opacity: .8; }
@media (min-width: 1200px) { .hint { display: flex; } }

/* ── Logos marquee ─────────────────────────────────────────── */
.clients { padding: 56px 0 30px; text-align: center; }
.eyebrow { font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.marquee { --gap: 64px; position: relative; overflow: hidden; margin-top: 22px;
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.marquee-track { display: flex; gap: var(--gap); width: max-content; animation: scroll 32s linear infinite; padding: 8px 0; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee img { height: 26px; width: auto; opacity: .55; filter: grayscale(1); transition: opacity .3s, filter .3s, transform .4s var(--ease); }
.marquee img:hover { opacity: 1; filter: none; transform: translateY(-2px) scale(1.06); }
@keyframes scroll { to { transform: translateX(calc(-50% - var(--gap) / 2)); } }

/* ── Section heads ─────────────────────────────────────────── */
section { position: relative; }
.sec { padding: clamp(80px, 12vw, 140px) 0; }
.sec-head { text-align: center; margin-bottom: clamp(36px, 6vw, 64px); }
.h2 { margin: 0; font-weight: 700; font-size: clamp(34px, 5vw, 56px); line-height: 1.04; letter-spacing: -.045em; }
.sub { margin: 14px 0 0; color: var(--muted); font-size: clamp(15px, 1.4vw, 17px); }

/* ── Projects grid ─────────────────────────────────────────── */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.proj { --tint: var(--lavender); position: relative; display: block; border-radius: var(--radius-xl); background: var(--tint);
  overflow: hidden; aspect-ratio: 1 / .86; isolation: isolate; transform: translateZ(0); }
.proj .media { position: absolute; inset: 0; overflow: hidden; }
.proj .media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04) translateY(var(--py, 0px)); transition: transform 1.2s var(--ease); }
.proj:hover .media img { transform: scale(1.09) translateY(var(--py, 0px)); }
.proj .shade { position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, rgba(23,23,23,.12)); opacity: 0; transition: opacity .6s; }
.proj:hover .shade { opacity: 1; }
.proj .bar { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 12px; padding: 10px;
  border-radius: 22px; background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-s); transition: transform .6s var(--ease), background .4s; }
.proj:hover .bar { transform: translateY(-4px); background: #fff; }
.proj .mark { width: 44px; height: 44px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; flex: none; overflow: hidden; }
.proj .mark img { width: 42%; height: auto; }
.proj .mark.wide img { width: 70%; }
.proj .mark.dark { background: #232323; }
.proj .t { flex: 1; min-width: 0; line-height: 1.25; }
.proj .t b { display: block; font-size: 16px; letter-spacing: -.01em; }
.proj .t small { color: var(--muted); font-size: 13px; }
.proj .go { width: 44px; height: 44px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; flex: none;
  transition: background .4s, color .4s, transform .6s var(--ease); }
.proj .go svg { width: 13px; transition: transform .6s var(--ease); }
.proj:hover .go { background: var(--blue); color: #fff; }
.proj:hover .go svg { transform: rotate(45deg); }
.proj .tag { position: absolute; top: 16px; left: 16px; padding: 6px 12px; border-radius: 99px; font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px); transform: translateY(-8px); opacity: 0; transition: .5s var(--ease); }
.proj:hover .tag { transform: none; opacity: 1; }

.cursor-view { position: fixed; left: 0; top: 0; z-index: 70; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%;
  background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 16px; font-weight: 700; letter-spacing: -.01em; box-shadow: 0 16px 40px -10px rgba(42,41,255,.55);
  pointer-events: none; transform: translate3d(var(--x, -200px), var(--y, -200px), 0) scale(0); transition: transform .5s var(--ease); }
.cursor-view.on { transform: translate3d(var(--x), var(--y), 0) scale(1); }
@media (hover: none) { .cursor-view { display: none; } }

/* ── Services accordion ────────────────────────────────────── */
.services { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--line); }
.svc { border-bottom: 1px solid var(--line); }
.svc button { width: 100%; display: flex; align-items: center; gap: 16px; padding: 24px 4px; text-align: left; position: relative; }
.svc .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); flex: none;
  transition: background .4s, color .4s, transform .6s var(--ease); }
.svc .ico svg { width: 20px; }
.svc h3 { margin: 0; flex: 1; font-size: clamp(18px, 2vw, 22px); font-weight: 700; letter-spacing: -.02em; transition: transform .5s var(--ease); }
.svc .pm { width: 32px; height: 32px; border-radius: 50%; position: relative; flex: none; background: var(--soft); transition: background .4s, transform .6s var(--ease); }
.svc .pm::before, .svc .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: currentColor; border-radius: 2px; transition: transform .5s var(--ease); }
.svc .pm::after { transform: rotate(90deg); }
.svc button:hover h3 { transform: translateX(6px); }
.svc.open .ico { background: var(--blue); color: #fff; transform: rotate(-8deg); }
.svc.open .pm { background: var(--ink); color: #fff; transform: rotate(180deg); }
.svc.open .pm::after { transform: rotate(0); }
.svc .body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.svc.open .body { grid-template-rows: 1fr; }
.svc .body > div { overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 26px 60px; }
.chips span { padding: 8px 14px; border-radius: 99px; background: var(--soft); font-size: 14px; color: var(--ink-2);
  opacity: 0; transform: translateY(10px); transition: .5s var(--ease); transition-delay: calc(var(--i) * 50ms + .1s); }
.svc.open .chips span { opacity: 1; transform: none; }

/* ── Timeline / Experience ─────────────────────────────────── */
.tl-sec { padding-top: 40px; }
.tl-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: clamp(40px, 6vw, 72px); }
.tl-head .eyebrow { display: inline-block; margin-bottom: 14px; padding: 6px 12px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.tl-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.tl-stats > div { padding: 16px 20px; border-radius: 20px; background: var(--soft); min-width: 130px; }
.tl-stats b { display: flex; align-items: baseline; font-size: 34px; line-height: 1; letter-spacing: -.05em; }
.tl-stats b em { font-style: normal; color: var(--blue); font-size: .7em; }
.tl-stats small { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.tl-stats .blue { background: var(--blue); color: #fff; max-width: 240px; }
.tl-stats .blue b { font-size: 22px; letter-spacing: -.03em; display: inline-flex; align-items: center; gap: 8px; }
.tl-stats .blue b::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(41,255,255,.25); animation: ping-soft 2s ease-in-out infinite; }
.tl-stats .blue small { color: rgba(255,255,255,.8); }
@keyframes ping-soft { 50% { box-shadow: 0 0 0 7px rgba(41,255,255,0); } }

.tl { max-width: 860px; margin: 0 auto; }

.tl-logo { height: 52px; min-width: 52px; flex: none; border-radius: 16px; background: #fff; display: grid; place-items: center; padding: 0 14px; box-shadow: inset 0 0 0 1px var(--line); }
.tl-logo img { height: 20px; width: auto; max-width: 120px; object-fit: contain; }
.tl-logo.mono { background: var(--ink); color: #fff; font-weight: 700; font-size: 16px; letter-spacing: -.02em; }

.tl-list { position: relative; list-style: none; margin: 0; padding: 0 0 0 44px; display: grid; gap: 18px; }
.tl-line { position: absolute; left: 11px; top: 28px; bottom: 28px; width: 2px; border-radius: 2px; background: var(--line); }
.tl-line i { position: absolute; left: 0; top: 0; width: 100%; height: var(--p, 0%); border-radius: inherit;
  background: linear-gradient(180deg, var(--cyan), var(--blue)); box-shadow: 0 0 14px rgba(42,41,255,.6); }
.tl-line i::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 0 5px rgba(42,41,255,.18), 0 0 20px rgba(42,41,255,.8); }
.tl-item { position: relative; }
.tl-node { position: absolute; left: -44px; top: 30px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--line);
  display: grid; place-items: center; transition: border-color .5s, background .5s, transform .6s var(--ease); z-index: 1; }
.tl-node::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background .5s, transform .6s var(--ease); }
.tl-item.done .tl-node { border-color: var(--blue); }
.tl-item.done .tl-node::after { background: var(--blue); }
.tl-item.on .tl-node { background: var(--blue); border-color: var(--blue); transform: scale(1.15); box-shadow: 0 0 0 6px rgba(42,41,255,.15); }
.tl-item.on .tl-node::after { background: #fff; }

.tl-card { position: relative; overflow: hidden; isolation: isolate; padding: 24px 26px 22px; border-radius: 28px; background: #fff;
  box-shadow: inset 0 0 0 1px var(--line); opacity: .55; transform: scale(.98); transform-origin: 0 50%;
  transition: opacity .6s var(--ease), transform .7s var(--ease), box-shadow .6s var(--ease); }
.tl-card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(42,41,255,.08), transparent 70%); }
.tl-card:hover::before { opacity: 1; }
.tl-item.done .tl-card { opacity: .85; transform: none; }
.tl-item.on .tl-card { opacity: 1; transform: none; box-shadow: inset 0 0 0 1.5px var(--blue), 0 30px 60px -28px rgba(42,41,255,.45); }
.tl-card:hover { opacity: 1; }
.tl-yr { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); z-index: -1; pointer-events: none;
  font-size: clamp(64px, 9vw, 120px); font-weight: 700; letter-spacing: -.06em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px #ececf3; transition: -webkit-text-stroke-color .6s, color .6s; }
.tl-item.on .tl-yr { color: rgba(42,41,255,.06); -webkit-text-stroke-color: rgba(42,41,255,.22); }
.tl-card-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.tl-card-top .tl-logo { height: 44px; min-width: 44px; border-radius: 14px; margin-right: 4px; padding: 0 12px; }
.tl-card-top .tl-logo img { height: 18px; }
.tl-period { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tl-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--soft); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.tl-tag.live { background: #eafbe4; color: #2f7a18; }
.tl-tag.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: ping-dot 1.6s ease-in-out infinite; }
@keyframes ping-dot { 50% { opacity: .3; } }
.tl-dur { margin-left: auto; padding: 6px 12px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: 13px; }
.tl-card h3 { margin: 0; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.1; letter-spacing: -.035em; }
.tl-co { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.tl-gantt { position: relative; height: 8px; margin-top: 22px; border-radius: 8px; background: var(--soft); }
.tl-gantt .seg { position: absolute; top: 0; bottom: 0; border-radius: 8px; background: linear-gradient(90deg, #8f8eff, var(--blue));
  transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.1s var(--ease) .15s; }
.tl-item.seen .tl-gantt .seg { transform: scaleX(1); }
.tl-item.on .tl-gantt .seg { box-shadow: 0 0 16px rgba(42,41,255,.55); }
.tl-axis { position: relative; height: 16px; margin-top: 8px; font-size: 11px; color: #a3a3aa; font-variant-numeric: tabular-nums; }
.tl-axis span { position: absolute; top: 0; transform: translateX(-50%); }
.tl-axis span:first-child { transform: none; }
.tl-axis span:last-child { transform: translateX(-100%); }

.tl-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: clamp(40px, 6vw, 64px);
  padding: 22px 22px 22px 30px; border-radius: 30px; background: var(--soft); }
.tl-cta p { margin: 0; font-size: clamp(18px, 2vw, 22px); font-weight: 700; letter-spacing: -.02em; }

@media (max-width: 900px) {
  .tl-card { opacity: 1; transform: none; }
}
@media (max-width: 560px) {
  .tl-list { padding-left: 34px; }
  .tl-node { left: -34px; width: 20px; height: 20px; }
  .tl-line { left: 9px; }
  .tl-card { padding: 20px; border-radius: 24px; }
  .tl-dur { margin-left: 0; }
  .tl-stats > div { flex: 1; min-width: 0; }
  .tl-cta { padding: 20px; }
}

/* ── Testimonials ──────────────────────────────────────────── */
.stack { display: flex; justify-content: center; margin: 20px 0 14px; }
.stack .heart { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; object-fit: cover; box-shadow: var(--shadow-s); }
.stack .heart { display: grid; place-items: center; background: var(--cyan); color: var(--blue); }
.stack .heart svg { width: 16px; animation: beat 1.4s ease-in-out infinite; }
@keyframes beat { 0%,100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.15); } }

.tm { position: relative; overflow: hidden; isolation: isolate; max-width: 920px; margin: 0 auto; border-radius: 44px; background: #fff;
  box-shadow: inset 0 0 0 1px var(--line), 0 50px 100px -50px rgba(42,41,255,.35); }
.tm::before { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -200px; top: -260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(42,41,255,.12), transparent 65%); }
.tm::after { content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; left: -180px; bottom: -240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(41,255,255,.18), transparent 65%); }
.tm-count { margin-left: 14px; margin-right: auto; align-self: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tm-count b { color: var(--ink); }
.tm-mono { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; letter-spacing: .02em;
  background: var(--blue-soft); color: var(--blue); transition: background .4s, color .4s, box-shadow .4s; }
.tm-body { display: flex; flex-direction: column; padding: clamp(28px, 5vw, 60px) clamp(22px, 5vw, 64px) clamp(20px, 3vw, 32px); min-width: 0; }
.tm-top { display: flex; justify-content: space-between; align-items: flex-start; }
.tm-mark { width: 52px; color: var(--blue); }
.tm-arrows { display: flex; gap: 8px; }
.tm-arrows button { width: 46px; height: 46px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; transition: background .3s, color .3s, transform .4s var(--ease); }
.tm-arrows button:hover { background: var(--blue); color: #fff; transform: scale(1.06); }
.tm-arrows svg { width: 15px; }
.tm-quotes { display: grid; margin: 28px 0 32px; flex: 1; align-content: center; }
.tm-q { grid-area: 1 / 1; margin: 0; opacity: 0; pointer-events: none; transition: opacity .4s; }
.tm-q.on { opacity: 1; pointer-events: auto; }
.tm-q p { margin: 0; font-size: clamp(24px, 3vw, 38px); line-height: 1.22; font-weight: 700; letter-spacing: -.035em; text-wrap: pretty; }
.tm-q.long p { font-size: clamp(20px, 2.3vw, 29px); }
.tm-q .wd { display: inline-block; opacity: .12; transform: translateY(6px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i) * 22ms); }
.tm-q.on .wd { opacity: 1; transform: none; }
.tm-q footer { display: flex; align-items: center; gap: 12px; margin-top: 24px; font-size: 15px; opacity: 0; transform: translateY(8px); transition: .6s var(--ease) .5s; }
.tm-q.on footer { opacity: 1; transform: none; }
.tm-q footer .tm-mono { width: 46px; height: 46px; font-size: 15px; background: var(--blue); color: #fff; }
.tm-q footer b { display: block; font-size: 16px; }
.tm-q footer small { color: var(--muted); font-size: 14px; }

.tm-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tm-tab { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px 16px; border-radius: 18px; text-align: left; min-width: 0;
  transition: background .4s; }
.tm-tab:hover { background: var(--soft); }
.tm-tab.on { background: var(--soft); }
.tm-tab .tm-mono { width: 34px; height: 34px; font-size: 12px; background: #ececf3; color: var(--muted); }
.tm-tab.on .tm-mono { background: var(--blue); color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(42,41,255,.25); }
.tm-tab span { min-width: 0; line-height: 1.25; }
.tm-tab b { display: block; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); transition: color .3s; }
.tm-tab.on b { color: var(--ink); }
.tm-tab small { display: none; }
.tm-bar { position: absolute; left: 12px; right: 12px; bottom: 7px; height: 3px; border-radius: 3px; background: #e7e7ee; overflow: hidden; }
.tm-bar b { display: block; height: 100%; background: var(--blue); transform: scaleX(0); transform-origin: 0 50%; }

/* ── Footer ────────────────────────────────────────────────── */
.footer { position: relative; padding: clamp(80px, 12vw, 140px) 0 130px; text-align: center; overflow: hidden; }
.footer .big { margin: 0 0 28px; font-weight: 700; font-size: clamp(44px, 9vw, 120px); line-height: .95; letter-spacing: -.06em; }
.footer .big a { display: inline-block; background: linear-gradient(90deg, var(--ink) 0 50%, var(--blue) 50% 100%); background-size: 200% 100%; background-position: 0 0;
  -webkit-background-clip: text; background-clip: text; color: transparent; transition: background-position .9s var(--ease); }
.footer .big a:hover { background-position: -100% 0; }
.footer .me { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 56px; }
.footer .me img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line); }
.footer .me b { font-size: 17px; letter-spacing: -.01em; }
.footer .me small { color: var(--muted); font-size: 14px; }
.socials { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.socials a { padding: 12px 18px; border-radius: 99px; background: var(--soft); font-weight: 700; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; transition: background .3s, color .3s, transform .4s var(--ease); }
.socials a:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.socials svg { width: 12px; }
.copy { margin-top: 40px; font-size: 13px; color: var(--muted); }

/* ── Case study pages ──────────────────────────────────────── */
.cs-hero { padding: clamp(40px, 7vw, 80px) 0 0; }
.back { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; padding: 10px 16px 10px 10px; border-radius: 99px; background: var(--soft); transition: background .3s, color .3s; }
.back i { width: 28px; height: 28px; border-radius: 50%; background: #fff; display: grid; place-items: center; transition: transform .5s var(--ease); }
.back svg { width: 12px; }
.back:hover { background: var(--ink); color: #fff; }
.back:hover i { transform: translateX(-3px); color: var(--ink); }
.cs-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: end; margin: 36px 0 clamp(36px, 5vw, 56px); }
.cs-title { margin: 0; font-weight: 700; font-size: clamp(42px, 7.6vw, 96px); line-height: .95; letter-spacing: -.055em; }
.cs-meta { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.cs-meta div { padding: 12px 18px; border-radius: 18px; background: var(--soft); min-width: 130px; }
.cs-meta small { display: block; font-size: 12px; color: var(--muted); }
.cs-meta b { font-size: 15px; letter-spacing: -.01em; }
.cs-overview small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--blue); font-weight: 700; margin-bottom: 10px; }
.cs-overview p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.65; }
.cs-cover { position: relative; border-radius: var(--radius-xl); overflow: hidden; background: var(--lavender); aspect-ratio: 16 / 9; }
.cs-cover img { width: 100%; height: 100%; object-fit: cover; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.pair .mask-img { border-radius: var(--radius-l); overflow: hidden; background: var(--soft); }
.pair img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

.cs-sec { display: grid; grid-template-columns: 300px 1fr; gap: clamp(28px, 6vw, 80px); padding: clamp(64px, 9vw, 110px) 0 0; }
.cs-sec > header { position: relative; }
.cs-sec > header .sticky { position: sticky; top: 40px; }
.cs-sec .num { font-size: 13px; color: var(--blue); font-weight: 700; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.cs-sec h2 { margin: 6px 0 0; font-size: clamp(30px, 3.6vw, 42px); line-height: 1; letter-spacing: -.045em; font-weight: 700; }
.prose { font-size: 17px; line-height: 1.7; color: var(--ink-2); max-width: 680px; }
.prose > * + * { margin-top: 18px; }
.prose p { margin: 0; }
.prose h3 { margin: 36px 0 0; font-size: 21px; color: var(--ink); letter-spacing: -.02em; line-height: 1.25; }
.prose h3:first-child { margin-top: 0; }
.prose h4 { margin: 28px 0 0; font-size: 17px; color: var(--ink); }
.prose strong { color: var(--ink); }
.prose ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.prose ul li { position: relative; padding: 14px 18px 14px 50px; background: var(--soft); border-radius: 16px; line-height: 1.5; }
.prose ul li::before { content: ""; position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 6px; background: var(--blue)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E") center/12px no-repeat; }
.prose ul.plain li::before { background: var(--ink) none; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; left: 24px; }
.prose .callout { padding: 22px 24px; border-radius: 22px; background: var(--blue-soft); color: var(--ink); border-left: 4px solid var(--blue); }
.prose .flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.prose .flow span { padding: 10px 16px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; }
.prose .flow i { color: var(--blue); font-style: normal; font-weight: 700; }
.prose .goals { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.prose .goals > div { padding: 24px; border-radius: 24px; background: var(--soft); }
.prose .goals h4 { margin: 0 0 8px; }
.highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.highlights > div { padding: 26px; border-radius: 24px; background: var(--soft); transition: transform .6s var(--ease), background .4s, color .4s; }
.highlights > div:hover { transform: translateY(-4px); background: var(--ink); color: #fff; }
.highlights > div:hover h4, .highlights > div:hover p { color: #fff; }
.highlights b.n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--blue); color: #fff; font-size: 14px; margin-bottom: 14px; }
.highlights h4 { margin: 0 0 6px !important; }
.highlights p { margin: 0; font-size: 15px; transition: color .4s; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { padding: 26px; border-radius: 26px; background: var(--soft); position: relative; overflow: hidden; }
.stat.blue { background: var(--blue); color: #fff; }
.stat.blue p { color: rgba(255,255,255,.85); }
.stat .v { font-size: clamp(44px, 5vw, 64px); font-weight: 700; letter-spacing: -.06em; line-height: 1; display: flex; align-items: baseline; gap: 2px; }
.stat .v em { font-style: normal; font-size: .45em; color: var(--blue); letter-spacing: -.02em; }
.stat.blue .v em { color: var(--cyan); }
.stat p { margin: 12px 0 0 !important; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.stat .up { position: absolute; top: 20px; right: 20px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); }
.stat .up svg { width: 12px; }

.quote { margin: clamp(64px, 9vw, 110px) 0 0; padding: clamp(40px, 7vw, 90px) clamp(24px, 6vw, 90px); border-radius: var(--radius-xl); background: var(--soft); text-align: center; position: relative; overflow: hidden; }
.quote::before { content: "“"; position: absolute; left: 50%; top: -.18em; transform: translateX(-50%); font-size: 280px; line-height: 1; color: var(--blue); opacity: .08; font-weight: 900; }
.quote p { position: relative; margin: 0 auto; max-width: 820px; font-size: clamp(22px, 3vw, 36px); font-weight: 700; line-height: 1.2; letter-spacing: -.035em; }
.quote small { display: block; margin-top: 18px; color: var(--muted); font-size: 14px; }
.hmw { margin-top: 20px; padding: clamp(40px, 7vw, 90px) clamp(24px, 6vw, 90px); border-radius: var(--radius-xl); background: var(--blue); color: #fff; position: relative; overflow: hidden; }
.hmw::after { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(41,255,255,.45), transparent 65%); animation: float2 14s ease-in-out infinite; }
.hmw small { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--cyan); margin-bottom: 16px; }
.hmw p { position: relative; z-index: 1; margin: 0; max-width: 900px; font-size: clamp(26px, 3.6vw, 46px); line-height: 1.1; letter-spacing: -.04em; font-weight: 700; }

.fig { margin-top: clamp(40px, 6vw, 64px); border-radius: var(--radius-l); overflow: hidden; background: var(--soft); }
.fig img, .fig video { width: 100%; height: auto; }
.fig.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; background: none; border-radius: 0; overflow: visible; }
.fig.duo > div { border-radius: var(--radius-l); overflow: hidden; background: var(--soft); }
.fig video { aspect-ratio: 16 / 9; object-fit: cover; background: #0f0f10; }

.next-proj { display: block; margin-top: clamp(80px, 12vw, 140px); border-radius: var(--radius-xl); overflow: hidden; position: relative; background: var(--ink); color: #fff; padding: clamp(32px, 6vw, 64px); isolation: isolate; }
.next-proj small { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); font-weight: 700; }
.next-proj h3 { margin: 10px 0 0; font-size: clamp(36px, 7vw, 88px); line-height: .95; letter-spacing: -.055em; display: flex; align-items: center; gap: .3em; }
.next-proj h3 svg { width: .55em; transition: transform .7s var(--ease); flex: none; }
.next-proj:hover h3 svg { transform: rotate(45deg); }
.next-proj .ghost { position: absolute; right: -4%; top: 50%; width: 46%; transform: translateY(-50%) rotate(-6deg) scale(.96); border-radius: 22px; opacity: .45; z-index: -1;
  transition: transform 1s var(--ease), opacity .6s; }
.next-proj:hover .ghost { transform: translateY(-50%) rotate(-2deg) scale(1.04); opacity: .8; }
.next-proj::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--ink) 45%, transparent); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 960px) {
  .cs-top { grid-template-columns: 1fr; }
  .cs-sec { grid-template-columns: 1fr; gap: 20px; }
  .cs-sec > header .sticky { position: static; }
}
@media (max-width: 720px) {
  .tm { border-radius: 32px; }
  .tm-tabs { grid-template-columns: repeat(3, auto); justify-content: start; }
  .tm-tab > span:not(.tm-mono) { display: none; }
  .tm-tab { padding: 8px 8px 14px; }
  .tm-bar { left: 8px; right: 8px; }
  .tm-mark { width: 40px; }
  .projects { grid-template-columns: 1fr; }
  .proj { aspect-ratio: 1 / 1; border-radius: 30px; }
  .chips { padding-left: 0; }
  .badge { padding: 12px 12px 0; border-radius: 36px; }
  .card { border-radius: 28px; }
  .card-top .logo { width: 86px; }
  .status { font-size: 12px; }
  .avatar { width: 76px; height: 76px; }
  .pair, .fig.duo, .prose .goals, .highlights { grid-template-columns: 1fr; }
  .dock a { padding: 0 11px; font-size: 14px; }
  .dock a.cta { padding: 0 15px; }
  .next-proj .ghost { display: none; }
  .btn { --h: 52px; font-size: 16px; }
}
