@font-face {
  font-family: "Archivo Black";
  src: url("./fonts/ArchivoBlack-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.kampanja-hero {
  --hero-display: "Archivo Black", "Arial Black", system-ui, sans-serif;
  --hero-animation: 520ms;
  --hero-distance: 16px;
  --hero-map-delay: 100ms;
  color: #192b25;
  background-color: #f0e5cf;
  background-image: url("./paper.png"), linear-gradient(115deg, #f4e4ce, #f0e0c9);
}

.hero-paper {
  width: min(100%, 112rem);
  min-height: min(100svh, 63rem);
  margin-inline: auto;
  padding: clamp(1rem, 2vh, 2rem) 4% clamp(1.75rem, 4.5vh, 3rem) 6.6%;
  display: grid;
  /* The islands sit below the headline in the shared middle column. */
  grid-template-columns: minmax(0, 53fr) minmax(0, 9fr) minmax(0, 38fr);
  align-items: center;
  box-sizing: border-box;
}

.hero-intro {
  min-width: 0;
  grid-area: 1 / 1 / 2 / 3;
  animation: hero-appear var(--hero-animation) ease-out both;
}

.kampanja-hero h1 {
  font-family: var(--hero-display);
  font-size: clamp(3rem, 7.35vw, 8.2rem);
  font-weight: 400;
  font-style: normal;
  text-transform: uppercase;
  line-height: 1.035;
  letter-spacing: -.025em;
  color: #fffdfa;
  text-shadow: 0 .013em .004em #976e49, .018em .04em .045em #91673d70;
  -webkit-text-stroke: .7px #906b48;
  paint-order: stroke fill;
  margin: 0;
}

.kampanja-hero h1 span {
  display: block;
  transform: scaleY(1.12);
}

.hero-intro p {
  font: 400 clamp(1.1rem, 2.35vw, 2.6rem)/1.28 system-ui, sans-serif;
  letter-spacing: -.025em;
  max-width: 36ch;
  text-wrap: balance;
  margin: clamp(1.3rem, 2.5vw, 2.8rem) 0 0 .04em;
  color: #52655f;
}

.hero-map {
  grid-area: 1 / 2 / 2 / 4;
  margin: 0;
  width: min(100%, max(20rem, 74svh));
  justify-self: end;
  animation: hero-appear var(--hero-animation) ease-out var(--hero-map-delay) both;
}

.hero-finland {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(3px 6px 4px rgba(104, 70, 36, .24));
}

.hero-district {
  --district-lift: translate(-4px, -7px);
  --district-lift-shadow: drop-shadow(4px 6px 3px rgba(67, 44, 19, .42));
  cursor: pointer;
  touch-action: manipulation;
  color: #152d78;
  transition: transform 180ms ease, filter 180ms ease;
  transform-box: fill-box;
  transform-origin: center;
}

.hero-district[data-district="pirkanmaa"] { color: #271e2b; }

.hero-district-face {
  stroke: #fff5e4;
  stroke-width: 2;
  stroke-linejoin: round;
}

.hero-district-grain, .hero-district text {
  pointer-events: none;
}

.hero-district text {
  fill: currentColor;
  font: 700 26px/1 system-ui, sans-serif;
  letter-spacing: -.03em;
  text-anchor: middle;
}

.hero-district:is([data-district="helsinki"], [data-district="ahvenanmaa"]) text { font-size: 21px; }
.hero-hit { fill: transparent; }

.hero-district[aria-current="true"] {
  transform: var(--district-lift);
  filter: var(--district-lift-shadow);
}

.hero-district[aria-current="true"] .hero-district-face {
  stroke: #694f76;
  stroke-width: 4;
}

.hero-district:focus-visible {
  outline: none;
  filter: drop-shadow(0 0 3px #fff);
}

.hero-district:focus-visible .hero-district-face {
  stroke: #172f55;
  stroke-width: 6;
}

@media (hover: hover) {
  .hero-district:hover {
    transform: var(--district-lift);
    filter: var(--district-lift-shadow);
  }
}

.hero-browse { display: none; }

@keyframes hero-appear {
  from { opacity: .15; transform: translateY(var(--hero-distance)); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 48rem) {
  .hero-paper {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 0;
    padding: clamp(1.65rem, 6vw, 2.8rem) 3vw .9rem;
  }

  .hero-intro { grid-area: auto; padding-inline: 2.5vw; }
  .kampanja-hero h1 {
    font-size: min(11.8vw, 5.25rem);
    line-height: 1.07;
    -webkit-text-stroke-width: 1px;
  }
  .hero-intro p { font-size: clamp(1rem, 4.2vw, 1.35rem); max-width: 35ch; margin: 1rem 0 0; }
  .hero-map { grid-area: auto; justify-self: center; width: min(100%, 29rem); margin-block: .7rem .2rem; }
  .hero-browse {
    display: inline-flex;
    align-items: center;
    justify-self: center;
    gap: .55rem;
    min-height: 2.75rem;
    padding: .55rem 1rem;
    color: var(--pine);
    border: 1px solid currentColor;
    border-radius: .4rem;
    font: 650 .875rem/1.2 system-ui, sans-serif;
    text-decoration: underline;
    text-underline-offset: .24em;
  }
  .hero-browse:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-intro, .hero-map { animation: none; }
  .hero-district { transition: none; }
}

@media (forced-colors: active) {
  .kampanja-hero h1 { color: CanvasText; -webkit-text-stroke: 0; text-shadow: none; }
  .hero-district-face { stroke: LinkText; fill: Canvas; }
  .hero-district text { fill: LinkText; }
  .hero-district:focus-visible { outline: 3px solid Highlight; }
}
