/* Pogna - Official Mirrors. Figma "dym projekty V2" 6751:7770 (1512 wide): px values below are Figma's. */

@font-face {
  font-family: "Clash Grotesk";
  src: url("assets/fonts/ClashGrotesk-Variable.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}

:root {
  --bg: #0a101f;
  --card: #1d253b;
  --panel: #12192b;
  --text: #d0d7fb;
  --muted: #727e9e;
  --green: #64e26f;
  --red: #ff5f6d;
  /* scale of the decoration (landscape, stripes, clouds): 1 on desktop, smaller on phones */
  --k: 1;
  --card-top: 185px;
  --page-bottom: 48px;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}
body.lock {
  overflow: hidden;
}
img {
  display: block;
}

.page {
  position: relative;
  min-height: 100svh;
  /* clip, not hidden: hidden would make the page the sticky header's scroller */
  overflow: clip;
  padding: 16px 16px var(--page-bottom);
}

/* ---------- background ---------- */

/* the landscape: 1512 x 864.73 at y -123.87; on wider screens its mirrored copies continue it either side */
.scenes {
  position: absolute;
  left: 50%;
  top: calc(-123.87px * var(--k));
  width: calc(1512px * var(--k));
  height: calc(864.73px * var(--k));
  transform: translateX(-50%);
  pointer-events: none;
}
.scene {
  position: absolute;
  inset: 0;
}
.scene--left {
  left: -100%;
  right: 100%;
  transform: scaleX(-1);
}
.scene--right {
  left: 100%;
  right: -100%;
  transform: scaleX(-1);
}
.scene img {
  position: absolute;
  max-width: none;
  user-select: none;
}
.scene .fill {
  inset: 0;
  width: 100%;
  height: 100%;
}
/* the trees' and the lights' own small pictures, in % of the 2065 x 1181 scene */
.scene .trees {
  left: calc(161 / 2065 * 100%);
  top: calc(562 / 1181 * 100%);
  width: calc(1569 / 2065 * 100%);
  height: calc(329 / 1181 * 100%);
}
.scene .lights {
  left: calc(1724 / 2065 * 100%);
  top: calc(445 / 1181 * 100%);
  width: calc(337 / 2065 * 100%);
  height: calc(265 / 1181 * 100%);
}

/* 6751:7891: the landscape fading into the page */
.scene-fade {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(333px * var(--k));
  height: calc(532px * var(--k));
  background: linear-gradient(179.63deg, rgba(10, 16, 31, 0) 4.93%, var(--bg) 45.78%);
  pointer-events: none;
}

/* 6751:7893: light stripes (white at the bottom, overlay-blended), 62.5 wide every 103.24, the first at x -100 */
.stripes {
  position: absolute;
  left: 50%;
  width: 8000px;
  margin-left: -4000px;
  top: calc(505px * var(--k));
  height: calc(926px * var(--k));
  background: linear-gradient(90deg, #fff 0 calc(62.5px * var(--k)), transparent 0) repeat-x;
  background-size: calc(103.24px * var(--k)) 100%;
  background-position-x: calc(4000px - 856px * var(--k));
  -webkit-mask-image: linear-gradient(to top, #000, transparent);
  mask-image: linear-gradient(to top, #000, transparent);
  opacity: 0.28;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.birds {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(70px * var(--k));
  height: calc(200px * var(--k));
  overflow: hidden;
  color: #252b4f;
  pointer-events: none;
}
.flock {
  position: absolute;
  inset-inline: 0;
  animation: flock-fly var(--cycle, 30s) linear var(--delay, 0s) infinite both;
  will-change: transform;
}
.flock--back {
  scale: -1 1;
}
@keyframes flock-fly {
  0% {
    transform: translate3d(-6%, 0, 0);
  }
  40%,
  100% {
    transform: translate3d(106%, var(--rise, -30px), 0);
  }
}
.bird {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 50% 70%;
  animation: bird-flap 0.55s ease-in-out var(--flap-delay, 0s) infinite;
}
@keyframes bird-flap {
  0%,
  100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.35);
  }
}

/* ---------- header ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 -16px;
  padding: 17px 16px;
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s ease-out,
    backdrop-filter 0.3s ease-out,
    box-shadow 0.3s ease-out;
}
.topbar.stuck {
  background: rgba(10, 16, 31, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(5, 8, 18, 0.35);
}

.top {
  position: relative;
  z-index: 2;
  max-width: 788px;
  height: 46px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  margin-top: 8px;
}
.logo img {
  width: 115px;
  height: auto;
}
.age {
  width: 47px;
  height: auto;
}

/* ---------- the card ---------- */

.card {
  position: relative;
  z-index: 1;
  max-width: 788px;
  /* reaches the page bottom (under the clouds) on tall screens */
  min-height: calc(100svh - var(--card-top) - var(--page-bottom));
  margin: calc(var(--card-top) - 16px - 80px) auto 0;
  padding: 0 29.5px 35px;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 30px;
  text-align: center;
}
h1 {
  margin: 62px 0 0;
  font: 600 40px/45px "Clash Grotesk", sans-serif;
  letter-spacing: -0.02em;
  color: var(--text);
  text-box: trim-both cap alphabetic;
}
.sub {
  max-width: 544px;
  margin: 34px auto 0;
  font-size: 20px;
  line-height: 30px;
  letter-spacing: -1px;
  color: var(--muted);
  text-box: trim-both cap alphabetic;
}

.panel {
  flex: 1;
  margin: 47.5px 0 0;
  /* the rows stay clear of the clouds that cover the panel's bottom */
  padding: 11px 0 365px;
  list-style: none;
  background: var(--panel);
  border-radius: 30px;
  box-shadow: inset 0 2px 2px rgba(152, 152, 152, 0.25);
  text-align: left;
  /* clips the rows' hover fill to the rounded corners */
  overflow: hidden;
}

.row {
  position: relative;
  height: 81px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 0 27px;
  transition: background 0.15s;
}
/* the whole row lights up under the pointer, as on Stake's mirrors */
.row:hover {
  background: #182038;
}
.row::after {
  content: "";
  position: absolute;
  left: 27.5px;
  right: 27.5px;
  bottom: 0;
  height: 1px;
  background: var(--card);
}
.row-link {
  position: absolute;
  inset: 0;
  border-radius: 16px;
}
.row-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -2px;
}
.domain {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -1.1px;
  color: var(--text);
  transition: color 0.15s;
}
.chev {
  flex: none;
  margin-left: 19px;
  color: var(--muted);
  transition:
    transform 0.15s,
    color 0.15s;
  pointer-events: none;
}
.row:hover .domain {
  color: #fff;
}
.row:hover .chev {
  color: var(--text);
  transform: translateX(3px);
}

/* status dot: 6751:7945 (green = up), grey while checking, red when it doesn't answer */
.dot {
  --c1: var(--green);
  --c2: #c5ffca;
  flex: none;
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c1) 40%, transparent);
}
.dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: linear-gradient(var(--c1), var(--c2));
}
.dot[data-state="checking"] {
  --c1: #727e9e;
  --c2: #a9b2cc;
  animation: dot-pulse 1.1s ease-in-out infinite;
}
.dot[data-state="offline"] {
  --c1: var(--red);
  --c2: #ffc2c8;
}
@keyframes dot-pulse {
  50% {
    opacity: 0.45;
  }
}

/* the countries pill: 71 x 28, flags 15 overlapping, a small chevron */
.pill {
  position: relative;
  z-index: 1;
  margin-left: auto;
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 0 11px;
  border: 0;
  border-radius: 999px;
  background: var(--card);
  box-shadow: inset 0 2px 2.8px rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: background 0.15s;
}
.pill:hover {
  background: #262f4a;
}
.pill:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.flags {
  display: flex;
}
.flag {
  position: relative;
  flex: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  overflow: hidden;
  background: #2b3550;
  font: 600 6px/15px "Inter", sans-serif;
  color: var(--text);
  text-align: center;
}
.flag::before {
  content: attr(data-code);
}
.flag img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.flags .flag + .flag {
  margin-left: -5px;
  box-shadow: 0 0 0 2px var(--card);
}
.pill:hover .flag + .flag {
  box-shadow: 0 0 0 2px #262f4a;
}
/* worldwide: a globe and the word in place of the flags */
.worldwide {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 600 12px/1 "Inter", sans-serif;
  letter-spacing: -0.2px;
  color: var(--text);
}
.worldwide svg,
.countries .globe {
  color: var(--green);
}

/* ---------- the clouds over the card's bottom ---------- */

.bottom {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.fade-under {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(-59px * var(--k));
  height: calc(504px * var(--k));
  background: linear-gradient(rgba(10, 16, 31, 0), var(--bg) 53%);
}
.clouds {
  position: absolute;
  left: 50%;
  bottom: calc(-33px * var(--k));
  display: flex;
  transform: translateX(calc(-50% + 64px * var(--k)));
}
.clouds img {
  width: calc(1960px * var(--k));
  max-width: none;
  height: auto;
  flex: none;
}
.clouds .flip {
  transform: scaleX(-1);
}
.fade-over {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(-59px * var(--k));
  height: calc(189px * var(--k));
  background: linear-gradient(rgba(10, 16, 31, 0), var(--bg) 50%);
}

/* ---------- the countries popup ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 8, 17, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s;
}
.modal[hidden] {
  display: none;
}
.modal.open {
  opacity: 1;
}
.dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100svh - 32px);
  overflow: auto;
  padding: 28px 24px 24px;
  background: var(--card);
  border-radius: 26px;
  box-shadow:
    inset 0 2px 2.8px rgba(255, 255, 255, 0.18),
    0 24px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.18s;
}
.modal.open .dialog {
  transform: none;
}
.close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
}
.close:hover {
  color: var(--text);
}
.dialog h2 {
  margin: 0 48px 0 0;
  font: 500 30px/36px "Clash Grotesk", sans-serif;
  letter-spacing: -1.4px;
  color: var(--text);
}
.modal-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.4px;
  color: var(--muted);
}
.modal-status .dot {
  width: 14px;
  height: 14px;
}
.modal-status .dot::after {
  inset: 2px;
}
.modal-label {
  margin: 22px 0 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.2px;
  text-transform: uppercase;
  color: var(--muted);
}
.countries {
  margin: 0;
  padding: 4px 16px;
  list-style: none;
  background: var(--panel);
  border-radius: 18px;
  box-shadow: inset 0 2px 2px rgba(152, 152, 152, 0.25);
}
.countries li {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
}
.countries li + li {
  border-top: 1px solid var(--card);
}
.countries .globe {
  display: flex;
  flex: none;
}
.countries .flag {
  width: 24px;
  height: 24px;
  font-size: 9px;
  line-height: 24px;
}
.country {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.7px;
}
.badge {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.badge--blocked {
  color: #ff7f8a;
  background: rgba(255, 95, 109, 0.12);
}
.badge--ok {
  color: var(--green);
  background: rgba(100, 226, 111, 0.12);
}
.go {
  display: block;
  margin-top: 18px;
  padding: 14px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.5px;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s;
}
.go:hover {
  background: #fff;
}

/* ---------- phones ---------- */

@media (max-width: 820px) {
  :root {
    --k: 0.62;
    --card-top: 110px;
    --page-bottom: 24px;
  }
  .page {
    padding-top: 12px;
  }
  .topbar {
    padding-block: 10px;
  }
  .top {
    height: 40px;
  }
  .logo {
    margin-top: 4px;
  }
  .logo img {
    width: 96px;
  }
  .age {
    width: 38px;
  }
  .card {
    margin-top: calc(var(--card-top) - 12px - 60px);
    padding: 0 12px 14px;
    border-radius: 24px;
  }
  h1 {
    margin-top: 36px;
    font-size: 30px;
    line-height: 36px;
  }
  .sub {
    margin-top: 22px;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: -0.6px;
    padding: 0 6px;
  }
  .panel {
    margin-top: 30px;
    padding: 6px 0 240px;
    border-radius: 20px;
  }
  .row {
    height: 64px;
    gap: 10px;
    padding: 0 12px 0 16px;
  }
  .row::after {
    left: 16px;
    right: 16px;
  }
  .domain {
    font-size: 18px;
    letter-spacing: -0.8px;
  }
  .dot {
    width: 16px;
    height: 16px;
  }
  .dot::after {
    inset: 2.5px;
  }
  .chev {
    margin-left: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flock {
    display: none;
  }
  .dot[data-state="checking"] {
    animation: none;
  }
  .modal,
  .dialog {
    transition: none;
  }
}
