:root {
  --blue: #3a2eff;
  --bg: #0e0a2b;
  --blue-deep: #2a20c9;
  --yellow: #ffd23f;
  --yellow-hover: #ffdc66;
  --yellow-step: #b98f00; /* the solid step under the yellow buttons */
  --pink: #ff8ac2;
  --mint: #7dffd0;
  --ink: #14103a;
  --white: #ffffff;
  --gutter: 20px;
  --card-pad: 28px;      /* inner padding of every card: the same on all four sides */
  --section-gap: 88px;   /* space between sections */
  --heading-gap: 32px;   /* space under a section heading: smaller than above it, so the heading sticks to its content */
  --ease: cubic-bezier(.22, .8, .24, 1);
  /* system fonts: nothing to download */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
/* overflow-x: the stamp starts its animation at twice its size; it must not make the page scroll sideways */
/* overflow-x: hidden is the fallback for browsers without clip (older Safari, e.g. in-app browsers on iPhone);
   body gets it too, because iOS ignores it on html alone */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden; overflow-x: clip;
}
a { color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

/* background: faint site windows, drifting slower than the page */
.bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(58, 46, 255, .55), transparent 70%),
    radial-gradient(760px 480px at 4% 104%, rgba(58, 46, 255, .32), transparent 70%);
}
.bg-item {
  position: absolute; color: var(--white);
  transform: translate3d(0, var(--y, 0px), 0) rotate(var(--r, 0deg));
  will-change: transform;
}
.bg svg.bg-item { fill: none; stroke: currentColor; stroke-width: 3; opacity: .16; }
.bg svg .solid { fill: currentColor; stroke: none; }
.bg svg .accent { fill: var(--yellow); stroke: none; }
.bg-win-a { width: min(46vw, 560px); right: -6vw; top: 12vh; --r: 6deg; }
.bg-win-b { width: min(30vw, 380px); left: -12vw; top: 46vh; --r: -7deg; }

/* top bar */
.top { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; }
.lang { display: flex; gap: 4px; background: var(--blue-deep); padding: 4px; border-radius: 999px; }
.lang a {
  font-weight: 800; font-size: 14px; text-decoration: none;
  border-radius: 999px; padding: 6px 14px;
  background: transparent; color: var(--white);
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.lang a:hover { color: var(--yellow); }
.lang a[aria-current="page"] { background: var(--yellow); color: var(--ink); }

/* highlighter sweep on hover: text gets a colored marker */
.sweep {
  background-image: linear-gradient(var(--mark, var(--yellow)), var(--mark, var(--yellow)));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 100%;
  transition: background-size .45s var(--ease), color .3s var(--ease);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.sweep:hover { background-size: 100% 100%; color: var(--ink); }

/* hero */
.hero { position: relative; padding: 48px 0 96px; }
h1 {
  font-family: var(--font); font-weight: 700;
  font-size: clamp(2.1rem, 6.4vw, 5rem);
  line-height: 1.06; letter-spacing: -0.02em; margin: 0 0 28px;
  max-width: min(100%, 11em); text-wrap: balance;
}
h1 span { display: inline-block; transition: color .3s var(--ease), transform .3s var(--ease); }
h1:hover span { color: var(--yellow); transform: translateX(8px); }
.lead { max-width: 34em; margin: 0 0 32px; font-size: 1.25rem; }
/* tactile button: a solid step underneath that the button presses into */
.btn {
  display: inline-flex; align-items: center; text-decoration: none; font-weight: 800;
  background: var(--yellow); color: var(--ink);
  padding: 16px 28px; border-radius: 999px;
  box-shadow: 0 6px 0 var(--yellow-step), 0 14px 22px -6px rgba(10, 6, 80, .55);
  transform: translateY(0);
  transition: transform .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn::after {
  content: ""; width: 8px; height: 8px; margin-left: 12px;
  border-top: 3px solid currentColor; border-right: 3px solid currentColor;
  transform: rotate(45deg); transition: transform .25s var(--ease);
}
.btn:hover { transform: translateY(-3px); background: var(--yellow-hover); box-shadow: 0 9px 0 var(--yellow-step), 0 20px 26px -8px rgba(10, 6, 80, .6); }
.btn:hover::after { transform: translateX(5px) rotate(45deg); }
.btn:active { transform: translateY(6px); box-shadow: 0 0 0 var(--yellow-step), 0 4px 8px -4px rgba(10, 6, 80, .5); }

.stamp {
  position: absolute; right: 0; top: 24px;
  width: clamp(120px, 20vw, 210px); aspect-ratio: 1;
  border-radius: 50%; background: var(--pink); color: var(--ink);
  display: grid; place-content: center; text-align: center;
  font-family: var(--font); font-weight: 700;
  font-size: clamp(.8rem, 1.6vw, 1.15rem); line-height: 1.15;
  transform: rotate(12deg);
  animation: stamp .6s cubic-bezier(.2, 1.6, .4, 1) .3s both;
  transition: transform .4s var(--ease), background-color .3s var(--ease);
}
.stamp:hover { transform: rotate(-4deg) scale(1.06); background: var(--mint); }
.stamp .tick { font-size: 2.4em; line-height: 1; }
@keyframes stamp {
  from { transform: rotate(40deg) scale(2); opacity: 0; }
  to { transform: rotate(12deg) scale(1); opacity: 1; }
}

/* page load: the headline and the button are there from the first paint. They used to fade in one
   after another, and on a phone the first screen stayed empty for about a second. Only the lead line
   slides in, briefly. */
.intro.lead { opacity: 0; transform: translateY(12px); animation: rise .3s var(--ease) .05s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* sections appear when scrolled into view */
.js .reveal {
  opacity: 0; transform: translateY(32px); transition: opacity .7s var(--ease), transform .7s var(--ease);
  /* safety net: if main.js never runs, the sections still appear after 2.5 s */
  animation: reveal-safety .01s linear 2.5s forwards;
}
.js.reveal-ready .reveal { animation: none; } /* main.js is running and takes over */
.js .reveal.in { opacity: 1; transform: none; }
@keyframes reveal-safety { to { opacity: 1; transform: none; } }

section { padding: 0 0 var(--section-gap); }
h2 { font-family: var(--font); font-weight: 700; font-size: clamp(1.7rem, 4.5vw, 2.8rem); line-height: 1.1; margin: 0 0 var(--heading-gap); }

/* both cards share one height (the owner's choice), so the card with less text has more space below it.
   text-box trims the invisible line-height air above the heading and below the last line */
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel {
  position: relative; text-box: trim-both cap alphabetic;
  border-radius: 32px; padding: var(--card-pad); color: var(--ink); background: var(--panel-color);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.panel.sites { --panel-color: var(--yellow); --mark: var(--white); } /* the main card: yellow, first */
.panel.tests { --panel-color: var(--pink); --mark: var(--mint); }
/* hover: the card lifts like the price cards, and a "test passed" tick is stamped in the corner */
.panel:hover { transform: translateY(-8px); box-shadow: 0 26px 44px -20px color-mix(in srgb, var(--panel-color) 80%, transparent); }
.panel::after {
  content: "✓"; position: absolute; top: var(--card-pad); right: var(--card-pad);
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--panel-color); font-weight: 800; font-size: 1.1rem;
  opacity: 0; transform: scale(.4) rotate(-40deg);
  transition: opacity .25s var(--ease), transform .45s cubic-bezier(.2, 1.6, .4, 1);
}
.panel:hover::after { opacity: 1; transform: none; }
.panel h3 { font-family: var(--font); font-weight: 700; font-size: 1.6rem; margin: 0 0 12px; }
.panel p { margin: 0; }
.panel .sweep:hover { color: var(--ink); }

/* what exactly gets checked: four plain facts under the two cards */
.trust { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust li { --accent: var(--yellow); }
.trust li:nth-child(2) { --accent: var(--mint); }
.trust li:nth-child(3) { --accent: var(--pink); }
.trust li::before { content: "✓"; font-weight: 800; font-size: 1.4rem; line-height: 1; color: var(--accent); }

/* site cards */
.cards { position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 0 24px; }
/* colored light behind the glass, so the blur has something to work on */
.cards::before, .cards::after {
  content: ""; position: absolute; z-index: -1; width: 260px; height: 260px; border-radius: 50%;
  filter: blur(60px); opacity: .55; pointer-events: none;
}
.cards::before { left: 6%; top: -10%; background: var(--mint); }
.cards::after { right: 6%; bottom: -12%; background: var(--pink); }

/* frosted glass: site cards, price cards and the order block */
.card, .plan, .order {
  position: relative; border-radius: 32px; color: var(--white);
  background: linear-gradient(150deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .06));
  border: 1.5px solid rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 30px -14px rgba(10, 6, 80, .7);
}
.card, .plan { transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s var(--ease); }
.card:hover, .plan:hover, .plan:focus-within {
  transform: translateY(-16px); border-color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 34px 60px -18px color-mix(in srgb, var(--accent) 75%, transparent);
}

.card {
  --accent: var(--mint);
  overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
  padding: var(--card-pad); text-decoration: none;
}
.card:nth-child(2) { --accent: var(--pink); }
/* light that follows the cursor */
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%);
  transition: opacity .35s var(--ease);
}
.card > * { position: relative; }
.card:hover::before { opacity: 1; }
.card:active { transform: translateY(-2px); }

.card .shot {
  display: block; width: 100%; height: auto; margin-bottom: 8px;
  border-radius: 16px; background: var(--blue-deep);
  transition: transform .45s var(--ease);
}
.card:hover .shot { transform: translateY(-4px) scale(1.02); }
.card .kind { font-weight: 800; font-size: .95rem; color: var(--accent); }
.card .title { margin: 0; font-family: var(--font); font-weight: 700; font-size: clamp(1.3rem, 3vw, 1.9rem); line-height: 1.15; }
.card .task { margin: 0; font-size: 1rem; opacity: .9; }
.card .tech { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.card .tech li {
  font-weight: 700; font-size: .85rem; padding: 4px 12px; border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--accent) 70%, transparent);
}
/* margin-top: auto keeps the links of both cards on one line when the texts differ in length */
.card .open { margin-top: auto; padding-top: 8px; font-weight: 800; color: var(--accent); }
.card .open::after {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 10px;
  border-top: 3px solid currentColor; border-right: 3px solid currentColor;
  transform: rotate(45deg); transition: transform .25s var(--ease);
}
.card:hover .open::after { transform: translateX(5px) rotate(45deg); }

.works { border: 3px dashed rgba(255, 255, 255, .6); border-radius: 32px; padding: var(--card-pad); transition: border-color .3s var(--ease); }
.works:hover { border-color: var(--yellow); }
.works p { margin: 0 0 24px; max-width: 32em; font-size: 1.15rem; }

.contacts { list-style: none; margin: 0; padding: 0; }
.contacts li { border-top: 2px solid rgba(255, 255, 255, .35); }
.contacts li:last-child { border-bottom: 2px solid rgba(255, 255, 255, .35); }
.contacts a {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 22px 0; text-decoration: none;
  font-family: var(--font); font-weight: 600;
  font-size: clamp(1.15rem, 3.2vw, 2rem);
  transition: color .3s var(--ease);
}
.contacts a > span:first-child { display: inline-block; transition: transform .3s var(--ease); }
.contacts a:hover { color: var(--yellow); }
.contacts a:hover > span:first-child { transform: translateX(12px); }
.contacts .val {
  font-family: var(--font); font-weight: 800; font-size: 1rem;
  color: var(--pink); text-align: right; overflow-wrap: anywhere;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat; background-position: 0 100%; background-size: 0% 2px;
  transition: background-size .35s var(--ease), color .3s var(--ease);
}
.contacts a:hover .val { color: var(--mint); background-size: 100% 2px; }

/* skip link for keyboard users */
.skip {
  position: absolute; left: 16px; top: 12px; z-index: 10;
  background: var(--yellow); color: var(--ink); font-weight: 800;
  padding: 10px 18px; border-radius: 999px; text-decoration: none;
  transform: translateY(-80px); transition: transform .2s var(--ease);
}
.skip:focus { transform: none; }

/* price cards: frosted glass, one accent color per plan */
.plans { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plans::before, .plans::after {
  content: ""; position: absolute; z-index: -1; width: 240px; height: 240px; border-radius: 50%;
  filter: blur(70px); opacity: .45; pointer-events: none;
}
.plans::before { left: 18%; top: -8%; background: var(--yellow); }
.plans::after { right: 14%; bottom: -10%; background: var(--mint); }
.plan {
  --accent: var(--yellow);
  display: flex; flex-direction: column; gap: 14px; padding: var(--card-pad);
}
.plan:nth-child(2) { --accent: var(--mint); }
.plan:nth-child(3) { --accent: var(--pink); }
.plan h3 { margin: 0; font-family: var(--font); font-weight: 700; font-size: clamp(1.55rem, 2.3vw, 1.9rem); line-height: 1.15; color: var(--accent); overflow-wrap: break-word; text-wrap: balance; }
.plan .for { margin: 0; font-size: 1rem; opacity: .9; }
.plan .price { margin: 6px 0 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.plan .price .amount { display: inline-flex; align-items: baseline; gap: 8px; }

/* currency switch above the price cards: pills in the .chip style */
.currency { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }
.currency legend { float: left; padding: 0; margin: 0 14px 0 0; line-height: 44px; font-weight: 800; font-size: .95rem; }
.currency .chip { display: inline-block; vertical-align: middle; margin: 0 6px 6px 0; }
/* CSS only: the checked radio hides the other price. Browsers without :has show both prices. */
section:has(.currency input[value="byn"]:checked) .amount-rub,
section:has(.currency input[value="rub"]:checked) .amount-byn { display: none; }
.plan .price .from { font-weight: 600; opacity: .8; }
.plan .price strong { font-family: var(--font); font-weight: 700; font-size: clamp(1.7rem, 3.2vw, 2.3rem); line-height: 1.1; }
.plan ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; font-size: 1rem; }
.plan li { position: relative; padding-left: 28px; }
.plan li::before {
  content: ""; position: absolute; left: 6px; top: .38em; width: 6px; height: 11px;
  border-right: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(45deg);
}
.plan .btn { margin-top: auto; align-self: flex-start; }
/* the yellow buttons have a 6px step under them; add it to the bottom padding so the space looks equal */
.plan, .works { padding-bottom: calc(var(--card-pad) + 6px); }
.plans-note { margin: 24px 0 0; max-width: 40em; font-size: 1rem; opacity: .85; }

/* "how the work goes": numbered steps, accent colours cycle like the price cards */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; counter-reset: step; }
.steps li { --accent: var(--yellow); counter-increment: step; }
.steps li, .trust li { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 2px solid rgba(255, 255, 255, .25); border-radius: 24px; }
.steps li:nth-child(3n+2) { --accent: var(--mint); }
.steps li:nth-child(3n+3) { --accent: var(--pink); }
.steps li::before { content: counter(step); font-family: var(--font); font-weight: 700; font-size: 1.8rem; line-height: 1; color: var(--accent); }
.steps strong, .trust strong { font-weight: 700; }
.steps span, .trust span { font-size: .95rem; opacity: .9; }

/* about me: the photo in a rounded frame, a thin yellow frame offset behind it, no glow */
.about { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 56px; align-items: center; }
.about-figure { position: relative; isolation: isolate; margin: 0 14px 14px 0; max-width: 360px; }
.about-figure::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border: 2px solid var(--yellow); border-radius: 32px; transform: translate(14px, 14px);
}
.about-photo { display: block; width: 100%; height: auto; border-radius: 32px; background: var(--blue-deep); }
.about-text p { margin: 0 0 16px; max-width: 34em; }
.about-text .about-name { margin: 0 0 4px; font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; }
.about-text .about-role { margin: 0 0 20px; font-weight: 800; color: var(--yellow); }
.about-link { color: var(--pink); font-weight: 800; transition: color .3s var(--ease); }
.about-link:hover { color: var(--mint); }

/* order block: glass card with contact buttons (no form, see order-form-brief.md in studio) */
.order {
  padding: var(--card-pad);
  background: linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.order .lead-in { margin: 0 0 28px; max-width: 36em; font-size: 1.1rem; }
.order-actions { display: flex; flex-wrap: wrap; gap: 20px 24px; }
/* second button: outline instead of yellow, so the main action (Telegram) stays the brightest */
.btn-ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: var(--yellow); box-shadow: inset 0 0 0 2px var(--yellow); }
.btn-ghost:active { box-shadow: inset 0 0 0 2px var(--yellow); }

/* plain pages: privacy, 404 */
.doc { max-width: 46em; padding: 24px 0 72px; }
.doc h1 { max-width: none; font-size: clamp(1.8rem, 5vw, 3rem); }
.doc h2 { font-size: 1.35rem; margin: 36px 0 12px; }
.doc p, .doc li { font-size: 1.05rem; }
.doc a { color: var(--pink); font-weight: 800; }
.doc a:hover { color: var(--mint); }
.notfound { min-height: 70vh; display: grid; align-content: center; justify-items: start; gap: 8px; }
.notfound h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 5vw, 3rem); }
.notfound p { margin: 0; }
.notfound .notfound-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.notfound .code { font-family: var(--font); font-weight: 700; font-size: clamp(5rem, 22vw, 12rem); line-height: 1; color: var(--yellow); }

footer { padding: 24px 0 48px; font-size: .9rem; opacity: .8; display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer a { text-decoration: none; font-weight: 800; }
footer a:hover { color: var(--yellow); }

main:focus-visible { outline: none; }

.top .mark { display: block; line-height: 0; }
.logo { display: block; width: 48px; height: 48px; transition: transform .35s var(--ease); }
.top .mark:hover .logo { transform: rotate(-8deg) scale(1.1); }

/* pills: the currency switch above the price cards */
.chip { position: relative; display: block; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: block; padding: 12px 20px; border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .1);
  font-weight: 700; line-height: 1.2;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.chip:hover span { border-color: var(--white); background: rgba(255, 255, 255, .18); }
.chip input:checked + span {
  background: var(--yellow); border-color: var(--yellow); color: var(--ink);
  box-shadow: 0 4px 0 var(--yellow-step); transform: translateY(-2px);
}
.chip input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* layout breakpoints */
@media (min-width: 901px) {
  /* the cards share rows (title, description, price, list, button), so the prices line up */
  @supports (grid-template-rows: subgrid) {
    .plan { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 14px; }
  }
  /* fallback for browsers without subgrid */
  @supports not (grid-template-rows: subgrid) {
    .plan h3 { min-height: 2.3em; }
    .plan .for { min-height: 3.1em; }
  }
}
@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; --card-pad: 24px; --section-gap: 64px; --heading-gap: 24px; }
  .bg-win-a { width: 78vw; right: -22vw; top: 18vh; }
  .bg-win-b { display: none; }
  .hero { padding: 24px 0 72px; }
  .stamp { position: static; margin: 0 0 24px; }
  .panels, .cards, .trust { grid-template-columns: 1fr; }
  .contacts a { flex-direction: column; gap: 4px; }
  .contacts .val { text-align: left; }
  .currency legend { float: none; line-height: 1.4; margin-bottom: 10px; } /* both pills fit in one row */
  .about { grid-template-columns: 1fr; gap: 32px; }
  .about-figure { max-width: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .intro.lead, .js .reveal { opacity: 1; transform: none; }
}
