/* ==========================================================================
   Fonts
   Outfit is self-hosted as one variable font per subset (SIL Open Font
   License 1.1, see /assets/fonts/OFL-Outfit.txt). File names carry a content hash,
   so a new font version needs a new name.
   ========================================================================== */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/outfit-latin-ext.0f53d1c0.woff2") format("woff2");
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/outfit-latin.6c18d579.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;
}
/* Cyrillic companion for Outfit, which has no Cyrillic glyphs (SIL Open Font License 1.1, see
   /assets/fonts/OFL-Onest.txt). Scaled so its lowercase sits closer to Outfit's x-height. */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/onest-cyrillic.68e5e01d.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  size-adjust: 96%;
}

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  color-scheme: only light;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Onest first: its unicode-range covers only Cyrillic, so Latin still renders in Outfit, and a mostly
     Cyrillic page resolves most glyphs at the first family (measurably less layout work). */
  --font-cyrillic: "Onest", "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Brand palette: azure, white, ice blue and dark navy. Text pairs meet WCAG AA. */
  --ink: #0b1f3a;
  --text: #33465e;
  --muted: #4f6079;
  --azure: #0197fd; /* brand accent: logo, large display text, icons */
  --azure-text: #006bc4; /* blue text at body sizes, on white and ice */
  --azure-button: #0074d4; /* button fill under white text */
  --azure-deep: #005aa6;
  --azure-soft: #dceeff;
  --ice: #f2f8ff;
  --ice-deep: #e6f1fc;
  --line: #dce7f3;
  --white: #ffffff;
  --navy: #0b1f3a;
  --on-navy: #ffffff;
  --on-navy-muted: #b4c3d6;
  --on-navy-accent: #8dc6ff;
  --success: #13774a;
  --success-soft: #e7f6ee;
  --focus: #006bc4;

  /* Type scale */
  --fs-display: clamp(2.75rem, 1.6rem + 4.2vw, 4.75rem);
  --fs-h2: clamp(2rem, 1.3rem + 2.2vw, 3.25rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-body: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --fs-card: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;
  --fs-2xs: 0.75rem;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --section-space: clamp(64px, 3rem + 3.5vw, 112px);
  --gutter: clamp(20px, 4vw, 48px);
  --header-height: 72px;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgb(11 31 58 / 0.06), 0 4px 12px rgb(11 31 58 / 0.04);
  --shadow-md: 0 18px 40px -18px rgb(11 31 58 / 0.22);
  --shadow-lg: 0 40px 80px -32px rgb(1 80 160 / 0.32), 0 0 0 1px rgb(11 31 58 / 0.05);
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1,
h2,
h3,
p,
ul {
  margin: 0;
}
ul {
  padding: 0;
  list-style: none;
}
h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 600;
  text-wrap: balance;
}
h2 {
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
p {
  text-wrap: pretty;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
[hidden] {
  display: none !important;
}

.container {
  width: min(1200px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.skip-link {
  position: fixed;
  top: 16px;
  left: 16px;
  transform: translateY(-200%);
  white-space: nowrap;
  z-index: 100;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
}
.skip-link:focus {
  transform: none;
}
.accent {
  color: var(--azure);
}
.eyebrow {
  margin-bottom: var(--space-4);
  color: var(--azure-text);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--azure-button);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow:
    0 1px 2px rgb(0 70 140 / 0.2),
    0 10px 24px -10px rgb(0 116 212 / 0.6);
  transition:
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.button:hover {
  background: var(--azure-deep);
  transform: translateY(-1px);
}
.button-small {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: var(--fs-sm);
}
.button-small .icon {
  width: 18px;
  height: 18px;
}
.button-large {
  min-height: 60px;
  padding: 0 32px;
  border-radius: 16px;
  font-size: 1.0625rem;
}
.button-ghost {
  border-color: var(--line);
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.button-ghost:hover {
  border-color: #c4d8ee;
  background: var(--ice);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgb(220 231 243 / 0.8);
  background: rgb(255 255 255 / 0.88);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  height: var(--header-height);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.brand img {
  width: 36px;
  height: 36px;
}
.brand-accent {
  color: var(--azure);
}
.desktop-nav {
  display: flex;
  gap: var(--space-6);
  margin-left: auto;
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.desktop-nav a {
  padding-block: var(--space-2);
  transition: color 0.2s;
}
.desktop-nav a:hover {
  color: var(--azure-text);
}
.menu-toggle {
  display: none;
}

/* Russian text uses Onest for Cyrillic letters; other pages only load it for the word "Русский". */
:root:lang(ru) {
  --font: var(--font-cyrillic);
}
a[lang="ru"],
.lang-hint[lang="ru"] {
  font-family: var(--font-cyrillic);
}

/* Language menu: a <details> of plain links, so it works without JavaScript. */
.lang-menu {
  position: relative;
}
.lang-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}
.lang-menu summary::-webkit-details-marker {
  display: none;
}
.lang-menu summary:hover,
.lang-menu[open] summary {
  border-color: #c4d8ee;
  background: var(--ice);
}
.lang-menu summary .icon {
  width: 18px;
  height: 18px;
  color: var(--azure-text);
}
.lang-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 180px;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}
.lang-menu-list a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.lang-menu-list a:hover {
  background: var(--ice);
}
.lang-menu-list a[aria-current="page"] {
  color: var(--azure-text);
  font-weight: 600;
}

/* One-time language hint, added by app.js. Fixed, so it never shifts the layout. */
.lang-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 8px 8px 8px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  color: var(--ink);
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-md);
  transform: translateX(-50%);
}
.lang-hint a {
  flex: none;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--ice);
  color: var(--azure-text);
  font-weight: 600;
}
.lang-hint button {
  flex: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 1.375rem;
  line-height: 1;
}
.lang-hint button:hover {
  background: var(--ice);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  overflow-x: clip;
  background: radial-gradient(48% 62% at 82% 46%, #e3f1ff 0%, rgb(227 241 255 / 0) 100%), var(--white);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(40px, 5vw, 80px);
  padding-block: clamp(48px, 2rem + 4vw, 104px) clamp(64px, 3rem + 4vw, 120px);
}
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-5);
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ice);
  color: var(--text);
  font-size: var(--fs-xs);
  font-weight: 500;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--azure);
  box-shadow: 0 0 0 4px rgb(1 151 253 / 0.16);
}
h1 {
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.hero-description {
  max-width: 34rem;
  margin-top: var(--space-5);
  font-size: var(--fs-lead);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.hero-note {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  color: var(--muted);
  font-size: var(--fs-sm);
}
.hero-note .icon {
  width: 18px;
  height: 18px;
  color: var(--success);
}

/* App screenshots in phone frames. Images carry their width and height, so nothing shifts as they load. */
.hero-phones {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: var(--space-4) 0 var(--space-6);
}
.product-halo {
  position: absolute;
  inset: 4% 0 0;
  z-index: 0;
  border-radius: 64px;
  background: radial-gradient(closest-side, rgb(1 151 253 / 0.2), rgb(1 151 253 / 0));
  pointer-events: none;
}
.phone {
  position: relative;
  z-index: 1;
  --phone-pad: 9px;
  width: var(--phone-w, 280px);
  padding: var(--phone-pad);
  border-radius: 42px;
  background: #0b1424;
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.1),
    0 0 0 1px rgb(11 31 58 / 0.18),
    0 40px 80px -32px rgb(11 31 58 / 0.45);
}
/* An iPhone status bar over the screenshots' empty top strip, which Telegram leaves for the system bar. It is
   a mask, so dark screens (picture.shot-dark) can paint it white. */
.phone picture {
  position: relative;
  display: block;
}
.phone picture::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1;
  aspect-ratio: 390 / 47;
  background: #000;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 390 47'%3E%3Ctext x='54' y='30' font-family='-apple-system,BlinkMacSystemFont,system-ui,Segoe UI,sans-serif' font-size='17' font-weight='600' text-anchor='middle'%3E9:41%3C/text%3E%3Cg transform='translate(294 18)'%3E%3Crect y='7.5' width='3' height='4.5' rx='.8'/%3E%3Crect x='4.5' y='5' width='3' height='7' rx='.8'/%3E%3Crect x='9' y='2.5' width='3' height='9.5' rx='.8'/%3E%3Crect x='13.5' width='3' height='12' rx='.8'/%3E%3C/g%3E%3Cg transform='translate(316 18)' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round'%3E%3Cpath d='M1 4.4a10.5 10.5 0 0 1 14.8 0'/%3E%3Cpath d='M4 7.5a6 6 0 0 1 8.8 0'/%3E%3C/g%3E%3Ccircle cx='324.4' cy='29.2' r='1.7'/%3E%3Crect x='339.5' y='18.5' width='24' height='11.5' rx='3.6' fill='none' stroke='black' stroke-opacity='.35'/%3E%3Crect x='341.5' y='20.5' width='20' height='7.5' rx='2'/%3E%3Crect x='364.5' y='22.2' width='1.6' height='4' rx='.8' fill-opacity='.4'/%3E%3C/svg%3E")
    center / 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 390 47'%3E%3Ctext x='54' y='30' font-family='-apple-system,BlinkMacSystemFont,system-ui,Segoe UI,sans-serif' font-size='17' font-weight='600' text-anchor='middle'%3E9:41%3C/text%3E%3Cg transform='translate(294 18)'%3E%3Crect y='7.5' width='3' height='4.5' rx='.8'/%3E%3Crect x='4.5' y='5' width='3' height='7' rx='.8'/%3E%3Crect x='9' y='2.5' width='3' height='9.5' rx='.8'/%3E%3Crect x='13.5' width='3' height='12' rx='.8'/%3E%3C/g%3E%3Cg transform='translate(316 18)' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round'%3E%3Cpath d='M1 4.4a10.5 10.5 0 0 1 14.8 0'/%3E%3Cpath d='M4 7.5a6 6 0 0 1 8.8 0'/%3E%3C/g%3E%3Ccircle cx='324.4' cy='29.2' r='1.7'/%3E%3Crect x='339.5' y='18.5' width='24' height='11.5' rx='3.6' fill='none' stroke='black' stroke-opacity='.35'/%3E%3Crect x='341.5' y='20.5' width='20' height='7.5' rx='2'/%3E%3Crect x='364.5' y='22.2' width='1.6' height='4' rx='.8' fill-opacity='.4'/%3E%3C/svg%3E")
    center / 100% no-repeat;
  pointer-events: none;
}
.phone .shot-dark::before {
  background: #fff;
}
.phone img,
.phone-placeholder {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 33px;
}
/* Only drawn by a --draft build, before the screenshots exist. */
.phone-placeholder {
  display: flex;
  flex-direction: column;
  gap: 10px;
  aspect-ratio: 390 / 844;
  padding: 56px 16px 16px;
  background: linear-gradient(180deg, #f2f8ff, #e6f1fc);
}
.phone-placeholder span {
  height: 48px;
  border-radius: 14px;
  background: rgb(255 255 255 / 0.85);
}
.hero-phones .phone {
  grid-area: 1 / 1;
}
.phone-back {
  --phone-w: 258px;
  transform: translateX(-38%) rotate(-6deg);
}
.phone-front {
  --phone-w: 290px;
  margin-top: 48px;
  transform: translateX(26%);
}

/* ==========================================================================
   Benefit strip
   ========================================================================== */

.benefit-strip {
  border-block: 1px solid var(--line);
  background: var(--ice);
}
.benefit-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3) var(--space-8);
  padding-block: var(--space-5);
}
.benefit-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.benefit-list .icon {
  color: var(--azure-text);
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding-block: var(--section-space);
}
.section-flush-top {
  padding-top: 0;
}
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
  align-items: end;
  gap: var(--space-5) var(--space-8);
  margin-bottom: var(--space-7);
}
.muted-heading {
  color: var(--muted);
}
.section-lead {
  font-size: var(--fs-lead);
}

/* Feature tiles: copy on top, the top of a phone screen rising from the bottom edge */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}
.tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow: clip; /* hidden can still be scrolled by scrollIntoView or find-in-page; clip cannot */
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: radial-gradient(90% 70% at 50% 100%, #e3f1ff, var(--ice));
}
.tile-copy {
  padding: var(--space-6) var(--space-6) 0;
}
.feature-label {
  margin-bottom: var(--space-2);
  color: var(--azure-text);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tile-copy h3 {
  margin-bottom: var(--space-2);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.tile-copy p:last-child {
  max-width: 34rem;
  font-size: var(--fs-card);
}
/* Shorter than the phone, so the phone runs off the tile's bottom edge. The tile screenshots are cropped to
   their top 70% (trim in src/site.json), which still reaches past that edge. */
.tile-visual {
  --phone-w: 254px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-4);
  height: 300px;
  margin-top: auto;
  padding-top: var(--space-6);
}
.tile-visual .phone {
  flex: none;
}
.tile-pair {
  --phone-w: 204px;
}
.tile-pair .phone + .phone {
  margin-top: var(--space-6);
}
.check-list {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  color: var(--ink);
  font-weight: 500;
}
.check-list .icon {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  padding: 3px;
  border-radius: 50%;
  background: var(--azure-soft);
  color: var(--azure-deep);
  stroke-width: 2.4;
}
.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-5);
}
.mini-card {
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
}
.mini-card h3 {
  margin-bottom: var(--space-2);
}
.mini-card p {
  font-size: var(--fs-card);
}

/* Desktop: the open chat in a light window, a dark window behind it */
.desktop-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}
.desktop-copy .section-lead {
  margin-top: var(--space-4);
}
.desktop-visual {
  position: relative;
  padding: var(--space-7) 0 0 var(--space-7);
}
.window {
  overflow: hidden;
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow:
    0 1px 2px rgb(11 31 58 / 0.06),
    0 32px 64px -24px rgb(11 31 58 / 0.3);
}
.window picture,
.window img {
  display: block;
  width: 100%;
  height: auto;
}
.window-bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f4f7fb;
}
.window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c9d3df;
}
.window-front {
  position: relative;
}
.window-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 72%;
  border-color: #1d2a3d;
  background: #17212b;
}
.window-back .window-bar {
  border-bottom-color: #253447;
  background: #1d2733;
}
.window-back .window-bar span {
  background: #3a4a5e;
}

/* Notifications */
.notification-section {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--on-navy-muted);
}
.notification-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(40% 60% at 80% 50%, rgb(1 151 253 / 0.22), transparent 70%);
  pointer-events: none;
}
.notification-section :focus-visible {
  outline-color: var(--on-navy-accent);
}
.notification-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(48px, 6vw, 96px);
  padding-block: var(--section-space);
}
.light-eyebrow {
  color: var(--on-navy-accent);
}
.notification-copy h2 {
  color: var(--on-navy);
}
.notification-copy h2 > span {
  color: var(--on-navy-accent);
}
.notification-copy > p {
  max-width: 34rem;
  margin-top: var(--space-5);
  font-size: var(--fs-lead);
}
.mode-tabs {
  display: inline-flex;
  gap: 4px;
  margin: var(--space-6) 0 var(--space-5);
  padding: 4px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 14px;
  background: rgb(255 255 255 / 0.06);
}
.mode-tabs button {
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--on-navy-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition:
    background-color 0.2s,
    color 0.2s;
}
.mode-tabs button:hover {
  color: var(--on-navy);
}
.mode-tabs button.active {
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
}
/* Tall enough for either mode, so switching tabs never shifts the page. */
#mode-panel {
  max-width: 32rem;
  min-height: 204px;
}
#mode-panel h3 {
  margin-bottom: var(--space-2);
  color: var(--on-navy);
}
.mode-footnote {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
}
.mode-footnote .icon {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--on-navy-accent);
}
.notification-demo {
  justify-self: center;
  width: 100%;
  max-width: 420px;
}
.telegram-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #e9f1f9;
  color: var(--ink);
  box-shadow:
    0 40px 80px -24px rgb(0 0 0 / 0.5),
    0 0 0 1px rgb(255 255 255 / 0.08);
}
.telegram-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.telegram-bot-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--azure-soft);
}
.telegram-card-header strong {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.3;
}
.telegram-card-header small {
  display: block;
  color: var(--muted);
  font-size: var(--fs-2xs);
}
.telegram-card-header > span:last-child {
  margin-left: auto;
  color: var(--muted);
  font-size: 1.25rem;
  letter-spacing: 1px;
  line-height: 1;
}
.telegram-card-content {
  min-height: 292px;
  padding: var(--space-5) var(--space-4);
  background-color: #e9f1f9;
  background-image: radial-gradient(rgb(11 31 58 / 0.06) 1px, transparent 1px);
  background-size: 16px 16px;
}
.notification-message {
  padding: var(--space-4);
  border-radius: 16px 16px 6px 6px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.message-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--azure-text);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.notification-message > strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}
.notification-message > p {
  margin-top: 4px;
  color: var(--text);
  font-size: var(--fs-sm);
}
.message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-xs);
}
.message-meta b {
  color: var(--ink);
  font-weight: 600;
}
.example-time {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--fs-2xs);
  text-align: right;
}
.notification-open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: 3px;
  padding: 12px;
  border-radius: 6px 6px 16px 16px;
  background: rgb(255 255 255 / 0.9);
  color: var(--azure-text);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.notification-open > .icon {
  width: 16px;
  height: 16px;
}
.inbox-example-reply {
  margin: var(--space-3) 0 0 var(--space-7);
  padding: 12px 14px;
  border-radius: 16px 16px 6px 16px;
  background: var(--azure-soft);
  font-size: var(--fs-sm);
}
.inbox-example-reply > span {
  display: block;
  padding-left: var(--space-2);
  border-left: 2px solid var(--azure);
  color: #2f5378;
  font-size: var(--fs-2xs);
}
.inbox-example-reply p {
  margin-top: 6px;
}
.inbox-example-reply small {
  display: block;
  margin-top: 6px;
  color: #2f5378;
  font-size: var(--fs-2xs);
  text-align: right;
}
.telegram-card-composer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  color: var(--muted);
  font-size: var(--fs-sm);
}
.telegram-card-composer > .icon:last-child {
  margin-left: auto;
  color: var(--azure);
}
.dark-demo-caption {
  margin-top: var(--space-4);
  font-size: var(--fs-xs);
  text-align: center;
}

/* How it works */
.center-heading {
  max-width: 40rem;
  margin: 0 auto var(--space-7);
  text-align: center;
}
.center-heading > p:last-child {
  margin-top: var(--space-4);
  font-size: var(--fs-lead);
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}
.step {
  position: relative;
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ice);
}
.step-number {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.step-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-5);
  border-radius: 14px;
  background: var(--white);
  color: var(--azure-text);
  box-shadow: var(--shadow-sm);
}
.step-icon .icon {
  width: 22px;
  height: 22px;
}
.step h3 {
  margin-bottom: var(--space-2);
}
.step p {
  font-size: var(--fs-card);
}
.step a,
.step-detail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
}
.step-detail {
  color: var(--muted);
}
.step a {
  color: var(--azure-text);
  font-weight: 600;
}
.step a:hover {
  color: var(--azure-deep);
}
.step a .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}
.step a:hover .icon {
  transform: translateX(3px);
}

/* FAQ */
.faq-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: var(--space-8);
}
.faq-heading {
  position: sticky;
  top: calc(var(--header-height) + var(--space-6));
}
.faq-heading > p:last-child {
  margin-top: var(--space-4);
  font-size: var(--fs-lead);
}
.faq-list details {
  border-bottom: 1px solid var(--line);
}
.faq-list details:first-child {
  border-top: 1px solid var(--line);
}
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5) 0;
  color: var(--ink);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary:hover {
  color: var(--azure-text);
}
.faq-list p {
  max-width: 62ch;
  padding: 0 var(--space-8) var(--space-5) 0;
}
.faq-list p a {
  color: var(--azure-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.faq-list p a:hover {
  color: var(--azure-deep);
}
.faq-plus {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ice);
}
.faq-plus::before,
.faq-plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: transform 0.2s;
}
.faq-plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
details[open] .faq-plus::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

/* Final call to action */
.final-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 3rem + 4vw, 112px) var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: radial-gradient(60% 80% at 50% 0%, rgb(1 151 253 / 0.12), transparent 70%), var(--ice);
  text-align: center;
}
.final-cta::before {
  content: "";
  position: absolute;
  bottom: -260px;
  left: -200px;
  width: 480px;
  height: 480px;
  border: 1px solid #d6e7fa;
  border-radius: 50%;
  box-shadow:
    0 0 0 40px rgb(214 231 250 / 0.3),
    0 0 0 80px rgb(214 231 250 / 0.18);
  pointer-events: none;
}
.final-cta > * {
  position: relative;
}
.final-cta h2 {
  font-size: clamp(2.25rem, 1.4rem + 3vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.final-cta h2 .accent {
  color: var(--azure-button);
}
.cta-lead {
  margin-top: var(--space-4);
  font-size: var(--fs-lead);
}
.final-cta .button {
  margin-top: var(--space-6);
}
.cta-note {
  margin-top: var(--space-4);
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* Not found page */
.not-found {
  padding-block: var(--section-space);
}
.not-found-inner > * {
  max-width: 40rem;
}
.not-found h1 {
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.not-found-lead {
  margin-top: var(--space-4);
  font-size: var(--fs-lead);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  padding-block: var(--space-6);
  color: var(--muted);
  font-size: var(--fs-sm);
}
.footer-inner .brand {
  font-size: 1.25rem;
}
.footer-inner .brand img {
  width: 32px;
  height: 32px;
}
.footer-tagline {
  margin-right: auto;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-6);
}
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--azure-text);
  font-weight: 600;
}
.footer-link:hover {
  color: var(--azure-deep);
}
.footer-link .icon {
  width: 16px;
  height: 16px;
}
.footer-link-label {
  color: var(--muted);
  font-weight: 500;
}
.footer-bottom {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.copyright {
  font-size: var(--fs-xs);
}
.footer-languages {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}
.footer-languages a {
  color: var(--text);
  font-weight: 500;
}
.footer-languages a:hover {
  color: var(--azure-text);
}
.footer-languages a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ==========================================================================
   Scroll reveal
   Content is visible by default. app.js only animates elements that start
   below the fold, and only once they are about to scroll into view, so a fast
   scroll, a crawler or a full-page capture never meets blank sections.
   ========================================================================== */

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}
.is-revealing {
  animation: reveal-up 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.feature-grid > .is-revealing:nth-child(2),
.steps-grid > .is-revealing:nth-child(2) {
  animation-delay: 80ms;
}
.feature-grid > .is-revealing:nth-child(3),
.steps-grid > .is-revealing:nth-child(3) {
  animation-delay: 160ms;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .phone-back {
    --phone-w: 230px;
  }
  .phone-front {
    --phone-w: 262px;
  }
}

/* Tablets get the menu button: the inline nav, language menu and call to action need about
   900px in Russian, the longest language. */
@media (max-width: 1000px) {
  .header-inner {
    gap: var(--space-3);
  }
  .desktop-nav,
  .header-cta {
    display: none;
  }
  .lang-menu {
    margin-left: auto;
  }
  .menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
  }
  .menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
  }
  .mobile-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: var(--space-2) var(--gutter) var(--space-4);
    border-bottom: 1px solid var(--line);
    background: var(--white);
    box-shadow: 0 16px 32px rgb(11 31 58 / 0.08);
  }
  .mobile-nav a {
    padding: 12px 0;
    color: var(--ink);
    font-size: 1.0625rem;
    font-weight: 500;
  }
  .mobile-nav a + a {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-copy {
    max-width: 40rem;
  }
  .hero-phones {
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
  }
  .phone-back {
    --phone-w: 220px;
  }
  .phone-front {
    --phone-w: 250px;
  }
  .section-heading {
    grid-template-columns: minmax(0, 1fr);
  }
  .tiles,
  .desktop-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .desktop-copy {
    max-width: 40rem;
  }
  .desktop-visual {
    padding: var(--space-6) 0 0 var(--space-6);
  }
  .notification-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .steps-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 40rem;
    margin-inline: auto;
  }
  .faq-section {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }
  .faq-heading {
    position: static;
  }
}

@media (max-width: 720px) {
  :root {
    --header-height: 64px;
  }
  .benefit-list {
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
  }
  .mini-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Phones skip the back window entirely; its picture loads a blank source here ("only" in site.json). */
  .window-back {
    display: none;
  }
  .desktop-visual {
    padding: 0;
  }
  .faq-list p {
    padding-right: 0;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-tagline {
    margin-right: 0;
  }
  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  .footer-bottom {
    flex-direction: column;
    flex-basis: auto;
    align-items: flex-start;
    align-self: stretch;
  }
}

@media (max-width: 480px) {
  .hero-actions .button {
    flex: 1 1 100%;
  }
  .phone {
    --phone-pad: 7px;
    border-radius: 32px;
  }
  .phone img,
  .phone-placeholder {
    border-radius: 25px;
  }
  .phone-back {
    --phone-w: 172px;
  }
  .phone-front {
    --phone-w: 200px;
    margin-top: 32px;
  }
  .tile-copy {
    padding: var(--space-5) var(--space-5) 0;
  }
  .tile-visual {
    --phone-w: 214px; /* a 200 px screen, matching sizes in src/site.json */
    height: 270px;
    padding-top: var(--space-5);
  }
  .tile-pair {
    --phone-w: 148px;
    gap: var(--space-3);
    height: 220px;
  }
  .tile-pair .phone + .phone {
    margin-top: var(--space-5);
  }
  .window {
    border-radius: 8px;
  }
  .window-bar {
    gap: 4px;
    padding: 6px 8px;
  }
  .window-bar span {
    width: 6px;
    height: 6px;
  }
  .mini-card {
    padding: var(--space-5);
  }
  .mode-tabs {
    display: flex;
  }
  .mode-tabs button {
    flex: 1 1 auto;
    padding-inline: var(--space-3);
    font-size: 0.875rem;
  }
  .inbox-example-reply {
    margin-left: var(--space-5);
  }
  .telegram-card-content {
    min-height: 316px;
  }
  .step {
    padding: var(--space-5);
  }
  .step-number {
    top: var(--space-5);
    right: var(--space-5);
  }
  .final-cta {
    padding-inline: var(--space-5);
  }
  .final-cta .button {
    padding-inline: 20px;
    font-size: 1rem;
  }
}

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