:root {
  --ink: #102f62;
  --blue: #1f5fd4;
  --card: rgba(255, 255, 255, 0.5);
  --card-border: rgba(255, 255, 255, 0.84);
  --shadow: 0 18px 45px rgba(49, 91, 153, 0.14);
}

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

html {
  min-width: 0;
  min-height: 100%;
  background: #e6f1ff;
}

body {
  min-width: 0;
  min-height: 100%;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  font-family: Vazirmatn, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 16%, rgba(71, 181, 255, 0.38), transparent 29rem),
    radial-gradient(circle at 92% 8%, rgba(213, 175, 255, 0.48), transparent 30rem),
    linear-gradient(145deg, #dcf3ff 0%, #e8f3ff 48%, #eee5ff 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.2;
  background:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
  background-size: 34px 34px;
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.34;
  animation: drift 13s ease-in-out infinite;
}

.ambient-a {
  width: 340px;
  height: 340px;
  top: -120px;
  left: -170px;
  background: radial-gradient(circle, rgba(81, 182, 255, 0.6), transparent 70%);
}

.ambient-b {
  width: 300px;
  height: 300px;
  top: 40px;
  right: -145px;
  background: radial-gradient(circle, rgba(222, 194, 255, 0.65), transparent 70%);
  animation-delay: -4s;
}

.ambient-c {
  width: 360px;
  height: 360px;
  bottom: -230px;
  left: 25%;
  background: radial-gradient(circle, rgba(76, 170, 255, 0.32), transparent 70%);
  animation-delay: -8s;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(94%, 960px);
  margin-inline: auto;
  padding-block: clamp(24px, 4vw, 48px) 48px;
}

.hero {
  margin-bottom: clamp(22px, 3vw, 32px);
  text-align: center;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 20px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  color: #174ec1;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 12px 30px rgba(45, 99, 169, 0.1), inset 0 1px rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 900;
}

.brand-mark {
  position: relative;
  width: 17px;
  height: 17px;
  border: 3px solid #2263dc;
  border-radius: 50%;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid #2263dc;
  border-radius: 50%;
}

.hero h1 {
  margin: clamp(14px, 2vw, 20px) 0 8px;
  color: #0b2c64;
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1px;
  text-shadow: 0 12px 30px rgba(14, 75, 162, 0.1);
}

.hero h1 span {
  color: var(--blue);
}

.hero p {
  margin: 0;
  color: rgba(26, 69, 128, 0.76);
  font-size: clamp(13px, 1.6vw, 18px);
  line-height: 1.8;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 20px);
  width: min(100%, 940px);
  margin-inline: auto;
}

.city-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: clamp(220px, 18vw, 245px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 14px 15px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 26px;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.32));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-decoration: none;
  opacity: 1;
  transform: none;
}

.city-card img {
  position: relative;
  z-index: 1;
  width: min(64%, 145px);
  height: 96px;
  margin-bottom: 9px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(20, 84, 165, 0.1));
}

.city-card h2 {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: #0c2d68;
  font-size: clamp(23px, 2.3vw, 31px);
  font-weight: 900;
  line-height: 1.25;
}

.pin {
  color: #4a73b7;
  font-size: 0.5em;
}

.views {
  position: relative;
  z-index: 1;
  margin-top: 9px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  color: rgba(23, 64, 126, 0.7);
  background: rgba(255, 255, 255, 0.34);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.last-card {
  grid-column: 2;
}

.glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.72), transparent 28%);
}

@media (hover: hover) and (pointer: fine) {
  .city-card {
    transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
  }

  .city-card:hover {
    transform: translateY(-7px) scale(1.01);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.44));
    box-shadow: 0 24px 60px rgba(26, 94, 178, 0.2), inset 0 1px #fff;
  }

  .city-card:hover .glow {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .page-shell {
    width: min(92%, 740px);
  }

  .city-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .last-card {
    grid-column: 1 / -1;
    width: calc(50% - clamp(7px, 0.9vw, 10px));
    justify-self: center;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(94%, 540px);
    padding-block: 18px 30px;
  }

  .hero {
    margin-bottom: 16px;
  }

  .brand-pill {
    gap: 6px;
    padding: 5px 13px;
    font-size: 12px;
  }

  .brand-mark {
    width: 12px;
    height: 12px;
    border-width: 2px;
  }

  .brand-mark::after {
    inset: 2px;
    border-width: 1px;
  }

  .hero h1 {
    margin-block: 9px 3px;
    font-size: clamp(28px, 9vw, 38px);
    letter-spacing: 0;
  }

  .hero p {
    font-size: clamp(11px, 3.2vw, 14px);
    line-height: 1.65;
  }

  .city-grid {
    gap: clamp(8px, 2.6vw, 12px);
  }

  .city-card {
    min-height: clamp(148px, 45vw, 178px);
    padding: 10px 7px 9px;
    border-radius: clamp(17px, 5vw, 22px);
  }

  .city-card img {
    width: min(68%, 96px);
    height: clamp(55px, 18vw, 72px);
    margin-bottom: 4px;
  }

  .city-card h2 {
    gap: 3px;
    font-size: clamp(18px, 5.8vw, 24px);
  }

  .views {
    margin-top: 5px;
    padding: 3px 6px;
    font-size: clamp(8px, 2.4vw, 10px);
  }

  .last-card {
    width: calc(50% - clamp(4px, 1.3vw, 6px));
  }
}

@media (max-width: 340px) {
  .page-shell {
    width: 95%;
  }

  .city-card {
    min-height: 144px;
  }
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(22px, -14px, 0) scale(1.06); }
}

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