/* =========================================
   1. ЦВЕТОВАЯ СИСТЕМА
   ========================================= */

:root {
  --color-dark: #3b3736;
  --color-cream: #ffeac5;
  --color-coral: #fe6847;
  --color-peach: #ffcd8e;

  --page-bg: #211f1e;
  --surface: #292524;
  --surface-raised: #302b2a;
  --surface-hover: #393231;

  --text-primary: #ffeac5;
  --text-secondary: #c6b9a8;
  --text-muted: #a99c8b;

  --intro-bg: #292524;

  --field-bg: #252221;
  --field-border: #514744;
  --field-focus-bg: #302b2a;
  --placeholder: #a99c8b;

  --button-bg: #fe6847;
  --button-text: #3b3736;
  --button-hover: #ff8063;

  --border-color: rgb(255 234 197 / 12%);
  --grid-line: rgb(255 234 197 / 7%);

  --orbit-line: rgb(255 234 197 / 28%);
  --orbit-line-accent: rgb(254 104 71 / 30%);

  --error-bg: #3a2926;
  --error-text: #ffbfb1;
  --error-border: #75433a;

  --success-bg: #26372d;
  --success-text: #bde8c9;
  --success-border: #476b52;

  --page-shadow: 0 24px 70px rgb(0 0 0 / 18%);

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

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;

  color-scheme: dark;
}


/* =========================================
   2. СВЕТЛАЯ ТЕМА
   ========================================= */

html[data-theme="light"] {
  color-scheme: light;

  --page-bg: #fff8ec;
  --surface: #fff3e1;
  --surface-raised: #ffffff;
  --surface-hover: #f5e8d6;

  --text-primary: #3b3736;
  --text-secondary: #776c62;
  --text-muted: #8b7b6a;

  --intro-bg: #3b3736;

  --field-bg: #fffdf8;
  --field-border: #d9c7ae;
  --field-focus-bg: #ffffff;
  --placeholder: #988775;

  --button-bg: #3b3736;
  --button-text: #ffeac5;
  --button-hover: #514a48;

  --border-color: rgb(59 55 54 / 13%);
  --grid-line: rgb(59 55 54 / 6%);

  --orbit-line: rgb(59 55 54 / 24%);
  --orbit-line-accent: rgb(254 104 71 / 35%);

  --error-bg: #fff0eb;
  --error-text: #9d3825;
  --error-border: #efb0a0;

  --success-bg: #e8f6e9;
  --success-text: #285e3d;
  --success-border: #afd4b4;

  --page-shadow: 0 24px 70px rgb(59 55 54 / 10%);
}


/* =========================================
   3. ОБЩИЕ ПРАВИЛА
   ========================================= */

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
  overflow-x: clip;
}

body {
  min-width: 320px;
  margin: 0;

  color: var(--text-primary);
  background: var(--page-bg);

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

  line-height: 1.5;

  transition:
    color 180ms ease,
    background-color 180ms ease;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;

  padding: 10px 14px;

  border-radius: 8px;

  color: var(--button-text);
  background: var(--color-cream);

  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(1160px, calc(100% - 64px));
  margin-inline: auto;
}


/* =========================================
   4. ШАПКА И НАВИГАЦИЯ
   ========================================= */

.site-header {
  position: relative;
  z-index: 20;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;

  min-height: 104px;

  border-bottom: 1px solid var(--border-color);
}

.brand {
  display: inline-flex;
  align-items: center;

  flex: 0 1 auto;
  width: fit-content;
  max-width: 100%;

  margin: 0;
  padding: 0;

  border: 0;
  border-radius: 0;

  background: transparent;

  line-height: 0;
  text-decoration: none;
}

.brand-logo {
  display: block;

  width: auto;
  height: 74px;
  max-width: 100%;

  object-fit: contain;
}

/*
  Здесь намеренно нет подложки у логотипа.
  Его внешний вид меняется переключением SVG через home.js.
*/

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3vw, 38px);

  margin-left: auto;
}

.site-nav a {
  color: var(--text-secondary);

  font-size: 13px;
  font-weight: 550;

  text-decoration: none;

  transition: color 160ms ease;
}

.site-nav a:hover {
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;

  border: 1px solid var(--border-color);
  border-radius: 50%;

  color: var(--text-primary);
  background: var(--surface-raised);

  cursor: pointer;

  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.theme-toggle i {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 18px;
  line-height: 1;
  font-style: normal;
}

.theme-toggle:hover {
  color: var(--button-text);
  background: var(--color-coral);
  border-color: transparent;

  transform: translateY(-1px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;

  min-height: 52px;
  padding: 14px 19px;

  border: 1px solid transparent;
  border-radius: 12px;

  color: var(--button-text);
  background: var(--button-bg);

  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;

  cursor: pointer;

  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.button:hover {
  background: var(--button-hover);
  transform: translateY(-1px);

  box-shadow: 0 8px 20px rgb(254 104 71 / 18%);
}

.button--small {
  min-height: 42px;
  padding: 10px 14px;

  border-radius: 10px;

  font-size: 12px;
}

.button:focus-visible,
.theme-toggle:focus-visible,
.menu-toggle:focus-visible,
a:focus-visible {
  outline: 3px solid var(--color-coral);
  outline-offset: 4px;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;

  width: 42px;
  height: 42px;
  padding: 0;

  border: 1px solid var(--border-color);
  border-radius: 50%;

  color: var(--text-primary);
  background: var(--surface-raised);

  cursor: pointer;
}

.menu-toggle span {
  display: block;

  width: 17px;
  height: 1.5px;

  border-radius: 2px;

  background: currentColor;

  transition: transform 160ms ease;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}


/* =========================================
   5. ПЕРВЫЙ ЭКРАН
   ========================================= */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.94fr);
  align-items: center;
  gap: clamp(34px, 5vw, 72px);

  padding: 76px 0 98px;
}

.hero-copy {
  position: relative;
  z-index: 2;

  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  color: var(--text-secondary);

  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.45px;
  line-height: 1.4;
}

.eyebrow-dot {
  display: block;

  width: 7px;
  height: 7px;
  flex: 0 0 7px;

  border-radius: 50%;

  background: var(--color-coral);
  box-shadow: 0 0 0 4px rgb(254 104 71 / 10%);
}

.hero-title {
  max-width: 660px;
  margin: 22px 0 0;

  font-size: clamp(44px, 5.5vw, 70px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -3.8px;
}

.hero-title span {
  display: block;
  color: var(--color-coral);
}

.hero-description {
  max-width: 510px;
  margin: 25px 0 0;

  color: var(--text-secondary);

  font-size: 16px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;

  margin-top: 31px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  color: var(--text-primary);

  font-size: 13px;
  font-weight: 650;

  text-decoration: none;

  transition: color 160ms ease;
}

.text-link span {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 23px;
  height: 23px;

  border: 1px solid var(--border-color);
  border-radius: 50%;

  color: var(--color-coral);

  transition: transform 160ms ease;
}

.text-link:hover {
  color: var(--color-coral);
}

.text-link:hover span {
  transform: translateY(2px);
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 13px;

  margin-top: 38px;
}

.hero-note p {
  max-width: 230px;
  margin: 0;

  color: var(--text-muted);

  font-size: 11px;
  line-height: 1.55;
}

.avatar-stack {
  display: inline-flex;
  align-items: center;
  padding-left: 2px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 32px;
  height: 32px;
  margin-left: -5px;

  border: 2px solid var(--page-bg);
  border-radius: 50%;

  color: #3b3736;

  font-size: 10px;
  font-weight: 800;
}

.avatar:first-child {
  margin-left: 0;
}

.avatar--cream {
  background: #ffeac5;
}

.avatar--coral {
  background: #fe6847;
}

.avatar--peach {
  background: #ffcd8e;
}

.avatar--outline {
  border-color: var(--surface-raised);

  color: var(--text-primary);
  background: var(--surface-raised);
}


/* =========================================
   6. ДЕМО-МАКЕТ РАСПИСАНИЯ
   ========================================= */

.hero-visual {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 0;
  min-height: 540px;

  isolation: isolate;
  overflow: visible;
}

.visual-orbit {
  position: absolute;
  z-index: 0;

  border: 1px solid var(--orbit-line);
  border-radius: 50%;

  pointer-events: none;
}

.visual-orbit--outer {
  top: 50%;
  left: 50%;

  width: min(540px, 118%);
  height: auto;
  aspect-ratio: 1;

  transform: translate(-50%, -50%) rotate(-20deg);
}

.visual-orbit--inner {
  top: 50%;
  left: 50%;

  width: min(480px, 106%);
  height: auto;
  aspect-ratio: 1;

  border-color: var(--orbit-line-accent);

  transform: translate(-50%, -50%);
}

.visual-segment {
  position: absolute;
  z-index: 0;

  width: 75px;
  height: 20px;

  border-radius: 30px;

  pointer-events: none;
}

.visual-segment--coral {
  top: 42px;
  right: 56px;

  background: var(--color-coral);

  transform: rotate(48deg);
}

.visual-segment--peach {
  bottom: 51px;
  left: 43px;

  width: 61px;
  height: 15px;

  background: var(--color-peach);

  transform: rotate(-42deg);
}

.schedule-card {
  position: relative;
  z-index: 1;

  width: min(100%, 455px);
  padding: 23px;

  border: 1px solid var(--border-color);
  border-radius: 22px;

  background: var(--surface-raised);
  box-shadow: var(--page-shadow);
}

.schedule-card__top,
.schedule-card__title-wrap,
.participants,
.common-time,
.schedule-legend,
.schedule-row {
  display: flex;
  align-items: center;
}

.schedule-card__top {
  justify-content: space-between;
  gap: 12px;
}

.schedule-card__title-wrap {
  min-width: 0;
  gap: 12px;
}

.schedule-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 43px;
  height: 43px;
  flex: 0 0 43px;

  border-radius: 13px;

  color: var(--color-coral);
  background: rgb(254 104 71 / 12%);
}

.schedule-icon svg {
  width: 23px;
  height: 23px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-label {
  margin: 0 0 3px;

  color: var(--text-muted);

  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}

.schedule-card h2 {
  margin: 0;

  color: var(--text-primary);

  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.3px;
}

.more-button {
  width: 32px;
  height: 32px;
  padding: 0 0 7px;

  border: 1px solid var(--border-color);
  border-radius: 10px;

  color: var(--text-secondary);
  background: transparent;

  font-size: 23px;
  line-height: 1;
}

.participants {
  gap: 10px;

  margin-top: 18px;
  padding-bottom: 18px;

  border-bottom: 1px solid var(--border-color);

  color: var(--text-secondary);

  font-size: 10px;
}

.avatar-stack--small .avatar {
  width: 26px;
  height: 26px;

  border-color: var(--surface-raised);

  font-size: 9px;
}

.common-time {
  justify-content: space-between;
  gap: 12px;

  margin: 17px 0 20px;
  padding: 13px 14px;

  border: 1px solid rgb(254 104 71 / 20%);
  border-radius: 13px;

  background: rgb(254 104 71 / 7%);
}

.common-time p {
  margin: 0 0 3px;

  color: var(--text-secondary);

  font-size: 10px;
}

.common-time strong {
  color: var(--text-primary);

  font-size: 14px;
  font-weight: 750;
}

.match-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;

  flex-shrink: 0;
  padding: 6px 8px;

  border-radius: 8px;

  color: #bde8c9;
  background: rgb(76 155 101 / 13%);

  font-size: 9px;
  font-weight: 750;
}

.match-badge svg {
  width: 13px;
  height: 13px;

  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.schedule-table {
  display: grid;
  gap: 8px;
}

.schedule-row {
  display: grid;
  grid-template-columns: 78px repeat(3, minmax(0, 1fr));
  gap: 7px;

  min-width: 0;
}

.schedule-row--head {
  color: var(--text-muted);

  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.6px;
  text-align: center;
}

.schedule-row--head span {
  padding-bottom: 4px;
}

.schedule-row--head .day-active {
  color: var(--color-coral);
}

.person-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  min-width: 0;

  color: var(--text-secondary);

  font-size: 10px;
  white-space: nowrap;
}

.person-dot,
.legend-dot {
  display: inline-block;

  width: 7px;
  height: 7px;
  flex: 0 0 7px;

  border-radius: 50%;
}

.person-dot--one {
  background: #ffeac5;
}

.person-dot--two {
  background: #fe6847;
}

.person-dot--three {
  background: #ffcd8e;
}

.person-dot--four {
  background: #a6b7a2;
}

.time-cell {
  display: block;

  height: 19px;

  border-radius: 5px;
}

.time-cell--free {
  background: rgb(189 232 201 / 17%);
}

.time-cell--busy {
  background: rgb(169 156 139 / 12%);
}

.time-cell--match {
  background: var(--color-coral);
  box-shadow: 0 0 0 1px rgb(254 104 71 / 8%);
}

.schedule-legend {
  flex-wrap: wrap;
  gap: 12px;

  margin-top: 18px;

  color: var(--text-muted);

  font-size: 8px;
}

.schedule-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot--free {
  background: rgb(189 232 201 / 65%);
}

.legend-dot--busy {
  background: rgb(169 156 139 / 45%);
}

.legend-dot--match {
  background: var(--color-coral);
}

.floating-note {
  position: absolute;
  right: -13px;
  bottom: 24px;
  z-index: 3;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 12px 15px;

  border: 1px solid var(--border-color);
  border-radius: 14px;

  background: var(--surface-raised);
  box-shadow: var(--page-shadow);
}

.floating-note__icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 29px;
  height: 29px;

  border-radius: 9px;

  color: #bde8c9;
  background: rgb(76 155 101 / 15%);

  font-size: 17px;
  font-weight: 800;
}

.floating-note strong,
.floating-note small {
  display: block;
}

.floating-note strong {
  color: var(--text-primary);
  font-size: 10px;
}

.floating-note small {
  margin-top: 2px;

  color: var(--text-muted);

  font-size: 9px;
}


/* =========================================
   7. СЕКЦИИ И ЗАГОЛОВКИ
   ========================================= */

.section-block {
  padding: 80px 0 92px;

  border-top: 1px solid var(--border-color);
}

.section-heading {
  max-width: 650px;
}

.section-heading h2 {
  margin: 17px 0 0;

  font-size: clamp(34px, 4.2vw, 50px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2.2px;
}

.section-heading h2 span {
  color: var(--color-coral);
}

.section-heading > p {
  max-width: 550px;
  margin: 18px 0 0;

  color: var(--text-secondary);

  font-size: 14px;
  line-height: 1.8;
}


/* =========================================
   8. КАРТОЧКИ ВОЗМОЖНОСТЕЙ
   ========================================= */

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

  margin-top: 39px;
}

.feature-card {
  min-width: 0;
  padding: 25px 23px 27px;

  border: 1px solid var(--border-color);
  border-radius: 18px;

  background: var(--surface);

  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgb(254 104 71 / 30%);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 48px;
  height: 48px;
  margin-bottom: 24px;

  border-radius: 14px;
}

.feature-icon svg {
  width: 25px;
  height: 25px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-icon--coral {
  color: var(--color-coral);
  background: rgb(254 104 71 / 12%);
}

.feature-icon--peach {
  color: var(--color-peach);
  background: rgb(255 205 142 / 12%);
}

.feature-icon--cream {
  color: var(--color-cream);
  background: rgb(255 234 197 / 9%);
}

.feature-number {
  color: var(--text-muted);

  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.05px;
}

.feature-card h3 {
  margin: 12px 0 0;

  font-size: 18px;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.45px;
}

.feature-card p {
  margin: 12px 0 0;

  color: var(--text-secondary);

  font-size: 12px;
  line-height: 1.8;
}


/* =========================================
   9. КАК ЭТО РАБОТАЕТ
   ========================================= */

.how-section {
  width: calc(100% + (100vw - min(1160px, 100vw - 64px)));
  margin-left: calc((min(1160px, 100vw - 64px) - 100vw) / 2);

  padding-inline: max(32px, calc((100vw - 1160px) / 2));

  background: var(--surface);
}

.section-heading--center {
  max-width: none;
  text-align: center;
}

.section-heading--center .eyebrow {
  justify-content: center;
}

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

  margin-top: 43px;
}

.step-card {
  position: relative;

  min-width: 0;
  padding: 22px 22px 25px;

  border: 1px solid var(--border-color);
  border-radius: 16px;

  background: var(--page-bg);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 39px;
  height: 39px;

  border-radius: 12px;

  color: var(--color-coral);
  background: rgb(254 104 71 / 10%);

  font-size: 12px;
  font-weight: 800;
}

.step-card h3 {
  margin: 19px 0 0;

  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.35px;
}

.step-card p {
  margin: 9px 0 0;

  color: var(--text-secondary);

  font-size: 12px;
  line-height: 1.8;
}


/* =========================================
   10. ФИНАЛЬНЫЙ ПРИЗЫВ
   ========================================= */

.closing-cta {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;

  min-height: 270px;
  margin: 70px 0 48px;
  padding: 43px 48px;

  overflow: hidden;

  border: 1px solid var(--border-color);
  border-radius: 23px;

  background: var(--intro-bg);

  isolation: isolate;
}

.closing-copy {
  position: relative;
  z-index: 2;

  max-width: 570px;
}

.closing-copy .eyebrow {
  color: var(--color-cream);
}

.closing-copy h2 {
  margin: 17px 0 0;

  color: var(--color-cream);

  font-size: clamp(31px, 4vw, 45px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
}

.closing-copy p {
  margin: 14px 0 0;

  color: rgb(255 234 197 / 78%);

  font-size: 13px;
  line-height: 1.7;
}

.button--light {
  position: relative;
  z-index: 2;

  flex-shrink: 0;
  min-width: 166px;

  color: #3b3736;
  background: var(--color-cream);
}

.button--light:hover {
  background: #fff1d5;
}


/* =========================================
   11. ПОДВАЛ
   ========================================= */

.site-footer {
  display: grid;
  grid-template-columns: auto minmax(170px, 1fr) auto auto;
  align-items: center;
  gap: 22px;

  min-height: 100px;
  padding: 20px 0 28px;

  border-top: 1px solid var(--border-color);
}

.brand--footer .brand-logo {
  height: 48px;
}

.footer-tagline {
  max-width: 230px;
  margin: 0;

  color: var(--text-muted);

  font-size: 11px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-social__label {
  color: var(--text-secondary);

  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 25px;
  height: 25px;
  flex: 0 0 25px;

  padding: 0;
  border: 0;
  border-radius: 0;

  color: var(--text-secondary);
  background: transparent;
}

.social-icon svg {
  display: block;

  width: 22px;
  height: 22px;

  fill: currentColor;
}

.copyright {
  margin: 0;

  color: var(--text-muted);

  font-size: 10px;
  line-height: 1.6;
  text-align: right;
  white-space: nowrap;
}


/* =========================================
   12. ДЕКОРАТИВНАЯ ФИГУРА
   ========================================= */

.closing-visual {
  position: absolute;
  z-index: 0;

  top: 50%;
  right: -19px;

  width: 300px;
  aspect-ratio: 1;

  opacity: 0.56;

  pointer-events: none;

  transform: translateY(-50%);
}

.closing-orbit {
  position: absolute;

  top: 50%;
  left: 50%;

  border: 1px solid var(--orbit-line);
  border-radius: 50%;

  transform: translate(-50%, -50%);
}

.closing-orbit--outer {
  width: 100%;
  height: 100%;
}

.closing-orbit--inner {
  width: 78%;
  height: 78%;

  border-color: var(--orbit-line-accent);
}

.closing-segment {
  position: absolute;
  border-radius: 999px;
}

.closing-segment--coral {
  top: 36px;
  right: 47px;

  width: 76px;
  height: 15px;

  background: var(--color-coral);

  transform: rotate(48deg);
}

.closing-segment--peach {
  bottom: 45px;
  left: 35px;

  width: 65px;
  height: 14px;

  background: var(--color-peach);

  transform: rotate(-42deg);
}

.closing-segment--cream {
  top: 50%;
  right: -1px;

  width: 39px;
  height: 11px;

  background: var(--color-cream);

  transform: translateY(-50%) rotate(90deg);
}

.closing-node {
  position: absolute;

  width: 9px;
  height: 9px;

  border-radius: 50%;
}

.closing-node--coral {
  top: 17%;
  left: 20%;

  background: var(--color-coral);
}

.closing-node--peach {
  right: 17%;
  bottom: 18%;

  width: 7px;
  height: 7px;

  background: var(--color-peach);
}

.closing-copy,
.closing-cta > .button {
  z-index: 2;
}


/* =========================================
   13. ПЛАНШЕТЫ
   ========================================= */

@media (max-width: 1000px) {
  .site-shell {
    width: min(100% - 48px, 900px);
  }

  .site-header {
    gap: 18px;
  }

  .site-nav {
    gap: 20px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.9fr);
    gap: 28px;

    padding-block: 58px 78px;
  }

  .hero-title {
    font-size: clamp(42px, 5.2vw, 58px);
    letter-spacing: -3px;
  }

  .hero-visual {
    min-height: 500px;
  }

  .visual-orbit--outer {
    width: min(500px, 118%);
  }

  .visual-orbit--inner {
    width: min(445px, 106%);
  }

  .schedule-card {
    padding: 19px;
  }

  .floating-note {
    right: -4px;
  }

  .how-section {
    width: calc(100% + 48px);
    margin-left: -24px;
    padding-inline: 24px;
  }
}


/* =========================================
   14. МОБИЛЬНЫЕ УСТРОЙСТВА
   ========================================= */

@media (max-width: 760px) {
  .site-shell {
    width: calc(100% - 40px);
  }

  .site-header {
    min-height: 90px;
    gap: 12px;
  }

  .brand-logo {
    height: 74px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;

    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;

    padding: 9px;

    border: 1px solid var(--border-color);
    border-radius: 15px;

    background: var(--surface-raised);
    box-shadow: var(--page-shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 13px;

    border-radius: 9px;

    font-size: 13px;
  }

  .site-nav a:hover {
    background: var(--surface-hover);
  }

  .header-actions {
    gap: 8px;
  }

  .header-cta {
    display: none;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;

    padding: 58px 0 70px;
  }

  .hero-copy {
    max-width: 620px;
  }

  .hero-title {
    max-width: 620px;

    font-size: clamp(44px, 8vw, 64px);
  }

  .hero-visual {
    width: min(100%, 510px);
    min-height: 455px;

    margin-inline: auto;
  }

  .visual-orbit--outer {
    width: min(500px, 112%);
  }

  .visual-orbit--inner {
    width: min(430px, 106%);
  }

  .schedule-card {
    width: min(100%, 455px);
  }

  .section-block {
    padding-block: 64px 72px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 12px;

    margin-top: 30px;
  }

  .feature-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    column-gap: 16px;

    padding: 20px;
  }

  .feature-icon {
    grid-column: 1;
    grid-row: 1 / span 3;

    width: 48px;
    height: 48px;

    margin: 0;
  }

  .feature-number,
  .feature-card h3,
  .feature-card p {
    grid-column: 2;
  }

  .feature-card h3 {
    margin-top: 8px;
    font-size: 17px;
  }

  .feature-card p {
    margin-top: 7px;
  }

  .how-section {
    width: calc(100% + 40px);
    margin-left: -20px;
    padding-inline: 20px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 12px;

    margin-top: 30px;
  }

  .step-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 14px;

    padding: 18px;
  }

  .step-number {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .step-card h3 {
    grid-column: 2;
    margin-top: 1px;
  }

  .step-card p {
    grid-column: 2;
    margin-top: 6px;
  }

  .closing-cta {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;

    margin: 50px 0 35px;
    padding: 32px 27px;
  }

  .site-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;

    padding-top: 18px;
  }

  .footer-tagline {
    flex: 1 1 180px;
  }

  .footer-social {
    flex: 1 1 100%;
    order: 3;
  }

  /*
    В мобильной версии кнопка прижата вправо.
    Декоративная окружность центрируется за ней.
  */

  .closing-cta > .button--light {
    align-self: flex-end;
  }

  .closing-visual {
    top: auto;
    right: -10px;
    bottom: -62px;

    width: 240px;

    opacity: 0.36;

    transform: none;
  }
}


/* =========================================
   15. УЗКИЕ ТЕЛЕФОНЫ
   ========================================= */

@media (max-width: 440px) {
  .site-shell {
    width: calc(100% - 32px);
  }

  .site-header {
    min-height: 82px;
  }

  .brand-logo {
    height: 74px;
    max-width: calc(100vw - 160px);
  }

  .theme-toggle,
  .menu-toggle {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .hero {
    padding-top: 45px;
    padding-bottom: 55px;
  }

  .hero-title {
    margin-top: 18px;

    font-size: clamp(36px, 10vw, 47px);
    letter-spacing: -2.3px;
  }

  .hero-description {
    margin-top: 19px;

    font-size: 14px;
    line-height: 1.75;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;

    margin-top: 24px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-note {
    align-items: flex-start;
    margin-top: 27px;
  }

  .hero-visual {
    min-height: 405px;
  }

  .visual-orbit--outer {
    width: min(370px, 112%);
  }

  .visual-orbit--inner {
    width: min(430px, 106%);
  }

  .visual-segment--coral {
    top: 26px;
    right: 31px;
  }

  .visual-segment--peach {
    bottom: 29px;
    left: 20px;
  }

  .schedule-card {
    padding: 15px 13px;
    border-radius: 17px;
  }

  .schedule-icon {
    width: 37px;
    height: 37px;
    flex-basis: 37px;

    border-radius: 11px;
  }

  .schedule-card h2 {
    font-size: 14px;
  }

  .participants {
    margin-top: 14px;
    padding-bottom: 14px;
  }

  .common-time {
    margin-block: 14px 16px;
    padding: 11px;
  }

  .common-time strong {
    font-size: 12px;
  }

  .match-badge {
    padding: 5px 6px;
    font-size: 8px;
  }

  .schedule-row {
    grid-template-columns: 65px repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .person-name {
    gap: 4px;
    font-size: 9px;
  }

  .time-cell {
    height: 16px;
  }

  .schedule-legend {
    gap: 8px;
    font-size: 7px;
  }

  .floating-note {
    right: -3px;
    bottom: 4px;
    padding: 9px 11px;
  }

  .floating-note__icon {
    width: 25px;
    height: 25px;
  }

  .section-heading h2 {
    font-size: clamp(31px, 8.5vw, 39px);
    letter-spacing: -1.6px;
  }

  .section-heading > p {
    font-size: 13px;
  }

  .how-section {
    width: calc(100% + 32px);
    margin-left: -16px;
    padding-inline: 16px;
  }

  .closing-cta {
    padding: 27px 21px;
  }

  .closing-copy h2 {
    font-size: 32px;
    letter-spacing: -1.4px;
  }

  .site-footer {
    column-gap: 12px;
    row-gap: 13px;
  }

  .brand--footer .brand-logo {
    height: 42px;
  }

  .footer-tagline {
    font-size: 10px;
  }

  .footer-social {
    justify-content: space-between;
    gap: 10px;
  }

  .footer-social__label {
    font-size: 10px;
  }

  .copyright {
    width: 100%;

    text-align: left;
    white-space: normal;

    order: 4;
  }

  /*
    При ширине телефона кнопка и окружность
    остаются центрированными относительно друг друга.
  */

  .closing-visual {
    top: auto;
    right: -6px;
    bottom: -57px;

    width: 220px;

    opacity: 0.28;

    transform: none;
  }
}


/* =========================================
   16. МОДАЛЬНОЕ ОКНО РЕГИСТРАЦИИ
   ========================================= */

.register-modal {
  position: fixed;

  width: min(500px, calc(100vw - 28px));
  max-width: none;
  max-height: min(900px, calc(100dvh - 28px));

  margin: auto;
  padding: 0;

  overflow-x: hidden;
  overflow-y: auto;

  border: 1px solid var(--border-color);
  border-radius: 24px;

  color: var(--text-primary);
  background: var(--surface-raised);

  box-shadow: 0 30px 100px rgb(0 0 0 / 38%);

  scrollbar-color: var(--text-muted) transparent;
  scrollbar-width: thin;

  overscroll-behavior: contain;
}

.register-modal::backdrop {
  background: rgb(14 12 11 / 74%);

  /* Без blur, чтобы не нагружать компьютер. */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.register-modal[open] {
  animation: register-modal-in 180ms ease-out;
}

@keyframes register-modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.register-modal__inner {
  position: relative;
  padding: 32px clamp(22px, 5vw, 40px) 36px;
}

.register-modal .legacy-theme-toggle[hidden] {
  display: none !important;
}


/* Крестик */

.register-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;
  padding: 0;

  border: 1px solid var(--border-color);
  border-radius: 50%;

  color: var(--text-secondary);
  background: var(--surface-hover);

  cursor: pointer;

  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.register-modal__close:hover {
  color: var(--text-primary);
  background: var(--surface);
  border-color: var(--color-coral);

  transform: rotate(90deg);
}

.register-modal__close:focus-visible {
  outline: 3px solid var(--color-coral);
  outline-offset: 3px;
}

.register-modal__close svg {
  width: 18px;
  height: 18px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}


/* Логотип по центру без подложки */

.register-modal__brand {
  display: flex;
  align-items: center;
  justify-content: center;

  width: fit-content;
  height: 74px;
  max-width: calc(100% - 44px);

  margin: 0 auto 23px;
  padding: 0;

  border: 0;
  border-radius: 0;

  background: transparent;
}

.register-modal__brand .brand-logo {
  display: block;

  width: auto;
  height: 54px;
  max-width: 100%;

  object-fit: contain;
}


/* Заголовок формы */

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

.register-modal__heading h2 {
  margin: 0;

  color: var(--text-primary);

  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1px;
}

.register-modal .form-description {
  margin: 10px 0 24px;

  color: var(--text-secondary);

  font-size: 13px;
  line-height: 1.65;
}


/* Поля формы */

.register-modal #registerForm {
  display: grid;
  gap: 14px;
}

.register-modal .field {
  display: grid;
  gap: 8px;

  min-width: 0;
}

.register-modal .field-control {
  position: relative;

  width: 100%;
  min-width: 0;
}

.register-modal .field-control input {
  display: block;

  width: 100%;
  height: 56px;
  padding: 18px 14px 4px;

  border: 1px solid var(--field-border);
  border-radius: 11px;
  outline: none;

  color: var(--text-primary);
  background: var(--field-bg);

  font-family: inherit;
  font-size: 14px;
  line-height: 20px;

  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.register-modal .field-control label {
  position: absolute;
  top: 50%;
  left: 15px;

  max-width: calc(100% - 30px);

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  color: var(--placeholder);

  font-size: 14px;
  line-height: 1.4;

  pointer-events: none;

  transform: translateY(-50%);
  transform-origin: left top;

  transition:
    top 160ms ease,
    color 160ms ease,
    font-size 160ms ease,
    transform 160ms ease;
}

.register-modal .field-control input:focus + label,
.register-modal .field-control input:not(:placeholder-shown) + label,
.register-modal .field-control input:-webkit-autofill + label,
.register-modal .field-control input:autofill + label {
  top: 7px;

  color: var(--text-secondary);

  font-size: 10px;
  line-height: 1.4;

  transform: translateY(0);
}

.register-modal .field-control input:focus + label {
  color: var(--color-coral);
}

.register-modal .field-control input:hover {
  border-color: var(--color-peach);
}

.register-modal .field-control input:focus {
  border-color: var(--color-coral);
  background: var(--surface-raised);

  box-shadow: 0 0 0 4px rgb(254 104 71 / 15%);
}

.register-modal .field-control input:-webkit-autofill,
.register-modal .field-control input:-webkit-autofill:hover,
.register-modal .field-control input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  caret-color: var(--text-primary);
}

.register-modal .field small {
  color: var(--text-secondary);

  font-size: 11px;
  line-height: 1.5;
}


/* Сообщения */

.register-modal .message {
  padding: 12px 14px;

  border: 1px solid transparent;
  border-radius: 10px;

  font-size: 13px;
  line-height: 1.6;

  overflow-wrap: anywhere;
}

.register-modal .message--error {
  border-color: var(--error-border);
  color: var(--error-text);
  background: var(--error-bg);
}

.register-modal .message--success {
  border-color: var(--success-border);
  color: var(--success-text);
  background: var(--success-bg);
}

.register-modal .message small {
  display: block;
  margin-top: 6px;

  font-size: 11px;
}


/* Кнопка регистрации */

.register-modal .submit-button {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 51px;
  margin-top: 3px;
  padding: 14px 17px;

  border: 0;
  border-radius: 11px;

  color: var(--button-text);
  background: var(--button-bg);

  font-family: inherit;
  font-size: 14px;
  font-weight: 750;
  text-align: center;

  cursor: pointer;

  transition:
    background-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.register-modal .submit-button:hover:not(:disabled) {
  background: var(--button-hover);
  transform: translateY(-1px);

  box-shadow: 0 6px 15px rgb(0 0 0 / 12%);
}

.register-modal .submit-button:focus-visible {
  outline: 3px solid var(--color-coral);
  outline-offset: 3px;
}

.register-modal .submit-button:disabled {
  opacity: 0.65;
  cursor: wait;
}


/* =========================================
   17. БЛОКИРОВКА ПРОКРУТКИ И АДАПТАЦИЯ
   ========================================= */

html.modal-open,
body.modal-open {
  overflow: hidden !important;
}

body.modal-open {
  overscroll-behavior: none;
}

@media (max-width: 760px) {
  .register-modal__inner {
    padding: 29px 25px 30px;
  }
}

@media (max-width: 440px) {
  .register-modal {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);

    border-radius: 20px;
  }

  .register-modal__inner {
    padding: 28px 20px 24px;
  }

  .register-modal__brand {
    height: 74px;
  }

  .register-modal__brand .brand-logo {
    height: 54px;
  }

  .register-modal__heading h2 {
    font-size: 27px;
  }

  .register-modal .form-description {
    margin-bottom: 20px;
    font-size: 12px;
  }

  .register-modal #registerForm {
    gap: 13px;
  }
}


/* =========================================
   18. УМЕНЬШЕНИЕ АНИМАЦИЙ
   ========================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .register-modal[open] {
    animation: none;
  }
}

/* Скрываем скроллбар окна регистрации,
   сохраняя возможность прокрутки */

.register-modal {
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* Старые версии Edge */
}

.register-modal::-webkit-scrollbar {
  display: none;              /* Chrome, Safari, Edge */
  width: 0;
  height: 0;
}