@charset "UTF-8";
/* ==========================================================================
   CCRM — marketing landing page
   Standalone. Shares the application's design language (warm minimalism,
   functional colour, Manrope) but none of its files or routes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Typeface — Manrope Variable, self-hosted
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-cyrillic-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-cyrillic-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  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;
}

/* --------------------------------------------------------------------------
   2. Design tokens — identical values to the CCRM application
   -------------------------------------------------------------------------- */

:root {
  --background: #f4f0e5;
  --surface: #fbf8ef;
  --surface-muted: #eee9dc;
  --surface-sunken: #efeadd;

  --foreground: #191919;
  --foreground-muted: #706e67;
  --foreground-faint: #8d8a80;

  --border: #d8d2c4;
  --border-soft: #e1dbce;
  --border-input: #d5cec0;

  --primary: #151515;
  --primary-hover: #262626;

  --pink: #f1b1d2;
  --yellow: #f3d45c;
  --blue: #acc4e7;
  --green: #a6b66e;
  --purple: #c5a0e5;
  --coral: #f3ab8e;

  --pink-tint: #f5d3e4;
  --yellow-tint: #f5e6a3;
  --blue-tint: #d7e3f5;
  --green-tint: #dde4c4;
  --purple-tint: #e5d6f4;
  --coral-tint: #f9dacd;
  --neutral-tint: #e6e1d4;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 999px;

  --font-sans: "Manrope Variable", "Manrope", "Inter", -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;

  --shadow-sm: 0 1px 2px rgba(20, 20, 20, 0.04);
  --shadow-md: 0 4px 16px rgba(20, 20, 20, 0.05);
  --shadow-lg: 0 24px 60px -24px rgba(20, 20, 20, 0.22);

  --nav-h: 68px;
  --gutter: 24px;
  --container: 1200px;
  --section-y: 112px;

  --ease: 150ms ease;
  --ease-out: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

img,
svg {
  display: block;
}

::selection {
  background: var(--yellow-tint);
  color: var(--foreground);
}

:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 3px;
  border-radius: 6px;
}

.icon {
  display: inline-flex;
  flex: 0 0 auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
}
.skip-link:focus {
  top: 12px;
}

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

.section {
  padding: var(--section-y) 0;
}

.section--tight {
  padding-top: 0;
}

/* --------------------------------------------------------------------------
   4. Type
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--foreground-muted);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--yellow);
}

.display {
  font-size: clamp(40px, 5.6vw, 68px);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.038em;
}

.h2 {
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.h3 {
  font-size: 18px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

.lead {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--foreground-muted);
}

.body-muted {
  font-size: 15px;
  line-height: 1.6;
  color: var(--foreground-muted);
}

.mark {
  background: linear-gradient(transparent 62%, var(--yellow) 62%, var(--yellow) 92%, transparent 92%);
  padding: 0 2px;
}

.section-head {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 56px;
}
.section-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  align-items: center;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease),
    transform var(--ease), box-shadow var(--ease);
}
.btn:active {
  transform: scale(0.98);
}
.btn .icon {
  transition: transform 200ms var(--ease-out);
}
.btn:hover .icon--nudge {
  transform: translateX(3px);
}

.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 8px 20px -10px rgba(20, 20, 20, 0.55);
}

.btn--secondary {
  background: transparent;
  border-color: var(--border-input);
  color: var(--foreground);
}
.btn--secondary:hover {
  background: rgba(20, 20, 20, 0.035);
  border-color: #bdb5a4;
}

.btn--yellow {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--primary);
}
.btn--yellow:hover {
  background: #f6dc76;
  border-color: #f6dc76;
}

.btn--ghost-dark {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.btn--ghost-dark:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn--sm {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.btn--block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   6. Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(244, 240, 229, 0.82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background-color 200ms ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(244, 240, 229, 0.92);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--yellow);
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
}
.nav__links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--foreground-muted);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  transition: color var(--ease), background-color var(--ease);
}
.nav__links a:hover {
  color: var(--foreground);
  background: rgba(20, 20, 20, 0.045);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__signin {
  font-size: 14.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  transition: background-color var(--ease);
}
.nav__signin:hover {
  background: rgba(20, 20, 20, 0.045);
}

.nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-input);
  background: transparent;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav__panel {
  display: none;
}

/* Language switcher (UZ / EN / RU) — stays visible on mobile */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-full);
}
.lang-switch a {
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 5px 9px;
  border-radius: var(--radius-full);
  color: var(--foreground-muted);
  transition: background-color var(--ease), color var(--ease);
}
.lang-switch a:hover {
  color: var(--foreground);
  background: rgba(20, 20, 20, 0.045);
}
.lang-switch a[aria-current] {
  color: var(--surface);
  background: var(--primary);
}

/* --------------------------------------------------------------------------
   7. Shared surfaces
   -------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out),
    border-color 250ms ease;
}
.card--hover:hover {
  transform: translateY(-4px);
  border-color: #cbc4b4;
  box-shadow: var(--shadow-lg);
}

.icon-tile {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--neutral-tint);
  color: var(--foreground);
}
.icon-tile--sm {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}
.tint-blue { background: var(--blue-tint); }
.tint-yellow { background: var(--yellow-tint); }
.tint-green { background: var(--green-tint); }
.tint-purple { background: var(--purple-tint); }
.tint-pink { background: var(--pink-tint); }
.tint-coral { background: var(--coral-tint); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--neutral-tint);
}
.pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}
.pill--blue { background: var(--blue-tint); }
.pill--yellow { background: var(--yellow-tint); }
.pill--purple { background: var(--purple-tint); }
.pill--green { background: var(--green-tint); }
.pill--coral { background: var(--coral-tint); }
.pill--pink { background: var(--pink-tint); }

.checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
}
.checklist__tick {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-tint);
  flex: 0 0 auto;
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   8. Product UI mockups (shared by hero + analytics)
   -------------------------------------------------------------------------- */

.ui {
  --ui-pad: 16px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-lg), 0 0 0 8px rgba(251, 248, 239, 0.6);
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  user-select: none;
}

.ui__chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
}
.ui__chrome i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
}
.ui__url {
  margin-left: 12px;
  height: 22px;
  flex: 0 1 260px;
  border-radius: var(--radius-full);
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  font-size: 10.5px;
  color: var(--foreground-faint);
}

.ui__body {
  display: flex;
  gap: 12px;
  padding: 12px;
}

.ui__rail {
  flex: 0 0 52px;
  background: var(--primary);
  border-radius: 14px;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
}
.ui__rail-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 8px;
}
.ui__rail-item {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.ui__rail-item.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.ui__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ui__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 0;
}
.ui__title {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.ui__sub {
  font-size: 10.5px;
  color: var(--foreground-muted);
}
.ui__who {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ui__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  background: var(--pink-tint);
}

.ui-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.ui-metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ui-metric--accent {
  background: var(--blue);
  border-color: #9db8e0;
}
.ui-metric__label {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--foreground-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ui-metric--accent .ui-metric__label,
.ui-metric--accent .ui-metric__foot {
  color: rgba(25, 25, 25, 0.66);
}
.ui-metric__value {
  font-size: 22px;
  font-weight: 550;
  letter-spacing: -0.03em;
  line-height: 1;
}
.ui-metric__foot {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--foreground-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.up {
  color: #5e6f2a;
}

.ui-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 10px;
}

.ui-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 12px;
  min-width: 0;
}
.ui-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.ui-card__title {
  font-size: 11.5px;
  font-weight: 650;
}
.ui-card__meta {
  font-size: 9.5px;
  color: var(--foreground-faint);
  font-weight: 500;
}

.ui-bars {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ui-bar {
  display: grid;
  grid-template-columns: 84px 1fr 26px;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 500;
}
.ui-bar__track {
  height: 14px;
  background: var(--surface-sunken);
  border-radius: 5px;
  overflow: hidden;
}
.ui-bar__fill {
  display: block;
  height: 100%;
  border-radius: 5px;
  width: 0;
  transition: width 1100ms var(--ease-out);
}
.is-visible .ui-bar__fill {
  width: var(--w);
}
.ui-bar__value {
  text-align: right;
  font-weight: 650;
}
.fill-blue { background: var(--blue); }
.fill-yellow { background: var(--yellow); }
.fill-purple { background: var(--purple); }
.fill-green { background: var(--green); }
.fill-coral { background: var(--coral); }
.fill-pink { background: var(--pink); }
.fill-neutral { background: #cfc8b8; }

.ui-activity {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ui-activity li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ui-activity__avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 8.5px;
  font-weight: 700;
  flex: 0 0 auto;
}
.ui-activity__text {
  flex: 1;
  min-width: 0;
  font-size: 10px;
  line-height: 1.35;
}
.ui-activity__text b {
  font-weight: 650;
}
.ui-activity__text span {
  display: block;
  color: var(--foreground-faint);
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ui .pill {
  height: 19px;
  font-size: 9px;
  padding: 0 7px;
}

/* --------------------------------------------------------------------------
   9. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 72px 0 104px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(20, 20, 20, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.hero__badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 5px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground-muted);
}
.hero__badge b {
  background: var(--yellow);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--foreground-muted);
}
.hero__trust li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero__visual {
  position: relative;
}

.hero__float {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  animation: float 6s ease-in-out infinite;
}
.hero__float small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--foreground-muted);
}
.hero__float--a {
  left: -28px;
  bottom: -30px;
}
.hero__float--b {
  right: -18px;
  top: -18px;
  animation-delay: -3s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* --------------------------------------------------------------------------
   10. Problems
   -------------------------------------------------------------------------- */

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.problem {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  background: transparent;
  border: 1px dashed #cfc7b6;
  border-radius: var(--radius-lg);
  transition: background-color 200ms ease, border-color 200ms ease;
}
.problem:hover {
  background: var(--surface);
  border-color: var(--border);
  border-style: solid;
}
.problem .icon-tile {
  background: var(--coral-tint);
}
.problem p {
  font-size: 15px;
  font-weight: 550;
  line-height: 1.45;
  padding-top: 8px;
}

.solution {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-2xl);
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.solution::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 40px solid rgba(243, 212, 92, 0.12);
}
.solution .h2 {
  color: #fff;
  font-size: clamp(26px, 3vw, 36px);
}
.solution p {
  color: rgba(255, 255, 255, 0.66);
}
.solution .checklist li {
  color: rgba(255, 255, 255, 0.9);
}
.solution .checklist__tick {
  background: var(--yellow);
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   11. Features
   -------------------------------------------------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.feature .body-muted {
  margin-top: -6px;
}
.feature__foot {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   12. How it works
   -------------------------------------------------------------------------- */

.flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.flow::before {
  content: "";
  position: absolute;
  top: 31px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--border) 0 8px, transparent 8px 14px);
}
.flow::after {
  content: "";
  position: absolute;
  top: 31px;
  left: 10%;
  height: 2px;
  width: 0;
  max-width: 80%;
  background: var(--primary);
  transition: width 1600ms var(--ease-out) 200ms;
}
.flow.is-visible::after {
  width: 80%;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.step__node {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 0 0 8px var(--background);
  transition: transform 250ms var(--ease-out);
}
.step:hover .step__node {
  transform: translateY(-3px) rotate(-3deg);
}
.step__num {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--yellow);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.step .h3 {
  font-size: 16px;
}
.step p {
  font-size: 14px;
  color: var(--foreground-muted);
  line-height: 1.5;
  max-width: 200px;
}

.pipeline-strip {
  margin-top: 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.pipeline-strip__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground-muted);
  margin-right: 6px;
}
.pipeline-strip .pill {
  height: 30px;
  font-size: 12.5px;
  padding: 0 13px;
}
.pipeline-strip .sep {
  color: var(--foreground-faint);
}

/* --------------------------------------------------------------------------
   13. Multi-branch
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 72px;
  align-items: center;
}
.split__copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.tree {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tree__node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--background);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}
.tree__node small {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--foreground-muted);
}
.tree__node--root {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.tree__node--root small {
  color: rgba(255, 255, 255, 0.6);
}
.tree__node--root .icon-tile {
  background: var(--yellow);
  color: var(--primary);
}

.tree__stem {
  width: 2px;
  height: 28px;
  background: var(--border);
}

.tree__row {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 28px;
}
.tree__row::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(100% / 6);
  right: calc(100% / 6);
  height: 2px;
  background: var(--border);
}

.branch {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--background);
  min-width: 0;
}
.branch::before {
  content: "";
  position: absolute;
  top: -29px;
  left: 50%;
  width: 2px;
  height: 28px;
  background: var(--border);
}
.branch__name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 650;
}
.branch__stat {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--foreground-muted);
}
.branch__stat b {
  color: var(--foreground);
  font-weight: 650;
}
.branch__people {
  display: flex;
  align-items: center;
}
.branch__people span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--background);
  margin-left: -6px;
  display: grid;
  place-items: center;
  font-size: 8.5px;
  font-weight: 700;
}
.branch__people span:first-child {
  margin-left: 0;
}
.branch--locked {
  opacity: 0.55;
}

.tree__legend {
  margin-top: 22px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--yellow-tint);
  font-size: 13px;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   14. Analytics
   -------------------------------------------------------------------------- */

.analytics {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}
.highlights li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px 0 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--background);
  font-size: 14px;
  font-weight: 550;
}

.ui--wide .ui__body {
  padding: 16px;
  gap: 14px;
}
.ui--wide .ui__main {
  gap: 14px;
}

.ui-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ui-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-full);
  background: var(--surface-muted);
  border: 1px solid var(--border-soft);
}
.ui-seg span {
  padding: 5px 11px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--foreground-muted);
}
.ui-seg span.is-on {
  background: var(--surface);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}
.ui-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 600;
  border: 1px solid var(--border-input);
  background: transparent;
}
.ui-btn--dark {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.ui-grid--analytics {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}

.chart {
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart__line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  transition: stroke-dashoffset 1800ms var(--ease-out);
}
.chart__area {
  opacity: 0;
  transition: opacity 900ms ease 600ms;
}
.is-visible .chart__line {
  stroke-dashoffset: 0;
}
.is-visible .chart__area {
  opacity: 1;
}

.legend {
  display: flex;
  gap: 14px;
  font-size: 9.5px;
  color: var(--foreground-muted);
  font-weight: 500;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend i {
  width: 10px;
  height: 3px;
  border-radius: 2px;
}

.ui-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
}
.ui-table th {
  text-align: left;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--foreground-faint);
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--border-soft);
}
.ui-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border-soft);
  font-weight: 500;
  white-space: nowrap;
}
.ui-table tr:last-child td {
  border-bottom: 0;
}
.ui-table .num {
  text-align: right;
}
.ui-table__mini {
  display: inline-block;
  width: 70px;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-sunken);
  overflow: hidden;
  vertical-align: middle;
  margin-right: 8px;
}
.ui-table__mini i {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   15. Roles
   -------------------------------------------------------------------------- */

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
}

.role {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 34px;
}
.role__head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.role__head .h3 {
  font-size: 22px;
}
.role__scope {
  margin-left: auto;
}
.role__divider {
  height: 1px;
  background: var(--border-soft);
}

.role--admin {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.role--admin .body-muted {
  color: rgba(255, 255, 255, 0.6);
}
.role--admin .role__divider {
  background: rgba(255, 255, 255, 0.12);
}
.role--admin .icon-tile {
  background: var(--yellow);
  color: var(--primary);
}
.role--admin .checklist__tick {
  background: rgba(243, 212, 92, 0.18);
  color: var(--yellow);
}
.role--admin .pill {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* --------------------------------------------------------------------------
   16. Audience
   -------------------------------------------------------------------------- */

.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.audience {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
}
.audience .h3 {
  font-size: 16px;
}
.audience p {
  font-size: 13.5px;
  color: var(--foreground-muted);
  line-height: 1.4;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   17. Pricing
   -------------------------------------------------------------------------- */

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.price {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 32px;
}
.price__name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.price__amount {
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.price__amount small {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground-muted);
  letter-spacing: 0;
}
.price .checklist li {
  font-size: 14.5px;
}
.price .btn {
  margin-top: auto;
}
.price--featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.price-note {
  margin-top: 22px;
  text-align: center;
  font-size: 14px;
  color: var(--foreground-muted);
}

/* --------------------------------------------------------------------------
   18. Final CTA
   -------------------------------------------------------------------------- */

.cta {
  position: relative;
  overflow: hidden;
  background: var(--primary);
  color: #fff;
  border-radius: 32px;
  padding: 80px 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.cta::before,
.cta::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.cta::before {
  width: 420px;
  height: 420px;
  left: -160px;
  bottom: -220px;
  border: 60px solid rgba(172, 196, 231, 0.12);
}
.cta::after {
  width: 300px;
  height: 300px;
  right: -90px;
  top: -130px;
  border: 48px solid rgba(243, 212, 92, 0.14);
}
.cta .h2 {
  color: #fff;
  max-width: 760px;
  position: relative;
}
.cta p {
  color: rgba(255, 255, 255, 0.66);
  max-width: 560px;
  position: relative;
}
.cta .btn-row {
  justify-content: center;
  position: relative;
  margin-top: 8px;
}
.cta__fine {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45) !important;
}

/* --------------------------------------------------------------------------
   19. FAQ
   -------------------------------------------------------------------------- */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 64px;
  align-items: start;
}
.faq-layout .section-head {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
  margin-bottom: 0;
}

.faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.faq details[open] {
  border-color: #c8c0ae;
  box-shadow: var(--shadow-md);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary:focus-visible {
  outline-offset: -2px;
  border-radius: var(--radius-lg);
}
.faq__toggle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-muted);
  flex: 0 0 auto;
  transition: transform 250ms var(--ease-out), background-color 200ms ease;
}
.faq details[open] .faq__toggle {
  transform: rotate(45deg);
  background: var(--yellow);
}
.faq__answer {
  padding: 0 22px 22px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--foreground-muted);
  max-width: 640px;
}

/* --------------------------------------------------------------------------
   20. Footer
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 72px 0 36px;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.footer__about {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 300px;
}
.footer__about p {
  font-size: 14px;
  color: var(--foreground-muted);
}
.footer h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--foreground-faint);
  margin-bottom: 16px;
}
.footer ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer ul a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--foreground-muted);
  transition: color var(--ease);
}
.footer ul a:hover {
  color: var(--foreground);
}
.footer__bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13.5px;
  color: var(--foreground-muted);
}

.footer ul a[aria-current] {
  color: var(--foreground);
}

/* --------------------------------------------------------------------------
   20b. Legal pages (privacy policy, terms of service)
   -------------------------------------------------------------------------- */

.legal {
  padding: 56px 0 var(--section-y);
}
.legal__doc {
  max-width: 760px;
  margin: 0 auto;
}
.legal__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 14px;
}
.legal__updated {
  font-size: 14px;
  color: var(--foreground-muted);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.legal__doc h2 {
  font-size: 20px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.012em;
  margin: 40px 0 12px;
}
.legal__doc p,
.legal__doc li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--foreground);
}
.legal__doc p + p,
.legal__doc p + ul,
.legal__doc ul + p {
  margin-top: 12px;
}
.legal__doc ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 22px;
  list-style: disc;
}
.legal__doc li::marker {
  color: var(--foreground-faint);
}
.legal__doc a {
  color: var(--foreground);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.legal__doc a:hover {
  text-decoration-color: var(--foreground);
}
.legal__contacts {
  margin-top: 16px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

@media (max-width: 640px) {
  .legal {
    padding-top: 32px;
  }
  .legal__doc h2 {
    font-size: 18px;
    margin-top: 32px;
  }
}

/* --------------------------------------------------------------------------
   21. Scroll reveal
   -------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   22. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1120px) {
  .nav__links a {
    padding: 8px 10px;
  }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 64px;
  }
  .hero__copy {
    max-width: 680px;
  }
  .hero__float--a {
    left: -12px;
  }
  .hero__float--b {
    right: -8px;
  }
  .footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer__about {
    grid-column: 1 / -1;
    max-width: 420px;
  }
}

@media (max-width: 960px) {
  :root {
    --section-y: 88px;
  }
  .nav__links,
  .nav__actions .nav__signin,
  .nav__actions .btn {
    display: none;
  }
  .nav__toggle {
    display: inline-flex;
  }
  .nav__actions {
    margin-left: auto;
  }
  .nav__panel {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 12px var(--gutter) 24px;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow-lg);
  }
  .nav.is-open .nav__panel {
    display: flex;
  }
  .nav__panel a:not(.btn) {
    padding: 12px 4px;
    font-size: 16px;
    font-weight: 550;
    border-bottom: 1px solid var(--border-soft);
  }
  .nav__panel .btn-row {
    margin-top: 16px;
  }
  .nav__panel .btn {
    flex: 1;
  }

  .problem-grid,
  .feature-grid,
  .audience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .solution {
    grid-template-columns: minmax(0, 1fr);
    padding: 36px;
    gap: 28px;
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }
  .flow {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    max-width: 520px;
    margin: 0 auto;
  }
  .flow::before,
  .flow::after {
    top: 32px;
    bottom: 32px;
    left: 31px;
    right: auto;
    width: 2px;
    height: auto;
  }
  .flow::before {
    background: repeating-linear-gradient(180deg, var(--border) 0 8px, transparent 8px 14px);
  }
  .flow::after {
    max-width: none;
    max-height: calc(100% - 64px);
    height: 0;
    bottom: auto;
    transition: height 1600ms var(--ease-out) 200ms;
  }
  .flow.is-visible::after {
    width: 2px;
    height: calc(100% - 64px);
  }
  .step {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 20px;
    padding-bottom: 28px;
  }
  .step:last-child {
    padding-bottom: 0;
  }
  .step__node {
    flex: 0 0 auto;
  }
  .step__text {
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .step p {
    max-width: none;
  }
  .ui-grid--analytics {
    grid-template-columns: minmax(0, 1fr);
  }
  .role-grid,
  .price-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
    margin: 0 auto;
  }
  .faq-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .faq-layout .section-head {
    position: static;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
    --section-y: 72px;
    --nav-h: 62px;
  }
  .hero {
    padding: 40px 0 72px;
  }
  .hero .btn-row .btn {
    flex: 1 1 auto;
  }
  .section-head {
    margin-bottom: 40px;
  }
  .problem-grid,
  .feature-grid,
  .audience-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .card {
    padding: 24px;
  }
  .solution {
    padding: 28px 22px;
    border-radius: 24px;
  }

  .ui__chrome {
    display: none;
  }
  .ui__body {
    padding: 8px;
    gap: 8px;
  }
  .ui__rail {
    display: none;
  }
  .ui-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ui-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ui__who .ui-btn {
    display: none;
  }
  .hero__float {
    display: none;
  }
  .ui-table-wrap {
    overflow-x: auto;
  }

  .tree {
    padding: 24px 14px 16px;
  }
  .tree__row {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 0;
    gap: 10px;
  }
  .tree__row::before,
  .branch::before {
    display: none;
  }
  .tree__stem--last {
    display: none;
  }

  .pipeline-strip .sep {
    display: none;
  }
  .role {
    padding: 26px;
  }
  .role__head {
    flex-wrap: wrap;
  }
  .price {
    padding: 26px;
  }
  .cta {
    padding: 56px 22px;
    border-radius: 24px;
  }
  .cta .btn-row .btn {
    flex: 1 1 100%;
  }
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.footer__credit a {
  color: var(--foreground);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--ease);
}
.footer__credit a:hover {
  text-decoration-color: var(--foreground);
}

/* --------------------------------------------------------------------------
   22. Contact dialog
   Opens from any [data-contact] CTA. The panel drops in from above with a
   soft spring, the page behind it blurs, and the fields settle one by one.
   Without JavaScript the same <dialog> works as a plain, static form.
   -------------------------------------------------------------------------- */

.contact {
  --contact-spring: cubic-bezier(0.16, 1, 0.3, 1);
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(16px, 7vh, 80px) 16px 32px;
  border: 0;
  background: rgba(21, 21, 21, 0.42);
  color: var(--foreground);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.contact[open] {
  display: grid;
  justify-items: center;
  align-items: start;
}
.contact::backdrop {
  background: transparent;
}

.contact__panel {
  position: relative;
  width: min(560px, 100%);
  padding: 36px 36px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  box-shadow: 0 48px 110px -36px rgba(20, 20, 20, 0.5), 0 2px 6px rgba(20, 20, 20, 0.06);
  transform-origin: 50% 0;
}

/* ---- Motion (only when JS drives the dialog) ---------------------------- */

.js .contact {
  background: rgba(21, 21, 21, 0);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  transition: background-color 450ms ease, -webkit-backdrop-filter 450ms ease,
    backdrop-filter 450ms ease;
}
.js .contact.is-open {
  background: rgba(21, 21, 21, 0.42);
  -webkit-backdrop-filter: blur(6px) saturate(115%);
  backdrop-filter: blur(6px) saturate(115%);
}

.js .contact__panel {
  opacity: 0;
  transform: translateY(-64px) scale(0.96);
  filter: blur(8px);
  transition: opacity 380ms ease, transform 720ms var(--contact-spring),
    filter 520ms var(--contact-spring);
}
.js .contact.is-open .contact__panel {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* Content follows the panel down, one row at a time */
.js .contact .stagger {
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity 420ms ease, transform 640ms var(--contact-spring);
}
.js .contact.is-open .stagger {
  opacity: 1;
  transform: none;
  transition-delay: calc(160ms + var(--i, 0) * 45ms);
}

/* Closing is quicker and lifts back up the way it came */
.js .contact.is-closing {
  transition-duration: 280ms;
}
.js .contact.is-closing .contact__panel {
  transform: translateY(-32px) scale(0.98);
  transition: opacity 220ms ease, transform 280ms cubic-bezier(0.4, 0, 1, 1),
    filter 240ms ease;
}

html.contact-lock {
  overflow: hidden;
}
html.contact-lock body {
  padding-right: var(--scrollbar-w, 0px);
}

/* ---- Header ------------------------------------------------------------- */

.contact__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--foreground-muted);
  cursor: pointer;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}
.contact__close .icon {
  transition: transform 300ms var(--ease-out);
}
.contact__close:hover {
  color: var(--foreground);
  background: var(--surface-muted);
  border-color: var(--border-input);
}
.contact__close:hover .icon {
  transform: rotate(90deg);
}

.contact__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 26px;
  padding-right: 44px;
}
.contact__mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--yellow);
  color: var(--primary);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.contact__title {
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.contact__lead {
  font-size: 15px;
  line-height: 1.55;
  color: var(--foreground-muted);
}

/* ---- Fields ------------------------------------------------------------- */

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.contact__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.field__label {
  padding: 0;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--foreground);
}
.field__label span {
  font-weight: 500;
  color: var(--foreground-faint);
}
fieldset.field .field__label {
  margin-bottom: 7px;
}

.field__input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border: 1px solid var(--border-input);
  border-radius: 14px;
  background: var(--background);
  color: var(--foreground);
  font: inherit;
  font-size: 15px;
  transition: border-color var(--ease), box-shadow 200ms ease, background-color var(--ease);
}
.field__input::placeholder {
  color: var(--foreground-faint);
}
.field__input:hover {
  border-color: #bdb5a4;
}
.field__input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(243, 212, 92, 0.5);
}
/* Fixed size: long text scrolls inside instead of stretching the dialog */
.field__input--area {
  height: 120px;
  padding: 12px 15px;
  line-height: 1.5;
  resize: none;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #c9c1b0 transparent;
}
.field__input--area::-webkit-scrollbar {
  width: 10px;
}
.field__input--area::-webkit-scrollbar-thumb {
  background: #c9c1b0;
  border: 3px solid transparent;
  border-radius: 10px;
  background-clip: padding-box;
}
.field__input--area::-webkit-scrollbar-thumb:hover {
  background-color: #aea694;
}

.field__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.field__meta .field__error {
  flex: 1;
}
.field__count {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--foreground-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: color var(--ease);
}
.field__count.is-near {
  color: #b3452d;
}

/* Phone: fixed +998 prefix, digits typed after it */
.phone-input {
  position: relative;
}
.phone-input__prefix {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 15px;
  display: flex;
  align-items: center;
  padding-right: 11px;
  font-size: 15px;
  font-weight: 650;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.phone-input__prefix::after {
  content: "";
  position: absolute;
  right: 0;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: var(--border-input);
}
.phone-input__input {
  padding-left: 68px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.field__error {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  font-size: 13px;
  font-weight: 550;
  color: #b3452d;
  transition: max-height 260ms var(--ease-out), opacity 200ms ease;
}
.field.has-error .field__error {
  max-height: 40px;
  opacity: 1;
}
.field.has-error .field__input {
  border-color: #d4613f;
  box-shadow: 0 0 0 4px rgba(243, 171, 142, 0.35);
}
.field.has-error.is-shaking .field__input,
.field.has-error.is-shaking .chips {
  animation: contact-shake 380ms var(--ease-out);
}

/* Radio chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  position: relative;
  cursor: pointer;
}
.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.chip span {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-full);
  background: var(--background);
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground-muted);
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease,
    transform 180ms var(--ease-out);
}
.chip:hover span {
  border-color: #bdb5a4;
  color: var(--foreground);
}
.chip input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  animation: contact-pop 320ms var(--ease-out);
}
.chip input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(243, 212, 92, 0.6);
}

/* ---- Submit ------------------------------------------------------------- */

.contact__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.contact__submit {
  position: relative;
  height: 52px;
  font-size: 15.5px;
}
.contact__submit-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 160ms ease, transform 200ms var(--ease-out);
}
.contact__spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 160ms ease;
}
.contact__form.is-busy .contact__submit {
  pointer-events: none;
}
.contact__form.is-busy .contact__submit-label {
  opacity: 0;
  transform: translateY(4px);
}
.contact__form.is-busy .contact__spinner {
  opacity: 1;
  animation: contact-spin 700ms linear infinite;
}
.contact__form-error {
  font-size: 13.5px;
  font-weight: 550;
  color: #b3452d;
  text-align: center;
}
.contact__form-error:empty {
  display: none;
}
.contact__note {
  font-size: 12.5px;
  color: var(--foreground-faint);
  text-align: center;
}

/* ---- Thank-you view ------------------------------------------------------ */

.contact__view--done {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 8px 6px;
  text-align: center;
}
.contact__view--done .contact__lead {
  max-width: 360px;
}
.contact__view--done form {
  margin-top: 12px;
}
.contact__panel.is-sent .contact__view--form {
  display: none;
}
.contact__panel.is-sent .contact__view--done {
  display: flex;
  animation: contact-rise 560ms var(--contact-spring, ease) both;
}

.contact__check {
  width: 76px;
  height: 76px;
  margin-bottom: 8px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact__check circle {
  fill: var(--green-tint);
  stroke: var(--green);
  stroke-width: 2.5;
  stroke-dasharray: 151;
  stroke-dashoffset: 0;
  transform: rotate(-90deg);
  transform-box: fill-box;
  transform-origin: 50% 50%;
}
.contact__check path {
  stroke: var(--primary);
  stroke-width: 3.5;
  stroke-dasharray: 34;
  stroke-dashoffset: 0;
}
.contact__panel.is-sent .contact__check circle {
  animation: contact-draw-circle 700ms var(--ease-out) 80ms both;
}
.contact__panel.is-sent .contact__check path {
  animation: contact-draw-tick 420ms var(--ease-out) 560ms both;
}

@keyframes contact-draw-circle {
  from {
    stroke-dashoffset: 151;
    fill-opacity: 0;
  }
}
@keyframes contact-draw-tick {
  from {
    stroke-dashoffset: 34;
  }
}
@keyframes contact-rise {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.98);
  }
}
@keyframes contact-pop {
  40% {
    transform: scale(1.06);
  }
}
@keyframes contact-shake {
  20%,
  60% {
    transform: translateX(-5px);
  }
  40%,
  80% {
    transform: translateX(5px);
  }
}
@keyframes contact-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 600px) {
  .contact {
    padding: 12px 12px 24px;
  }
  .contact__panel {
    padding: 28px 20px 22px;
    border-radius: 22px;
  }
  .contact__title {
    font-size: 22px;
  }
  .contact__row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }
}
