/* Pro Tattoo – pro-tattoo.shop country picker
   Design language mirrors pro-tattoo.sk: white surfaces, navy ink, copper-gold accents,
   Pirata One headlines, torn-paper edges and brush textures. */

:root {
  --navy: #273b4c;
  --navy-dark: #1e2e3b;
  --navy-deep: #111d27;
  --slate: #4c6173;
  --gold: #d2934d;
  --gold-light: #daa76e;
  --line: #e8eaec;
  --paper: #ffffff;
  --paper-soft: #f6f7f8;

  --font-display: "Pirata One", "Times New Roman", serif;
  --font-body: "Red Hat Display", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 5.5vw, 96px);
  --radius: 6px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 320ms;

  /* where the map's focal point (central Europe) sits in the viewport */
  --map-x: 66vw;
  --map-y: 50dvh;
  --map-width: max(112vw, 180dvh);
}

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

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- Map ---------- */

.map {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 46% 58% at var(--map-x) var(--map-y), #000 38%, transparent 100%);
  mask-image: radial-gradient(ellipse 46% 58% at var(--map-x) var(--map-y), #000 38%, transparent 100%);
  animation: map-in 1.6s var(--ease) both;
}

.map__svg {
  position: absolute;
  left: var(--map-x);
  top: var(--map-y);
  width: var(--map-width);
  height: auto;
  /* 62.5% / 52% = focal point baked in by tools/build-map.mjs */
  transform: translate(-62.5%, -52%);
}

.map__graticule {
  fill: none;
  stroke: var(--navy);
  stroke-opacity: 0.08;
  stroke-width: 1;
  stroke-dasharray: 2 6;
}

.map__land {
  fill: var(--paper-soft);
  stroke: var(--navy);
  stroke-opacity: 0.3;
  stroke-width: 0.8;
  stroke-linejoin: round;
}

.map__country {
  fill: var(--navy);
  stroke: var(--paper);
  stroke-width: 1.2;
  stroke-linejoin: round;
  cursor: pointer;
  pointer-events: auto;
  transition: fill var(--duration) var(--ease);
}

.map__country--soon {
  fill: url(#hatch);
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-dasharray: 5 4;
}

.map__hatch-line {
  stroke: var(--navy);
  stroke-opacity: 0.35;
  stroke-width: 1.4;
}

.map__country.is-active {
  fill: var(--gold);
}

.map__country--soon.is-active {
  fill: rgba(210, 147, 77, 0.28);
}

.map__pin {
  cursor: pointer;
  pointer-events: auto;
}

.map__pin-hit {
  fill: transparent;
}

.map__pin-dot {
  fill: var(--gold);
  stroke: var(--paper);
  stroke-width: 1.5;
  transition: fill var(--duration) var(--ease);
}

.map__pin-ring {
  fill: none;
  stroke: var(--paper);
  stroke-opacity: 0.85;
  stroke-width: 1.2;
}

.map__pin-pulse {
  fill: var(--gold);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.8s var(--ease) infinite;
}

.map__pin:nth-child(2n) .map__pin-pulse { animation-delay: 0.7s; }
.map__pin:nth-child(3n) .map__pin-pulse { animation-delay: 1.4s; }

.map__pin--soon .map__pin-ring {
  stroke: var(--gold);
  stroke-dasharray: 3 3;
}

.map__pin--soon .map__pin-dot {
  fill: var(--paper);
  stroke: var(--gold);
  stroke-width: 2;
}

.map__pin.is-active .map__pin-dot {
  fill: var(--navy-dark);
}

.map__pin-label {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-anchor: middle;
  fill: var(--navy-dark);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 5px;
  stroke-linejoin: round;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
  pointer-events: none;
}

.map__pin.is-active .map__pin-label {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  0% { opacity: 0.55; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(3.2); }
}

@keyframes map-in {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- Top bar ---------- */

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(18px, 3.2dvh, 34px) var(--gutter) 0;
}

.topbar__logo img {
  width: auto;
  height: clamp(38px, 5.4dvh, 50px);
}

.topbar__claim {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: right;
  color: var(--slate);
}

.topbar__claim-accent {
  display: block;
  color: var(--gold);
}

/* ---------- Picker ---------- */

.picker {
  position: relative;
  z-index: 2;
  align-self: center;
  width: min(600px, 46vw);
  margin-left: var(--gutter);
  padding: clamp(16px, 3dvh, 40px) 0 clamp(40px, 6dvh, 72px);
  animation: rise 1s var(--ease) 0.15s both;
}

.tag {
  display: inline-block;
  padding: 6px 16px 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--gold);
  -webkit-mask: url("../assets/img/tag-mask.svg") center / 100% 100% no-repeat;
  mask: url("../assets/img/tag-mask.svg") center / 100% 100% no-repeat;
}

.picker__title {
  margin: 0.18em 0 0.16em;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(46px, min(6vw, 10dvh), 96px);
  line-height: 0.92;
  color: var(--navy);
}

.picker__lead {
  max-width: 30em;
  margin: 0 0 clamp(18px, 3.4dvh, 32px);
  font-size: clamp(15px, 1.15vw, 17px);
  color: var(--slate);
}

.shops {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* odd number of shops: let the last one (Poland, coming soon) span the full row */
.shops li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.shop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: clamp(9px, 1.4dvh, 13px) 16px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition:
    border-color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease),
    transform var(--duration) var(--ease);
}

.shop::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gold);
  transform: scaleY(0);
  transition: transform var(--duration) var(--ease);
}

.shop.is-active {
  border-color: rgba(210, 147, 77, 0.55);
  box-shadow: 0 14px 30px -14px rgba(39, 59, 76, 0.35);
  transform: translateY(-2px);
}

.shop.is-active::before {
  transform: scaleY(1);
}

.shop--soon {
  border-style: dashed;
  border-color: rgba(210, 147, 77, 0.6);
}

.shop__flag {
  flex: none;
  width: 28px;
  height: 21px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(17, 29, 39, 0.1);
}

.shop__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.shop__country {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.shop__domain {
  font-size: 13px;
  font-weight: 500;
  color: var(--slate);
}

.shop__badge {
  padding: 3px 8px 2px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--gold);
  -webkit-mask: url("../assets/img/tag-mask.svg") center / 100% 100% no-repeat;
  mask: url("../assets/img/tag-mask.svg") center / 100% 100% no-repeat;
}

.shop__arrow {
  flex: none;
  width: 8px;
  height: 13px;
  margin-left: auto;
  background: var(--gold);
  -webkit-mask: url("../assets/img/chevron.svg") center / contain no-repeat;
  mask: url("../assets/img/chevron.svg") center / contain no-repeat;
  opacity: 0.35;
  transform: translateX(-4px);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.shop.is-active .shop__arrow {
  opacity: 1;
  transform: translateX(0);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Footer with torn-paper edge ---------- */

.footer {
  position: relative;
  z-index: 3;
  isolation: isolate;
  overflow-x: clip; /* torn strip is wider than the viewport */
  color: rgba(255, 255, 255, 0.82);
  background: var(--navy-dark);
  font-size: 13px;
}

/* brush texture, same treatment as pro-tattoo.sk dark sections */
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../assets/img/texture.webp") center / cover no-repeat;
  mix-blend-mode: color-dodge;
  opacity: 0.45;
}

/* torn white paper strip riding on the footer's top edge */
.footer::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -17px;
  width: max(2120px, 110vw);
  height: 34px;
  background: var(--paper);
  transform: translateX(-50%) scaleY(-1);
  -webkit-mask: url("../assets/img/torn.svg") center / 100% 100% no-repeat;
  mask: url("../assets/img/torn.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 26px var(--gutter) 18px;
}

.footer p {
  margin: 0;
}

.footer a {
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

.footer a:hover {
  color: var(--gold-light);
}

.footer__copy {
  color: rgba(255, 255, 255, 0.55);
}

.footer__contact {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  color: var(--paper);
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  :root {
    --map-x: 74vw;
  }

  .picker {
    width: min(560px, 54vw);
  }

  .picker__title {
    font-size: clamp(46px, min(5.4vw, 9dvh), 96px);
  }

  .shops {
    gap: 8px;
  }

  .shop {
    gap: 10px;
    padding-inline: 12px;
  }

  .shop__country {
    font-size: 14px;
  }

  .shop__badge {
    display: none;
  }
}

/* stacked layout: map band between logo and picker */
@media (max-width: 860px) {
  :root {
    --map-x: 50%;
    --map-y: 50%;
    --map-width: min(276vw, 1600px);
  }

  body {
    grid-template-rows: auto minmax(220px, 1fr) auto auto;
  }

  .map {
    position: relative;
    grid-row: 2;
    inset: auto;
    margin: -12px 0 -8px;
    -webkit-mask-image: radial-gradient(ellipse 72% 62% at 50% 50%, #000 45%, transparent 100%);
    mask-image: radial-gradient(ellipse 72% 62% at 50% 50%, #000 45%, transparent 100%);
  }

  .topbar {
    grid-row: 1;
  }

  .picker {
    grid-row: 3;
  }

  .footer {
    grid-row: 4;
  }

  .topbar__claim {
    display: none;
  }

  .picker {
    align-self: end;
    width: auto;
    margin: 0 var(--gutter);
    padding: 0 0 34px;
  }

  .tag {
    display: none;
  }

  .picker__title {
    margin: 0 0 14px;
    font-size: clamp(38px, 10vw, 60px);
  }

  .picker__lead {
    display: none;
  }

  .shops {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .shop {
    gap: 10px;
    padding: 9px 10px;
  }

  .shop__flag {
    width: 22px;
    height: 16px;
  }

  .shop__country {
    font-size: 13px;
    white-space: normal;
  }

  .shop__domain {
    font-size: 11.5px;
  }

  .shop__badge {
    display: none;
  }

  .shop__arrow {
    display: none;
  }

  .footer__inner {
    flex-direction: column;
    gap: 2px;
    justify-content: center;
    padding-top: 22px;
    padding-bottom: 14px;
  }

  .footer__copy {
    font-size: 11px;
  }
}

/* short laptop screens: 9 shops must still fit above the fold */
@media (min-width: 861px) and (max-height: 720px) {
  .picker {
    padding-bottom: 32px;
  }

  .picker__lead {
    margin-bottom: 14px;
  }

  .shops {
    gap: 7px 12px;
  }

  .shop {
    padding-block: 7px;
  }
}

@media (max-width: 860px) and (min-height: 900px) {
  .picker__lead {
    display: block;
    font-size: 14px;
  }
}

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