/* Foresight Code — Bold Studio: oversized editorial type, one cobalt colour, hover-fill rows */
:root {
  color-scheme: light;
  --bg: #faf8f3;
  --ink: #0c0c0c;
  --muted: #5f5d57;
  --rule: #0c0c0c;
  --blue: #1b3bff;
  --blue-2: #5b2bff;
  --grad-loop: linear-gradient(110deg, var(--blue), var(--blue-2), var(--blue), var(--blue-2), var(--blue));
  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.7, 0, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 28px; position: relative; }
::selection { background: var(--blue); color: #fff; }
@keyframes shift { to { background-position: 200% center; } }

/* ---------- Nav (inverts over any background) ---------- */
nav.top { position: fixed; inset: 0 0 auto 0; z-index: 60; color: #fff; mix-blend-mode: difference; transition: transform .45s var(--ease); }
nav.top .wrap { display: flex; justify-content: space-between; align-items: center; height: 76px; }
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -.03em; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand i { width: 12px; height: 12px; background: #fff; border-radius: 50%; display: inline-block; }
.links { display: flex; align-items: center; gap: 30px; }
.links a { text-decoration: none; font-size: .98rem; font-weight: 500; position: relative; }
.links a:not(.cta)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.links a:not(.cta):hover::after { transform: scaleX(1); transform-origin: left; }
.links a.cta { border: 1.5px solid #fff; border-radius: 999px; padding: 8px 20px; transition: background .3s, color .3s; }
.links a.cta:hover { background: #fff; color: #000; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; padding: 150px 0 70px; display: flex; align-items: center; overflow: hidden; }
.hero .wrap { width: 100%; z-index: 2; }
.orb { position: absolute; right: -12vw; top: 9vh; width: 34vw; height: 34vw; min-width: 300px; min-height: 300px; background: var(--blue); z-index: 0;
  border-radius: 62% 38% 55% 45% / 48% 58% 42% 52%; animation: morph 14s ease-in-out infinite; will-change: transform; }
@keyframes morph { 50% { border-radius: 40% 60% 42% 58% / 58% 40% 60% 42%; } }
.eyebrow { font: 500 .82rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.eyebrow b { width: 9px; height: 9px; border-radius: 50%; background: #17c964; box-shadow: 0 0 0 0 rgba(23, 201, 100, .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(23, 201, 100, 0); } 100% { box-shadow: 0 0 0 0 rgba(23, 201, 100, 0); } }
.hero-title { font-size: clamp(3.3rem, 10.4vw, 10.5rem); line-height: .93; letter-spacing: -.055em; font-weight: 800; margin: 26px 0 44px; }
.ln { display: block; overflow: hidden; padding: .02em 0 .1em; margin-bottom: -.06em; }
.ln-in { display: block; transform: translateY(108%); animation: up 1.1s var(--ease) forwards; animation-delay: calc(var(--i) * .13s + .15s); }
@keyframes up { to { transform: none; } }
.slot { display: inline-grid; overflow: hidden; vertical-align: top; color: var(--blue); padding-bottom: .1em; margin-bottom: -.1em; }
.slot .w { grid-area: 1 / 1; transform: translateY(105%); transition: transform .8s var(--ease); }
.slot .w.on { transform: none; }
.slot .w.out { transform: translateY(-105%); }
.hero-foot { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.35rem); max-width: 600px; margin: 0; color: var(--ink); line-height: 1.5; }
.btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 18px 32px; border-radius: 999px; font-weight: 600; font-size: 1.02rem; text-decoration: none;
  border: 1.5px solid var(--ink); color: var(--ink); transition: transform .3s var(--ease), background .3s, color .3s, box-shadow .3s; }
.btn:hover { background: var(--ink); color: var(--bg); transform: translateY(-3px); }
.btn.primary { border-color: transparent; background: var(--grad-loop); background-size: 200% 100%; color: #fff; animation: shift 6s linear infinite; }
.btn.primary:hover { box-shadow: 0 18px 40px -12px rgba(27, 59, 255, .7); color: #fff; }
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(5px); }
.badge { position: absolute; right: 11vw; top: 30vh; width: 150px; height: 150px; z-index: 3; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; text-decoration: none;
  transition: transform .4s var(--ease), background .3s; }
.badge:hover { transform: scale(1.1); background: #fff; color: var(--ink); }
.badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 16s linear infinite; }
.badge text { font: 600 14px var(--font); fill: currentColor; text-transform: uppercase; }
.badge span { font-size: 1.8rem; transition: transform .3s; }
.badge:hover span { transform: rotate(-45deg); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Marquee ---------- */
.mq { overflow: hidden; border-block: 1.5px solid var(--ink); padding: 14px 0; background: var(--bg); position: relative; z-index: 3; }
.mq + .mq { border-top: 0; }
.mq-track { display: flex; width: max-content; will-change: transform; }
.mq-track span { font-size: clamp(2.6rem, 7vw, 6.5rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; white-space: nowrap; padding-right: .5em; text-transform: uppercase; color: var(--ink); }
.mq-track span:nth-child(even) { color: #d3cdbb; }
.mq.blue { background: var(--blue); border-color: var(--blue); }
.mq.blue .mq-track span { color: #fff; }
.mq.blue .mq-track span:nth-child(even) { color: rgba(255, 255, 255, .38); }

/* ---------- Sections ---------- */
section { padding: 130px 0; position: relative; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; margin-bottom: 56px; }
.label { font: 500 .82rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
h2 { font-size: clamp(2.6rem, 7.2vw, 6.6rem); line-height: .94; letter-spacing: -.05em; font-weight: 800; margin: 0; }
h2 em { font-style: normal; color: var(--blue); }
.sec-link { font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--ink); padding-bottom: 3px; white-space: nowrap; transition: color .2s, border-color .2s; }
.sec-link:hover { color: var(--blue); border-color: var(--blue); }

/* Rows: services + projects */
.rows { border-top: 1.5px solid var(--ink); }
.row {
  position: relative; display: grid; grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1.2fr) 56px; gap: 28px; align-items: center;
  padding: 38px 8px; border-bottom: 1.5px solid var(--ink); text-decoration: none; color: inherit; overflow: hidden; isolation: isolate;
  transition: color .4s var(--ease), padding .5s var(--ease);
}
.row::before { content: ""; position: absolute; inset: 0; background: var(--blue); transform: scaleY(0); transform-origin: bottom; transition: transform .55s var(--ease); z-index: -1; }
.row:hover::before { transform: scaleY(1); }
.row:hover { color: #fff; padding-left: 28px; padding-right: 28px; }
.row .n { font: 500 .9rem var(--mono); opacity: .7; }
.row .t { font-size: clamp(1.9rem, 4.4vw, 3.9rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.row .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.row .tags span { font: 500 .74rem var(--mono); padding: 4px 12px; border: 1.2px solid currentColor; border-radius: 999px; opacity: .75; }
.row .d { margin: 0; color: var(--muted); font-size: 1.02rem; line-height: 1.5; max-width: 560px; transition: color .4s; }
.row:hover .d { color: rgba(255, 255, 255, .92); }
.row .go { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-size: 1.2rem; transition: transform .45s var(--ease), background .3s, color .3s; }
.row:hover .go { background: #fff; color: var(--blue); transform: rotate(-45deg); }
.row.hide { display: none; }

/* reveal */
.rv { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }

/* ---------- Ink block: custom CRM + AI ---------- */
.ink-sec { background: var(--ink); color: var(--bg); border-radius: 44px; margin: 0 14px; overflow: hidden; }
.ink-sec .label { color: rgba(250, 248, 243, .6); }
.ink-sec h2 em { color: #8da0ff; }
.crm-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: start; }
.crm-lede { font-size: 1.2rem; color: rgba(250, 248, 243, .78); max-width: 580px; margin: 28px 0 0; }
.caps { display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; margin: 48px 0 44px; }
.cap { border-top: 1.5px solid rgba(250, 248, 243, .22); padding: 22px 0 26px; }
.cap h4 { margin: 0 0 8px; font-size: 1.3rem; letter-spacing: -.025em; font-weight: 700; }
.cap p { margin: 0; color: rgba(250, 248, 243, .7); font-size: .98rem; }
.btn.light { border-color: rgba(250, 248, 243, .6); color: var(--bg); }
.btn.light:hover { background: var(--bg); color: var(--ink); box-shadow: none; }
.flow { background: #171717; border: 1px solid rgba(250, 248, 243, .14); border-radius: 26px; padding: 26px 28px 22px; position: sticky; top: 110px; }
.flow-head { display: flex; justify-content: space-between; font: 500 .78rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: rgba(250, 248, 243, .55); padding-bottom: 16px; border-bottom: 1px solid rgba(250, 248, 243, .12); }
.flow-head .live { display: inline-flex; align-items: center; gap: 8px; color: #6ee7a0; }
.flow-head .live i { width: 8px; height: 8px; border-radius: 50%; background: #17c964; animation: ping 2s infinite; }
.flow-step { display: grid; grid-template-columns: 46px 1fr; gap: 18px; padding: 20px 0; border-bottom: 1px solid rgba(250, 248, 243, .1); opacity: .35; transition: opacity .6s var(--ease); }
.flow-step.on { opacity: 1; }
.flow-step .ic { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid rgba(250, 248, 243, .4); display: grid; place-items: center; font: 600 .9rem var(--mono); transition: all .5s var(--ease); }
.flow-step.on .ic { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 0 7px rgba(27, 59, 255, .28); }
.flow-step strong { display: block; font-size: 1.08rem; letter-spacing: -.015em; font-weight: 650; }
.flow-step small { display: block; color: rgba(250, 248, 243, .6); font-size: .88rem; margin-top: 2px; }
.flow-foot { padding-top: 18px; font-size: .86rem; color: rgba(250, 248, 243, .55); }

/* ---------- iOS app showcase ---------- */
.app { padding-top: 40px; }
.app-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 70px; align-items: center; }
.app-id { display: flex; align-items: center; gap: 16px; margin: 0 0 26px; }
.app-id img { width: 64px; height: 64px; border-radius: 15px; border: 1px solid rgba(12, 12, 12, .12); box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .4); }
.app-id strong { display: block; font-size: 1.2rem; letter-spacing: -.02em; font-weight: 700; }
.app-id span { color: var(--muted); font-size: .92rem; }
.app-lede { font-size: 1.15rem; color: var(--muted); max-width: 560px; margin: 26px 0 0; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 30px 0 38px; }
.facts li { font: 500 .8rem var(--mono); padding: 6px 14px; border: 1.2px solid var(--ink); border-radius: 999px; }
.btn.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.dark:hover { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 18px 40px -12px rgba(27, 59, 255, .7); }
.phones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.phone { aspect-ratio: 294 / 522; border-radius: 22px; background: var(--ink); overflow: hidden; box-shadow: 0 24px 50px -22px rgba(12, 12, 12, .55); }
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; }
.phone:nth-child(even) { margin-top: 44px; }
.phone.rv.in { animation: floaty 7s ease-in-out infinite; }
.phone:nth-child(2).rv.in { animation-delay: -1.5s; } .phone:nth-child(3).rv.in { animation-delay: -3s; } .phone:nth-child(4).rv.in { animation-delay: -4.5s; }
@keyframes floaty { 50% { translate: 0 -12px; } }

/* ---------- GitHub contribution grid ---------- */
.gh { border: 1.5px solid var(--ink); border-radius: 28px; padding: 34px 34px 24px; background: var(--bg); }
.gh-stats { display: flex; flex-wrap: wrap; gap: 14px 56px; margin-bottom: 30px; }
.gh-stat strong { display: block; font-size: clamp(2rem, 4.2vw, 3.4rem); font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.gh-stat span { font: 500 .78rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gh-scroll { overflow-x: auto; padding-bottom: 8px; }
.gh-inner { min-width: 760px; }
.gh-months, .gh-grid { display: grid; grid-template-columns: repeat(var(--cols, 53), 1fr); gap: 4px; }
.gh-months { margin-bottom: 8px; height: 16px; }
.gh-months span { font: 500 .72rem var(--mono); color: var(--muted); white-space: nowrap; }
.gh-grid { grid-template-rows: repeat(7, auto); }
.gh-c { display: block; aspect-ratio: 1; border-radius: 4px; background: #e8e3d6; }
.gh-c.l1 { background: #c9d2ff; } .gh-c.l2 { background: #94a7ff; } .gh-c.l3 { background: #5b76ff; } .gh-c.l4 { background: var(--blue); }
.gh-grid .gh-c { opacity: 0; transition: transform .2s var(--ease), box-shadow .2s; }
.gh.in .gh-grid .gh-c { animation: pop .55s var(--ease) forwards; animation-delay: calc(var(--i) * 16ms); }
@keyframes pop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
.gh-grid .gh-c:hover { transform: scale(1.35); box-shadow: 0 0 0 2px var(--ink); position: relative; z-index: 2; }
.gh-foot { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; font-size: .86rem; color: var(--muted); }
.gh-legend { display: inline-flex; align-items: center; gap: 4px; }
.gh-legend .gh-c { width: 14px; height: 14px; display: inline-block; aspect-ratio: auto; border-radius: 3px; }
.gh-legend .gh-c:first-of-type { margin-left: 6px; } .gh-legend .gh-c:last-of-type { margin-right: 6px; }
.gh-tip { position: fixed; z-index: 90; pointer-events: none; background: var(--ink); color: var(--bg); font: 500 .8rem var(--mono); padding: 7px 12px; border-radius: 8px; opacity: 0; transform: translate(-50%, -140%); transition: opacity .15s; white-space: nowrap; }
.gh-tip.show { opacity: 1; }

/* ---------- Blue block: process ---------- */
.blue-sec { background: var(--blue); color: #fff; border-radius: 44px; margin: 0 14px; overflow: hidden; }
.blue-sec .label { color: rgba(255, 255, 255, .75); }
.blue-sec h2 em { color: #fff; -webkit-text-stroke: 0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 70px; }
.step { border-top: 1.5px solid rgba(255, 255, 255, .85); padding-top: 22px; }
.step .big { font-size: clamp(4rem, 8vw, 7.5rem); font-weight: 800; letter-spacing: -.06em; line-height: .9; color: transparent; -webkit-text-stroke: 1.6px #fff; transition: color .4s; }
.step:hover .big { color: #fff; }
.step h3 { font-size: 1.6rem; letter-spacing: -.03em; margin: 22px 0 8px; font-weight: 800; }
.step p { margin: 0; color: rgba(255, 255, 255, .85); font-size: 1rem; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 90px; padding-top: 34px; border-top: 1.5px solid rgba(255, 255, 255, .35); }
.principles h4 { margin: 0 0 8px; font-size: 1.25rem; letter-spacing: -.02em; font-weight: 700; }
.principles p { margin: 0; color: rgba(255, 255, 255, .8); font-size: .98rem; }

/* ---------- CTA ---------- */
.cta { text-align: left; padding-bottom: 90px; }
.cta .big-link { display: block; font-size: clamp(1.7rem, 5.6vw, 5.8rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; text-decoration: none; margin: 18px 0 0; position: relative; width: fit-content; max-width: 100%; word-break: break-word; }
.cta .big-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.05em; height: .09em; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.cta .big-link:hover { color: var(--blue); }
.cta .big-link:hover::after { transform: scaleX(1); }
.cta .big-link span { display: inline-block; transition: transform .4s var(--ease); }
.cta .big-link:hover span { transform: translateX(.2em) rotate(-45deg); }
.cta p { max-width: 520px; color: var(--muted); margin: 34px 0 0; font-size: 1.15rem; }

footer { border-top: 1.5px solid var(--ink); padding: 28px 0 36px; font-size: .92rem; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted); }

/* ---------- Projects page ---------- */
.phead { padding: 170px 0 50px; position: relative; overflow: hidden; }
.phead h1 { font-size: clamp(4.5rem, 17vw, 17rem); line-height: .85; letter-spacing: -.07em; font-weight: 800; margin: 24px 0 36px; }
.phead h1 em { font-style: normal; color: var(--blue); }
.phead .lede { max-width: 640px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 44px 0 0; }
.chip { font: 600 .95rem var(--font); color: var(--ink); background: transparent; border: 1.5px solid var(--ink); padding: 10px 22px; border-radius: 999px; cursor: pointer; transition: all .3s var(--ease); }
.chip:hover { background: var(--ink); color: var(--bg); }
.chip.active { background: var(--grad-loop); background-size: 200% 100%; color: #fff; border-color: transparent; animation: shift 6s linear infinite; }
.work { padding: 40px 0 110px; }
.note { color: var(--muted); margin-top: 44px; }
.note a { color: var(--blue); font-weight: 600; }

/* ---------- Booking (Cal.com) ---------- */
.book-cta { margin: 34px 0 0; }
.or { font: 500 .8rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 38px 0 0; }
.or + .big-link { margin-top: 8px; }
.book { margin-top: 70px; border: 1.5px solid var(--ink); border-radius: 28px; overflow: hidden; background: #fff; }
.book-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 26px; border-bottom: 1.5px solid var(--ink); font: 500 .8rem var(--mono); letter-spacing: .06em; text-transform: uppercase; background: var(--bg); }
.book-head a { text-decoration: none; border-bottom: 1.5px solid var(--ink); }
.book-head a:hover { color: var(--blue); border-color: var(--blue); }
.book iframe { display: block; width: 100%; height: 720px; border: 0; }

/* ---------- Custom cursor ---------- */
.cursor { position: fixed; top: 0; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; mix-blend-mode: difference; pointer-events: none; z-index: 300;
  transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease); display: none; }
.has-cursor .cursor { display: block; }
.cursor.big { width: 70px; height: 70px; margin: -35px 0 0 -35px; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }

@media (max-width: 900px) {
  section { padding: 90px 0; }
  .orb { right: -30vw; top: 4vh; width: 70vw; height: 70vw; opacity: .9; }
  .hero { padding-top: 120px; }
  .hero-foot { grid-template-columns: 1fr; }
  .badge { display: none; }
  .links a:not(.cta):not(.keep) { display: none; }
  .links { gap: 18px; }
  .row { grid-template-columns: 38px minmax(0, 1fr) 46px; padding: 30px 4px; gap: 18px; }
  .row .d { grid-column: 2 / -1; grid-row: 2; }
  .row .go { width: 44px; height: 44px; }
  .row:hover { padding-left: 14px; padding-right: 14px; }
  .crm-grid { grid-template-columns: 1fr; gap: 50px; }
  .flow { position: static; }
  .caps { grid-template-columns: 1fr; }
  .ink-sec { border-radius: 28px; margin: 0 8px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .principles { grid-template-columns: 1fr; }
  .gh { padding: 22px 18px 18px; border-radius: 20px; }
  .book { border-radius: 20px; }
  .book iframe { height: 820px; }
  .app-grid { grid-template-columns: 1fr; gap: 46px; }
  .phones { grid-template-columns: repeat(4, minmax(150px, 1fr)); overflow-x: auto; padding: 6px 4px 26px; }
  .blue-sec { border-radius: 28px; margin: 0 8px; }
}
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ln-in { transform: none; }
  .rv { opacity: 1; transform: none; }
  .gh-grid .gh-c { opacity: 1; }
  html { scroll-behavior: auto; }
}
