/* ===========================================================
   Quizmeister / QM Osvoll — minimal version
   Dark backdrop so the real neon logo does the talking.
   One accent (logo blue) for interactive elements, one quiet
   italic serif for the tagline, everything else out of the way.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500&family=Piazzolla:ital,wght@1,400&family=Tilt+Neon&display=swap');

:root {
  --bg: #0b0d11;
  --text: #f4f2ec;
  --text-muted: #9099a1;
  --blue: #79c9ec;
  --coral: #ef6672;
  --gold: #ffd27a;
  --border: rgba(244, 242, 236, 0.14);

  --font-body: 'Work Sans', sans-serif;
  --font-tagline: 'Piazzolla', serif;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
  margin: 0;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 32%, #131720 0%, var(--bg) 58%, #06070a 100%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Ambient party-light glow, sitewide */
body::before,
body::after {
  content: "";
  position: fixed;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(75px);
  opacity: 0.34;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background: radial-gradient(circle, var(--blue), transparent 70%);
  top: -140px;
  left: -100px;
  animation: drift-a 19s ease-in-out infinite alternate;
}

body::after {
  background: radial-gradient(circle, var(--coral), transparent 70%);
  bottom: -160px;
  right: -110px;
  animation: drift-b 23s ease-in-out infinite alternate;
}

@keyframes drift-a {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 34px) scale(1.14); }
}

@keyframes drift-b {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-36px, -28px) scale(1.1); }
}

img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0; }

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

.wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- minimal top bar (kontakt / vilkår pages) ---------- */

.bar-minimal {
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.bar-minimal .logo-link img { height: 34px; width: auto; }

.bar-minimal nav {
  display: flex;
  gap: 24px;
}

.bar-minimal nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.bar-minimal nav a:hover { color: var(--blue); }

/* ---------- homepage hero ---------- */

.hero-minimal {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  gap: 16px;
  overflow: hidden;
}

.logo-wrap {
  position: relative;
  display: inline-block;
}

.logo-mark {
  position: relative;
  z-index: 2;
  width: min(420px, 78vw);
  height: auto;
  margin-bottom: 6px;
  animation:
    neon-power-on 1.7s steps(1, end) both,
    glow-breathe 4.5s ease-in-out 1.7s infinite;
}

.photo-chip {
  position: absolute;
  z-index: 1;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blue);
  box-shadow: 0 0 18px rgba(121, 201, 236, 0.4);
  opacity: 0;
  pointer-events: none;
  touch-action: manipulation;
  transition: transform 3.4s ease-in-out, opacity 1.4s ease-in-out;
}

.photo-chip.is-dodging {
  transition: transform 0.32s cubic-bezier(.2, .9, .3, 1.3), opacity 0.32s ease-out;
}

.photo-chip--goggles {
  top: 6%;
  left: -46px;
}

.photo-chip--santa {
  bottom: 6%;
  right: -40px;
  border-color: var(--coral);
  box-shadow: 0 0 18px rgba(239, 102, 114, 0.4);
}

.photo-chip--cowboy {
  bottom: -6%;
  left: 10%;
  width: 76px;
  height: 76px;
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(255, 210, 122, 0.4);
}

/* Smaller screens: keep the photo bubbles, but shrink them and tuck them
   closer to the logo so they stay on screen instead of disappearing. */
@media (max-width: 760px) {
  .photo-chip,
  .photo-chip--cowboy {
    width: 54px;
    height: 54px;
    border-width: 2px;
  }
  .photo-chip--goggles { top: -4%; left: -8px; }
  .photo-chip--santa { bottom: 2%; right: -8px; }
  .photo-chip--cowboy { bottom: -8%; left: 6%; }
}

@media (max-width: 420px) {
  .photo-chip,
  .photo-chip--cowboy {
    width: 46px;
    height: 46px;
  }
}

/* ---------- music toggle ---------- */

.music-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-raised, #1c2024);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.music-toggle:hover {
  border-color: var(--blue);
  box-shadow: 0 0 16px rgba(121, 201, 236, 0.35);
  transform: translateY(-1px);
}

.music-toggle .music-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.music-toggle[aria-expanded="true"] {
  border-color: var(--coral);
  box-shadow: 0 0 16px rgba(239, 102, 114, 0.4);
}

.music-panel {
  position: fixed;
  top: 72px;
  right: 20px;
  z-index: 49;
  width: min(320px, 92vw);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-8px);
  transition: max-height 0.4s ease, opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.music-panel.is-open {
  max-height: 380px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.music-panel iframe {
  display: block;
  width: 100%;
}

@keyframes neon-power-on {
  0%   { opacity: 0; }
  4%   { opacity: 1; }
  8%   { opacity: 0.3; }
  12%  { opacity: 1; }
  22%  { opacity: 0.35; }
  28%  { opacity: 1; }
  36%  { opacity: 0.55; }
  42%  { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes glow-breathe {
  0%, 100% {
    filter: drop-shadow(0 0 22px rgba(121, 201, 236, 0.28))
            drop-shadow(0 0 40px rgba(239, 102, 114, 0.14));
  }
  50% {
    filter: drop-shadow(0 0 34px rgba(121, 201, 236, 0.42))
            drop-shadow(0 0 58px rgba(239, 102, 114, 0.22));
  }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.hero-minimal .tagline { animation: rise-in 0.7s ease-out 1.5s both; }
.hero-minimal .ticker { animation: rise-in 0.7s ease-out 1.75s both; }
.hero-minimal .btn-minimal { animation: rise-in 0.7s ease-out 2s both; }

.tagline {
  font-family: 'Courier New', Courier, 'Liberation Mono', monospace;
  font-style: oblique;
  font-weight: 400;
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  color: var(--text);
}

.ticker {
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 13px 0;
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 26s linear infinite;
}

.ticker-seq {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-right: 18px;
  flex: none;
}

.ticker-item {
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text);
}

.ticker-item--blue { color: var(--blue); text-shadow: 0 0 12px rgba(121, 201, 236, 0.3); }
.ticker-item--coral { color: var(--coral); text-shadow: 0 0 12px rgba(239, 102, 114, 0.3); }
.ticker-item--gold { color: var(--gold); text-shadow: 0 0 12px rgba(255, 210, 122, 0.3); }

.ticker-sep {
  color: var(--text-muted);
  font-size: 0.7rem;
  opacity: 0.6;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

/* ---------- confetti burst ---------- */

.confetti-bit {
  position: fixed;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 999;
  left: 0;
  top: 0;
  animation: confetti-pop 0.6s ease-out forwards;
}

@keyframes confetti-pop {
  0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.4) rotate(180deg); opacity: 0; }
}

/* ---------- twinkle lights ---------- */

.spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s, 4px);
  height: var(--s, 4px);
  border-radius: 50%;
  background: var(--c, var(--blue));
  box-shadow: 0 0 8px var(--c, var(--blue));
  animation: twinkle var(--dur, 4s) ease-in-out var(--delay, 0s) infinite;
  pointer-events: none;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.85; }
}

.star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s, 14px);
  height: var(--s, 14px);
  background: var(--c, var(--gold));
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C12 6 14 10 24 12C14 14 12 18 12 24C12 18 10 14 0 12C10 10 12 6 12 0Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C12 6 14 10 24 12C14 14 12 18 12 24C12 18 10 14 0 12C10 10 12 6 12 0Z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  filter: drop-shadow(0 0 6px var(--c, var(--gold)));
  animation: star-twinkle var(--dur, 3.5s) ease-in-out var(--delay, 0s) infinite;
  pointer-events: none;
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.6) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(10deg); }
}

/* ---------- simple button ---------- */

.btn-minimal {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--bg);
  background: var(--blue);
  padding: 13px 30px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-minimal:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 26px -6px rgba(121, 201, 236, 0.5),
    0 4px 30px -8px rgba(239, 102, 114, 0.35);
}

/* ---------- footer ---------- */

.footer-minimal {
  padding: 26px 24px 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.footer-minimal a {
  text-decoration: none;
  color: var(--text-muted);
}

.footer-minimal a:hover { color: var(--coral); }

.footer-minimal .sep { opacity: 0.4; }

/* ---------- contact page ---------- */

.page-title {
  font-family: var(--font-tagline);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 14px;
}

.page-intro {
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: 36px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 13px 28px;
  border-radius: 999px;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-2px);
}

/* ---------- contact page: bubbles, neon signs ---------- */

.contact-page {
  max-width: 640px;
  padding-top: 24px;
  padding-bottom: 64px;
  text-align: center;
}

.contact-page .page-intro { margin-left: auto; margin-right: auto; margin-bottom: 30px; }

.q {
  border: 0;
  padding: 0;
  margin: 0 0 30px;
  min-width: 0;
}

.q legend {
  width: 100%;
  padding: 0;
  margin: 0 0 14px;
  font-family: var(--font-tagline);
  font-style: italic;
  font-size: 1.25rem;
  text-align: center;
}

.qnum {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: 10px;
  border-radius: 50%;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--bg);
  background: var(--blue);
  box-shadow: 0 0 12px rgba(121, 201, 236, 0.5);
  vertical-align: 2px;
}

.qnum--coral { background: var(--coral); box-shadow: 0 0 12px rgba(239, 102, 114, 0.5); }

.chips {
  --chip: var(--blue);
  --chip-glow: rgba(121, 201, 236, 0.45);
  --chip-fill: rgba(121, 201, 236, 0.14);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.chips--coral {
  --chip: var(--coral);
  --chip-glow: rgba(239, 102, 114, 0.45);
  --chip-fill: rgba(239, 102, 114, 0.14);
}

.chip { position: relative; cursor: pointer; }

.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.chip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.95rem;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease,
              background 0.18s ease, color 0.18s ease;
}

.chip:hover span { border-color: var(--chip); transform: translateY(-2px); }

.chip input:checked + span {
  color: var(--chip);
  border-color: var(--chip);
  background: var(--chip-fill);
  box-shadow: 0 0 18px var(--chip-glow), inset 0 0 12px var(--chip-fill);
  transform: scale(1.05);
}

.chip input:focus-visible + span { outline: 2px solid var(--chip); outline-offset: 3px; }

.q--fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  text-align: left;
}

.field span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.field em { font-style: normal; opacity: 0.7; }

.field input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.field input::placeholder { color: var(--text-muted); opacity: 0.7; }
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(121, 201, 236, 0.15); }

.send { margin-top: 4px; cursor: pointer; }

.send.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.send-hint { margin-top: 12px; font-size: 0.85rem; color: var(--text-muted); }

.send-hint.nudge { animation: nudge 0.45s ease; color: var(--coral); }

@keyframes nudge {
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.preview { margin-top: 18px; font-size: 0.85rem; color: var(--text-muted); }
.preview summary { cursor: pointer; }
.preview summary:hover { color: var(--blue); }

.preview pre {
  margin: 12px auto 10px;
  max-width: 460px;
  padding: 14px 16px;
  text-align: left;
  white-space: pre-wrap;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.copy-msg {
  font: inherit;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}

.copy-msg:hover { color: var(--blue); border-color: var(--blue); }

.direct {
  margin-top: 46px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.direct-label {
  margin-bottom: 22px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.neon-signs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 30px;
}

.neon {
  --neon: var(--blue);
  --neon-glow: rgba(121, 201, 236, 0.55);
  display: inline-block;
  max-width: 100%;
  padding: 12px 26px;
  border: 2px solid var(--neon);
  border-radius: 16px;
  font-family: 'Tilt Neon', var(--font-body);
  font-size: clamp(1.05rem, 4.6vw, 1.45rem);
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #fff;
  text-shadow: 0 0 4px #fff, 0 0 10px var(--neon), 0 0 22px var(--neon), 0 0 40px var(--neon);
  box-shadow: 0 0 8px var(--neon), 0 0 26px var(--neon-glow), inset 0 0 14px var(--neon-glow);
  animation: neon-power-on 1.7s steps(1, end) var(--d, 0s) both;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow-wrap: anywhere;
}

.neon--coral { --neon: var(--coral); --neon-glow: rgba(239, 102, 114, 0.55); }

.neon:hover {
  transform: scale(1.04);
  box-shadow: 0 0 12px var(--neon), 0 0 40px var(--neon-glow), inset 0 0 22px var(--neon-glow);
}

.save-contact { font-size: 0.92rem; padding: 11px 24px; }

@media (max-width: 520px) {
  .q--fields { grid-template-columns: 1fr; }
  .chip span { padding: 9px 15px; font-size: 0.9rem; }
}

/* ---------- terms page ---------- */

.legal h2 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.15rem;
  margin: 32px 0 8px;
}

.legal h2:first-of-type { margin-top: 0; }

.legal p, .legal li { color: var(--text-muted); }
.legal ul { padding-left: 1.2em; }

/* ---------- responsive ---------- */

@media (max-width: 560px) {
  .bar-minimal nav { gap: 16px; }
}

@media (max-width: 420px) {
  .bar-minimal { flex-wrap: wrap; justify-content: center; row-gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  body::before, body::after,
  .logo-mark, .spark, .star, .photo-chip,
  .hero-minimal .tagline, .hero-minimal .ticker, .hero-minimal .btn-minimal {
    animation: none !important;
    transition: none !important;
  }
  .logo-mark {
    filter: drop-shadow(0 0 26px rgba(121, 201, 236, 0.32))
            drop-shadow(0 0 44px rgba(239, 102, 114, 0.16));
  }
  .hero-minimal .tagline, .hero-minimal .ticker, .hero-minimal .btn-minimal {
    opacity: 1;
    transform: none;
  }
  .spark { opacity: 0.4; }
  .star { opacity: 0.5; transform: scale(0.9) rotate(0deg); }
  .confetti-bit { display: none; }
  .neon, .send-hint.nudge { animation: none !important; }
  .chip span, .neon { transition: none !important; }
  .photo-chip { opacity: 0.85; transform: none; }
  .ticker-track { flex-wrap: wrap; width: 100%; }
  .ticker-seq:last-child { display: none; }
}
