/* ==========================================================================
   MURASHKIN STUDIO — Design System
   Art direction: "exaggerated minimalism" — oversized fluid type, generous
   whitespace, high contrast, calm & professional. Light theme primary with
   one dark section for rhythm. Orange = CTA only, purple = secondary detail.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FONTS
   Headings: "Unbounded" (500, 700) — distinctive, techy, full Cyrillic.
   Body: "Inter" (400, 500, 600) — chosen over Manrope because Inter ships
   a wider Cyrillic + Cyrillic-ext subset, has superior hinting and optical
   legibility at 16–18px UI sizes, and its neutral grotesque voice balances
   the loud, decorative Unbounded without competing with it.
   -------------------------------------------------------------------------- */
/* Fonts are loaded from index.html via <link rel="preconnect"> + <link rel="stylesheet">
   so the font CSS downloads in parallel with this file instead of after it. */

/* --------------------------------------------------------------------------
   2. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* ---- Color: brand primitives ---- */
  --brand-orange: #FB5607;
  --brand-purple: #8338EC;
  --brand-graphite: #212529;
  --brand-grey: #E9ECEF;

  /* ---- Color: semantic ---- */
  --color-bg: #FFFFFF;
  --color-surface: #FFFFFF;
  --color-surface-grey: var(--brand-grey);
  --color-surface-dark: var(--brand-graphite);
  --color-text: var(--brand-graphite);
  --color-text-muted: #495057;          /* 7.5:1 on white — AA/AAA safe   */
  --color-text-on-dark: var(--brand-grey);
  --color-text-muted-on-dark: #ADB5BD;
  --color-accent: var(--brand-orange);   /* large text / btn bg only       */
  --color-accent-hover: #E04E00;         /* darker hover, better contrast  */
  --color-accent-text: #C74400;          /* AA-safe orange: 4.7:1 on white */
  --color-secondary: var(--brand-purple);
  --color-secondary-hover: #6F2DC9;
  --color-secondary-tint: #8338EC14;     /* 8% purple tint for badges      */
  --color-border: #DEE2E6;
  --color-border-dark: #343A40;
  --color-focus: var(--brand-purple);

  /* ---- Spacing scale (4px base) ---- */
  --space-1: 0.25rem;   /*   4px */
  --space-2: 0.5rem;    /*   8px */
  --space-3: 0.75rem;   /*  12px */
  --space-4: 1rem;      /*  16px */
  --space-5: 1.25rem;   /*  20px */
  --space-6: 1.5rem;    /*  24px */
  --space-8: 2rem;      /*  32px */
  --space-10: 2.5rem;   /*  40px */
  --space-12: 3rem;     /*  48px */
  --space-16: 4rem;     /*  64px */
  --space-20: 5rem;     /*  80px */
  --space-24: 6rem;     /*  96px */

  /* ---- Fluid type scale ---- */
  --text-xs: 0.75rem;                                   /* 12px           */
  --text-sm: 0.875rem;                                  /* 14px           */
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem); /* 16 → 18px      */
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);/* 18 → 22px      */
  --text-xl: clamp(1.375rem, 1.2rem + 0.9vw, 1.875rem); /* 22 → 30px      */
  --text-2xl: clamp(1.75rem, 1.4rem + 1.8vw, 2.75rem);  /* 28 → 44px      */
  --text-3xl: clamp(2.25rem, 1.7rem + 2.8vw, 4rem);     /* 36 → 64px      */
  --text-hero: clamp(2.75rem, 1.8rem + 5vw, 6rem);      /* 44 → 96px      */

  /* ---- Font families ---- */
  --font-heading: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* ---- Radii ---- */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;

  /* ---- Elevation (one consistent, subtle scale) ---- */
  --shadow-sm: 0 1px 2px rgba(33, 37, 41, 0.06);
  --shadow-md: 0 4px 12px rgba(33, 37, 41, 0.08);
  --shadow-lg: 0 12px 32px rgba(33, 37, 41, 0.12);

  /* ---- Motion ---- */
  --transition: 200ms ease-out;
  --transition-fast: 150ms ease-out;

  /* ---- Layout ---- */
  --container: 1200px;
  --nav-height: 72px;

  /* ---- Z-index scale ---- */
  --z-base: 0;
  --z-raised: 10;
  --z-nav: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* --------------------------------------------------------------------------
   3. RESET + BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* guard against accidental horizontal scroll */
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-secondary-hover);
  text-decoration: underline;
}

ul[class],
ol[class] {
  list-style: none;
}

::selection {
  background-color: var(--brand-purple);
  color: #FFFFFF;
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   4. TYPOGRAPHY
   -------------------------------------------------------------------------- */
.h1,
.h2,
.h3,
h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: inherit;
  overflow-wrap: break-word; /* Unbounded is wide — never overflow on mobile */
}

.h1 {
  font-size: var(--text-hero);
}

.h2 {
  font-size: var(--text-3xl);
  line-height: 1.15;
}

.h3 {
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.2;
}

.lead {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 42rem;
}

/* Narrow screens only: hyphenate long Russian words in section headings
   (h1 stays unhyphenated — display type must not break mid-word) */
@media (max-width: 480px) {
  h2,
  h3,
  .h2,
  .h3 {
    -webkit-hyphens: auto;
    hyphens: auto;
  }

  /* card and band headings must not break mid-word — enough room to wrap whole words */
  .card__title,
  .magnet__title {
    -webkit-hyphens: manual;
    hyphens: manual;
  }
}

.eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent-text); /* AA-safe orange for small text */
  margin-bottom: var(--space-4);
}

.eyebrow--purple {
  color: var(--color-secondary);
}

.text-muted {
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   5. LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 4vw, var(--space-8));
}

.section {
  padding-block: clamp(4rem, 10vw, 8rem);
  background-color: var(--color-bg);
}

.section--grey {
  background-color: var(--color-surface-grey);
}

/* One dark section per page for contrast rhythm */
.section--dark {
  background-color: var(--color-surface-dark);
  color: var(--color-text-on-dark);
}

.section--dark .lead,
.section--dark .text-muted {
  color: var(--color-text-muted-on-dark);
}

.section--dark .eyebrow {
  color: var(--brand-orange); /* full orange on graphite: ≈ 4.7:1, passes AA for 14px 600 */
}

/* Responsive grids: mobile-first, collapse to single column */
.grid-2,
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   6. BUTTONS
   Orange #FB5607 + white ≈ 3.26:1 — passes AA only as WCAG "large text",
   so buttons use 19px / 700 (≥ 18.66px bold); hover darkens to #E04E00.
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-body);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-fast),
              border-color var(--transition-fast),
              color var(--transition-fast),
              transform var(--transition-fast),
              box-shadow var(--transition-fast);
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

/* Primary — the one loud orange element on the page */
.btn--primary {
  background-color: var(--color-accent);
  color: #FFFFFF;
}

.btn--primary:hover {
  background-color: var(--color-accent-hover);
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
}

/* Secondary — quiet graphite outline */
.btn--secondary {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-text);
}

.btn--secondary:hover {
  background-color: var(--color-text);
  color: #FFFFFF;
}

/* On-dark variants (inside .section--dark) */
.btn--on-dark {
  background-color: #FFFFFF;
  color: var(--brand-graphite);
}

.btn--on-dark:hover {
  background-color: var(--brand-grey);
  color: var(--brand-graphite);
  box-shadow: var(--shadow-md);
}

.btn--outline-on-dark {
  background-color: transparent;
  color: var(--color-text-on-dark);
  border-color: var(--color-text-on-dark);
}

.btn--outline-on-dark:hover {
  background-color: var(--color-text-on-dark);
  color: var(--brand-graphite);
}

/* --------------------------------------------------------------------------
   7. NAVIGATION (sticky, blur backdrop)
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  height: var(--nav-height);
  background-color: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav__logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-text);
  text-decoration: none;
}

.nav__logo:hover {
  color: var(--color-text);
  text-decoration: none;
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}

.nav__link:hover {
  color: var(--color-secondary);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   8. CARDS
   -------------------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 3vw, var(--space-10));
  transition: border-color var(--transition),
              transform var(--transition),
              box-shadow var(--transition);
}

.card:hover {
  border-color: var(--color-secondary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card__title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--text-lg);
  line-height: 1.2;
}

.card__text {
  color: var(--color-text-muted);
}

/* Cards inside the dark section */
.section--dark .card {
  background-color: transparent;
  border-color: var(--color-border-dark);
}

.section--dark .card:hover {
  border-color: var(--color-secondary);
}

.section--dark .card__text {
  color: var(--color-text-muted-on-dark);
}

/* --------------------------------------------------------------------------
   9. BADGES / TAGS
   -------------------------------------------------------------------------- */
.badge,
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-secondary);
  background-color: var(--color-secondary-tint);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.section--dark .badge,
.section--dark .tag {
  background-color: rgba(131, 56, 236, 0.2);
  color: #B794F6; /* lightened purple — readable on graphite */
}

/* --------------------------------------------------------------------------
   10. FORMS
   -------------------------------------------------------------------------- */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  width: 100%;
  max-width: 32rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.form__input,
.form__textarea,
.form__select {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form__textarea {
  min-height: 128px;
  resize: vertical;
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: #868E96;
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px var(--color-secondary-tint);
}

.form__input:focus-visible,
.form__textarea:focus-visible,
.form__select:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.form__hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.form__error {
  font-size: var(--text-sm);
  color: #C92A2A;
}

/* --------------------------------------------------------------------------
   11. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background-color: var(--color-surface-dark);
  color: var(--color-text-on-dark);
  padding-block: clamp(var(--space-12), 6vw, var(--space-20));
}

.footer__link {
  display: inline-block;
  color: var(--color-text-on-dark);
  padding-block: var(--space-1);
}

.footer__link:hover {
  color: #FFFFFF;
}

.footer__bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-dark);
  font-size: var(--text-sm);
  color: var(--color-text-muted-on-dark);
}

/* --------------------------------------------------------------------------
   12. SCROLL REVEAL
   -------------------------------------------------------------------------- */
/* hidden-until-scroll only when JS confirmed itself via html.js —
   crawlers and no-JS clients always see full content */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
}

html.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Optional stagger helpers for grids */
.reveal--delay-1 { transition-delay: 80ms; }
.reveal--delay-2 { transition-delay: 160ms; }
.reveal--delay-3 { transition-delay: 240ms; }

/* --------------------------------------------------------------------------
   13. REDUCED MOTION
   Kill all animation/transition for users who ask for it — reveal elements
   render fully visible and static.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
  }

  .btn:hover,
  .card:hover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   14. UTILITIES
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.flow > * + * {
  margin-top: var(--space-4);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.text-center {
  text-align: center;
}

.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

/* ==========================================================================
   15. PAGE LAYER — layout for concrete landing sections
   (extends the design system above; overrides .nav visual → .header)
   ========================================================================== */

/* ---- Anchor offset under sticky header ---- */
[id] {
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: calc(var(--z-nav) + 1);
  background: #FFFFFF;
  color: var(--color-text);
  padding: var(--space-3) var(--space-5);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-md);
}

.skip-link:focus {
  top: 0;
}

/* ---- Header / nav (sticky lives on .header, .nav is the inner row) ---- */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background-color: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  position: static;
  height: var(--nav-height);
  background: none;
  border: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
}

.nav__logo:hover {
  color: var(--color-text);
  text-decoration: none;
}

.nav__logo svg,
.nav__logo img {
  width: 38px;
  height: 38px;
  flex: none;
}

.nav__wordmark {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav__cta {
  min-height: 42px;
  padding-block: var(--space-2);
}

.nav__burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
}

.nav__burger-line {
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: var(--color-text);
  transition: transform var(--transition), opacity var(--transition);
}

.nav__burger[aria-expanded="true"] .nav__burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__burger[aria-expanded="true"] .nav__burger-line:nth-child(2) {
  opacity: 0;
}

.nav__burger[aria-expanded="true"] .nav__burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 767px) {
  .nav__burger {
    display: flex;
  }

  .nav__menu {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
    background: #FFFFFF;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    padding: var(--space-6) clamp(var(--space-4), 4vw, var(--space-8)) var(--space-8);
  }

  .nav__menu--open {
    display: flex;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav__link {
    display: block;
    padding: var(--space-3) 0;
    font-size: var(--text-base);
  }

  .nav__cta {
    width: 100%;
  }
}

/* ---- Section head ---- */
.section__head {
  margin-bottom: clamp(var(--space-10), 6vw, var(--space-16));
  max-width: 52rem;
}

.section__title {
  font-size: var(--text-3xl);
  line-height: 1.15;
  margin-bottom: var(--space-4);
}

.section__intro {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 42rem;
}

.section--dark .section__intro {
  color: var(--color-text-muted-on-dark);
}

/* ---- Hero: editorial headline, mascot sticker, marquee — one viewport ---- */
:root {
  /* the site is light-only: block browser auto-darkening on phones */
  color-scheme: only light;
}

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--nav-height));
  padding-block: 0;
}

/* subtle dot grid behind the hero, fades at top and bottom */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(33, 37, 41, 0.07) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 72%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 72%, transparent);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(1.5rem, 4vh, 3rem);
}

.hero__title {
  font-size: clamp(2.5rem, 5.2vw, 4.75rem);
  margin-bottom: 0;
}

.hero__accent {
  position: relative;
  display: inline-block;
}

.hero__swash {
  position: absolute;
  left: -0.04em;
  bottom: -0.16em;
  width: 104%;
  height: 0.22em;
  overflow: visible;
}

.hero__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  margin-top: clamp(var(--space-6), 3vh, var(--space-10));
}

.hero__sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 32rem;
  margin-bottom: var(--space-6);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero__mail {
  margin-top: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.hero__mascot {
  flex: none;
  width: clamp(240px, 30vw, 420px);
  /* let the mascot ride up into the headline's whitespace */
  margin-top: calc(-1 * clamp(var(--space-8), 6vh, var(--space-16)));
}

.hero__mascot svg,
.hero__mascot img {
  width: 100%;
  height: auto;
  transform: rotate(-2deg);
}

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

.hero__mascot--float {
  animation: mascot-float 6s ease-in-out infinite;
}

@media (max-width: 767px) {
  .hero {
    min-height: 0; /* on phones let content define height — no cramped 100dvh */
  }

  /* one centered axis: headline → mascot → text → buttons */
  .hero__inner {
    text-align: center;
  }

  /* headline must hold its two intended lines: «Софт, который / работает годами» */
  .hero__title {
    font-size: clamp(1.6rem, 7.9vw, 2.5rem);
    white-space: nowrap;
  }

  .hero__bottom {
    flex-direction: column-reverse;
    align-items: center;
    gap: var(--space-5);
    margin-top: var(--space-4);
  }

  .hero__mascot {
    margin-top: 0;
    align-self: center;
    width: clamp(200px, 54vw, 280px);
  }

  .hero__sub {
    margin-inline: auto;
  }

  .hero__actions {
    justify-content: center;
  }
}

/* ---- Sticker treatment: white die-cut outline + soft shadow ---- */
.sticker {
  filter: drop-shadow(3px 0 0 #FFFFFF) drop-shadow(-3px 0 0 #FFFFFF)
          drop-shadow(0 3px 0 #FFFFFF) drop-shadow(0 -3px 0 #FFFFFF)
          drop-shadow(0 14px 22px rgba(33, 37, 41, 0.16));
}

/* ---- Marquee: studio disciplines ticker at the hero's base ---- */
.marquee {
  position: relative;
  margin-top: auto; /* pin to the bottom of the viewport-height hero */
  padding-block: var(--space-4);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: #FFFFFF;
  overflow: hidden;
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
}

.marquee__track span {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.marquee__dot {
  color: var(--color-accent-text);
}

.marquee__dot--alt {
  color: var(--color-secondary);
}

@keyframes marquee-scroll {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation: none;
  }
}

/* ---- Services: editorial numbered list instead of card grid ---- */
.services-list {
  border-top: 1px solid #CED4DA;
}

.service-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  grid-template-areas:
    "num title icon"
    "num text  icon";
  column-gap: var(--space-6);
  row-gap: var(--space-2);
  align-items: start;
  padding: var(--space-8) var(--space-4);
  border-bottom: 1px solid #CED4DA;
  transition: background-color var(--transition);
}

.service-row:hover {
  background-color: #FFFFFF;
}

.service-row__num {
  grid-area: num;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-xl);
  line-height: 1.3;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--color-secondary);
}

@supports not (-webkit-text-stroke: 1px black) {
  .service-row__num {
    color: var(--color-secondary);
  }
}

.service-row__title {
  grid-area: title;
  font-size: var(--text-xl);
  font-weight: 500;
  transition: color var(--transition);
}

.service-row:hover .service-row__title {
  color: var(--color-secondary);
}

.service-row__text {
  grid-area: text;
  color: var(--color-text-muted);
  max-width: 44rem;
}

.service-row__icon {
  grid-area: icon;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid #CED4DA;
  border-radius: var(--radius-full);
  color: var(--color-secondary);
  background: #FFFFFF;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
}

.service-row:hover .service-row__icon {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #FFFFFF;
  transform: rotate(-8deg);
}

.service-row__icon svg {
  width: 22px;
  height: 22px;
}

@media (min-width: 1024px) {
  .service-row {
    grid-template-columns: 5rem 1.1fr 1.4fr auto;
    grid-template-areas: "num title text icon";
    align-items: center;
    column-gap: var(--space-8);
  }
}

@media (max-width: 480px) {
  .service-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "num  icon"
      "title title"
      "text text";
    padding-inline: 0;
  }
}

/* ---- Service card icon ---- */
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-secondary-tint);
  color: var(--color-secondary);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

/* ---- Process ---- */
.process {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

.process__step {
  position: relative;
}

.process__number {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--color-secondary);
  background: var(--color-bg);
  padding-right: var(--space-3);
}

@supports not (-webkit-text-stroke: 1px black) {
  .process__number {
    color: var(--color-border);
  }
}

.process__title {
  font-size: var(--text-lg);
  font-weight: 500;
  margin: var(--space-4) 0 var(--space-2);
}

.process__text {
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .process {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-10) var(--space-8);
  }
}

@media (min-width: 1024px) {
  .process {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
  }

  /* connector line behind the oversized numbers */
  .process::before {
    content: "";
    position: absolute;
    top: 1.75rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-border);
  }

  .process__number {
    position: relative;
  }
}

/* ---- Why us: header row + mascot, then 4 points in an editorial band ---- */
.why__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  margin-bottom: clamp(var(--space-10), 6vw, var(--space-16));
}

.why__head {
  max-width: 44rem;
  margin-bottom: 0;
}

.why__mascot {
  flex: none;
  width: clamp(150px, 16vw, 220px);
}

.why__mascot svg,
.why__mascot img {
  width: 100%;
  height: auto;
  transform: rotate(4deg);
}

.why__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10) var(--space-8);
  border-top: 1px solid var(--color-border-dark);
  padding-top: clamp(var(--space-10), 5vw, var(--space-12));
}

@media (min-width: 640px) {
  .why__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .why__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.why__marker {
  display: block;
  margin-bottom: var(--space-4);
  font-size: 1.375rem;
  line-height: 1;
  color: #B794F6; /* lightened purple — readable on graphite */
}

.why__point-title {
  font-size: var(--text-lg);
  font-weight: 500;
  color: #FFFFFF;
  margin-bottom: var(--space-2);
}

.why__point-text {
  color: var(--color-text-muted-on-dark);
}

@media (max-width: 639px) {
  .why__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .why__mascot {
    align-self: flex-end;
    margin-top: calc(-1 * var(--space-8));
  }
}

/* ---- Case cards ---- */
.card--case .badge {
  align-self: flex-start;
}

.card--case__metric {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-xl);
  line-height: 1.15;
  color: var(--color-accent-text);
}

/* ---- CTA card ---- */
.cta-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #35205E 0%, var(--brand-graphite) 60%);
  color: var(--color-text-on-dark);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-10), 7vw, var(--space-20));
}

.cta-card__content {
  position: relative;
  z-index: var(--z-raised);
  max-width: 36rem;
}

.cta-card__title {
  font-size: var(--text-3xl);
  color: #FFFFFF;
  margin-bottom: var(--space-4);
}

.cta-card__text {
  font-size: var(--text-lg);
  color: var(--color-text-muted-on-dark);
  margin-bottom: var(--space-8);
}

.cta-card__mascot {
  position: absolute;
  right: clamp(0px, 4vw, 56px);
  bottom: -40px;
  width: clamp(180px, 24vw, 280px);
  transform: rotate(-4deg);
}

.cta-card__mascot svg,
.cta-card__mascot img {
  width: 100%;
  height: auto;
}

@media (max-width: 767px) {
  /* on phones the mascot shrinks and peeks from the card's corner
     instead of disappearing — the card felt empty without it */
  .cta-card {
    padding-bottom: calc(clamp(var(--space-10), 7vw, var(--space-20)) + 72px);
  }

  .cta-card__mascot {
    right: -14px;
    bottom: -30px;
    width: 150px;
    transform: rotate(-6deg);
  }
}

/* ---- Contact ---- */
.contact__inner {
  gap: clamp(var(--space-10), 6vw, var(--space-20));
  align-items: start;
}

.contact__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.contact__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--color-text);
  overflow-wrap: anywhere;
}

.contact__link:hover {
  color: var(--color-secondary);
  text-decoration: none;
}

.contact__link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-secondary-tint);
  color: var(--color-secondary);
  transition: background-color var(--transition), color var(--transition);
}

.contact__link:hover .contact__link-icon {
  background: var(--color-secondary);
  color: #FFFFFF;
}

.contact__link-icon svg {
  width: 22px;
  height: 22px;
}

/* form sits on the grey section — lift it onto a white card */
.section--grey .form {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 3vw, var(--space-10));
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* anti-spam honeypot: visually gone, still in the POST body for bots */
.form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form__required {
  color: var(--color-accent-text);
}

.form__input--invalid {
  border-color: #C92A2A;
}

.form__input--invalid:focus {
  border-color: #C92A2A;
  box-shadow: 0 0 0 3px rgba(201, 42, 42, 0.12);
}

.form__submit {
  align-self: flex-start;
}

.form__success {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: rgba(43, 138, 62, 0.1);
  color: #247736; /* ≥4.5:1 on the green tint */
  font-weight: 500;
}

/* ---- Footer layout ---- */
.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: 2fr 1fr 1fr auto;
    align-items: start;
  }
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: #FFFFFF;
}

.footer__logo:hover {
  color: #FFFFFF;
  text-decoration: none;
}

.footer__logo svg,
.footer__logo img {
  width: 32px;
  height: 32px;
  flex: none;
}

.footer__wordmark {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
}

.footer__line {
  margin-top: var(--space-4);
  max-width: 28rem;
  font-size: var(--text-sm);
  color: var(--color-text-muted-on-dark);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.footer__socials {
  display: flex;
  gap: var(--space-3);
}

.footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-full);
  color: var(--color-text-on-dark);
  transition: border-color var(--transition), color var(--transition);
}

.footer__social:hover {
  border-color: var(--color-secondary);
  color: #FFFFFF;
  text-decoration: none;
}

.footer__social svg {
  width: 20px;
  height: 20px;
}

/* ---- De-template accents ---- */
.card--case:nth-child(odd) .badge {
  transform: rotate(-2deg);
}

.card--case:nth-child(2) .badge {
  transform: rotate(1.5deg);
}

/* raster logo is slightly taller than square — keep its aspect */
.nav__logo img,
.footer__logo img {
  height: auto;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* ==========================================================================
   MOBILE POLISH — desktop-grade look on phones
   ========================================================================== */
@media (max-width: 480px) {
  /* CTA title: no mid-word hyphen break («Расскажи-те»), size to fit */
  .cta-card__title {
    -webkit-hyphens: manual;
    hyphens: manual;
    font-size: clamp(1.85rem, 8.5vw, 2.25rem);
  }

  /* full-width tap targets */
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .form__submit {
    width: 100%;
  }
}

/* ==========================================================================
   SERVICE PAGES — hero, breadcrumbs, pricing, FAQ, geo links
   ========================================================================== */
.breadcrumbs {
  margin-bottom: clamp(var(--space-6), 3vw, var(--space-10));
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.breadcrumbs a {
  color: var(--color-text-muted);
}

.breadcrumbs a:hover {
  color: var(--color-secondary);
}

.breadcrumbs span[aria-hidden] {
  margin-inline: var(--space-2);
  color: var(--color-border);
}

.page-hero {
  padding-top: clamp(var(--space-8), 5vw, var(--space-12));
}

.page-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
}

.page-hero__title {
  font-size: clamp(2.1rem, 4.5vw, 4rem);
  line-height: 1.1;
  margin-bottom: var(--space-6);
}

.page-hero__sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 36rem;
  margin-bottom: var(--space-8);
}

.page-hero__mascot {
  flex: none;
  width: clamp(180px, 22vw, 300px);
}

.page-hero__mascot img {
  width: 100%;
  height: auto;
  transform: rotate(-3deg);
}

@media (max-width: 767px) {
  .page-hero__inner {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .page-hero__mascot {
    align-self: flex-end;
    width: clamp(150px, 40vw, 220px);
  }
}

/* ---- pricing cards ---- */
.card--price {
  gap: var(--space-3);
}

.card--price__value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--color-accent-text);
}

.card--price__list {
  margin: var(--space-2) 0 var(--space-4);
  padding-left: 1.2em;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.card--price__btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ---- FAQ ---- */
.faq {
  max-width: 52rem;
  border-top: 1px solid #CED4DA;
}

.faq__item {
  border-bottom: 1px solid #CED4DA;
}

.faq__q {
  display: block;
  padding: var(--space-5) var(--space-10) var(--space-5) 0;
  position: relative;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--text-lg);
  cursor: pointer;
  list-style: none;
  transition: color var(--transition);
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q::after {
  content: "+";
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--color-secondary);
  transition: transform var(--transition);
}

.faq__item[open] .faq__q::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq__q:hover {
  color: var(--color-secondary);
}

.faq__a {
  padding: 0 var(--space-10) var(--space-6) 0;
  color: var(--color-text-muted);
  max-width: 46rem;
}

/* ---- feature grid on service pages ---- */
.feature-grid {
  gap: var(--space-6);
}

/* ---- geo links in footer ---- */
.footer__geo {
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted-on-dark);
}

.footer__geo-link {
  color: var(--color-text-on-dark);
  margin-right: var(--space-2);
  white-space: nowrap;
}

.footer__geo-link:hover {
  color: #FFFFFF;
}

/* ==========================================================================
   V2 BLOCKS — lead magnet, founder, cases footnote
   ========================================================================== */

/* ---- Lead magnet: checklist band ---- */
.magnet {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
  background: var(--color-surface-dark);
  color: #FFFFFF;
  border-radius: 24px;
  padding: clamp(var(--space-8), 5vw, var(--space-12));
}

.magnet__title {
  color: #FFFFFF;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: var(--space-4);
}

.magnet__text {
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: var(--space-6);
  max-width: 34rem;
}

.magnet__form {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.magnet__input {
  flex: 1 1 240px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
  font: inherit;
}

.magnet__input::placeholder { color: rgba(255, 255, 255, 0.45); }

.magnet__input:focus {
  outline: none;
  border-color: #FB5607;
}

.magnet__note {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.55);
}

.magnet__success {
  margin-top: var(--space-4);
  font-weight: 600;
  color: #7CE38B;
}

.magnet__list {
  list-style: none;
  display: grid;
  gap: var(--space-3);
  padding: 0;
  margin: 0;
}

.magnet__list li {
  position: relative;
  padding-left: 1.6em;
  color: rgba(255, 255, 255, 0.85);
}

.magnet__list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: #FB5607;
}

@media (max-width: 767px) {
  .magnet { grid-template-columns: 1fr; }
}

/* ---- Founder strip inside why-us ---- */
.founder {
  margin-top: clamp(var(--space-8), 5vw, var(--space-12));
  padding-top: clamp(var(--space-6), 4vw, var(--space-8));
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.founder__avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.founder__avatar img { width: 62px; height: auto; }

.founder__name {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  color: #FFFFFF;
}

.founder__role {
  color: var(--color-text-muted-on-dark);
  font-size: var(--text-sm);
  margin-top: 2px;
}

.founder__text {
  flex: 1 1 320px;
  color: rgba(255, 255, 255, 0.78);
}

.founder__tg {
  color: #FFFFFF;
  font-weight: 600;
  white-space: nowrap;
}

/* ---- Privacy note under form buttons ---- */
.privacy-note {
  margin-top: var(--space-3);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.privacy-note a {
  color: inherit;
  text-decoration: underline;
}

/* ---- Cases footnote (NDA line) ---- */
.cases__note {
  margin-top: var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.cases__note a {
  color: var(--color-accent-text);
  font-weight: 600;
}
