:root {
  color-scheme: dark;
  --bg: #0a1426;
  --surface: #12233e;
  --ink: #f0f6ff;
  --muted: #b8c9e3;
  --line: #314b70;
  --blue: #68bdff;
  --wrap: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 105px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse 60% 780px at 90% 350px, #15375b, transparent 85%),
    radial-gradient(ellipse 55% 680px at 0 77%, #122949, transparent 90%),
    var(--bg);
  font:
    16px/1.55 system-ui,
    sans-serif;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.1;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.85rem);
  text-wrap: balance;
  overflow-wrap: anywhere;
}

h2 {
  font-size: clamp(1.95rem, 4vw, 3.1rem);
}
h3 {
  font-size: 1.22rem;
}
p {
  color: var(--muted);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}

:where(a, button, select, textarea, summary):focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #0a1426ec;
  backdrop-filter: blur(15px);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 790;
}

.brand-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  object-fit: cover;
  border-radius: 50%;
}

.nav {
  display: flex;
  align-items: center;
  gap: 21px;
}

.nav a {
  color: var(--muted);
  font-size: 0.94rem;
}

.nav a:hover {
  color: white;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 45px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--blue);
  color: #0b1d32;
  font-weight: 750;
  text-align: center;
}

.btn:hover {
  background: #a4d9ff;
}

.btn.alt {
  color: var(--ink);
  border-color: var(--line);
  background: transparent;
}

.btn.alt:hover {
  background: var(--surface);
}
.menu {
  display: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  align-items: center;
  gap: 52px;
  padding-block: clamp(55px, 8vw, 110px);
}

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

.eyebrow {
  margin-bottom: 16px;
  color: var(--blue);
  font-weight: 720;
}

.hero-description {
  max-width: 53ch;
  margin: 20px 0 24px;
  font-size: 1.08rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section-actions {
  margin-top: 22px;
}

.emblem {
  display: grid;
  place-items: center;
  margin: 0;
  isolation: isolate;
}

/* Лицевая и обратная стороны вращаются вместе с ребром монеты. */
.coin-scene {
  display: grid;
  place-items: center;
  width: min(100%, 410px);
  aspect-ratio: 1;
  perspective: 920px;
  background: radial-gradient(circle, #2465a64f, transparent 68%);
}

.coin {
  position: relative;
  width: 85%;
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transform: rotateY(-18deg) rotateZ(-6deg);
  animation: coin-turn 9s linear infinite;
}

.coin-face,
.coin-rim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.coin-rim {
  border: 2px solid #5796c8;
  background: #17395c;
  transform: translateZ(var(--depth));
}

.coin-rim:nth-child(3n) {
  border-color: #96cfff;
}

.coin-face {
  object-fit: cover;
  backface-visibility: hidden;
  border: 1px solid #77c1ff;
  box-shadow: 0 0 14px #409eff66;
}

.coin-front {
  transform: translateZ(13px);
}
.coin-back {
  transform: rotateY(180deg) translateZ(13px);
}

@keyframes coin-turn {
  from {
    transform: rotateY(-18deg) rotateZ(-6deg);
  }
  to {
    transform: rotateY(342deg) rotateZ(-6deg);
  }
}

.block {
  padding-block: clamp(38px, 6.2vw, 85px);
}

.intro {
  max-width: 64ch;
  margin-top: 13px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 25px;
}

.card {
  display: block;
  min-height: 120px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, #172d4d, #111f36);
  color: var(--ink);
  text-align: left;
}

.card p {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 14px;
}

.tabs button {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
}

.tabs button[aria-pressed="true"] {
  border-color: var(--blue);
  background: var(--blue);
  color: #0b1d32;
}

.service-panel,
.contact,
.dialog {
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.service-panel li + li {
  margin-top: 7px;
}

.steps {
  display: grid;
  gap: 14px;
  margin: 25px 0 0;
  padding-left: 24px;
}

.steps li::marker {
  color: var(--blue);
  font-weight: 750;
}

.steps p {
  margin-top: 4px;
}

details {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

summary {
  cursor: pointer;
  font-weight: 700;
}

details p {
  margin-top: 9px;
}

.lower-panorama {
  display: grid;
  align-items: center;
  min-height: clamp(390px, 46vw, 620px);
  background-image:
    linear-gradient(180deg, var(--bg), #0a14262b 27%, #0a142643 65%, var(--bg)),
    url("assets/kyrgyzstan.webp");
  background-size: cover;
  background-position:
    center,
    center 52%;
}

.lower-panorama .contact {
  max-width: 750px;
  background: #0b1930e6;
  backdrop-filter: blur(8px);
}

.contact p {
  margin: 12px 0 18px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}

.contact-links a:hover {
  text-decoration: underline;
}

footer {
  padding-block: 28px 38px;
  color: var(--muted);
  font-size: 0.9rem;
}

.dialog {
  width: min(540px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  color: var(--ink);
}

.dialog::backdrop {
  background: #030912c9;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dialog h2 {
  font-size: 1.6rem;
}

.dialog label {
  display: grid;
  gap: 7px;
  margin: 16px 0;
}

.dialog input,
.dialog select,
.dialog textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}

.dialog p {
  margin-top: 12px;
}
.dialog .btn[type="submit"] {
  margin-top: 8px;
}

/* Элементы скрываются после запуска наблюдения за прокруткой. */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 680ms ease,
    transform 680ms ease;
  transition-delay: var(--delay, 0ms);
}

.reveal-ready [data-reveal].visible,
.reveal-ready [data-reveal]:focus-within {
  opacity: 1;
  transform: none;
}

.reveal-ready [data-reveal]:focus-within {
  transition-delay: 0ms;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 900px) {
  .menu {
    display: inline-flex;
  }
  .bar {
    min-height: 66px;
  }
  .header-contact {
    display: none;
  }

  .nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    padding: 14px 24px 22px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
  }

  .nav.is-open {
    display: grid;
    gap: 4px;
  }

  .nav a {
    padding: 10px 2px;
  }
  .hero {
    gap: 24px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .hero,
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    padding-block: 44px 24px;
  }
  .card {
    min-height: 0;
  }
  .coin-scene {
    width: min(100%, 290px);
  }
  .lower-panorama {
    background-position:
      center,
      58% center;
  }
}

/* Раздел услуг с чередованием фото и текста. */
#tasks.wrap {
  width: min(1240px, calc(100% - 48px));
}

.tasks-heading {
  margin-bottom: clamp(24px, 4vw, 44px);
}

.task-story {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  grid-template-areas: "visual copy";
  align-items: center;
}

.task-story + .task-story {
  margin-top: clamp(32px, 5vw, 68px);
}

.task-story--reverse {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  grid-template-areas: "copy visual";
}

.task-visual {
  position: relative;
  grid-area: visual;
  min-width: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 18px;
  background: #12233e;
}

.task-visual img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.task-story-copy {
  position: relative;
  z-index: 1;
  grid-area: copy;
  margin-inline-start: -20px;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #101f37;
}

.task-story--reverse .task-story-copy {
  margin-inline-start: 0;
  margin-inline-end: -20px;
}

.task-story-copy h3 {
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
}

.task-story-copy p {
  max-width: 48ch;
  margin-top: 12px;
}

.task-story-actions {
  margin-top: 20px;
}

@media (max-width: 760px) {
  #tasks.wrap {
    width: calc(100% - 32px);
  }

  .task-story,
  .task-story--reverse {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "visual"
      "copy";
  }

  .task-story .task-story-copy {
    margin: -12px 10px 0;
  }
}

/* Панорама продолжается под полупрозрачным футером. */
.lower-panorama {
  grid-template-rows: 1fr auto;
  background-image:
    linear-gradient(180deg, var(--bg), #0a14262b 27%, #0a142643 65%, #0a1426eb),
    url("assets/kyrgyzstan.webp");
}

.site-footer {
  padding-block: 30px 24px;
  background: linear-gradient(180deg, transparent, #08132555);
  color: var(--muted);
  overflow-wrap: anywhere;
}

.site-footer .footer-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 24px 32px;
}

.footer-company p {
  max-width: 34ch;
  margin-top: 10px;
}

.site-footer .footer-heading {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: normal;
}

.site-footer nav ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer nav a {
  font-size: 14px;
}

.site-footer nav a:hover,
.site-footer nav a:focus-visible {
  color: var(--blue);
  text-decoration: underline;
}

.site-footer a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

.footer-legal {
  display: grid;
  gap: 4px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #acc9f033;
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .site-footer .footer-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

.legal-page {
  min-height: 100vh;
  padding-block: clamp(24px, 5vw, 64px);
  background:
    linear-gradient(#0a14265c, var(--bg) 400px),
    url("assets/kyrgyzstan.webp") center top / auto 480px no-repeat;
}

.legal-document {
  max-width: 800px;
  margin-top: 24px;
  padding: clamp(20px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #0b1930ef;
  overflow-wrap: anywhere;
}

.legal-document h1 {
  margin-block: 10px 24px;
  font-size: clamp(1.8rem, 5vw, 3rem);
}

.legal-document h2 {
  margin-block: 24px 8px;
  font-size: 1.25rem;
}

.legal-document p + p {
  margin-top: 10px;
}

.legal-document a {
  color: var(--blue);
  text-decoration: underline;
}

/* Полупрозрачная карточка на фоне гор. */
.lower-panorama .contact {
  max-width: 700px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(182, 218, 255, 0.24);
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    rgba(10, 23, 42, 0.86),
    rgba(10, 23, 42, 0.6)
  );
  backdrop-filter: blur(7px);
  box-shadow: 0 20px 48px rgba(3, 10, 22, 0.28);
}

.lower-panorama .contact h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lower-panorama .contact p {
  max-width: 50ch;
  margin: 14px 0 24px;
  color: #d3dfef;
  line-height: 1.6;
}

.lower-panorama .contact-links {
  gap: 8px 20px;
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid rgba(182, 218, 255, 0.2);
}

.lower-panorama .contact-links a {
  display: inline-block;
  padding-block: 6px;
  color: #e3efff;
}

.lower-panorama .contact-links a:hover,
.lower-panorama .contact-links a:focus-visible {
  color: #8cd1ff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 540px) {
  .lower-panorama .contact {
    border-radius: 18px;
  }

  .lower-panorama .contact .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
  }
}
