/* ===== Base ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  background: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-display);
}

.container {
  max-width: calc(var(--container-width) + 40px);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

img {
  width: 100%;
  height: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  width: 90%;
  margin-inline: auto;
  padding-top: 16px;
}

.site-header__inner {
  background: var(--color-globe-blue);
  border: 2px solid var(--color-white);
  border-radius: 999px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__logo img {
  width: 46px;
  height: 46px;
}

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

.site-nav__list {
  display: flex;
  gap: 24px;
}

.site-nav__list a {
  font-size: 16px;
  line-height: 19px;
  text-transform: uppercase;
  white-space: nowrap;
}

.lang-toggle {
  display: flex;
  gap: 6px;
}

.lang-toggle a {
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.lang-toggle a[aria-current="page"] {
  background: var(--color-globe-red);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
}

.burger span {
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
  display: flex;
  flex-direction: column;
}

.hero__photo {
  order: 2;
}

.hero__photo img {
  display: block;
  height: 100%;
  object-fit: cover;
}

.hero__right {
  order: 1;
  background: var(--color-electric-blue);
  padding: 110px 24px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero__title {
  font-size: 40px;
  line-height: 1.15;
  font-weight: 700;
}

.hero__battle {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: clamp(140px, 28vw, 260px);
}

.hero__can {
  width: auto;
  height: 100%;
  object-fit: contain;
}

.hero__can + .hero__can {
  margin-left: clamp(-24px, -3vw, -10px);
}

.hero__vs-accent {
  position: absolute;
  left: 60%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: 72%;
  z-index: 1;
}

.hero__vs {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-size: clamp(40px, 10vw, 100px);
  font-weight: 700;
  color: var(--color-white);
  pointer-events: none;
}

.hero__subtitle {
  background: var(--color-globe-blue);
  padding: 16px 24px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

/* ===== Stages ===== */
.stages {
  background: var(--color-black);
  padding-block: 56px;
}

.stages__cards {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}

.stage-card {
  max-width: 380px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.stage-card__glow {
  position: relative;
  width: 219px;
  height: 219px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-card__glow::before {
  content: "";
  position: absolute;
  inset: 10%;
  background: var(--color-electric-blue);
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
}

.stage-card__glow img {
  position: relative;
  z-index: 1;
  width: 92%;
  height: auto;
}

.stage-card p {
  font-size: 20px;
  line-height: 1.4;
}

/* ===== Map / points section ===== */
.map-section {
  background: var(--color-globe-blue);
  padding-block: 56px;
}

.section-title {
  font-size: 24px;
  font-weight: 400;
  text-align: center;
  white-space: pre-line;
  margin-bottom: 32px;
}

.kz-map-wrap {
  position: relative;
  max-width: 720px;
  margin-inline: auto;
}

.kz-map {
  width: 100%;
  height: auto;
  display: block;
}

.kz-region {
  fill: var(--color-electric-blue);
  stroke: var(--color-white);
  stroke-width: 1.5;
  transition: fill 0.15s ease;
}

.kz-region:hover {
  fill: var(--color-white);
}

.map-pin {
  position: absolute;
  width: 8%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--color-white);
  border: 3px solid var(--color-globe-red);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.map-pin img {
  width: 100%;
}

/* ===== Results ===== */
.results {
  background: var(--color-black);
  padding-block: 56px;
}

.results .section-title {
  text-align: left;
}

.result-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.result-card {
  background: var(--color-globe-blue);
  border: 4px solid var(--color-white);
  border-radius: var(--radius-result-card);
  padding: 25px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.result-card h3 {
  grid-column: 1 / -1;
  font-size: 18px;
  font-weight: 400;
}

.result-card__percent {
  font-size: 40px;
  font-weight: 700;
}

.result-card__bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.result-card__bar span {
  display: block;
  height: 100%;
  background: var(--color-globe-red);
}

.result-card__label {
  display: block;
  font-size: 12px;
  margin-top: 6px;
  opacity: 0.85;
}

.result-card img {
  width: 60px;
}

.chart {
  background: var(--color-globe-blue);
  border-radius: var(--radius-card);
  padding: 24px 16px;
}

.chart h3 {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 20px;
}

.chart__grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
}

.chart__axis {
  display: flex;
  flex-direction: column-reverse;
  justify-content: space-between;
  font-size: 10px;
  opacity: 0.7;
  padding-block: 4px;
}

.chart__plot {
  position: relative;
  height: 220px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.chart__line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart__labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  opacity: 0.7;
  margin-top: 8px;
  grid-column: 2;
}

.chart__dot {
  position: absolute;
  transform: translate(-50%, 50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chart__dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-globe-red);
}

.chart__dot span {
  font-size: 11px;
  white-space: nowrap;
}

/* ===== Gallery ===== */
.gallery {
  background: var(--color-electric-blue);
  padding-block: 56px;
}

.gallery__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.gallery__head .section-title {
  text-align: left;
  margin-bottom: 0;
}

.gallery__arrows {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.gallery__arrows button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-white);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery__arrows svg {
  width: 16px;
  height: 16px;
}

.gallery__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius-card);
}

.gallery__track::-webkit-scrollbar {
  display: none;
}

.gallery__track img {
  scroll-snap-align: start;
  flex: 0 0 260px;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
}

/* ===== FAQ ===== */
.faq {
  background: var(--color-electric-blue);
  padding-block: 56px;
}

.faq .section-title {
  text-align: left;
}

.faq-item {
  background: var(--color-globe-blue);
  border-right: 2px solid var(--color-white);
  border-bottom: 2px solid var(--color-white);
  border-radius: var(--radius-faq-card);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item[open] {
  border-right-color: var(--color-globe-red);
  border-bottom-color: var(--color-globe-red);
}

.faq-item__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 25px;
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-white);
  cursor: pointer;
  list-style: none;
}

.faq-item__q::-webkit-details-marker {
  display: none;
}

.faq-item__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  position: relative;
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: "";
  position: absolute;
  background: var(--color-white);
  border-radius: 2px;
}

.faq-item__icon::before {
  inset: 45% 0;
  height: 2px;
}

.faq-item__icon::after {
  inset: 0 45%;
  width: 2px;
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-item__icon::after {
  transform: scaleY(0);
}

.faq-item__a {
  padding: 0 25px 25px;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.9;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-black);
  border-top: 2px solid var(--color-white);
  padding-block: 24px 20px;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer__logo img {
  width: 46px;
  height: 46px;
}

.footer__links {
  display: flex;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  text-transform: uppercase;
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.footer__bottom {
  text-align: center;
  margin-top: 32px;
  font-size: 12px;
  opacity: 0.7;
}

/* ===== Modal city ===== */
.modal-city {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 20px;
}

.modal-city[hidden] {
  display: none;
}

.modal-city__panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: var(--color-globe-blue);
  border: 1px solid var(--color-white);
  border-radius: var(--radius-card);
  padding: 24px;
}

.modal-city__close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 20px;
  color: var(--color-white);
}

.modal-city__logo {
  width: 60px;
  height: 60px;
  margin-bottom: 16px;
}

.modal-city__city {
  font-size: 20px;
  margin-bottom: 16px;
}

.modal-city__places {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 14px;
}

.modal-city__places li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 8px;
}

/* ===== Desktop breakpoint (Figma Desktop frame = 1440) ===== */
@media (min-width: 900px) {
  .site-nav {
    gap: 40px;
  }

  .burger {
    display: none;
  }

  .hero {
    flex-direction: row;
    min-height: 92vh;
  }

  .hero__photo,
  .hero__right {
    flex: 1 1 50%;
  }

  .hero__photo {
    order: 1;
  }

  .hero__right {
    order: 2;
    padding: 120px 48px 64px;
  }

  .hero__title {
    font-size: 68px;
    line-height: 81.6px;
  }

  .hero__subtitle {
    font-size: 34px;
    line-height: 40.8px;
  }

  .stages__cards {
    flex-direction: row;
    justify-content: center;
  }

  .stage-card p {
    font-size: 26px;
    line-height: 36.4px;
  }

  .section-title {
    font-size: 32px;
  }

  .result-cards {
    grid-template-columns: repeat(4, 1fr);
  }

  .chart__labels {
    font-size: 13px;
  }
}

@media (max-width: 899px) {
  .site-nav {
    position: fixed;
    inset: 88px 20px auto 20px;
    background: var(--color-globe-blue);
    border: 2px solid var(--color-white);
    border-radius: 24px;
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    gap: 20px;
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 0.25s ease,
      opacity 0.2s ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav__list {
    flex-direction: column;
    gap: 18px;
  }

  .burger {
    display: flex;
  }
}
