/* tops.me — лендинг для агентов */

:root {
  --gold: #ffd94e;
  --edge: clamp(20px, 5vw, 72px);   /* поля страницы */
  --gutter: clamp(12px, 4vw, 36px); /* поля футера */
  --line: #2d313b;
  --line-strong: #363945;
  --muted: #b6bcc9;
  --font-display: "Avenir Next", system-ui, -apple-system, sans-serif;
}

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

body {
  margin: 0;
  background: #000;
  color: #f7f8fb;
  font: 16px/1.5 system-ui, -apple-system, sans-serif;
  overflow-wrap: anywhere;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #125aff; outline-offset: 3px; }

/* ---------- Кнопки ---------- */

.agents-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(105deg, #135dcf, #0876bc);
  color: #fff;
  font-weight: 700;
  text-align: center;
}
.agents-button:hover { filter: brightness(1.15); }

.agents-button--whatsapp { background: #236c34; }
.agents-button--whatsapp:hover { background: #2b7a3e; }

/* ---------- Шапка ---------- */

.agents-top,
.agents-wrap {
  width: min(100% - 2 * var(--edge), 1200px);
  margin-inline: auto;
}

.agents-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 20px;
  font-family: var(--font-display);
}
.agents-top-actions { display: flex; align-items: center; gap: 8px; }
.agents-brand { display: inline-flex; align-items: center; }

/* ---------- Переключатель языка ---------- */

.lang-switch { position: relative; }

.lang-switch > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.lang-switch > summary::-webkit-details-marker { display: none; }

.lang-switch__chevron { flex: none; transition: transform .15s; }
.lang-switch[open] .lang-switch__chevron { transform: rotate(180deg); }

.lang-switch__menu {
  position: absolute;
  z-index: 20;
  min-width: 100%;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid #414551;
  border-radius: 14px;
  background: #15161a;
  box-shadow: 0 10px 30px rgb(0 0 0 / .5);
}
.lang-switch__menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 9px;
  color: #fff;
  white-space: nowrap;
}
.lang-switch__menu a:hover,
.lang-switch__menu a:focus-visible { background: #252933; }

/* в шапке: кружок-пилюля на месте бывшего меню, список раскрывается вниз */
.lang-switch--header > summary {
  padding: 0 14px;
  border: 1px solid #414551;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
}
.lang-switch--header .lang-switch__menu { top: calc(100% + 8px); right: 0; }

/* в футере: глобус + полное название, список раскрывается вверх */
.lang-switch--footer > summary { gap: 9px; font-size: 17px; }
.lang-switch--footer .lang-switch__menu { bottom: calc(100% + 8px); left: 0; }

/* ---------- Основная часть ---------- */

.agents-page { font-family: var(--font-display); }

.agents-wrap { padding-block: clamp(52px, 8vw, 108px); }

.agents-hero,
.agents-intro,
.agents-feature,
.agents-season {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(25px, 5vw, 72px);
}

.agents-page h1,
.agents-page h2,
.agents-page h3 {
  margin: 0;
  font-weight: 450;
  line-height: 1.12;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.agents-page h1 { font-size: clamp(33px, 4.5vw, 62px); }
.agents-page h2 { font-size: clamp(31px, 4.2vw, 55px); }
.agents-page h3 { font-size: clamp(24px, 3vw, 39px); }
.agents-page h1 span,
.agents-page h2 span { color: var(--gold); }

.agents-page p {
  margin: 18px 0 0;
  color: #c9cfda;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.55;
}

.agents-page .agents-result { display: grid; margin-top: 28px; }
.agents-result strong { color: var(--gold); font-size: clamp(23px, 2.6vw, 37px); }

.agents-media {
  display: block;
  width: 100%;
  height: auto;
  max-height: 585px;
  object-fit: cover;
  border-radius: 26px;
}

.agents-intro,
.agents-season { border-top: 1px solid var(--line); }
.agents-intro .agents-media { aspect-ratio: 6 / 5; }

.agents-tools > h2 { margin-bottom: 30px; }

.agents-feature {
  padding-block: clamp(30px, 5vw, 68px);
  border-top: 1px solid var(--line);
}
.agents-feature--assistant .agents-media { object-fit: contain; background: #060e25; }
.agents-feature--support { grid-template-columns: minmax(0, 1fr); }

.agents-season .agents-button { margin-top: 24px; }

/* ---------- Эксперты ---------- */

.experts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(5px, 1vw, 14px);
  width: min(100%, 1000px);
  margin: 0 auto;
  padding: 6px 0 30px;
  color: #141922;
  text-align: center;
  isolation: isolate;
}

.expert {
  min-width: 0;
  padding: clamp(18px, 4vw, 44px) clamp(5px, 1vw, 12px);
  border: 1px solid #e1e4e8;
  border-radius: clamp(16px, 4vw, 28px);
  background: #f5f5f5;
  transform: translateY(clamp(12px, 2vw, 24px));
}
.expert:nth-child(2) { transform: none; box-shadow: 0 6px 16px rgb(0 0 0 / .27); }

.expert img {
  display: block;
  width: min(80%, clamp(64px, 12vw, 156px));
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto 10px;
  border-radius: 50%;
  object-fit: cover;
}
.expert h4 {
  margin: 0;
  font-size: clamp(14px, 2.65vw, 28px);
  font-weight: 450;
  line-height: 1.12;
  letter-spacing: -.03em;
}
.agents-page .expert p {
  margin-top: 6px;
  color: #343b49;
  font-size: clamp(13px, 1.6vw, 17px);
}

.expert-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 12px auto 0;
  padding: 7px 0;
  border-radius: 13px;
  background: #fff;
  color: #343b49;
  font-size: clamp(11px, 1.4vw, 14px);
  line-height: 1.35;
}
.expert-details span + span { border-inline-start: 1px solid #e0e3e8; }
.expert-details strong { display: block; color: #141922; font-size: 1.2em; }

/* ---------- География ---------- */

.agents-geography > h2 {
  max-width: 22ch;
  margin: 0 auto clamp(44px, 7vw, 82px);
  text-align: center;
}

.agents-region {
  padding-block: clamp(28px, 5vw, 58px);
  border-top: 1px solid #393939;
}
.agents-page .agents-region > h3 {
  margin-bottom: clamp(26px, 5vw, 52px);
  font-size: clamp(20px, 3vw, 32px);
  text-align: center;
}

.agents-countries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(27px, 5vw, 54px) clamp(12px, 4vw, 48px);
  max-width: 860px;
  margin-inline: auto;
}
.agents-country {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(7px, 2vw, 18px);
  align-items: start;
}
.agents-flag { font-size: clamp(21px, 4vw, 42px); line-height: 1; }
.agents-country h4 {
  margin: 0;
  color: #fff;
  font-size: clamp(18px, 2.35vw, 28px);
  font-weight: 500;
  text-transform: uppercase;
}
.agents-country ul {
  margin: 9px 0 0;
  padding-inline-start: 1.1em;
  color: #b6b6bb;
  font-size: clamp(17px, 2.1vw, 25px);
  line-height: 1.55;
}

/* ---------- Римма ---------- */

.agents-wrap.agents-onboarding { padding-block: 0 clamp(48px, 7vw, 88px); }

.agents-onboarding-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid #50535d;
  border-radius: 26px;
  text-align: center;
}
.agents-onboarding-card img {
  width: clamp(128px, 34vw, 210px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
}
.agents-page .agents-onboarding-card h2 { margin-top: 4px; font-size: clamp(26px, 4vw, 38px); }
.agents-page .agents-onboarding-card p { margin: 0; }
.agents-onboarding-card .agents-button { margin-top: 10px; }

/* кнопка «Написать нам», прилипающая к низу экрана на телефонах */
.agents-mobile-contact { display: none; }

/* ---------- 404 ---------- */

.not-found h1 + h1 { margin-top: 12px; color: var(--muted); }
.not-found__links { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Футер ---------- */

.site-footer {
  padding: 32px var(--gutter) 25px;
  border-top: 1px solid var(--line-strong);
  background: #000;
  color: #f6f7fb;
}
.footer-inner {
  display: grid;
  gap: 30px;
  max-width: 1240px;
  margin: auto;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.035em;
}
.footer-brand img { border-radius: 50%; }

.footer-contact {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding-top: 24px;
}
.footer-contact h2 { margin: 0; font-size: 19px; letter-spacing: -.04em; }
.footer-phone {
  font-size: clamp(22px, 5.6vw, 27px);
  font-weight: 750;
  letter-spacing: -.025em;
}
.footer-messenger {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #252933;
  color: #fff;
}
.footer-contact p {
  max-width: 52ch;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
}
.footer-meta small {
  margin-inline-start: auto;
  color: var(--muted);
  font-size: inherit;
}

/* ---------- Адаптив ---------- */

@media (max-width: 760px) {
  .agents-hero,
  .agents-intro,
  .agents-feature,
  .agents-season { grid-template-columns: minmax(0, 1fr); }

  .experts {
    width: calc(100% + 2 * var(--edge));
    margin-inline: calc(-1 * var(--edge));
  }

  .agents-mobile-contact {
    position: fixed;
    z-index: 12;
    inset: auto 20px calc(12px + env(safe-area-inset-bottom));
    display: flex;
    width: min(100% - 40px, 420px);
    margin-inline: auto;
    border: 1px solid rgb(129 169 255 / .7);
    background: linear-gradient(115deg, rgb(23 85 214 / .85), rgb(18 70 186 / .8));
    backdrop-filter: blur(5px);
    box-shadow:
      inset 0 1px 1px rgb(198 219 255 / .57),
      inset 0 -1px 2px rgb(16 43 126 / .31),
      0 5px 18px rgb(16 59 136 / .16);
  }

  /* место под прилипшую кнопку */
  .site-footer { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 640px) {
  .expert-details { grid-template-columns: minmax(0, 1fr); }
  .expert-details span + span {
    margin-top: 5px;
    padding-top: 5px;
    border-inline-start: 0;
    border-top: 1px solid #e0e3e8;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lang-switch__chevron { transition: none; }
}
