:root {
  --ink: #070808;
  --text: #c49a78;
  --text-soft: #9e7b61;
  --copper: #b6784f;
  --copper-bright: #e0b180;
  --mist: rgba(205, 213, 211, 0.16);
  --panel: rgba(7, 8, 8, 0.56);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
}

body {
  overflow: hidden;
}

@media (pointer: fine) {
  body,
  a,
  button {
    cursor: url("assets/cursor-key.svg") 4 4, auto;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 620px;
  padding:
    env(safe-area-inset-top, 0)
    env(safe-area-inset-right, 0)
    env(safe-area-inset-bottom, 0)
    env(safe-area-inset-left, 0);
  overflow: hidden;
  background: #070808;
}

.hero-image {
  position: absolute;
  inset: 0;
  background-image: url("assets/klucznik-hero-web.jpg");
  background-size: cover;
  background-position: center;
  filter: saturate(0.82) contrast(1.03);
  transform: scale(1.01);
}

.shade {
  position: absolute;
  pointer-events: none;
}

.shade-left {
  inset: 0;
  background:
    radial-gradient(circle at 51% 42%, transparent 0 22%, rgba(3, 4, 5, 0.18) 49%, rgba(3, 4, 5, 0.62) 100%),
    linear-gradient(90deg, rgba(2, 3, 4, 0.5), transparent 43%, rgba(1, 1, 1, 0.2));
}

.shade-bottom {
  inset: auto 0 0;
  height: 30%;
  background: linear-gradient(0deg, rgba(2, 2, 2, 0.64), transparent);
}

.topbar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) auto auto;
  align-items: center;
  gap: clamp(14px, 1.7vw, 34px);
  padding: clamp(22px, 3.8vw, 54px) clamp(24px, 4.2vw, 76px) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}

.brand-mark {
  display: grid;
  place-items: center;
  position: relative;
  width: 40px;
  aspect-ratio: 1;
  border: 1px solid rgba(205, 132, 82, 0.48);
  border-radius: 50%;
  isolation: isolate;
  background:
    radial-gradient(circle at 35% 27%, rgba(255, 201, 142, 0.2), transparent 24%),
    radial-gradient(circle at 63% 66%, rgba(54, 8, 5, 0.52), transparent 44%),
    linear-gradient(145deg, rgba(100, 29, 18, 0.95), rgba(33, 10, 8, 0.96) 68%);
  color: rgba(232, 174, 117, 0.86);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.9;
  box-shadow:
    inset 0 2px 5px rgba(255, 209, 152, 0.13),
    inset 0 -7px 14px rgba(9, 2, 2, 0.58),
    inset 0 0 0 4px rgba(43, 10, 7, 0.42),
    0 0 0 1px rgba(38, 8, 5, 0.92),
    0 0 18px rgba(0, 0, 0, 0.72);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.82),
    0 0 8px rgba(220, 131, 82, 0.24);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  pointer-events: none;
}

.brand-mark::before {
  z-index: -1;
  inset: -4px;
  background:
    radial-gradient(circle at 18% 28%, rgba(92, 25, 16, 0.9) 0 8%, transparent 10%),
    radial-gradient(circle at 78% 24%, rgba(74, 18, 12, 0.86) 0 7%, transparent 10%),
    radial-gradient(circle at 84% 75%, rgba(103, 28, 18, 0.86) 0 8%, transparent 11%),
    radial-gradient(circle at 22% 80%, rgba(57, 12, 9, 0.9) 0 8%, transparent 11%);
  filter: blur(0.2px);
}

.brand-mark::after {
  border: 1px solid rgba(226, 157, 94, 0.38);
  box-shadow:
    inset 0 0 8px rgba(255, 205, 144, 0.08),
    0 0 10px rgba(91, 24, 16, 0.32);
}

.brand strong {
  display: block;
  font-size: clamp(1.05rem, 1.55vw, 1.72rem);
  font-weight: 500;
  line-height: 1.05;
}

.brand small {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: clamp(0.5rem, 0.58vw, 0.66rem);
  font-family: Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.nav,
.extras {
  display: flex;
  align-items: center;
}

.nav {
  justify-content: center;
  gap: clamp(12px, 1.35vw, 26px);
  white-space: nowrap;
}

.nav button,
.nav a,
.sponsor {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: clamp(0.76rem, 0.9vw, 1.04rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
  transition: color 320ms ease, text-shadow 320ms ease;
}

.nav button::before,
.nav button::after,
.nav a::before,
.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 360ms ease, transform 520ms ease;
}

.nav button::before,
.nav a::before {
  top: calc(100% + 10px);
  width: 120%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 173, 116, 0.88), transparent);
  box-shadow: 0 0 16px rgba(224, 177, 128, 0.45);
}

.nav button::after,
.nav a::after {
  top: calc(100% - 18px);
  width: 150%;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(229, 193, 151, 0.18), rgba(195, 126, 78, 0.08) 35%, transparent 72%);
  filter: blur(9px);
  transform: translateX(-50%) translateY(12px) scale(0.72);
}

.nav button:hover,
.nav button:focus-visible,
.nav a:hover,
.nav a:focus-visible {
  color: var(--copper-bright);
  outline: 0;
  text-shadow:
    0 0 10px rgba(219, 157, 101, 0.45),
    0 0 26px rgba(219, 157, 101, 0.42);
}

.nav button:hover::before,
.nav button:hover::after,
.nav button:focus-visible::before,
.nav button:focus-visible::after,
.nav a:hover::before,
.nav a:hover::after,
.nav a:focus-visible::before,
.nav a:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.extras {
  position: relative;
  justify-content: flex-end;
  gap: 13px;
  isolation: isolate;
}

.extras::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -10px -12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(3, 4, 4, 0.72), rgba(3, 4, 4, 0.5));
  filter: blur(10px);
  opacity: 0;
  pointer-events: none;
}

.social,
.sound-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border: 1px solid rgba(195, 126, 78, 0.58);
  border-radius: 50%;
  color: var(--copper-bright);
  background: rgba(8, 6, 5, 0.36);
  font-family: Arial, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: inset 0 0 8px rgba(184, 105, 61, 0.1);
  transition: border-color 260ms ease, box-shadow 260ms ease, color 260ms ease;
}

.social svg,
.sound-toggle svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.sound-toggle {
  position: relative;
  padding: 0;
  animation: soundHint 4.8s ease-in-out infinite;
}

.sound-toggle::before {
  content: "";
  position: absolute;
  z-index: 1;
  width: 2px;
  height: 21px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.82;
  transform: rotate(-38deg);
  transition: opacity 220ms ease, transform 260ms ease;
  box-shadow: 0 0 8px rgba(240, 192, 140, 0.18);
}

.sound-toggle::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(224, 177, 128, 0.22);
  opacity: 0;
  transform: scale(0.72);
  animation: soundRing 4.8s ease-out infinite;
}

.sound-toggle .speaker-body {
  fill: currentColor;
}

.sound-toggle .sound-wave {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.24;
  transition: opacity 220ms ease;
}

.sound-toggle[aria-pressed="true"] {
  color: #f0c08c;
  border-color: rgba(224, 156, 98, 0.82);
  animation: none;
  box-shadow:
    inset 0 0 12px rgba(184, 105, 61, 0.18),
    0 0 18px rgba(184, 86, 54, 0.18);
}

.sound-toggle[aria-pressed="true"]::before {
  opacity: 0;
  transform: rotate(-38deg) scaleY(0.2);
}

.sound-toggle[aria-pressed="true"]::after {
  animation-duration: 3.4s;
}

.sound-toggle[aria-pressed="true"] .sound-wave {
  opacity: 1;
  animation: soundWavePulse 1.9s ease-in-out infinite;
}

.sound-toggle[aria-pressed="true"] .sound-wave-two {
  animation-delay: 0.22s;
}

.social:hover,
.social:focus-visible,
.sound-toggle:hover,
.sound-toggle:focus-visible {
  color: #f0c08c;
  border-color: rgba(224, 156, 98, 0.85);
  outline: 0;
  box-shadow:
    inset 0 0 12px rgba(184, 105, 61, 0.2),
    0 0 18px rgba(184, 86, 54, 0.12);
}

.sponsor {
  overflow: hidden;
  min-width: 132px;
  padding: 12px 16px;
  border: 1px solid rgba(194, 128, 84, 0.5);
  border-radius: 6px;
  background:
    radial-gradient(circle at 84% 44%, rgba(178, 60, 39, 0.32), transparent 24%),
    linear-gradient(180deg, rgba(111, 62, 38, 0.42), rgba(27, 14, 10, 0.52)),
    rgba(21, 13, 10, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(238, 185, 128, 0.08),
    0 6px 24px rgba(0, 0, 0, 0.55);
  text-align: center;
  font-size: clamp(0.66rem, 0.78vw, 0.85rem);
  animation: sponsorEmber 6.8s ease-in-out infinite;
}

.sponsor::after {
  content: "";
  position: absolute;
  inset: -80% auto -80% -46%;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(246, 192, 134, 0.18), transparent);
  opacity: 0;
  transform: rotate(18deg) translateX(-150%);
  transition: opacity 260ms ease, transform 840ms ease;
}

.sponsor:hover,
.sponsor:focus-visible {
  color: #f0c08c;
  outline: 0;
  border-color: rgba(224, 156, 98, 0.84);
  box-shadow:
    inset 0 0 0 1px rgba(238, 185, 128, 0.12),
    inset 0 0 24px rgba(180, 55, 38, 0.24),
    0 0 24px rgba(161, 54, 37, 0.18),
    0 8px 28px rgba(0, 0, 0, 0.55);
}

.sponsor:hover::after,
.sponsor:focus-visible::after {
  opacity: 1;
  transform: rotate(18deg) translateX(430%);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(194, 128, 84, 0.5);
  border-radius: 50%;
  background: rgba(5, 5, 5, 0.38);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  margin: 5px auto;
  background: var(--copper-bright);
}

.copy {
  position: absolute;
  z-index: 4;
  left: clamp(32px, 6.2vw, 132px);
  bottom: clamp(86px, 14vh, 198px);
  max-width: min(650px, 42vw);
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.9);
}

.lead {
  margin: 0;
  color: var(--text-soft);
  font-size: clamp(0.85rem, 1.1vw, 1.2rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lead-break {
  display: inline;
}

.copy h1 {
  margin: 0 0 24px;
  color: var(--text);
  font-size: clamp(2.55rem, 4.85vw, 5.65rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cursor-mist {
  position: fixed;
  z-index: 8;
  left: 0;
  top: 0;
  width: 118px;
  height: 78px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse, rgba(222, 191, 154, 0.22), rgba(168, 123, 91, 0.1) 38%, transparent 72%);
  filter: blur(12px);
  mix-blend-mode: screen;
  transform: translate3d(-50%, -50%, 0) scale(0.72);
  transition: opacity 260ms ease, transform 260ms ease;
}

.cursor-mist.is-visible {
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) scale(1);
}

.light {
  position: absolute;
  z-index: 3;
  width: clamp(28px, 2.9vw, 58px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle, rgba(255, 238, 198, 0.9) 0 9%, rgba(239, 175, 100, 0.34) 24%, rgba(178, 87, 48, 0.08) 45%, transparent 68%);
  filter: blur(0.8px);
  opacity: 0.42;
  will-change: opacity, transform;
}

.light-lamp-left {
  left: 45.65%;
  top: 49.05%;
  width: clamp(22px, 1.55vw, 34px);
  opacity: 0.68;
  background:
    radial-gradient(circle, rgba(255, 244, 211, 0.72) 0 11%, rgba(246, 184, 101, 0.34) 28%, rgba(191, 94, 48, 0.11) 56%, transparent 78%);
  filter: blur(1px);
  animation: lanternGlow 5.8s ease-in-out infinite;
}

.light-lamp-left::before {
  content: "";
  position: absolute;
  inset: -34px -42px -38px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 226, 176, 0.22), rgba(208, 123, 68, 0.08) 42%, transparent 72%);
  filter: blur(10px);
  opacity: 0.8;
  animation: lanternAura 5.8s ease-in-out infinite;
}

.light-lamp-left::after {
  content: "";
  position: absolute;
  left: 45%;
  top: clamp(112px, 13vh, 164px);
  width: clamp(150px, 18vw, 330px);
  height: clamp(34px, 7.8vh, 92px);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 48% 45%, rgba(255, 220, 164, 0.28), rgba(198, 113, 62, 0.11) 34%, rgba(198, 113, 62, 0.04) 58%, transparent 74%),
    linear-gradient(90deg, transparent, rgba(236, 179, 112, 0.12), transparent);
  filter: blur(9px);
  opacity: 0.44;
  transform: translateX(-50%) rotate(2deg) scaleY(0.9);
  animation: lanternReflection 5.8s ease-in-out infinite;
}

.fog-field {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: screen;
  --fog-x: -40vw;
  --fog-y: -40vh;
  --fog-hole: 150px;
  -webkit-mask-image: radial-gradient(circle var(--fog-hole) at var(--fog-x) var(--fog-y), transparent 0 34%, rgba(0, 0, 0, 0.18) 51%, rgba(0, 0, 0, 0.78) 76%, #000 100%);
  mask-image: radial-gradient(circle var(--fog-hole) at var(--fog-x) var(--fog-y), transparent 0 34%, rgba(0, 0, 0, 0.18) 51%, rgba(0, 0, 0, 0.78) 76%, #000 100%);
}

.fog-layer {
  position: absolute;
  pointer-events: none;
  will-change: transform, opacity;
}

.fog-low {
  left: -18vw;
  right: -18vw;
  bottom: -3vh;
  height: 25vh;
  opacity: 0.28;
  background:
    radial-gradient(ellipse at 18% 56%, rgba(211, 219, 216, 0.2), transparent 52%),
    radial-gradient(ellipse at 52% 46%, rgba(198, 207, 205, 0.16), transparent 58%),
    radial-gradient(ellipse at 82% 58%, rgba(217, 222, 218, 0.18), transparent 54%);
  filter: blur(18px);
  animation: fogCrawl 36s ease-in-out infinite alternate;
}

.fog-mid {
  left: -12vw;
  right: -16vw;
  bottom: 14vh;
  height: 29vh;
  opacity: 0.13;
  background:
    radial-gradient(ellipse at 28% 52%, rgba(220, 226, 222, 0.2), transparent 50%),
    radial-gradient(ellipse at 70% 46%, rgba(202, 211, 209, 0.14), transparent 57%);
  filter: blur(24px);
  animation: fogCrawl 48s ease-in-out -12s infinite alternate-reverse;
}

.fog-front {
  left: -22vw;
  right: -22vw;
  bottom: -18vh;
  height: 54vh;
  opacity: 0.13;
  background:
    radial-gradient(ellipse at 40% 68%, rgba(225, 230, 226, 0.18), transparent 56%),
    radial-gradient(ellipse at 78% 60%, rgba(198, 207, 203, 0.13), transparent 62%);
  filter: blur(28px);
  transform-origin: center bottom;
  animation: fogApproach 32s ease-in-out infinite;
}

.cigar-smoke {
  position: absolute;
  z-index: 4;
  left: 52.1%;
  top: 42.35%;
  width: 118px;
  height: 180px;
  pointer-events: none;
  mix-blend-mode: screen;
  transform: translate(0, -100%);
  transform-origin: left bottom;
}

.cigar-smoke::before {
  content: "";
  position: absolute;
  left: -1px;
  bottom: -3px;
  width: 22px;
  height: 46px;
  border-left: 4px solid rgba(232, 238, 235, 0.34);
  border-radius: 50%;
  filter: blur(3px);
  opacity: 0.44;
  transform: rotate(8deg);
  animation: smokeThread 6.8s ease-in-out infinite;
}

.cigar-smoke span {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  filter: blur(4px);
  left: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 0;
  background: radial-gradient(circle, rgba(232, 238, 235, 0.34) 0 18%, rgba(220, 226, 223, 0.2) 38%, transparent 72%);
  opacity: 0;
  transform: scale(0.35);
  --smoke-x: 20px;
  --smoke-y: -128px;
  --smoke-rotate: -10deg;
  animation: cigarPuff 6.2s ease-in-out infinite;
}

.cigar-smoke span:nth-child(2) {
  --smoke-x: 34px;
  --smoke-y: -142px;
  --smoke-rotate: 12deg;
  animation-delay: -1.55s;
}

.cigar-smoke span:nth-child(3) {
  --smoke-x: 12px;
  --smoke-y: -152px;
  --smoke-rotate: -18deg;
  animation-delay: -3.1s;
}

.cigar-smoke span:nth-child(4) {
  --smoke-x: 44px;
  --smoke-y: -120px;
  --smoke-rotate: 18deg;
  animation-delay: -4.65s;
}

.trace-message {
  position: fixed;
  z-index: 9;
  left: 50%;
  bottom: clamp(18px, 4vh, 44px);
  max-width: min(420px, calc(100vw - 36px));
  padding: 10px 14px;
  border: 1px solid rgba(194, 128, 84, 0.24);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.58);
  color: rgba(224, 177, 128, 0.78);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, 10px, 0);
  transition: opacity 520ms ease, transform 520ms ease;
}

.trace-message.is-visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

@keyframes lanternGlow {
  0%,
  100% {
    opacity: 0.28;
    transform: scale(0.94);
  }

  18% {
    opacity: 0.62;
    transform: scale(1.06);
  }

  23% {
    opacity: 0.36;
    transform: scale(0.98);
  }

  29% {
    opacity: 0.68;
    transform: scale(1.08);
  }

  58% {
    opacity: 0.42;
    transform: scale(1.03);
  }

  64% {
    opacity: 0.64;
    transform: scale(1.07);
  }

  72% {
    opacity: 0.32;
    transform: scale(0.96);
  }

  78% {
    opacity: 0.58;
    transform: scale(1.06);
  }
}

@keyframes lanternAura {
  0%,
  100% {
    opacity: 0.48;
    transform: scale(0.92);
  }

  29%,
  64% {
    opacity: 0.92;
    transform: scale(1.08);
  }

  72% {
    opacity: 0.56;
    transform: scale(0.98);
  }
}

@keyframes lanternReflection {
  0%,
  100% {
    opacity: 0.24;
    transform: translateX(-50%) rotate(2deg) scaleY(0.86);
  }

  29%,
  64% {
    opacity: 0.58;
    transform: translateX(-50%) rotate(2deg) scaleY(1.08);
  }

  72% {
    opacity: 0.3;
    transform: translateX(-50%) rotate(2deg) scaleY(0.94);
  }
}

@keyframes soundHint {
  0%,
  100% {
    color: var(--copper-bright);
    border-color: rgba(195, 126, 78, 0.52);
    box-shadow: inset 0 0 8px rgba(184, 105, 61, 0.1);
  }

  46% {
    color: #efc18e;
    border-color: rgba(224, 156, 98, 0.82);
    box-shadow:
      inset 0 0 12px rgba(184, 105, 61, 0.18),
      0 0 16px rgba(184, 86, 54, 0.16);
  }
}

@keyframes soundRing {
  0%,
  54% {
    opacity: 0;
    transform: scale(0.72);
  }

  60% {
    opacity: 0.48;
  }

  100% {
    opacity: 0;
    transform: scale(1.34);
  }
}

@keyframes soundWavePulse {
  0%,
  100% {
    opacity: 0.58;
  }

  48% {
    opacity: 1;
  }
}

@keyframes fogCrawl {
  0% {
    transform: translate3d(-5vw, 0, 0) scale(1);
  }

  48% {
    opacity: 0.34;
  }

  100% {
    transform: translate3d(7vw, -1.8vh, 0) scale(1.08);
  }
}

@keyframes fogApproach {
  0%,
  100% {
    opacity: 0.08;
    transform: translate3d(-3vw, 3vh, 0) scale(0.9);
  }

  45% {
    opacity: 0.18;
    transform: translate3d(3vw, -2vh, 0) scale(1.16);
  }

  70% {
    opacity: 0.11;
    transform: translate3d(0, 0, 0) scale(1.04);
  }
}

@keyframes cigarPuff {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.28);
  }

  16% {
    opacity: 0.76;
    transform: translate3d(6px, -22px, 0) rotate(5deg) scale(0.72);
  }

  48% {
    opacity: 0.52;
  }

  74% {
    opacity: 0.25;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--smoke-x), var(--smoke-y), 0) rotate(var(--smoke-rotate)) scale(2.15);
  }
}

@keyframes smokeThread {
  0%,
  100% {
    opacity: 0.18;
    transform: translate3d(0, 12px, 0) rotate(3deg);
  }

  52% {
    opacity: 0.68;
    transform: translate3d(18px, -30px, 0) rotate(-8deg);
  }
}

@keyframes sponsorEmber {
  0%,
  100% {
    color: var(--text);
    border-color: rgba(194, 128, 84, 0.48);
    box-shadow:
      inset 0 0 0 1px rgba(238, 185, 128, 0.08),
      inset 0 0 18px rgba(131, 48, 32, 0.14),
      0 6px 24px rgba(0, 0, 0, 0.55);
  }

  52% {
    color: #e2b180;
    border-color: rgba(205, 103, 69, 0.72);
    box-shadow:
      inset 0 0 0 1px rgba(255, 200, 143, 0.13),
      inset 0 0 24px rgba(180, 55, 38, 0.28),
      0 0 18px rgba(161, 54, 37, 0.22),
      0 6px 24px rgba(0, 0, 0, 0.55);
  }
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .nav {
    position: absolute;
    top: calc(100% + 18px);
    right: clamp(24px, 4vw, 54px);
    display: none;
    min-width: 280px;
    padding: 18px;
    border: 1px solid rgba(194, 128, 84, 0.28);
    border-radius: 8px;
    background: rgba(5, 5, 5, 0.84);
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    backdrop-filter: blur(14px);
  }

  .nav button::before,
  .nav button::after,
  .nav a::before,
  .nav a::after,
  .cursor-mist {
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .menu-toggle {
    display: block;
    justify-self: end;
  }

  .extras {
    grid-column: 3;
  }

  .copy {
    max-width: min(560px, 48vw);
  }
}

@media (max-width: 760px) {
  body {
    overflow: hidden;
  }

  .stage {
    min-height: 100svh;
  }

  .hero-image {
    background-image: url("assets/klucznik-hero-mobile-clean.jpg");
    background-position: 62% center;
    transform: scale(1.04);
  }

  .fog-field {
    display: none;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding:
      calc(18px + env(safe-area-inset-top, 0px))
      calc(18px + env(safe-area-inset-right, 0px))
      0
      calc(18px + env(safe-area-inset-left, 0px));
  }

  .brand-mark {
    width: 32px;
    opacity: 0.72;
  }

  .brand strong {
    font-size: 1rem;
  }

  .brand small {
    display: none;
  }

  .extras {
    position: absolute;
    top: calc(76px + env(safe-area-inset-top, 0px));
    right: calc(18px + env(safe-area-inset-right, 0px));
    gap: 8px;
  }

  .social {
    width: 34px;
    font-size: 1.05rem;
  }

  .sound-toggle {
    width: 34px;
  }

  .sound-toggle svg {
    width: 16px;
    height: 16px;
  }

  .sponsor {
    width: auto;
    min-width: 0;
    height: 34px;
    padding: 0 11px;
    overflow: visible;
    color: var(--copper-bright);
    font-family: Arial, sans-serif;
    font-size: 0;
    font-weight: 700;
  }

  .sponsor::before {
    content: "Sponsor";
    display: grid;
    place-items: center;
    height: 100%;
    font-size: 0.66rem;
    letter-spacing: 0.12em;
  }

  .copy {
    left: calc(18px + env(safe-area-inset-left, 0px));
    right: calc(18px + env(safe-area-inset-right, 0px));
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    max-width: 72vw;
  }

  .eyebrow {
    font-size: 0.65rem;
  }

  .lead {
    max-width: 260px;
    font-size: 0.78rem;
  }

  .lead-break {
    display: block;
  }

  .copy h1 {
    margin: 12px 0 14px;
    font-size: clamp(1.9rem, 10vw, 3.55rem);
  }

  .light {
    display: none;
  }

  .cigar-smoke {
    left: clamp(88px, calc(62.5vw - 18svh), 132px);
    top: 41.8svh;
    width: 54px;
    height: 78px;
    z-index: 5;
    transform: translate(0, -100%);
    transform-origin: left bottom;
  }

  .cigar-smoke::before {
    left: 1px;
    bottom: 0;
    width: 13px;
    height: 38px;
    border-left-width: 2px;
    border-left-color: rgba(238, 244, 240, 0.42);
    opacity: 0.58;
    filter: blur(2.2px);
  }

  .cigar-smoke span {
    left: 0;
    bottom: 0;
    width: 8px;
    height: 8px;
    filter: blur(2px);
    background: radial-gradient(circle, rgba(238, 244, 240, 0.34) 0 16%, rgba(226, 232, 229, 0.16) 42%, transparent 74%);
    --smoke-x: 12px;
    --smoke-y: -44px;
    animation-duration: 5.8s;
  }

  .cigar-smoke span:nth-child(2) {
    left: 1px;
    --smoke-x: 19px;
    --smoke-y: -54px;
  }

  .cigar-smoke span:nth-child(3) {
    left: 0;
    --smoke-x: 7px;
    --smoke-y: -58px;
  }

  .cigar-smoke span:nth-child(4) {
    left: 1px;
    --smoke-x: 23px;
    --smoke-y: -47px;
  }
}

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