/* =========================================================
   UNDERSIDE: Wall of Fame
   Korktavle med polaroider, sortert etter måned
   (bygger på fargene i utleie.css)
   ========================================================= */
.wof-side main { overflow-x: clip; }

/* ---------- Hero med neonskilt ---------- */
.wof-hero {
  position: relative;
  padding: 120px 24px 110px;
  text-align: center;
  color: var(--krem);
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 70, 120, .18), transparent 60%),
    linear-gradient(rgba(14, 8, 4, .82), rgba(14, 8, 4, .92)),
    url("bilder/ognascene-mork.jpg") center / cover;
}
.wof-hero .smuler { justify-content: center; }
.underside .neon {
  margin: 18px 0 8px;
  font-family: "Monoton", cursive;
  font-weight: 400;
  font-size: clamp(54px, 10vw, 140px);
  line-height: 1;
  color: #ffe7f1;
  text-shadow: 0 0 4px #fff, 0 0 12px #ff4f8b, 0 0 28px #ff4f8b, 0 0 60px #ff2d6f, 0 0 110px #ff2d6f;
  animation: wof-flimmer 6s infinite;
}
.neon span { color: #e6fbff; text-shadow: 0 0 4px #fff, 0 0 12px #38d6ff, 0 0 30px #38d6ff, 0 0 70px #1fa8ff; }
@keyframes wof-flimmer {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: .45; }
}
.wof-ingress { max-width: 640px; margin: 18px auto 0; font-size: 19px; line-height: 1.6; color: #e9dcc0; }

.wof-tellere { display: flex; justify-content: center; gap: clamp(20px, 6vw, 80px); margin-top: 44px; flex-wrap: wrap; }
.wof-teller b { display: block; font: 400 clamp(40px, 5vw, 64px)/1 "Alfa Slab One", serif; color: var(--sennep); }
.wof-teller span { font: 600 13px "Oswald", sans-serif; letter-spacing: .25em; text-transform: uppercase; color: #cbbd9c; }

/* ---------- Filter og sortering ---------- */
.wof-filter {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: rgba(43, 28, 14, .94);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.wof-filter button {
  padding: 8px 17px; border: 2px solid #8a6a3e; border-radius: 999px;
  background: transparent; color: var(--krem); cursor: pointer;
  font: 600 14px "Oswald", sans-serif; letter-spacing: .14em; text-transform: uppercase;
  transition: background .2s, color .2s, transform .2s;
}
.wof-filter button:hover { transform: translateY(-2px); }
.wof-filter button[aria-pressed="true"] { background: var(--sennep); border-color: var(--sennep); color: var(--brun); }
.wof-filter .wof-sorter { border-style: dashed; }
.wof-filter .skille-strek { width: 2px; height: 26px; background: #6b5232; margin: 0 6px; }

/* ---------- Korktavla ---------- */
.wof-kork {
  --kork: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .18 0 0 0 0 .06 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23k)'/%3E%3C/svg%3E");
  padding: 50px clamp(16px, 4vw, 60px) 110px;
  background: var(--kork), radial-gradient(ellipse at 50% 0%, #c99a62, #a8763f 70%);
  border-top: 18px solid #5a3a1c;
  border-bottom: 18px solid #5a3a1c;
  box-shadow: inset 0 10px 30px rgba(0, 0, 0, .35), inset 0 -10px 30px rgba(0, 0, 0, .35);
}
.wof-tips { text-align: center; margin: 0 0 10px; font: 700 26px "Caveat", cursive; color: #3a2410; }
.wof-tavle {
  max-width: 1320px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 46px 34px;
}

/* Månedslapp – en teipet papirlapp over hele bredden */
.underside .wof-maned {
  grid-column: 1 / -1;
  justify-self: start;
  position: relative;
  margin: 36px 0 -6px;
  padding: 8px 26px 6px;
  background: #fbf3dc;
  font: 700 clamp(30px, 3.4vw, 42px)/1 "Caveat", cursive;
  color: #a51b25;
  transform: rotate(-1.5deg);
  box-shadow: 0 6px 14px rgba(40, 20, 5, .35);
  clip-path: polygon(0 4%, 3% 0, 30% 3%, 60% 0, 97% 2%, 100% 8%, 99% 96%, 70% 100%, 40% 97%, 6% 100%, 0 94%);
}
.underside .wof-maned::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 80px; height: 24px; margin-left: -40px;
  background: rgba(255, 246, 200, .7);
  transform: rotate(3deg);
}
.underside .wof-maned small { margin-left: 10px; font-size: .55em; color: #6a5a4a; }
.underside .wof-maned:first-child { margin-top: 10px; }

/* ---------- Polaroid (med flipp) ---------- */
.wof-pol {
  --r: 0deg;
  position: relative;
  display: block; width: 100%;
  perspective: 1200px;
  transform: rotate(var(--r));
  transition: transform .35s cubic-bezier(.3, 1.5, .5, 1);
  cursor: pointer;
  border: 0; padding: 0; background: none; text-align: left; font: inherit; color: inherit;
}
.wof-pol:hover, .wof-pol:focus-visible { transform: rotate(0deg) scale(1.07); z-index: 3; }
.wof-pol:focus-visible { outline: 3px solid var(--sennep); outline-offset: 6px; }
.wof-kort {
  display: block; /* må være blokk – ellers virker ikke snu-animasjonen */
  position: relative;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.4, .2, .2, 1);
}
.wof-pol.snudd .wof-kort { transform: rotateY(180deg); }
.wof-side-a, .wof-side-b {
  margin: 0;
  backface-visibility: hidden;
  background: #fbf8f0;
  padding: 12px 12px 0;
  box-shadow: 0 2px 3px rgba(0, 0, 0, .25), 0 14px 26px rgba(40, 20, 5, .4);
}
.wof-side-a img {
  display: block; width: 100%; aspect-ratio: 1; object-fit: cover;
  filter: sepia(.15) saturate(1.05) contrast(1.03);
  background: #222;
}
.wof-side-a figcaption {
  padding: 10px 2px 14px;
  font: 700 25px/1.05 "Caveat", cursive; color: #1f2a6b;
}
.wof-side-a figcaption small { display: block; margin-top: 3px; font-size: 18px; font-weight: 500; color: #555; }
.wof-side-b {
  position: absolute; inset: 0;
  transform: rotateY(180deg);
  padding: 22px 20px;
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  background: repeating-linear-gradient(#fbf8f0 0 29px, #cfe0f2 29px 30px);
  font: 500 22px/1.25 "Caveat", cursive; color: #22305e;
}
.wof-side-b strong { font-size: 28px; color: #a51b25; }
.wof-side-b .sjanger { font: 600 12px "Oswald", sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #8a6a3e; }

/* Nål eller teip – velges tilfeldig */
.wof-nal::before {
  content: ""; position: absolute; z-index: 2; top: -9px; left: 50%;
  width: 20px; height: 20px; margin-left: -10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a8a, var(--nalfarge, #c4161c) 55%, #5e0b12);
  box-shadow: 2px 5px 5px rgba(0, 0, 0, .4);
}
.wof-teip::before {
  content: ""; position: absolute; z-index: 2; top: -14px; left: 50%;
  width: 96px; height: 28px; margin-left: -48px;
  background: rgba(255, 246, 200, .62);
  transform: rotate(var(--teip, -4deg));
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 50%);
}
.wof-flagg {
  position: absolute; z-index: 2; right: 18px; top: 18px;
  padding: 3px 8px; border-radius: 3px;
  background: #111; color: #fff; font: 600 11px "Oswald", sans-serif; letter-spacing: .12em;
}

/* ---------- Avslutning ---------- */
.wof-neste { padding: 90px 24px; text-align: center; background: var(--gronn); color: var(--krem); }
.underside .wof-neste h2 { color: var(--krem); }
.wof-neste p { font-size: 18px; margin: 0 0 30px; color: #d8e3c8; }

@media (max-width: 560px) {
  .wof-tavle { grid-template-columns: repeat(2, 1fr); gap: 34px 18px; }
  .wof-side-a figcaption { font-size: 20px; }
  .wof-side-b { font-size: 17px; padding: 14px; }
  .wof-filter .skille-strek { display: none; }
  /* Én rad man kan sveipe i, så filteret ikke tar halve skjermen */
  .wof-filter { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .wof-filter button { flex: none; padding: 7px 14px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .neon { animation: none; }
  .wof-pol, .wof-kort { transition: none; }
}
