/* =====================================================================
   proffi — marketing site (proffi.xyz)
   Conservative light theme: white and cool off-white surfaces, graphite
   ink, 1px hairlines, soft layered shadows and the brand blue #0084FF as
   the only accent (primary actions, focus, key data points). Dark graphite
   only for the footer and the phone bezel. Tokens are shared with
   apps/landing-page — see README «Токены».
   ===================================================================== */

/* Logo wordmark only (official logo), latin only. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(../fonts/plus-jakarta-sans-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Inter 4 with the optical-size axis: the Display cut is used automatically
   at heading sizes, the Text cut at body sizes (font-optical-sizing: auto).
   Cyrillic + latin are preloaded; the swap lands on a metric-matched fallback. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter-cyrillic-opsz-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter-latin-opsz-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Kazakh / Tajik / Kyrgyz / Uzbek letters, cut from Inter's cyrillic-ext
   (9 KB instead of 41 KB; command in README). */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter-cyrillic-ca-opsz-normal.woff2) format('woff2');
  unicode-range: U+0492-0493, U+049A-049B, U+04A2-04A3, U+04AE-04AF, U+04B2-04B3, U+04B6-04B7, U+04BA-04BB, U+04D8-04D9, U+04E2-04E3, U+04E8-04E9, U+04EE-04EF;
}
/* Metric-matched fallbacks (fontTools, Russian + Latin sample, Inter 400). */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Segoe UI');
  font-weight: 100 900;
  size-adjust: 107.6%;
  ascent-override: 90.1%;
  descent-override: 22.4%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Inter Fallback A';
  src: local('Arial'), local('ArialMT');
  font-weight: 100 900;
  size-adjust: 106%;
  ascent-override: 91.4%;
  descent-override: 22.8%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;
  /* surfaces */
  --bg: #ffffff;
  --bg-2: #f6f8fb; /* alternate bands */
  --surface: #ffffff; /* cards */
  --surface-2: #f6f8fb;
  --surface-3: #eef2f7;
  /* 1px hairlines */
  --line: #e3e8ef;
  --line-2: #d6dde6;
  --line-3: #c3ccd8;
  /* graphite ink: 18.0 / 7.7 / 5.4 : 1 on white (5.1 / 4.8 on the off-whites) */
  --ink: #0f1723;
  --ink-2: #475467;
  --ink-3: #5f6b7a;
  /* the one accent */
  --accent: #0084ff;
  --accent-strong: #0a6ed1; /* button fill: white text 5.0:1; also blue text on white */
  --accent-strong-hover: #085db3;
  --accent-text: #0a6ed1;
  --accent-soft: rgba(0, 132, 255, 0.08);
  /* dark graphite, used sparingly (footer, phone bezel) */
  --dark: #0f1419;
  --dark-ink: #eceef1;
  --dark-ink-2: #aab1bb;
  --dark-ink-3: #858d98;
  --dark-line: #262b32;
  /* soft layered elevation */
  --shadow-1: 0 1px 2px rgba(15, 23, 35, 0.05);
  --shadow-2: 0 1px 2px rgba(15, 23, 35, 0.04), 0 8px 24px -12px rgba(15, 23, 35, 0.14);
  --shadow-3: 0 1px 2px rgba(15, 23, 35, 0.04), 0 12px 32px -14px rgba(15, 23, 35, 0.16), 0 48px 96px -48px rgba(15, 23, 35, 0.22);

  --f-sans: 'Inter', 'Inter Fallback', 'Inter Fallback A', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Consolas, 'Liberation Mono', monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 8px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --nav-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-stopped {
  overflow: clip;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img,
svg,
canvas {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
p {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
}
ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
  list-style: none;
}
::selection {
  background: rgba(0, 132, 255, 0.18);
  color: var(--ink);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-sm);
  font-weight: 500;
  transition: top 0.2s;
}
.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- type ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.kicker::before {
  content: '';
  flex: none;
  width: 20px;
  height: 1px;
  background: var(--line-3);
}
.kicker .n {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.h-display {
  font-weight: 500;
  letter-spacing: -0.032em;
  line-height: 1.04;
}
.h2 {
  font-weight: 500;
  font-size: clamp(28px, 3.3vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.026em;
  text-wrap: balance;
}
.h3 {
  font-weight: 600;
  font-size: clamp(17px, 1.35vw, 19px);
  line-height: 1.3;
  letter-spacing: -0.012em;
}
.lead {
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 62ch;
}
.muted {
  color: var(--ink-3);
}

/* split text: words (or lines) rise out of a mask — no rotation, no overshoot */
[data-split] .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.08em 0.02em 0.12em;
  margin: -0.08em -0.02em -0.12em;
}
[data-split] .wi {
  display: inline-block;
  transform: translate3d(0, 104%, 0);
  transition: transform 1.2s var(--ease);
  transition-delay: calc(var(--i, 0) * 32ms + var(--d, 0ms));
  will-change: transform;
}
[data-split].is-in .wi {
  transform: none;
}
.js-off [data-split] .wi,
.rm [data-split] .wi {
  transform: none;
  transition: none;
}

/* reveal */
.rv {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 1s var(--ease),
    transform 1.2s var(--ease);
  transition-delay: var(--d, 0ms);
}
.rv.is-in {
  opacity: 1;
  transform: none;
}
.js-off .rv,
.rm .rv {
  opacity: 1;
  transform: none;
  transition: none;
}

/* The first screen animates in on its own (CSS only), so its text paints as
   early as possible instead of waiting for JS / IntersectionObserver. */
.js .hero .rv {
  opacity: 1;
  transform: none;
  transition: none;
  animation: heroRise 1.2s var(--ease) both;
  animation-delay: var(--d, 0ms);
}
.js .hero [data-split] .wi {
  transform: none;
  transition: none;
  animation: lineUp 1.3s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms + 60ms);
}
@keyframes heroRise {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
}
@keyframes lineUp {
  from {
    transform: translate3d(0, 104%, 0);
  }
}
.rm .hero .rv,
.rm .hero [data-split] .wi {
  animation: none;
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.003em;
  white-space: nowrap;
  transition:
    background-color 0.25s,
    border-color 0.25s,
    color 0.25s;
}
.btn .ico {
  width: 17px;
  height: 17px;
  flex: none;
  transition: transform 0.45s var(--ease);
}
.btn:hover .ico-arrow {
  transform: translateX(2px);
}
.btn-primary {
  color: #fff;
  background: var(--accent-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 1px 2px rgba(10, 60, 120, 0.2),
    0 6px 16px -8px rgba(10, 110, 209, 0.5);
}
.btn-primary:hover {
  background: var(--accent-strong-hover);
}
.btn-ghost,
.btn-ch {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-2);
  box-shadow: var(--shadow-1);
}
.btn-ghost:hover,
.btn-ch:hover {
  border-color: var(--line-3);
  background: var(--surface-2);
}
.btn-ch .ico {
  color: var(--ink-2);
}
.btn-lg {
  min-height: 52px;
  padding: 0 24px;
  font-size: 16px;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition:
    transform 0.6s var(--ease),
    background-color 0.3s,
    border-color 0.3s;
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-color: var(--line);
}
.nav.is-hidden {
  transform: translate3d(0, -100%, 0);
}
.nav .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 32px;
  height: 32px;
  flex: none;
}
.logo .accent {
  color: #0084ff;
}
.nav-links {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  display: flex;
  gap: 2px;
}
.nav-links a {
  position: relative;
  padding: 8px 13px;
  font-size: 14.5px;
  color: var(--ink-2);
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.5s var(--ease);
}
.nav-links a:hover,
.nav-links a.is-active {
  color: var(--ink);
}
.nav-links a.is-active::after {
  transform: none;
}
.nav-cta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}
.nav .btn {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14.5px;
}
.burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  align-items: center;
  justify-content: center;
}
.burger span {
  position: relative;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: background-color 0.2s;
}
.burger span::before,
.burger span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.4s var(--ease);
}
.burger span::before {
  transform: translateY(-6px);
}
.burger span::after {
  transform: translateY(6px);
}
.nav.menu-open .burger span {
  background: transparent;
}
.nav.menu-open .burger span::before {
  transform: rotate(45deg);
}
.nav.menu-open .burger span::after {
  transform: rotate(-45deg);
}
.progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 51;
  height: 1px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--accent);
  pointer-events: none;
}
.mnav {
  position: fixed;
  inset: 0;
  z-index: 49;
  padding: calc(var(--nav-h) + 20px) var(--gutter) 32px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s var(--ease),
    visibility 0.35s;
}
.mnav.is-open {
  opacity: 1;
  visibility: visible;
}
.mnav a:not(.btn) {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.mnav .btn {
  margin-top: 24px;
}

/* ---------- sections ---------- */
section {
  position: relative;
}
.sec {
  padding-block: clamp(80px, 9.5vw, 136px);
  border-top: 1px solid var(--line);
}
.sec.alt {
  background: var(--bg-2);
}
.sec-head {
  display: grid;
  gap: 20px;
  margin-bottom: clamp(44px, 5.5vw, 76px);
}
.sec-head .h2 {
  max-width: 26ch;
}
@media (min-width: 961px) {
  .sec-head {
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
    column-gap: 32px;
    row-gap: 22px;
  }
  .sec-head > .kicker {
    grid-row: 1 / span 2;
    align-self: start;
    padding-top: 0.9em;
  }
  .sec-head > :not(.kicker) {
    grid-column: 2;
  }
}

/* ---------- stage (WebGL signal field) ---------- */
.stage-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  pointer-events: none;
  opacity: var(--stage-o, 1);
  transition: opacity 0.2s linear;
}
.stage-fallback {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: none;
  opacity: var(--stage-o, 1);
}
.no-gl .stage-fallback {
  display: block;
}
.no-gl .stage-canvas {
  display: none;
}
.stage-fallback svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
main {
  position: relative;
  z-index: 1;
}

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 64px;
  isolation: isolate;
  overflow: clip;
}
/* engineering grid: hairlines, faded out towards the edges */
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 23, 35, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 35, 0.045) 1px, transparent 1px);
  background-size: 88px 88px;
  background-position: calc(50% + 44px) 0;
  -webkit-mask: radial-gradient(70% 60% at 55% 45%, #000 20%, transparent 80%);
  mask: radial-gradient(70% 60% at 55% 45%, #000 20%, transparent 80%);
}
/* keeps the copy readable over the particle stream */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(62% 56% at 24% 52%, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.45) 60%, transparent 85%);
}
.hero-inner {
  display: grid;
  gap: 28px;
  justify-items: start;
}
.hero h1 {
  font-size: clamp(36px, 4.6vw, 68px);
}
.hero h1 .line {
  display: block;
}
.hero h1 .dim {
  color: var(--ink-3);
}
.hero .lead {
  max-width: 58ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}
.hero-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  margin-top: 28px;
  border-top: 1px solid var(--line-2);
}
.hero-facts li {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 22px 24px 4px 0;
}
.hero-facts li + li {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.hero-facts b {
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.hero-facts span {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-3);
  max-width: 26ch;
}
.scroll-cue {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 28px;
  translate: -50% 0;
  justify-items: center;
  gap: 10px;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.scroll-cue i {
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--ink-3), transparent);
  transform-origin: top;
  animation: cue 2.8s var(--ease-io) infinite;
}
@media (min-height: 1000px) and (min-width: 900px) {
  .scroll-cue {
    display: grid;
  }
}
@keyframes cue {
  0% {
    transform: scaleY(0);
    opacity: 1;
  }
  60% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}
