/* ============================================================
   MERCATOR POLSKA
   Ekscynatorium
   ============================================================ */


/* ------------------------------------------------------------
   STRONA
   ------------------------------------------------------------ */

html,
body {
  margin: 0;
  padding: 0;

  background: #ffffff;
  color: #20252b;
}


.mp-page,
.mp-page * {
  box-sizing: border-box;
}


.mp-page {
  width: 100%;

  margin: 0;
  padding: 24px 16px 40px;

  background: #ffffff;

  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
}


.mp-app {
  width: min(1200px, 100%);
  margin: 0 auto;
}



/* ------------------------------------------------------------
   NAGŁÓWEK
   ------------------------------------------------------------ */

.mp-header {
  margin-bottom: 18px;
}


.mp-eyebrow {
  display: inline-block;

  margin-bottom: 10px;

  padding: 6px 10px;

  color: #176b91;
  background: #eef8fc;

  border: 1px solid #cde8f4;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 800;

  letter-spacing: .07em;
  text-transform: uppercase;
}


.mp-title {
  margin: 0 0 8px;

  color: #161a1e;

  font-size: clamp(32px, 5vw, 58px);
  font-weight: 800;

  line-height: 1.04;
  letter-spacing: -.035em;
}


.mp-lead {
  max-width: 900px;

  margin: 0;

  color: #515a63;

  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
}


.mp-lead strong {
  color: #20252b;
}



/* ------------------------------------------------------------
   KARTA EKSPERYMENTU
   ------------------------------------------------------------ */

.mp-card {
  overflow: hidden;

  background: #ffffff;

  border: 1px solid #d8dfe5;
  border-radius: 16px;

  box-shadow:
    0 9px 30px rgba(0, 0, 0, .07);
}



/* ------------------------------------------------------------
   PASEK PRZYCISKÓW
   ------------------------------------------------------------ */

.mp-toolbar {
  display: flex;
  flex-wrap: wrap;

  gap: 7px;

  padding: 10px;

  background: #f5f7f9;

  border-bottom: 1px solid #dce2e7;
}


.mp-button {
  appearance: none;

  min-height: 40px;

  padding: 8px 13px;

  color: #26323c;
  background: #ffffff;

  border: 1px solid #cad3db;
  border-radius: 7px;

  font-family: inherit;
  font-size: 14px;
  font-weight: 700;

  line-height: 1.15;

  cursor: pointer;

  transition:
    background .15s ease,
    border-color .15s ease,
    transform .08s ease;
}


.mp-button:hover {
  background: #eef2f5;
  border-color: #aebbc6;
}


.mp-button:active {
  transform: translateY(1px);
}


.mp-button:focus-visible {
  outline: 3px solid rgba(39, 159, 214, .35);
  outline-offset: 2px;
}


.mp-button-primary {
  color: #271e00;
  background: #ffca28;

  border-color: #dda900;
}


.mp-button-primary:hover {
  background: #ffd447;
}



/* ------------------------------------------------------------
   MAPA
   ------------------------------------------------------------ */

.mp-map-wrap {
  position: relative;

  width: 100%;

  /*
   * Ten stosunek boków jest celowy.
   *
   * Mercator zajmuje teraz praktycznie całą szerokość
   * i nie tworzy ogromnych pustych pól po bokach.
   */

  aspect-ratio: 1.4 / 1;

  overflow: hidden;

  background: #091827;

  touch-action: none;
}


.mp-map {
  display: block;

  width: 100%;
  height: 100%;

  background: #091827;
}



/* ------------------------------------------------------------
   ELEMENTY SVG
   ------------------------------------------------------------ */

.mp-ocean {
  fill: #091827;
}


.mp-graticule {
  fill: none;

  stroke: #263a4e;
  stroke-width: 1;

  opacity: .78;

  vector-effect: non-scaling-stroke;
}


.mp-latitude-line {
  fill: none;

  stroke: #485e71;
  stroke-width: 1;

  stroke-dasharray: 5 5;

  opacity: .8;

  vector-effect: non-scaling-stroke;
}


.mp-equator {
  fill: none;

  stroke: #ff6565;
  stroke-width: 1.5;

  stroke-dasharray: 8 5;

  opacity: .95;

  vector-effect: non-scaling-stroke;
}


.mp-land {
  fill: #2b4054;
  stroke: none;
}


.mp-borders {
  fill: none;

  stroke: #597083;
  stroke-width: .65;

  opacity: .9;

  vector-effect: non-scaling-stroke;
}


.mp-poland-home {
  fill: none;

  stroke: #ffca28;
  stroke-width: 2;

  stroke-dasharray: 5 4;

  opacity: .7;

  pointer-events: none;

  vector-effect: non-scaling-stroke;
}


.mp-moving-poland {
  fill: #ffca28;

  stroke: #fff0a0;
  stroke-width: 2;

  pointer-events: none;

  filter:
    drop-shadow(
      0 3px 5px rgba(0, 0, 0, .65)
    );

  vector-effect: non-scaling-stroke;
}


.mp-poland-hit {
  fill: rgba(255, 202, 40, .001);

  stroke: rgba(255, 202, 40, .001);
  stroke-width: 15;

  cursor: grab;

  pointer-events: all;

  vector-effect: non-scaling-stroke;
}


.mp-poland-hit.mp-dragging {
  cursor: grabbing;
}


.mp-poland-label {
  fill: #111820;

  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  font-size: 11px;
  font-weight: 900;

  text-anchor: middle;

  pointer-events: none;
}


.mp-map-label {
  fill: #a8bac9;

  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  font-size: 11px;
  font-weight: 700;

  pointer-events: none;
}


.mp-map-label-equator {
  fill: #ff8989;
}



/* ------------------------------------------------------------
   ŁADOWANIE / BŁĄD
   ------------------------------------------------------------ */

.mp-loading {
  position: absolute;
  inset: 0;

  z-index: 20;

  display: grid;
  place-items: center;

  padding: 20px;

  color: #aec0d0;
  background: #091827;

  font-size: 15px;
  line-height: 1.5;

  text-align: center;
}


.mp-loading-error {
  color: #ffd4d4;
}



/* ------------------------------------------------------------
   PODPOWIEDŹ
   ------------------------------------------------------------ */

.mp-hint {
  position: absolute;

  left: 50%;
  bottom: 12px;

  transform: translateX(-50%);

  z-index: 10;

  max-width: calc(100% - 20px);

  padding: 7px 12px;

  color: #edf4fa;
  background: rgba(5, 14, 23, .88);

  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;

  box-shadow:
    0 3px 12px rgba(0, 0, 0, .26);

  font-size: 12px;
  font-weight: 700;

  line-height: 1.25;

  text-align: center;

  pointer-events: none;
}



/* ------------------------------------------------------------
   STATYSTYKI
   ------------------------------------------------------------ */

.mp-stats {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  background: #ffffff;

  border-top: 1px solid #dfe5ea;
}


.mp-stat {
  min-width: 0;

  padding: 14px 16px;

  border-right: 1px solid #e0e5e9;
}


.mp-stat:last-child {
  border-right: 0;
}


.mp-stat-name {
  margin-bottom: 4px;

  color: #60707e;

  font-size: 11px;
  font-weight: 800;

  line-height: 1.3;

  letter-spacing: .035em;
  text-transform: uppercase;
}


.mp-stat-value {
  color: #20252b;

  font-size: clamp(21px, 3vw, 29px);
  font-weight: 800;

  line-height: 1.1;

  font-variant-numeric:
    tabular-nums;
}



/* ------------------------------------------------------------
   WYJAŚNIENIE
   ------------------------------------------------------------ */

.mp-science-note {
  padding: 15px 17px 17px;

  color: #4d5963;
  background: #f5f7f8;

  border-top: 1px solid #e0e5e9;

  font-size: 14px;
  line-height: 1.58;
}


.mp-science-note strong {
  color: #1f252a;
}



/* ============================================================
   TABLET / TELEFON
   ============================================================ */

@media (max-width: 760px) {

  .mp-page {
    padding:
      12px 7px 24px;
  }


  .mp-header {
    margin-bottom: 12px;
  }


  .mp-title {
    font-size:
      clamp(29px, 9vw, 42px);
  }


  .mp-lead {
    font-size: 15px;
    line-height: 1.45;
  }


  .mp-card {
    border-radius: 10px;
  }


  .mp-toolbar {
    display: grid;

    grid-template-columns:
      1fr 1fr;

    gap: 5px;

    padding: 6px;
  }


  .mp-button {
    width: 100%;

    min-height: 40px;

    padding: 6px;

    font-size: 12px;
  }


  /*
   * Na telefonie mapa może być odrobinę wyższa
   * w stosunku do szerokości.
   */

  .mp-map-wrap {
    aspect-ratio: 1.2 / 1;
  }


  .mp-stats {
    grid-template-columns:
      1fr 1fr;
  }


  .mp-stat {
    padding: 10px 11px;
  }


  .mp-stat:nth-child(2) {
    border-right: 0;
  }


  .mp-stat:nth-child(1),
  .mp-stat:nth-child(2) {
    border-bottom:
      1px solid #e0e5e9;
  }


  .mp-stat-name {
    font-size: 9px;
  }


  .mp-stat-value {
    font-size: 20px;
  }


  .mp-hint {
    bottom: 7px;

    padding: 5px 8px;

    font-size: 10px;

    border-radius: 8px;
  }


  .mp-science-note {
    padding: 12px;

    font-size: 13px;
    line-height: 1.5;
  }

}



/* ============================================================
   BARDZO MAŁE TELEFONY
   ============================================================ */

@media (max-width: 420px) {

  .mp-page {
    padding-left: 3px;
    padding-right: 3px;
  }


  .mp-toolbar {
    grid-template-columns:
      1fr 1fr;
  }


  .mp-map-wrap {
    aspect-ratio: 1.08 / 1;
  }

}