/* =========================================================
   BufferBrains — design system
   Colours come straight from the logo: charcoal + warm yellow gradient.
   ========================================================= */
:root {
  --ink: #2b2b2b;
  --ink-2: #1d1d1d;
  --ink-3: #3a3a3a;
  --paper: #f6f4ee;
  --paper-2: #edeae1;
  --white: #ffffff;
  --y1: #fdb515;
  --y2: #ffe11f;
  --grad: linear-gradient(90deg, var(--y1), var(--y2));
  --muted: #6f6c64;
  --muted-light: #a9a69d;
  --line: rgba(43, 43, 43, .12);
  --line-light: rgba(255, 255, 255, .12);

  --f-display: "Poppins", system-ui, sans-serif;
  --f-body: "DM Sans", system-ui, sans-serif;

  --pad: clamp(20px, 4vw, 56px);
  --container: 1360px;
  --radius: 22px;
  --ease: cubic-bezier(.65, 0, .35, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--y2); color: var(--ink); }
:focus-visible { outline: 2px solid var(--y1); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }
.muted { color: var(--muted); }
.skip { position: fixed; left: 16px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 16px; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.05; letter-spacing: -0.035em; }
.h-hero { font-size: clamp(3rem, 9.4vw, 9rem); line-height: .95; }
.h-hero--md { font-size: clamp(2.6rem, 7vw, 6.4rem); }
.h-xl { font-size: clamp(2.6rem, 7vw, 6.2rem); line-height: .98; }
.h-lg { font-size: clamp(2.1rem, 4.6vw, 4rem); }
.lead { font-size: clamp(1.2rem, 1.8vw, 1.5rem); line-height: 1.45; margin-bottom: 18px; font-family: var(--f-display); letter-spacing: -0.01em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-display); font-size: .8rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 22px;
}
.eyebrow--light { color: var(--muted-light); }
.eyebrow .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px rgba(253, 181, 21, .2); }

/* Yellow marker highlight (from the logo circle) */
.hl {
  background: var(--grad) no-repeat 0 88% / 100% .28em;
  padding-inline: .04em;
}
.js .hl { background-size: 0% .28em; transition: background-size 1.1s var(--ease-out) .6s; }
.js .is-in .hl, .anim-fallback .hl { background-size: 100% .28em; }
em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Split-line reveal */
.split__line { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.split-up { display: inline-block; will-change: transform; }
.js .split-up { transform: translateY(110%); }
.js .fade-up { opacity: 0; transform: translateY(40px); }
.anim-fallback .split-up, .anim-fallback .fade-up { transform: none !important; opacity: 1 !important; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--white); --fill: var(--grad); --fill-fg: var(--ink);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 28px; border-radius: 999px;
  font-family: var(--f-display); font-weight: 500; font-size: .98rem; letter-spacing: -0.01em;
  background: var(--bg); color: var(--fg);
  transition: color .45s var(--ease);
}
.btn::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 100%;
  width: 150%; aspect-ratio: 1; border-radius: 50%;
  background: var(--fill); transform: translate(-50%, 0) scale(0);
  transition: transform .6s var(--ease);
}
.btn:hover::before { transform: translate(-50%, -55%) scale(1); }
.btn:hover { color: var(--fill-fg); }
.btn .icon { width: 18px; height: 18px; transition: transform .45s var(--ease); }
.btn:hover .icon { transform: translateX(3px) rotate(-45deg); }
.btn--yellow { --bg: var(--grad); --fg: var(--ink); --fill: var(--ink); --fill-fg: var(--white); }
.btn--dark { --bg: var(--ink); --fg: var(--white); }
.btn--line { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); --fill: var(--ink); --fill-fg: var(--white); }
.btn--big { padding: 20px 34px; font-size: 1.05rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 28px;
  font-family: var(--f-display); font-weight: 500; border-bottom: 1.5px solid currentColor; padding-bottom: 4px;
}
.link-arrow .icon { width: 18px; transition: transform .4s var(--ease); }
.link-arrow:hover .icon { transform: translateX(5px); }

.ulink { background: linear-gradient(currentColor, currentColor) no-repeat 100% 100% / 0 1px; transition: background-size .5s var(--ease); }
.ulink:hover { background-position: 0 100%; background-size: 100% 1px; }

/* ---------- Logo mark ---------- */
.mark .mark__b { fill: var(--ink); }
.mark .mark__o { stroke: var(--mark-gap, var(--paper)); stroke-width: 9; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { width: 26px; height: auto; }
.brand__word { font-family: var(--f-display); font-size: 1.28rem; font-weight: 400; letter-spacing: -0.02em; white-space: nowrap; }
.brand__word b { font-weight: 600; }
.brand--light { color: var(--white); }
.brand--light .mark__b { fill: var(--white); }
.brand--light .mark { --mark-gap: var(--ink); }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 60; transition: transform .5s var(--ease), background .4s, box-shadow .4s; }
.nav__inner { display: flex; align-items: center; gap: 32px; height: 84px; }
.nav__links { display: flex; gap: 6px; margin-left: auto; padding: 6px; border-radius: 999px; background: rgba(255, 255, 255, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px var(--line); }
.nav__link { position: relative; padding: 9px 18px; border-radius: 999px; font-family: var(--f-display); font-size: .94rem; font-weight: 500; overflow: hidden; transition: background .3s; }
.nav__link > span { display: block; position: relative; transition: transform .45s var(--ease); }
.nav__link > span::after { content: attr(data-text); position: absolute; left: 0; top: calc(100% + 14px); }
.nav__link:hover > span { transform: translateY(calc(-100% - 14px)); }
.nav__link.is-active { background: var(--ink); color: var(--white); }
.nav__cta { padding: 13px 22px; }
.nav.is-scrolled { background: rgba(246, 244, 238, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav.is-scrolled .nav__links { background: transparent; box-shadow: none; }
.nav.is-hidden { transform: translateY(-100%); }

.burger { display: none; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); margin-left: auto; position: relative; z-index: 2; }
.burger span { position: absolute; left: 16px; right: 16px; height: 2px; background: var(--white); border-radius: 2px; transition: transform .5s var(--ease), top .5s var(--ease); }
.burger span:first-child { top: 21px; }
.burger span:last-child { top: 29px; }
.menu-open .burger { background: var(--y2); }
.menu-open .burger span { background: var(--ink); top: 25px; }
.menu-open .burger span:first-child { transform: rotate(45deg); }
.menu-open .burger span:last-child { transform: rotate(-45deg); }

.menu { position: fixed; inset: 0; z-index: 55; pointer-events: none; visibility: hidden; }
.menu__bg { position: absolute; inset: 0; background: var(--ink); clip-path: circle(0% at calc(100% - 46px) 42px); transition: clip-path .8s var(--ease); }
.menu__inner { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 48px; padding-top: 84px; color: var(--white); }
.menu__links a { display: flex; align-items: baseline; gap: 16px; font-family: var(--f-display); font-weight: 600; font-size: clamp(2.6rem, 11vw, 4.4rem); letter-spacing: -0.04em; line-height: 1.15; opacity: 0; transform: translateY(30px); transition: opacity .5s, transform .6s var(--ease-out); }
.menu__links a small { font-size: .9rem; color: var(--muted-light); letter-spacing: 0; font-weight: 400; }
.menu__links a.is-active { color: var(--y2); }
.menu__foot { display: grid; gap: 8px; color: var(--muted-light); opacity: 0; transition: opacity .5s .4s; }
.menu-open .menu { pointer-events: auto; visibility: visible; }
.menu-open .menu__bg { clip-path: circle(150% at calc(100% - 46px) 42px); }
.menu-open .menu__links a { opacity: 1; transform: none; }
.menu-open .menu__links a:nth-child(2) { transition-delay: .06s; }
.menu-open .menu__links a:nth-child(3) { transition-delay: .12s; }
.menu-open .menu__links a:nth-child(4) { transition-delay: .18s; }
.menu-open .menu__links a:nth-child(5) { transition-delay: .24s; }
.menu-open .menu__foot { opacity: 1; }
.menu-open .brand { position: relative; z-index: 2; color: var(--white); }
.menu-open .brand .mark__b { fill: var(--white); }
.menu-open .brand .mark { --mark-gap: var(--ink); }
.menu-open .nav { background: transparent; box-shadow: none; backdrop-filter: none; }
.menu-open .nav.is-hidden { transform: none; }
.menu { transition: visibility 0s .8s; }
.menu-open .menu { transition: none; }

/* ---------- Page wipe (logo circle) ---------- */
.wipe { position: fixed; inset: 0; z-index: 100; pointer-events: none; display: none; }
.js .wipe { display: block; }
.wipe__circle {
  position: absolute; left: var(--wx, 50%); top: var(--wy, 50%);
  width: 300vmax; height: 300vmax; border-radius: 50%;
  background: var(--grad); transform: translate(-50%, -50%) scale(1);
}
.anim-fallback .wipe { display: none; }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none;
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--ink); display: none;
  transition: width .4s var(--ease), height .4s var(--ease), margin .4s var(--ease), background .3s;
}
.has-cursor .cursor { display: grid; place-items: center; opacity: 0; }
.cursor__label { font-family: var(--f-display); font-size: .82rem; font-weight: 600; color: var(--ink); opacity: 0; transform: scale(.6); transition: opacity .3s, transform .4s var(--ease); white-space: nowrap; }
.cursor.is-hover { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: var(--grad); }
.cursor.is-hover .cursor__label { opacity: 1; transform: none; }
.cursor.is-link { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: rgba(253, 181, 21, .35); }
.cursor.is-dark { background: var(--y2); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(90px, 13vw, 180px); }
.section--tight { padding-block: clamp(50px, 7vw, 100px); }
.section--alt { background: var(--paper-2); }
.head-row { display: flex; justify-content: space-between; align-items: end; gap: 40px; flex-wrap: wrap; margin-bottom: clamp(40px, 6vw, 80px); }
.head-row__aside { max-width: 420px; color: var(--muted); font-size: 1.08rem; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 140px 0 90px; overflow: hidden; }
.hero__inner { position: relative; }
.hero__title { position: relative; z-index: 2; font-size: clamp(3rem, 8vw, 8.4rem); line-height: .93; max-width: 12ch; }
.hero__orb { position: absolute; z-index: 1; right: var(--pad); top: 50%; width: clamp(220px, 27vw, 430px); aspect-ratio: 236 / 350; transform: translateY(-56%); pointer-events: none; }
.orb-b { position: absolute; left: 3%; top: 1.7%; width: 66.5%; height: 50.8%; background: var(--ink); border-top-right-radius: 34% 32%; will-change: transform; }
.orb-o {
  position: absolute; left: 3%; bottom: 0; width: 95%; aspect-ratio: 1; border-radius: 50%;
  background: var(--grad); box-shadow: 0 0 0 clamp(5px, .7vw, 10px) var(--paper);
  overflow: hidden; will-change: transform;
}
.orb-o__shine { position: absolute; inset: 0; background: radial-gradient(circle at var(--sx, 30%) var(--sy, 25%), rgba(255, 255, 255, .55), transparent 45%); transition: background .2s; }
.hero__bottom { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: end; gap: 40px; flex-wrap: wrap; margin-top: clamp(40px, 6vw, 72px); }
.hero__lead { max-width: 520px; font-size: clamp(1.05rem, 1.4vw, 1.22rem); color: var(--muted); }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__rotator { position: relative; z-index: 2; display: flex; gap: 12px; align-items: center; margin-top: 40px; font-family: var(--f-display); }
.rotator { display: inline-block; padding: 6px 16px; border-radius: 999px; background: var(--ink); color: var(--y2); font-weight: 500; min-width: 10ch; text-align: center; }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid var(--ink); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--ink); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Marquee ---------- */
.marquee { background: var(--ink); color: var(--white); padding: 26px 0; overflow: hidden; transform: rotate(-1.5deg) scale(1.02); margin-block: 10px; }
.marquee__track { display: flex; align-items: center; gap: 36px; width: max-content; animation: marquee 38s linear infinite; }
.marquee__track span { font-family: var(--f-display); font-size: clamp(1.4rem, 3vw, 2.4rem); font-weight: 500; letter-spacing: -0.03em; white-space: nowrap; }
.marquee__dot { width: 18px; height: 18px; border-radius: 50%; background: var(--grad); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Intro statement ---------- */
.intro__grid { display: grid; grid-template-columns: 1fr 3fr; gap: 40px; }
.statement { font-family: var(--f-display); font-size: clamp(1.7rem, 3.6vw, 3.2rem); line-height: 1.18; letter-spacing: -0.03em; font-weight: 500; }
.statement--sm { font-size: clamp(1.4rem, 2.6vw, 2.3rem); }
.statement .w { opacity: .14; transition: opacity .3s; }
.statement .w.on, .anim-fallback .statement .w { opacity: 1; }

/* ---------- Services list (home) ---------- */
.srv-list { border-bottom: 1px solid var(--line); }
.srv-row a {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 80px 1.3fr 1fr 64px; align-items: center; gap: 24px;
  padding: clamp(24px, 3vw, 40px) 12px; border-top: 1px solid var(--line);
  transition: color .5s var(--ease), padding .5s var(--ease);
}
.srv-row a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease); }
.srv-row a:hover { color: var(--white); padding-inline: 32px; }
.srv-row a:hover::before { transform: scaleY(1); }
.srv-row__num { font-family: var(--f-display); color: var(--muted); }
.srv-row__title { font-family: var(--f-display); font-size: clamp(1.6rem, 3.4vw, 3rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.srv-row__desc { color: var(--muted); transition: color .5s; }
.srv-row a:hover .srv-row__desc { color: var(--muted-light); }
.srv-row__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); transition: background .5s, transform .6s var(--ease), box-shadow .5s; }
.srv-row__icon .icon { width: 26px; }
.srv-row a:hover .srv-row__icon { background: var(--grad); color: var(--ink); box-shadow: none; transform: rotate(-45deg); }

/* ---------- Project cards ---------- */
.pcard { display: block; }
.pcard__media { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--accent, var(--ink)); aspect-ratio: 16 / 10.5; }
.pcard__img { position: absolute; inset: 0; transition: transform 1s var(--ease-out); }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.pcard:hover .pcard__img { transform: scale(1.05); }
.pcard__media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); pointer-events: none; }
.pcard .pill { position: absolute; left: 16px; top: 16px; z-index: 2; }
.pcard__meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 20px; }
.pcard__meta h3 { font-size: clamp(1.3rem, 2vw, 1.75rem); letter-spacing: -0.03em; }
.pcard__arrow { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); transition: background .4s, transform .5s var(--ease); }
.pcard__arrow .icon { width: 18px; }
.pcard:hover .pcard__arrow { background: var(--grad); box-shadow: none; transform: rotate(45deg); }
.pcard__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pcard__tags span { font-size: .84rem; padding: 4px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 600; font-family: var(--f-display); background: rgba(255, 255, 255, .92); color: var(--ink); backdrop-filter: blur(6px); }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: #22a55a; box-shadow: 0 0 0 3px rgba(34, 165, 90, .2); }
.pill--wip i { background: var(--y1); box-shadow: 0 0 0 3px rgba(253, 181, 21, .25); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Mock UI for software / no-screenshot projects */
.mock { position: absolute; inset: 0; padding: 7% 8% 0; background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent, #555) 70%, transparent), transparent 60%), var(--ink-2); overflow: hidden; }
.mock::before { content: ""; position: absolute; width: 46%; aspect-ratio: 1; right: -10%; bottom: -18%; border-radius: 50%; background: var(--grad); opacity: .95; }
.mock__bar { position: relative; display: flex; gap: 6px; padding: 12px 14px; background: #2f2f2f; border-radius: 12px 12px 0 0; }
.mock__bar i { width: 9px; height: 9px; border-radius: 50%; background: #555; }
.mock__body { position: relative; display: grid; grid-template-columns: 22% 1fr; gap: 14px; height: 100%; padding: 16px; background: #262626; }
.mock__side { display: grid; gap: 10px; align-content: start; }
.mock__side b { height: 10px; border-radius: 6px; background: #3a3a3a; }
.mock__side b:first-child { background: var(--y1); width: 70%; }
.mock__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock__row span { height: 46px; border-radius: 10px; background: #333; }
.mock__chart { display: flex; align-items: end; gap: 8%; height: 45%; margin-top: 16px; padding: 12px; border-radius: 10px; background: #2f2f2f; }
.mock__chart em { flex: 1; height: var(--h); border-radius: 4px 4px 0 0; background: #4a4a4a; }
.mock__chart em:nth-child(4), .mock__chart em:nth-child(6) { background: var(--grad); }
.mock__badge { position: absolute; left: 8%; bottom: 9%; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 999px; background: var(--white); font-family: var(--f-display); font-weight: 600; font-size: .9rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.mock__icon { width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--ink); color: var(--y2); }

/* ---------- Horizontal featured work ---------- */
.hscroll { padding-block: clamp(70px, 10vw, 140px); overflow: hidden; }
.hscroll__head { display: flex; justify-content: space-between; align-items: end; gap: 30px; flex-wrap: wrap; margin-bottom: 56px; }
.hscroll__track { display: flex; gap: clamp(20px, 3vw, 44px); padding-inline: var(--pad); width: max-content; }
.pcard--h { width: clamp(300px, 40vw, 640px); }
.hscroll__end { width: clamp(240px, 26vw, 380px); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 22px; text-align: center; font-family: var(--f-display); font-size: clamp(1.6rem, 2.6vw, 2.4rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.hscroll__end-orb { width: clamp(120px, 14vw, 200px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--grad); transition: transform .6s var(--ease); }
.hscroll__end-orb .icon { width: 36%; }
.hscroll__end:hover .hscroll__end-orb { transform: scale(1.08) rotate(45deg); }

/* ---------- Numbers ---------- */
.numbers { background: var(--ink); color: var(--white); }
.numbers--compact { padding-block: clamp(60px, 8vw, 100px); }
.numbers__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.num { padding: 10px 28px; border-left: 1px solid var(--line-light); }
.num:first-child { border-left: 0; padding-left: 0; }
.num strong { display: block; font-family: var(--f-display); font-weight: 600; font-size: clamp(3.4rem, 7.4vw, 7rem); line-height: 1; letter-spacing: -0.05em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.num > span { color: var(--muted-light); display: block; margin-top: 12px; max-width: 18ch; }

/* ---------- Process ---------- */
.process__grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(40px, 8vw, 120px); align-items: start; }
.process__sticky { position: sticky; top: 130px; }
.process__sticky .muted { margin-top: 24px; max-width: 380px; }
.steps { counter-reset: s; }
.step { display: grid; grid-template-columns: 90px 1fr; gap: 20px; padding: 40px 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step__n { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-weight: 600; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); transition: background .5s; }
.step:hover .step__n { background: var(--grad); box-shadow: none; }
.step h3 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin-bottom: 10px; }
.step p { color: var(--muted); max-width: 46ch; }

/* ---------- Clients ---------- */
.clients__list { display: flex; flex-wrap: wrap; gap: 10px 0; }
.clients__list li { font-family: var(--f-display); font-size: clamp(1.5rem, 3.6vw, 3.2rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.2; }
.clients__list li:not(:last-child)::after { content: "/"; margin-inline: .35em; color: var(--y1); font-weight: 400; }
.clients__list a { color: var(--muted-light); transition: color .4s; }
.clients__list a:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--white); padding-top: clamp(80px, 12vw, 160px); border-radius: clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px) 0 0; margin-top: -1px; }
.footer__big { position: relative; display: block; font-family: var(--f-display); font-weight: 600; font-size: clamp(2.8rem, 8.2vw, 8.6rem); line-height: .95; letter-spacing: -0.05em; }
.footer__line { display: block; overflow: hidden; padding-bottom: .16em; margin-bottom: -.1em; }
.footer__orb { position: absolute; right: 0; top: 0; width: clamp(90px, 13vw, 200px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: var(--ink); transition: transform .7s var(--ease); }
.footer__orb .icon { width: 36%; }
.footer__big:hover .footer__orb { transform: rotate(45deg) scale(1.08); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-block: clamp(70px, 9vw, 120px) 60px; margin-top: clamp(60px, 8vw, 100px); border-top: 1px solid var(--line-light); }
.footer__brand p { color: var(--muted-light); margin-top: 20px; max-width: 34ch; }
.footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-light); font-weight: 500; margin-bottom: 20px; }
.footer li { margin-bottom: 10px; }
.footer .muted { color: var(--muted-light); }
.footer__social { display: flex; gap: 16px; margin-top: 18px; }
.footer__bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-block: 28px; border-top: 1px solid var(--line-light); color: var(--muted-light); font-size: .92rem; }

/* WhatsApp */
.wa { position: fixed; right: 22px; bottom: 22px; z-index: 50; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .6); }
.wa svg { width: 30px; }

/* ---------- Inner page hero ---------- */
.page-hero { padding: clamp(150px, 20vw, 230px) 0 clamp(30px, 5vw, 60px); }
.page-hero__lead { max-width: 640px; margin-top: 32px; font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); }
.page-hero__row { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.page-hero__icon { flex: none; width: clamp(80px, 10vw, 140px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--grad); }
.page-hero__icon .icon { width: 42%; }
.crumbs { display: flex; gap: 10px; color: var(--muted); font-family: var(--f-display); font-size: .9rem; margin-bottom: 28px; }
.crumbs a:hover { color: var(--ink); }

/* ---------- Services page ---------- */
.srv-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.srv-card { position: relative; display: flex; flex-direction: column; padding: clamp(28px, 3vw, 40px); border-radius: var(--radius); background: var(--white); box-shadow: inset 0 0 0 1px var(--line); transition: transform .6s var(--ease), box-shadow .5s; }
.srv-card:hover { transform: translateY(-8px); box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -30px rgba(0, 0, 0, .25); }
.srv-card__link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.srv-card__top { display: flex; justify-content: space-between; align-items: start; margin-bottom: 40px; }
.srv-card__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--y2); transition: background .5s, color .5s; }
.srv-card:hover .srv-card__icon { background: var(--grad); color: var(--ink); }
.srv-card__icon .icon { width: 28px; }
.srv-card__num { font-family: var(--f-display); color: var(--muted); }
.srv-card h2 { font-size: clamp(1.6rem, 2.3vw, 2.1rem); margin-bottom: 12px; }
.srv-card > p { color: var(--muted); margin-bottom: 24px; }
.srv-card .link-arrow { margin-top: auto; padding-top: 24px; border: 0; }
.srv-card--cta { background: var(--grad); box-shadow: none; justify-content: center; }
.srv-card--cta > p { color: var(--ink); opacity: .75; }
.srv-card--cta .btn { align-self: start; }
.srv-card__mark { width: 46px; margin-bottom: 30px; --mark-gap: var(--y1); }
.srv-card__mark .mark__o { fill: var(--white); }

.ticks { display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: start; }
.ticks .icon { flex: none; width: 22px; height: 22px; padding: 4px; margin-top: 2px; border-radius: 50%; background: var(--grad); stroke-width: 2.6; }
.ticks--lg li { font-size: 1.12rem; }

/* Service detail */
.detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(40px, 8vw, 120px); }
.deliver__list li { display: flex; gap: 20px; align-items: baseline; padding: 20px 0; border-top: 1px solid var(--line); font-family: var(--f-display); font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: 500; letter-spacing: -0.02em; }
.deliver__list li:last-child { border-bottom: 1px solid var(--line); }
.deliver__list span { font-size: .8rem; color: var(--muted); font-weight: 400; }

.faq-wrap { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(40px, 8vw, 120px); align-items: start; }
.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px 0; font-family: var(--f-display); font-size: clamp(1.1rem, 1.8vw, 1.4rem); font-weight: 500; letter-spacing: -0.02em; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__plus { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); transition: transform .5s var(--ease), background .4s; }
.faq__plus .icon { width: 18px; }
.faq__item[open] .faq__plus { transform: rotate(45deg); background: var(--grad); box-shadow: none; }
.faq__a { overflow: hidden; }
.faq__a p { padding-bottom: 26px; color: var(--muted); max-width: 60ch; }

.chips-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-link { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px 12px 14px; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--f-display); font-weight: 500; transition: background .4s, color .4s; }
.chip-link .icon { width: 20px; }
.chip-link:hover { background: var(--ink); color: var(--white); }

/* ---------- Work page ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 50px; }
.filter { padding: 12px 22px; border-radius: 999px; font-family: var(--f-display); font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); transition: background .4s, color .4s; }
.filter sup { font-size: .7em; color: var(--muted); margin-left: 2px; }
.filter:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.filter.is-active { background: var(--ink); color: var(--white); }
.filter.is-active sup { color: var(--y2); }
.grid-work { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(40px, 5vw, 70px) clamp(20px, 3vw, 40px); }
.grid-work--masonry .grid-work__item:nth-child(even) { margin-top: clamp(0px, 8vw, 120px); }
.grid-work__item.is-hidden { display: none; }
.grid-work--masonry.is-filtered .grid-work__item { margin-top: 0; }
.page-service .grid-work, .page-project .grid-work { grid-template-columns: repeat(3, 1fr); }

/* ---------- Case study ---------- */
.case-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.case-meta dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; font-family: var(--f-display); }
.case-meta dd { font-family: var(--f-display); font-weight: 500; font-size: 1.1rem; }
.case-meta .pill { background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.case-cover { position: relative; padding-bottom: 40px; }
.case-cover::before { content: ""; position: absolute; left: 0; right: 0; top: 18%; bottom: 0; background: var(--accent); opacity: .12; }
.case-cover .container { position: relative; }
.case-cover__frame { border-radius: clamp(14px, 2vw, 26px); overflow: hidden; box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .45); }
.case-cover__visit { position: absolute; right: calc(var(--pad) + 30px); bottom: -30px; z-index: 2; }
.browser { background: var(--white); }
.browser__bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; background: #ecebe6; }
.browser__bar i { width: 11px; height: 11px; border-radius: 50%; background: #d3d1ca; }
.browser__bar i:first-child { background: #ff6058; } .browser__bar i:nth-child(2) { background: #ffbd2e; } .browser__bar i:nth-child(3) { background: #28c940; }
.browser__bar span { margin-inline: auto; padding: 4px 18px; border-radius: 8px; background: var(--white); font-size: .82rem; color: var(--muted); }
.browser__view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--accent); }
.browser__view > img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.case-body { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(50px, 6vw, 90px) clamp(40px, 8vw, 120px); }
.case-text { font-family: var(--f-display); font-size: clamp(1.25rem, 2vw, 1.65rem); line-height: 1.4; letter-spacing: -0.02em; }

.next-case { display: block; background: var(--paper-2); padding-block: clamp(70px, 10vw, 140px); position: relative; overflow: hidden; isolation: isolate; }
.next-case::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); clip-path: circle(0% at 85% 50%); transition: clip-path .9s var(--ease); }
.next-case:hover::before { clip-path: circle(150% at 85% 50%); }
.next-case__inner { position: relative; display: grid; gap: 10px; }
.next-case__name { font-family: var(--f-display); font-weight: 600; font-size: clamp(2.4rem, 7vw, 6.4rem); letter-spacing: -0.045em; line-height: 1; max-width: 14ch; transition: color .6s; }
.next-case:hover .next-case__name { color: var(--white); }
.next-case__orb { position: absolute; right: var(--pad); top: 50%; translate: 0 -50%; width: clamp(80px, 10vw, 150px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--grad); transition: transform .6s var(--ease); }
.next-case__orb .icon { width: 36%; }
.next-case:hover .next-case__orb { transform: scale(1.1); }

/* ---------- About ---------- */
.name-story { display: grid; grid-template-columns: .8fr 1.6fr; gap: clamp(40px, 8vw, 120px); align-items: center; }
.name-story__mark { width: 100%; max-width: 320px; }
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.value { padding: 32px 28px; border-radius: var(--radius); background: var(--white); box-shadow: inset 0 0 0 1px var(--line); transition: background .5s, transform .6s var(--ease); }
.value:hover { background: var(--grad); transform: translateY(-6px); }
.value__n { display: block; font-family: var(--f-display); color: var(--muted); margin-bottom: 60px; }
.value:hover .value__n { color: var(--ink); }
.value h3 { font-size: 1.45rem; margin-bottom: 12px; }
.value p { color: var(--muted); }
.value:hover p { color: var(--ink); }
.split-2 { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 8vw, 120px); align-items: start; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .8fr 1.6fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.contact-info { display: grid; gap: 12px; position: sticky; top: 120px; }
.contact-info__item { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 18px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--f-display); font-weight: 500; word-break: break-word; transition: transform .5s var(--ease); }
a.contact-info__item:hover { transform: translateX(6px); }
.contact-info__item > span { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--y2); }
.contact-info__item .icon { width: 22px; }
.contact-info__item small { display: block; font-size: .78rem; color: var(--muted); font-weight: 400; text-transform: uppercase; letter-spacing: .08em; }
.form-card { padding: clamp(26px, 4vw, 56px); border-radius: clamp(20px, 3vw, 32px); background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.form { display: grid; gap: 30px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 24px; }
.field { border: 0; display: block; position: relative; }
.field legend { font-family: var(--f-display); font-weight: 500; margin-bottom: 14px; }
.field--float input, .field--float textarea {
  width: 100%; padding: 22px 0 10px; border: 0; border-bottom: 1.5px solid var(--line); background: transparent;
  font: inherit; font-size: 1.1rem; color: var(--ink); border-radius: 0; resize: vertical; transition: border-color .3s;
}
.field--float input:focus, .field--float textarea:focus { outline: none; border-color: var(--ink); }
.field--float > span { position: absolute; left: 0; top: 22px; color: var(--muted); pointer-events: none; transition: transform .35s var(--ease), font-size .35s var(--ease), color .3s; transform-origin: left; }
.field--float input:focus + span, .field--float input:not(:placeholder-shown) + span,
.field--float textarea:focus + span, .field--float textarea:not(:placeholder-shown) + span { transform: translateY(-22px) scale(.8); color: var(--ink); }
.field--float::after { content: ""; position: absolute; left: 0; right: 0; top: calc(100% - 1.5px - 1.4em); height: 1.5px; }
.field__err { display: block; min-height: 1.2em; margin-top: 6px; font-size: .85rem; color: #c0392b; }
.has-error input, .has-error textarea { border-color: #c0392b; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick__opt input { position: absolute; opacity: 0; pointer-events: none; }
.pick__opt span { display: inline-block; padding: 11px 18px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; font-size: .95rem; transition: background .3s, box-shadow .3s, color .3s; }
.pick__opt span:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.pick__opt input:checked + span { background: var(--ink); color: var(--white); box-shadow: none; }
.pick__opt input:focus-visible + span { outline: 2px solid var(--y1); outline-offset: 2px; }
.form .btn { justify-self: start; }
.form .btn[disabled] { opacity: .6; pointer-events: none; }
.form__alert { padding: 14px 18px; border-radius: 12px; background: #fdecea; color: #a5281b; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-success { text-align: center; padding: 40px 0; display: grid; justify-items: center; gap: 14px; }
.form-success[hidden], .form[hidden] { display: none; }
.form-success__mark { width: 70px; margin-bottom: 10px; --mark-gap: var(--white); }
.form-success h2 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.form-success p { color: var(--muted); margin-bottom: 14px; }

/* ---------- Legal / prose ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.6rem; margin: 40px 0 12px; }
.prose p { color: var(--muted); }
.prose a { text-decoration: underline; color: var(--ink); }

/* ---------- 404 ---------- */
.nf { min-height: 90svh; display: grid; place-items: center; padding: 140px 0 60px; text-align: center; }
.nf__inner { display: grid; justify-items: center; gap: 18px; }
.nf__code { display: flex; align-items: center; gap: 2vw; font-family: var(--f-display); font-weight: 600; font-size: clamp(7rem, 22vw, 16rem); line-height: 1; letter-spacing: -0.06em; }
.nf__mark { height: .82em; width: auto; animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-6deg); } }
.nf__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .srv-cards, .values { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .page-service .grid-work, .page-project .grid-work { grid-template-columns: repeat(2, 1fr); }
  .srv-row a { grid-template-columns: 56px 1fr 64px; }
  .srv-row__desc { display: none; }
}

@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .burger { display: block; }
  .nav__inner { height: 76px; }

  .hero { min-height: auto; padding-top: 130px; }
  .hero__orb { position: relative; right: auto; top: auto; transform: none; width: 34vw; max-width: 220px; margin: -10px 0 10px auto; order: -1; }
  .hero__inner { display: flex; flex-direction: column; }
  .scroll-cue { display: none; }

  .intro__grid, .process__grid, .detail-grid, .faq-wrap, .name-story, .split-2, .contact-grid { grid-template-columns: 1fr; }
  .process__sticky, .contact-info { position: static; }
  .numbers__grid { grid-template-columns: 1fr 1fr; gap: 40px 0; }
  .num:nth-child(3) { border-left: 0; padding-left: 0; }

  /* Featured work becomes a swipe carousel on touch screens */
  .hscroll__track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 20px; scrollbar-width: none; }
  .hscroll__track::-webkit-scrollbar { display: none; }
  .hscroll__track > * { scroll-snap-align: center; flex: none; }
  .pcard--h { width: 82vw; }
  .hscroll__end { width: 60vw; }

  .grid-work { grid-template-columns: 1fr 1fr; }
  .grid-work--masonry .grid-work__item:nth-child(even) { margin-top: 0; }
  .case-meta { grid-template-columns: 1fr 1fr; }
  .case-body { grid-template-columns: 1fr; }
  .case-cover__visit { position: static; margin-top: 24px; }
  .name-story__mark { max-width: 180px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .srv-cards, .values, .grid-work, .page-service .grid-work, .page-project .grid-work, .form__row, .footer__grid { grid-template-columns: 1fr; }
  .srv-row a { grid-template-columns: 1fr 52px; gap: 14px; }
  .srv-row__num { display: none; }
  .srv-row__icon { width: 52px; height: 52px; }
  .step { grid-template-columns: 1fr; gap: 16px; }
  .page-hero__row { flex-direction: column-reverse; align-items: start; }
  .footer__orb { position: relative; display: grid; margin-top: 24px; right: auto; bottom: auto; }
  .next-case__orb { display: none; }
  .hero__actions .btn { flex: 1; justify-content: center; }
  .wa { width: 52px; height: 52px; right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .split-up, .js .fade-up { transform: none; opacity: 1; }
  .statement .w { opacity: 1; }
  .js .wipe { display: none; }
}
