/* Kraft.Dev v2. Light: neutral bone + graphite ink + signal orange.
   Radius rule: interactive = pill, cards = 22px, images = 14px. */
:root {
  --bg: #f1f1ef;
  --bg-2: #e7e7e4;
  --bg-3: #dcdcd8;
  --ink: #16181c;
  --mute: #5c5f66;
  --dim: #c3c4c6;
  --ink-2: #3a3d43;
  --line: rgba(22, 24, 28, .11);
  --line-2: rgba(22, 24, 28, .2);
  --signal: #f8531c;
  --signal-ink: #1a0d07;
  --r-card: 22px;
  --r-img: 14px;
  --pad: clamp(20px, 4.4vw, 72px);
  --max: 1440px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: "Geologica", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 380;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
html.is-loading body { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--signal); color: var(--signal-ink); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 12px; }
.ic { width: 1em; height: 1em; flex: none; }

/* ---------- curtain ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 100;
  background: #16181c; color: #ece9e2;
  display: grid; place-items: center;
  clip-path: inset(0 0 0 0 round 0px);
}
html:not(.is-loading) .curtain { pointer-events: none; }
.curtain__brand { font-size: clamp(28px, 3.4vw, 44px); font-weight: 500; letter-spacing: -.03em; }
.curtain__brand i, .nav__logo i { font-style: normal; color: var(--signal); }
.curtain__count {
  position: absolute; left: var(--pad); bottom: calc(var(--pad) * .7);
  font-size: clamp(64px, 12vw, 180px); font-weight: 200; letter-spacing: -.06em; line-height: .8;
  font-variant-numeric: tabular-nums;
}
.curtain__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(236, 233, 226, .14); }
.curtain__bar i { display: block; height: 100%; width: 100%; background: var(--signal); transform-origin: 0 50%; transform: scaleX(0); }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--signal); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- nav ---------- */
.nav {
  position: fixed; z-index: 50;
  top: max(14px, env(safe-area-inset-top));
  left: 50%; transform: translateX(-50%);
  width: min(1100px, calc(100% - 28px));
  height: 60px;
  display: flex; align-items: center; gap: 24px;
  padding: 0 8px 0 24px;
  border-radius: 999px;
  background: rgba(241, 241, 239, .72);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  color: var(--ink);
  transition: transform .6s var(--ease), background .4s, color .4s;
}
.nav.nav--dark {
  --ink: #ece9e2; --mute: #9b9ea5; --bg: #121417; --line: rgba(236, 233, 226, .14);
  background: rgba(22, 24, 28, .62); color: var(--ink);
}
.nav.nav--dark .nav__links a.is-active { background: rgba(236, 233, 226, .08); }
.nav.nav--dark .burger { background: #24282e; }
.nav.is-hidden { transform: translate(-50%, calc(-100% - 30px)); }
.nav__logo { font-weight: 600; font-size: 19px; letter-spacing: -.03em; min-height: 44px; display: flex; align-items: center; }
.nav__logo .lg { display: inline-block; white-space: pre; will-change: transform; }
.nav__links { display: flex; gap: 4px; margin: 0 auto; }
.nav__links a { padding: 10px 14px; border-radius: 999px; color: var(--mute); font-size: 15px; transition: color .3s, background .3s; }
.nav__links a.is-active { color: var(--ink); background: rgba(22, 24, 28, .06); }
.nav__cta { height: 44px; }
.burger { display: none; }

/* text roll on hover: two stacked copies */
[data-roll] { display: inline-block; position: relative; overflow: hidden; vertical-align: top; }
[data-roll] .roll__a, [data-roll] .roll__b { display: block; transition: transform .55s var(--ease); }
[data-roll] .roll__b { position: absolute; left: 0; top: 100%; }
@media (hover: hover) {
  a:hover > [data-roll] .roll__a, [data-roll]:hover .roll__a, a:hover [data-roll] .roll__a { transform: translateY(-100%); }
  a:hover > [data-roll] .roll__b, [data-roll]:hover .roll__b, a:hover [data-roll] .roll__b { transform: translateY(-100%); }
  .nav__links a:hover { color: var(--ink); }
}

/* ---------- buttons ---------- */
.btn {
  --h: 54px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 26px;
  border-radius: 999px;
  font-size: 16px; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent;
  transition: background .35s var(--ease), color .35s, border-color .35s, transform .2s;
  will-change: transform;
}
.btn .ic { font-size: 19px; }
.btn--signal { background: var(--signal); color: var(--signal-ink); }
.btn--light { background: var(--ink); color: var(--bg); }
.btn--ghost { border-color: rgba(22, 24, 28, .28); color: var(--ink); background: rgba(241, 241, 239, .35); }
.btn--lg { --h: 64px; padding: 0 34px; font-size: 18px; }
@media (hover: hover) {
  .btn--signal:hover { background: #ff7445; }
  .btn--light:hover { background: #2c2f35; }
  .btn--ghost:hover { border-color: var(--ink); }
}
.btn:active { transform: scale(.97); }

.link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; border-bottom: 1px solid var(--line-2); padding-bottom: 4px; min-height: 44px; transition: border-color .3s, color .3s; }
.link .ic { transition: transform .4s var(--ease); }
@media (hover: hover) { .link:hover { border-color: var(--signal); } .link:hover .ic { transform: translate(3px, -3px); color: var(--signal); } }
.link-inline { color: var(--ink); border-bottom: 1px solid var(--signal); }

/* ---------- dark panels: light page, dark rounded sheets in a few places ---------- */
.is-dark {
  --ink: #ece9e2;
  --ink-2: #c9c7c1;
  --mute: #9b9ea5;
  --dim: #3d4148;
  --line: rgba(236, 233, 226, .12);
  --line-2: rgba(236, 233, 226, .22);
  --bg: #121417;
  --bg-2: #1b1e23;
  --bg-3: #24282e;
  background: #121417;
  color: var(--ink);
}
.panel {
  margin: 0 clamp(8px, 1.1vw, 18px);
  border-radius: clamp(26px, 3vw, 48px);
  overflow: hidden;
  position: relative;
  transform-origin: 50% 0;
}
.panel.is-dark::before, .footer.is-dark::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 85% 0%, rgba(248, 83, 28, .16), rgba(248, 83, 28, 0) 70%);
}
.panel > *, .footer > * { position: relative; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.hero__gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; background: var(--bg); }
.hero__shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(241, 241, 239, .94) 0%, rgba(241, 241, 239, .45) 36%, rgba(241, 241, 239, 0) 60%),
    linear-gradient(to right, rgba(241, 241, 239, .6) 0%, rgba(241, 241, 239, 0) 55%);
}
.hero__inner {
  padding-top: 112px; padding-bottom: clamp(40px, 7vh, 80px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(32px, 5vw, 90px); align-items: center;
}
.hero__text { min-width: 0; }
.hero__kicker { color: var(--mute); font-size: 16px; margin-bottom: 22px; }
.hero__title {
  font-size: clamp(44px, 5.6vw, 100px);
  font-weight: 300; line-height: .98; letter-spacing: -.05em;
}
.hero__title .line, .contact__title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero__title .w, .contact__title .w { display: inline-block; will-change: transform; }
.hero__foot { display: grid; gap: 28px; margin-top: clamp(26px, 4vh, 44px); }
.hero__lead { color: var(--ink-2); font-size: clamp(17px, 1.35vw, 20px); max-width: 44ch; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- device (CSS phone, live screen) ---------- */
.device-wrap { position: relative; margin: 0; perspective: 1400px; justify-self: end; transition: opacity 1.2s var(--ease) .5s, transform 1.4s var(--ease) .5s; }
html.js.is-loading .device-wrap { opacity: 0; transform: translateY(70px); }
.device {
  --w: clamp(268px, 21vw, 330px);
  transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg));
  transform-style: preserve-3d;
  position: relative; width: var(--w); aspect-ratio: 9 / 19.5;
  border-radius: calc(var(--w) * .165);
  padding: calc(var(--w) * .017);
  /* iPhone 17 Pro, Cosmic Orange: anodized aluminium band seen from the front */
  background:
    linear-gradient(90deg, rgba(255, 214, 180, .55), rgba(255, 214, 180, 0) 9%, rgba(255, 214, 180, 0) 91%, rgba(255, 214, 180, .45)),
    linear-gradient(160deg, #f19a62 0%, #dc6a2e 22%, #c4561f 48%, #d9662b 70%, #b04a19 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 226, 200, .6),
    inset 0 1px 1px rgba(255, 240, 225, .7),
    inset 0 -1px 2px rgba(90, 30, 8, .35),
    0 2px 3px rgba(120, 50, 20, .12),
    0 30px 60px -22px rgba(120, 50, 20, .38),
    0 60px 120px -40px rgba(22, 24, 28, .25);
}
.device__btn { position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #a9481a, #ec8a52); }
.device__btn--a { left: -3px; top: 17%; height: 4.5%; }
.device__btn--b { left: -3px; top: 25%; height: 8%; }
.device__btn--c { left: -3px; top: 35%; height: 8%; }
.device__btn--d { right: -3px; top: 28%; height: 12%; background: linear-gradient(270deg, #a9481a, #ec8a52); }
.device__btn--e { right: -2px; top: 58%; height: 7%; width: 3px; background: linear-gradient(270deg, #b85220, #f0a070); }
.screen {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: calc(var(--w) * .148);
  border: calc(var(--w) * .024) solid #050506;
  background: #0f1115; color: #e6e6e3;
  font-size: calc(var(--w) * .04);
  isolation: isolate;
}
.island { position: absolute; z-index: 20; top: 2.2%; left: 50%; transform: translateX(-50%); width: 32%; height: 4.6%; border-radius: 999px; background: #050506; }
.sbar {
  position: absolute; z-index: 15; top: 2.2%; left: 0; right: 0; height: 4.6%;
  display: grid; grid-template-columns: 1fr 34% 1fr; align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--font);
}
.sbar__time { justify-self: center; font-weight: 600; font-size: 1.12em; letter-spacing: -.01em; padding-left: .4em; font-variant-numeric: tabular-nums; }
.sbar__ic { grid-column: 3; justify-self: center; display: flex; align-items: center; gap: .3em; padding-right: .3em; }
.sbar__ic svg { display: block; height: .82em; width: auto; fill: currentColor; }
.ios-signal { width: 1.23em !important; }
.ios-wifi { width: 1.16em !important; height: .9em !important; }
.ios-bat { width: 1.9em !important; height: .9em !important; }
.home-ind { position: absolute; z-index: 16; left: 50%; bottom: 1.1%; transform: translateX(-50%); width: 36%; height: .42em; border-radius: 999px; background: rgba(255, 255, 255, .85); }
.screen.hi-dark .home-ind { background: rgba(0, 0, 0, .85); }
.screen.sb-dark .sbar { color: #111; }

/* IDE scene */
.ide { position: absolute; inset: 0; padding-top: 4.3em; display: flex; flex-direction: column; background: #0f1115; }
.ide__tabs { display: flex; gap: 2px; padding: 0 4%; font-family: var(--mono); font-size: .78em; color: #6c717a; border-bottom: 1px solid #1d2026; }
.ide__tabs span { padding: .7em .8em .6em; border-radius: .5em .5em 0 0; }
.ide__tabs .is-on { color: #e6e6e3; background: #171a1f; box-shadow: inset 0 2px 0 var(--signal); }
.ide__body { position: relative; flex: 1; overflow: hidden; background: #171a1f; }
.ide__code { position: absolute; left: 0; right: 0; top: 0; padding: .9em 0; font-family: var(--mono); font-variant-ligatures: none; font-size: .8em; line-height: 1.62; will-change: transform; transition: transform .35s var(--ease); }
.cl { display: flex; white-space: pre; height: 1.62em; }
.cl[hidden] { display: none; }
.cl__n { flex: none; width: 2.6em; padding-right: .9em; text-align: right; color: #454a53; }
.cl__t { overflow: hidden; width: 0; flex: none; }
.cl.is-cur .cl__t { position: relative; overflow: visible; }
.caret { display: inline-block; width: .5em; height: 1.15em; vertical-align: -.2em; background: var(--signal); margin-left: 1px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.tk-k { color: #ff7a4a; } .tk-s { color: #d9c9a0; } .tk-c { color: #5f6570; } .tk-d { color: #f0a36c; } .tk-f { color: #f2f2ef; } .tk-n { color: #9fc6ff; }
.term {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background: #0b0c0f; border-top: 1px solid #23262d;
  font-family: var(--mono); font-size: .76em; line-height: 1.7;
  transform: translateY(101%); transition: transform .6s var(--ease);
}
.term.is-on { transform: none; }
.term__head { padding: .55em 1.1em; color: #6c717a; border-bottom: 1px solid #1d2026; font-family: var(--font); font-size: 1.05em; }
.term__log { padding: .6em 1.1em; }
.term__log div { white-space: pre; animation: termIn .3s var(--ease) both; }
.term__log .ok { color: #7fd08a; }
.term__log .go { color: #ff8a5c; }
@keyframes termIn { from { opacity: 0; transform: translateY(4px); } }

/* Telegram scene */
.tg {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  /* Telegram-style default wallpaper: soft four-colour green gradient + our own doodle tile */
  background:
    url("img/tg-pattern.svg") 0 0 / calc(var(--w) * 1.02) auto repeat,
    radial-gradient(70% 55% at 12% 8%, #d6e3a3, rgba(214, 227, 163, 0) 70%),
    radial-gradient(60% 50% at 92% 30%, #8fc39a, rgba(143, 195, 154, 0) 70%),
    radial-gradient(70% 60% at 20% 92%, #b9d79a, rgba(185, 215, 154, 0) 70%),
    radial-gradient(60% 50% at 85% 88%, #c9dc9e, rgba(201, 220, 158, 0) 70%),
    #a9cf98;
  color: #111;
  clip-path: circle(0% at 50% 88%);
  transition: clip-path 1s cubic-bezier(.7, 0, .2, 1);
}
.screen.is-chat .tg { clip-path: circle(150% at 50% 88%); }
.tg__head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 4.3em 4% .6em;
  background: rgba(247, 247, 247, .94); border-bottom: .5px solid rgba(0, 0, 0, .14);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--font);
}
.tg__back { display: flex; align-items: center; gap: .1em; color: #0a84ff; font-size: 1.02em; justify-self: start; }
.tg__back svg { width: 1.35em; height: 1.35em; margin-left: -.3em; }
.tg__ava { justify-self: end; width: 2.3em; height: 2.3em; border-radius: 50%; background: #16181c; color: var(--signal); display: grid; place-items: center; font-weight: 600; }
.tg__who { display: flex; flex-direction: column; align-items: center; line-height: 1.2; text-align: center; }
.tg__who b { font-weight: 600; font-size: 1.02em; white-space: nowrap; }
.tg__who small { color: #8a8d92; font-size: .82em; }
.tg__log { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: .45em; padding: .8em 4%; overflow: hidden; }
.m { max-width: 82%; padding: .55em .8em; border-radius: 1.05em; line-height: 1.32; font-size: .98em; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); animation: msgIn .45s var(--ease) both; transform-origin: 0 100%; }
.m small { display: block; margin-top: .25em; font-size: .78em; opacity: .55; }
.m--bot { align-self: flex-start; background: #fff; border-bottom-left-radius: .35em; }
.m--me { align-self: flex-end; background: #16181c; color: #fff; border-bottom-right-radius: .35em; transform-origin: 100% 100%; }
.m--ok { align-self: flex-start; background: #eaf6ea; color: #24613a; border-bottom-left-radius: .35em; }
.keys { display: flex; gap: .4em; animation: msgIn .45s var(--ease) both; }
.keys span { flex: 1; text-align: center; padding: .55em .6em; border-radius: .8em; background: rgba(255, 255, 255, .78); font-size: .92em; font-weight: 500; transition: background .25s, color .25s, transform .2s; }
.keys span.pay { background: var(--signal); color: #fff; }
.keys span.is-tap { transform: scale(.94); filter: brightness(.9); }
.typing { align-self: flex-start; display: flex; gap: .25em; padding: .7em .9em; background: #fff; border-radius: 1.05em; animation: msgIn .3s var(--ease) both; }
.typing i { width: .42em; height: .42em; border-radius: 50%; background: #9aa0a6; animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.tg__input { display: flex; align-items: center; gap: .7em; margin: 0 3% 8.5%; padding: .65em .9em; border-radius: 999px; background: rgba(255, 255, 255, .9); color: #9a9da2; }
.tg__input svg { width: 1.25em; height: 1.25em; flex: none; }
.tg__input span { flex: 1; }
.glare { position: absolute; inset: 0; z-index: 30; pointer-events: none; border-radius: inherit; background: linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .09) 45%, rgba(255, 255, 255, 0) 60%); background-size: 250% 100%; background-position: var(--gx, 60%) 0; }

.toast {
  position: absolute; z-index: 5; left: calc(var(--tw, 0px) - 22%); bottom: 9%;
  width: 66%; padding: 1.1em 1.3em 1.2em; border-radius: 18px;
  background: #16181c; color: #ece9e2;
  box-shadow: 0 30px 60px -20px rgba(22, 24, 28, .45);
  display: flex; flex-direction: column; gap: .2em;
  font-size: clamp(13px, 1vw, 15px);
  opacity: 0; transform: translateY(18px) scale(.96);
  transition: opacity .5s var(--ease), transform .7s var(--ease);
}
.toast.is-on { opacity: 1; transform: none; }
.toast__t { color: #9b9ea5; }
.toast__sum { font-size: 2.6em; font-weight: 500; color: var(--signal); letter-spacing: -.03em; line-height: 1.05; }
.toast__day { color: #9b9ea5; } .toast__day b { color: #ece9e2; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- marquee ---------- */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 22px 0; }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__set { display: flex; flex: none; }
.marquee__set span { font-size: clamp(22px, 2.6vw, 36px); font-weight: 300; letter-spacing: -.02em; color: var(--mute); padding: 0 clamp(18px, 2vw, 32px); display: flex; align-items: center; gap: clamp(18px, 2vw, 32px); white-space: nowrap; }
.marquee__set span::after { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--dim); }

/* ---------- manifesto ---------- */
.manifesto { padding-top: clamp(100px, 14vw, 200px); padding-bottom: clamp(100px, 14vw, 200px); margin-top: clamp(60px, 8vw, 120px); margin-bottom: clamp(90px, 11vw, 160px); }
.manifesto__text {
  font-size: clamp(30px, 4.3vw, 66px); font-weight: 300; line-height: 1.12; letter-spacing: -.035em;
  max-width: 22ch; text-wrap: pretty;
}
.manifesto__text .fw { color: var(--dim); transition: color .25s linear; }
.manifesto__text .fw.on { color: var(--ink); }
.manifesto__text .fw.sig.on { color: var(--signal); }

/* ---------- section heads ---------- */
.sec-title { font-size: clamp(38px, 5.2vw, 82px); font-weight: 300; line-height: 1; letter-spacing: -.045em; text-wrap: balance; }
.sec-sub { color: var(--mute); font-size: clamp(17px, 1.3vw, 19px); max-width: 52ch; margin-top: 22px; }
.sec-head { margin-bottom: clamp(48px, 7vw, 96px); }

/* ---------- services ---------- */
.services { padding-bottom: clamp(100px, 13vw, 180px); }
.svc-group { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px; padding-top: 28px; border-top: 1px solid var(--line-2); margin-bottom: clamp(48px, 6vw, 84px); }
.svc-group__name { font-size: clamp(22px, 2vw, 30px); font-weight: 300; letter-spacing: -.025em; color: var(--ink); position: sticky; top: 110px; align-self: start; padding-top: 18px; }
.svc-list { min-width: 0; }
.svc {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) 120px 92px 28px; column-gap: 20px; align-items: baseline;
  padding: 22px 18px; margin: 0 -18px;
  border-radius: 16px;
  border-bottom: 1px solid var(--line);
}
.svc:last-child { border-bottom: 0; }
.svc::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--bg-2);
  transform: scaleY(.6); opacity: 0;
  transition: transform .5s var(--ease), opacity .35s;
}
.svc__name { font-size: clamp(21px, 2.1vw, 30px); font-weight: 400; letter-spacing: -.025em; line-height: 1.2; transition: transform .5s var(--ease); }
.svc__price { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.svc__term { color: var(--mute); white-space: nowrap; }
.svc__arrow { font-size: 22px; color: var(--mute); align-self: center; transition: transform .5s var(--ease), color .3s; }
.svc__desc { grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease); }
.svc__desc > span { overflow: hidden; color: var(--mute); max-width: 62ch; opacity: 0; transition: opacity .4s, padding .55s var(--ease); }
@media (hover: hover) {
  .svc:hover::before, .svc:focus-visible::before { transform: none; opacity: 1; }
  .svc:hover .svc__name { transform: translateX(8px); }
  .svc:hover .svc__arrow { transform: rotate(45deg); color: var(--signal); }
  .svc:hover .svc__desc { grid-template-rows: 1fr; }
  .svc:hover .svc__desc > span { opacity: 1; padding-top: 12px; }
}

/* ---------- bento ---------- */
.eng { padding-bottom: clamp(100px, 13vw, 180px); }
.eng__title { max-width: 16ch; margin-bottom: clamp(44px, 6vw, 80px); }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.cell {
  --mx: 50%; --my: 50%;
  position: relative; overflow: hidden; isolation: isolate;
  background: #fafaf8;
  border-radius: var(--r-card);
  padding: clamp(24px, 2.6vw, 36px);
  display: flex; flex-direction: column; gap: 12px;
  min-height: 300px;
}
.cell::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: 2; pointer-events: none;
  background: radial-gradient(380px circle at var(--mx) var(--my), rgba(248, 83, 28, .6), rgba(22, 24, 28, .08) 45%, rgba(22, 24, 28, .06));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.cell h3 { font-size: clamp(21px, 1.8vw, 26px); font-weight: 400; letter-spacing: -.025em; line-height: 1.2; max-width: 22ch; }
.cell p { color: var(--mute); font-size: 16px; max-width: 46ch; }
.cell__big { font-weight: 200; letter-spacing: -.06em; line-height: .85; }
.cell--code { grid-column: span 7; }
.cell--pulse { grid-column: span 5; }
.cell--x { grid-column: span 4; }
.cell--app { grid-column: span 4; padding-bottom: 0; }
.cell--py { grid-column: span 4; background: radial-gradient(120% 90% at 100% 100%, rgba(248, 83, 28, .32), rgba(248, 83, 28, 0) 60%), #fafaf8; justify-content: flex-end; }
.cell--own { grid-column: span 12; flex-direction: row; align-items: center; gap: clamp(24px, 5vw, 80px); min-height: 0; }

.code {
  margin: auto 0 0; padding: 20px 22px; border-radius: var(--r-img);
  background: #16181c; border: 1px solid #16181c;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.7; color: #b9bcc2;
  overflow-x: auto;
}
.code code { display: flex; flex-direction: column; }
.code .l { display: block; white-space: pre; }
.code b.k { font-weight: 400; color: #ff7a4a; }
.code s { text-decoration: none; color: #d8c9a6; }
.code em { font-style: normal; color: #ece9e2; }
.code i { font-style: normal; color: #6b7079; }

.cell--pulse .cell__big { font-size: clamp(80px, 9vw, 140px); margin-top: auto; }
.pulse { width: 100%; height: 80px; margin-top: 18px; overflow: visible; }
.pulse .pulse__base { stroke: rgba(22, 24, 28, .18); }
.pulse path { fill: none; stroke: var(--signal); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.cell__big--x { font-size: clamp(110px, 12vw, 180px); color: var(--ink); margin-bottom: auto; }
.cell__shot { order: 2; margin-top: auto; align-self: center; flex: none; width: 52%; max-width: 210px; height: 170px; border-radius: 18px 18px 0 0; overflow: hidden; border: 1px solid var(--line-2); border-bottom: 0; transform: translateY(14px); transition: transform .6s var(--ease); }
.cell--app > div:last-child { display: flex; flex-direction: column; gap: 12px; }
.cell__shot img { width: 100%; }
@media (hover: hover) { .cell--app:hover .cell__shot { transform: translateY(0); } }
.cell__big--brace { font-size: clamp(80px, 10vw, 150px); color: var(--signal); flex: none; }

/* ---------- platform ---------- */
.platform { overflow: hidden; }
.platform__inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 100px); padding-top: clamp(100px, 12vw, 170px); padding-bottom: clamp(100px, 12vw, 170px); align-items: center; }
.platform .sec-title { max-width: 12ch; }
.platform__lead { color: var(--ink-2); font-size: clamp(17px, 1.4vw, 21px); margin-top: 30px; max-width: 54ch; }
.platform__list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin: 40px 0 34px; }
.platform__list li { padding: 16px 0 16px 26px; border-top: 1px solid var(--line); position: relative; font-size: 16px; }
.platform__list li::before { content: ""; position: absolute; left: 2px; top: 25px; width: 10px; height: 1px; background: var(--signal); }
.platform__note { color: var(--mute); font-size: 15px; max-width: 58ch; margin-bottom: 26px; }
.platform__phones { position: relative; height: clamp(520px, 52vw, 700px); }
.phone { position: absolute; margin: 0; width: 58%; border-radius: 34px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 40px 80px -34px rgba(22, 24, 28, .35); background: #fff; will-change: transform; }
.phone img { width: 100%; }
.phone--a { left: 0; top: 0; }
.phone--b { right: 0; top: 16%; }

/* ---------- works ---------- */
.works { position: relative; padding: clamp(100px, 12vw, 160px) 0 clamp(60px, 7vw, 100px); }
@media (min-width: 761px) { .works { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 90px 0 110px; } }
.works__track { display: flex; align-items: flex-start; gap: clamp(18px, 2vw, 32px); padding: 0 var(--pad); width: max-content; will-change: transform; }
.works__head { width: min(400px, 78vw); flex: none; padding-right: 20px; align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; }
.works__head p { color: var(--mute); max-width: 30ch; margin-top: 22px; }
.work { width: clamp(300px, 44vw, 680px); flex: none; display: block; }
.work__img { border-radius: var(--r-img); overflow: hidden; aspect-ratio: 16 / 10; background: var(--bg-2); position: relative; transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
/* the whole screenshot is shown: 1200x750 files in a 16:10 frame, no crop, no zoom */
.work__img img { width: 100%; height: 100%; object-fit: contain; }
.work h3 { font-size: clamp(20px, 1.7vw, 26px); font-weight: 400; letter-spacing: -.02em; margin-top: 20px; display: flex; justify-content: space-between; gap: 12px; }
.work p { color: var(--mute); font-size: 15px; margin-top: 6px; max-width: 46ch; }
@media (hover: hover) {
  .work:hover .work__img { transform: translateY(-8px); box-shadow: 0 28px 50px -24px rgba(22, 24, 28, .35); }
}
.works__end { width: clamp(280px, 30vw, 440px); flex: none; align-self: stretch; aspect-ratio: auto; border-radius: var(--r-card); background: var(--bg-2); border: 1px dashed var(--line-2); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 24px; padding: 36px; min-height: 260px; }
.works__end p { font-size: clamp(24px, 2.2vw, 34px); font-weight: 300; letter-spacing: -.03em; line-height: 1.15; }
.works__bar { position: absolute; left: var(--pad); right: var(--pad); bottom: clamp(30px, 3vw, 50px); height: 1px; background: var(--line); }
.works__bar i { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- process ---------- */
.process { padding-top: clamp(100px, 12vw, 160px); padding-bottom: clamp(100px, 12vw, 160px); }
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: clamp(56px, 7vw, 96px); padding-top: 54px; }
.steps__line { position: absolute; left: 0; right: 0; top: 13px; height: 1px; background: var(--line-2); }
.steps__line i { display: block; height: 100%; background: var(--signal); transform-origin: 0 50%; transform: scaleX(0); }
.step { position: relative; }
.step__n {
  position: absolute; top: -54px; left: 0;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 500;
  background: var(--bg); border: 1px solid var(--line-2); color: var(--mute);
  transition: background .4s, color .4s, border-color .4s;
}
.step.on .step__n { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.step h3 { font-size: clamp(21px, 1.8vw, 26px); font-weight: 400; letter-spacing: -.025em; line-height: 1.2; }
.step p { color: var(--mute); margin-top: 12px; font-size: 16px; max-width: 30ch; }

/* ---------- faq ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 100px); padding-bottom: clamp(100px, 12vw, 160px); }
.faq__side { position: sticky; top: 120px; align-self: start; }
.faq__side .sec-title { max-width: 10ch; }
.qa { border-top: 1px solid var(--line-2); }
.qa:last-child { border-bottom: 1px solid var(--line-2); }
.qa summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 0; min-height: 44px;
  font-size: clamp(18px, 1.6vw, 23px); letter-spacing: -.02em; font-weight: 400;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary .ic { font-size: 22px; color: var(--mute); transition: transform .5s var(--ease), color .3s; }
.qa[open] summary .ic { transform: rotate(45deg); color: var(--signal); }
@media (hover: hover) { .qa summary:hover .ic { color: var(--ink); } }
.qa__a { overflow: hidden; }
.qa__a p { color: var(--mute); padding: 0 48px 28px 0; max-width: 62ch; }

/* ---------- contact + footer ---------- */
.contact { padding-top: clamp(90px, 11vw, 160px); padding-bottom: clamp(60px, 8vw, 100px); }
.contact__title { font-size: clamp(52px, 9vw, 150px); font-weight: 300; line-height: .95; letter-spacing: -.055em; }
.contact__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-top: clamp(36px, 5vw, 64px); flex-wrap: wrap; }
.contact__row p { color: var(--mute); max-width: 40ch; font-size: clamp(17px, 1.4vw, 20px); }

.footer {
  position: relative; overflow: hidden;
  margin: 0 clamp(8px, 1.1vw, 18px);
  border-radius: clamp(26px, 3vw, 48px) clamp(26px, 3vw, 48px) 0 0;
  padding-bottom: max(26px, env(safe-area-inset-bottom));
  transform-origin: 50% 0;
}
.wordmark {
  display: flex; justify-content: center; align-items: baseline;
  font-size: clamp(90px, 22.5vw, 390px); line-height: .78; letter-spacing: -.06em;
  font-weight: 200; user-select: none; padding: 0 2vw;
  margin-bottom: clamp(20px, 3vw, 40px);
}
.wordmark span { display: inline-block; font-variation-settings: "wght" var(--w, 200); font-weight: var(--w, 200); will-change: transform; }
.wordmark .dot { color: var(--signal); }
.footer__row { display: flex; justify-content: space-between; gap: 18px 32px; flex-wrap: wrap; color: var(--mute); font-size: 14px; border-top: 1px solid var(--line); padding-top: 22px; }
.footer__row a { min-height: 44px; display: inline-flex; align-items: center; margin: -12px 0; }
@media (hover: hover) { .footer__row a:hover { color: var(--ink); } }

.grain {
  /* plain alpha, no blend mode: a blended fixed layer makes the browser re-mix the whole page every frame */
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* reveal initial states, only when JS runs */
html.js [data-reveal] { opacity: 0; transform: translateY(28px); }
html.js .hero [data-hero-in] { opacity: 0; transform: translateY(20px); }

/* ---------- mobile menu ---------- */
.mnav {
  position: fixed; inset: 0; z-index: 45;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 28px;
  padding: 110px var(--pad) max(32px, env(safe-area-inset-bottom));
  height: 100dvh;
}
.mnav[hidden] { display: none; }
.mnav nav { display: flex; flex-direction: column; }
.mnav nav a { font-size: 40px; font-weight: 300; letter-spacing: -.04em; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mnav .btn { align-self: stretch; }
.mnav__note { color: var(--mute); font-size: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav { gap: 10px; justify-content: space-between; }
  .burger {
    display: grid; place-content: center; gap: 6px;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--bg-3); border: 0; cursor: pointer; padding: 0;
  }
  .burger i { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform .4s var(--ease); }
  .burger[aria-expanded="true"] i:first-child { transform: translateY(3.75px) rotate(45deg); }
  .burger[aria-expanded="true"] i:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav__cta { margin-left: auto; }
  .cell--code { grid-column: span 12; }
  .cell--pulse, .cell--x, .cell--app, .cell--py { grid-column: span 6; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 56px; }
  .steps__line { display: none; }
  .platform__inner { grid-template-columns: 1fr; }
  .platform__phones { height: auto; aspect-ratio: 1 / .95; max-width: 560px; width: 100%; margin: 0 auto; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { height: 56px; padding-left: 18px; }
  .nav__cta { display: none; }
  .hero__inner { grid-template-columns: 1fr; padding-top: 110px; }
  .device-wrap { justify-self: center; margin-top: 18px; }
  .device { --w: min(76vw, 300px); }
  .toast { left: -10%; width: 72%; font-size: 13px; }
  .hero__ctas .btn { flex: 1 1 auto; }
  .svc-group { grid-template-columns: 1fr; gap: 4px; }
  .svc-group__name { position: static; padding-top: 0; }
  .svc { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; padding: 20px 0; margin: 0; border-radius: 0; }
  .svc::before { display: none; }
  .svc__name { grid-column: 1 / -1; }
  .svc__price { grid-column: 1; }
  .svc__term { grid-column: 2; grid-row: 2; text-align: right; }
  .svc__arrow { display: none; }
  .svc__desc { grid-template-rows: 1fr; }
  .svc__desc > span { opacity: 1; padding-top: 4px; font-size: 15px; }
  .cell--pulse, .cell--x, .cell--app, .cell--py, .cell--own { grid-column: span 12; }
  .cell { min-height: 0; }
  .cell--x .cell__big--x { margin-bottom: 8px; }
  .cell--own { flex-direction: column; align-items: flex-start; }
  .code { padding: 16px; }
  .platform__list { grid-template-columns: 1fr; }
  .works { padding-bottom: 40px; }
  .works__track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 18px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .works__track::-webkit-scrollbar { display: none; }
  .works__head { width: 100%; }
  .work, .works__end { width: 82vw; scroll-snap-align: center; }
  .code { font-size: 10.5px; }
  .works__track { flex-wrap: nowrap; }
  .works__head { display: none; }
  .works::before { content: ""; }
  .works__bar { display: none; }
  .steps { grid-template-columns: 1fr; padding-top: 0; padding-left: 50px; row-gap: 40px; }
  .steps__line { display: block; left: 13px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .steps__line i { width: 100%; height: 100%; transform-origin: 50% 0; transform: scaleY(0); }
  .step__n { top: -2px; left: -50px; }
  .faq { grid-template-columns: 1fr; }
  .faq__side { position: static; }
  .qa__a p { padding-right: 0; }
  .contact__row .btn { width: 100%; }
  .footer__row { flex-direction: column; }
  .curtain__count { bottom: 40px; }
}

/* mobile works title (shown above the swipe row) */
.works__mhead { display: none; }
@media (max-width: 760px) {
  .works__mhead { display: block; padding: 0 var(--pad); margin-bottom: 34px; }
  .works__mhead p { color: var(--mute); margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html.js [data-reveal], html.js .hero [data-hero-in] { opacity: 1; transform: none; }
  .manifesto__text .fw { color: var(--ink); }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--bg-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* touch devices: no blend-mode grain, no backdrop blur over moving content (iOS repaints them every scroll frame) */
@media (hover: none), (pointer: coarse) {
  .grain { display: none; }
  .nav { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(241, 241, 239, .94); }
  .nav.nav--dark { background: rgba(22, 24, 28, .94); }
  .tg__head { -webkit-backdrop-filter: none; backdrop-filter: none; background: #f7f7f7; }
  .device-wrap { transition-delay: .2s; }
}
