:root {
  --red: #cf000c;
  --ink: #020202;
  --navy: #101038;
  --paper: #f3f5f8;
  --rope: #6b4a2a;
  --gold: #d4a017;
  --snow: rgba(18, 16, 22, 0.72);
  --bank: #c9d1db;
  --fir: #2c4a32;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --z-nav: 6;
  --z-menu: 7;
  --z-lightbox: 8;
}

html.night {
  --ink: #e8e6de;
  --paper: #1a1816;
  --snow: rgba(236, 232, 224, 0.82);
  --bank: #26282c;
  --fir: #1c3224;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

html {
  color-scheme: light;
  background: var(--paper);
  overflow-x: clip;
}

html.night { color-scheme: dark; }

body {
  font-family: Satoshi, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100dvh;
}

body.is-menu,
body.is-lightbox { overflow: hidden; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.snowfall,
.lights {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.flake {
  position: absolute;
  top: -8%;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  opacity: var(--o);
  background: var(--snow);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' d='M8 1v14M1 8h14M3.05 3.05l9.9 9.9M12.95 3.05l-9.9 9.9'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' d='M8 1v14M1 8h14M3.05 3.05l9.9 9.9M12.95 3.05l-9.9 9.9'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: flake-fall var(--d) var(--ease) var(--delay) infinite;
}

.light {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: 0 0 8px 2px rgba(16, 16, 56, 0.16);
  animation: light-flicker var(--d) var(--ease) var(--delay) infinite;
}

.light:nth-child(even) {
  background: var(--red);
  box-shadow: 0 0 8px 2px rgba(207, 0, 12, 0.14);
}

@keyframes flake-fall {
  from { transform: translate3d(0, 0, 0) rotate(var(--r, 0deg)); opacity: 0; }
  14% { opacity: var(--o); }
  to { transform: translate3d(var(--drift), 118vh, 0) rotate(calc(var(--r, 0deg) + 32deg)); opacity: 0; }
}

@keyframes light-flicker {
  0%, 100% { opacity: 0.08; transform: scale(0.8); }
  50% { opacity: 0.42; transform: scale(1.1); }
}

.island {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 10px 12px 10px 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  backdrop-filter: blur(22px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}

.brand {
  position: relative;
  display: block;
  width: max-content;
}

.brand img,
.island-logo img { display: block; height: 13px; width: auto; }

.brand .logo-night {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
}

html.night .brand .logo-day { opacity: 0; }
html.night .brand .logo-night { opacity: 1; }

.island-links { display: flex; gap: 18px; }

.island-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}

.burger,
.menu-x {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  position: relative;
  cursor: pointer;
}

.burger span,
.menu-x span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1px;
  background: var(--ink);
  transition: transform 700ms var(--ease), background-color 700ms var(--ease);
}

.burger span:first-child { top: 17px; }
.burger span:last-child { top: 24px; }

body.is-menu .burger span:first-child {
  top: 20px;
  transform: rotate(45deg);
}

body.is-menu .burger span:last-child {
  top: 20px;
  transform: rotate(-45deg);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 48px 32px;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(28px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms var(--ease), background-color 700ms var(--ease);
}

body.is-menu .menu {
  opacity: 1;
  pointer-events: auto;
}

.menu a {
  color: var(--ink);
  text-decoration: none;
  font-family: Gambarino, serif;
  font-size: clamp(42px, 9vw, 78px);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease), color 700ms var(--ease);
}

body.is-menu .menu a:nth-child(2) { transition-delay: 100ms; opacity: 1; transform: none; }
body.is-menu .menu a:nth-child(3) { transition-delay: 160ms; opacity: 1; transform: none; }

.menu-x { position: absolute; top: 24px; right: 24px; }
.menu-x span:first-child { transform: rotate(45deg); top: 20px; }
.menu-x span:last-child { transform: rotate(-45deg); top: 20px; }

.hero {
  --drift-h: 13.5%;
  --fir-root: 5.2%;
  --a-l: 1.4%;
  --a-w: 84px;
  --a-h: 32vh;
  --b-l: 81.4%;
  --b-w: 72px;
  --b-h: 56vh;
  --c-r: 2.2%;
  --c-w: 160px;
  --c-h: 72vh;
  --crane-r: 1.2%;
  --crane-w: min(268px, 19vw);
  --crane-h: 78vh;
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 48px;
  align-items: center;
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 120px 0 168px;
}

.hero-yard {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  pointer-events: none;
}

.drift {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: var(--drift-h);
  background:
    radial-gradient(ellipse 18% 52% at 14% 62%, rgba(48, 58, 72, 0.22), transparent 70%),
    radial-gradient(ellipse 24% 48% at 38% 78%, rgba(40, 50, 64, 0.18), transparent 72%),
    radial-gradient(ellipse 20% 44% at 61% 58%, rgba(52, 62, 76, 0.2), transparent 68%),
    radial-gradient(ellipse 22% 50% at 86% 74%, rgba(36, 46, 58, 0.2), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--bank) 58%, #fff) 0 10%, var(--bank) 36%, color-mix(in srgb, var(--bank) 70%, #6e7888) 100%);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 160' preserveAspectRatio='none'%3E%3Cpath fill='%23000' d='M0 78C70 18 110 96 186 36c70-28 108 70 186 22 64-22 108 58 176 16 62-20 112 64 184 18 68-24 118 54 188 12 60-18 108 60 176 20 58-22 104 48 164 14 40-14 86 28 180 8v80H0z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 160' preserveAspectRatio='none'%3E%3Cpath fill='%23000' d='M0 78C70 18 110 96 186 36c70-28 108 70 186 22 64-22 108 58 176 16 62-20 112 64 184 18 68-24 118 54 188 12 60-18 108 60 176 20 58-22 104 48 164 14 40-14 86 28 180 8v80H0z'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.drift::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 28%),
    repeating-radial-gradient(circle at 12% 40%, rgba(255, 255, 255, 0.28) 0 0.7px, transparent 1.2px 3.2px),
    repeating-radial-gradient(circle at 68% 70%, rgba(24, 32, 44, 0.16) 0 0.6px, transparent 1.1px 3.6px);
  pointer-events: none;
}

.drift::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  pointer-events: none;
}

html.night .drift {
  background:
    radial-gradient(ellipse 20% 46% at 16% 58%, rgba(0, 0, 0, 0.28), transparent 72%),
    radial-gradient(ellipse 26% 40% at 47% 70%, rgba(0, 0, 0, 0.22), transparent 74%),
    radial-gradient(ellipse 18% 36% at 71% 54%, rgba(0, 0, 0, 0.24), transparent 70%),
    radial-gradient(ellipse 22% 42% at 90% 66%, rgba(0, 0, 0, 0.2), transparent 72%),
    linear-gradient(180deg, color-mix(in srgb, var(--bank) 70%, #3a3c40) 0 16%, var(--bank) 42%, color-mix(in srgb, var(--bank) 82%, #0c0d10) 100%);
}

html.night .drift::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 32%),
    repeating-radial-gradient(circle at 12% 40%, rgba(255, 255, 255, 0.06) 0 0.6px, transparent 1.1px 3.4px),
    repeating-radial-gradient(circle at 68% 70%, rgba(0, 0, 0, 0.22) 0 0.5px, transparent 1px 4px);
}

html.night .drift::after {
  opacity: 0.18;
  mix-blend-mode: overlay;
}

.fir {
  position: absolute;
  z-index: 1;
}

.fir::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--fir);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 122'%3E%3Cpath fill='%23000' d='M40 4l16 28h-7l17 26h-9l18 36H5l18-36h-9L31 32h-7z'/%3E%3Crect x='36' y='92' width='8' height='28' fill='%23000'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 122'%3E%3Cpath fill='%23000' d='M40 4l16 28h-7l17 26h-9l18 36H5l18-36h-9L31 32h-7z'/%3E%3Crect x='36' y='92' width='8' height='28' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: bottom center;
  mask-position: bottom center;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.fir::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  top: 14%;
  bottom: 28%;
  background-image:
    radial-gradient(circle at 22% 18%, var(--red) 0 2.4px, transparent 3.2px),
    radial-gradient(circle at 70% 34%, var(--gold) 0 2.4px, transparent 3.2px),
    radial-gradient(circle at 36% 52%, var(--red) 0 2.4px, transparent 3.2px),
    radial-gradient(circle at 66% 70%, var(--gold) 0 2.4px, transparent 3.2px),
    radial-gradient(circle at 30% 84%, var(--red) 0 2.4px, transparent 3.2px);
  animation: bulb 1s steps(2) infinite;
}

.fir-a {
  left: var(--a-l);
  bottom: var(--fir-root);
  width: var(--a-w);
  height: var(--a-h);
}

.fir-a::after { animation-delay: -0.2s; }

.fir-b {
  left: var(--b-l);
  bottom: var(--fir-root);
  width: var(--b-w);
  height: var(--b-h);
  opacity: 0.78;
}

.fir-b::after { animation-delay: -0.7s; }

.fir-c {
  right: var(--c-r);
  bottom: var(--fir-root);
  width: var(--c-w);
  height: var(--c-h);
}

.fir-c::after { animation-delay: -1.1s; }

.crane {
  position: absolute;
  right: var(--crane-r);
  bottom: var(--fir-root);
  z-index: 1;
  width: var(--crane-w);
  height: var(--crane-h);
  overflow: visible;
  color: var(--navy);
}

.crane-glass { fill: var(--paper); }

.crane-lift {
  transform-origin: 204px 41px;
  transform-box: view-box;
  transform: translateY(-6px);
  animation: crane-hoist 12s ease-in-out infinite;
}

.crane-swing {
  transform-origin: 204px 86px;
  transform-box: view-box;
  transform: rotate(-3deg);
  animation: crane-swing 3.8s ease-in-out infinite;
}

html.night .crane { color: #c8c6be; }

.festoon {
  position: absolute;
  z-index: 3;
  height: 36px;
}

.festoon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-bottom: 2px solid var(--rope);
  border-radius: 50%;
}

.festoon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  height: 16px;
  background-image:
    radial-gradient(circle at 8px 7px, var(--red) 0 3px, transparent 4px),
    radial-gradient(circle at 28px 11px, var(--gold) 0 3px, transparent 4px);
  background-size: 40px 16px;
  background-repeat: repeat-x;
  animation: bulb 1s steps(2) infinite;
}

.festoon-top {
  top: 18px;
  left: 2%;
  right: 2%;
}

.festoon-join {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.festoon-wire {
  fill: none;
  stroke: var(--rope);
  stroke-width: 1.35;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.festoon-bulb-red { fill: var(--red); }
.festoon-bulb-gold { fill: var(--gold); }
.festoon-bulb { animation: bulb 1s steps(2) infinite; }
.festoon-bulb:nth-of-type(odd) { animation-delay: -0.4s; }

.hero-copy,
.hero-aside {
  position: relative;
  z-index: 4;
}

.hero-copy h1 {
  font-family: Gambarino, serif;
  font-size: clamp(56px, 8vw, 104px);
  line-height: 0.88;
  margin: 0 0 22px;
  letter-spacing: -0.03em;
}

.lead {
  margin: 0 0 28px;
  max-width: 34ch;
  font-size: 18px;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 20px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  transition: transform 700ms var(--ease);
}

.cta:active { transform: scale(0.98); }

.cta-ico {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  transition: transform 700ms var(--ease);
}

.cta:hover .cta-ico { transform: translate(3px, -1px) scale(1.05); }

.hero-aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-aside button {
  appearance: none;
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  background: transparent;
  text-align: left;
  padding: 26px 8px;
  font-family: Gambarino, serif;
  font-size: clamp(28px, 3.2vw, 40px);
  cursor: pointer;
  color: var(--ink);
  transition: color 700ms var(--ease), padding 700ms var(--ease), border-color 700ms var(--ease);
}

.hero-aside button:last-child {
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.hero-aside button:hover {
  color: var(--red);
  padding-left: 16px;
}

.rules {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: end;
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 96px 0 24px;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}

.rules h2 {
  font-family: Gambarino, serif;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.rules .lead { margin-bottom: 0; }

.rules-copy {
  position: relative;
  padding: 32px 36px 44px;
  background: #e8edf2;
  box-shadow:
    0 14px 28px rgba(16, 16, 56, 0.07),
    inset 0 0 0 1px rgba(16, 16, 56, 0.06);
}

.rules-copy[data-reveal] {
  transform: translateY(32px) rotate(-1.2deg);
}

.rules-copy::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 28px;
  width: 22px;
  height: 36px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 36'%3E%3Cpath fill='none' stroke='%23757b84' stroke-width='2.2' stroke-linecap='round' d='M8 23V9.2c0-2.8 4.6-2.8 4.6 0v16.2c0 3.6-6.2 3.6-6.2 0V11.4c0-1.8 2.8-1.8 2.8 0V22'/%3E%3C/svg%3E") center / contain no-repeat;
}

.rules-copy::after {
  content: "до 15 ноября";
  position: absolute;
  right: 28px;
  bottom: 16px;
  font-family: Gambarino, serif;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--ink) 36%, transparent);
  transform: rotate(-1.4deg);
}

.rules-sheet {
  display: flex;
  flex-direction: column;
}

.rule {
  padding: 22px 8px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.rule:last-child { border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); }

.rule b {
  display: block;
  font-family: Gambarino, serif;
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 6px;
}

.rule p {
  margin: 0;
  max-width: 36ch;
  color: color-mix(in srgb, var(--ink) 58%, transparent);
}

.sample {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0 8px;
}

.sample-copy {
  max-width: 36ch;
  margin-bottom: 28px;
}

.sample h2 {
  font-family: Gambarino, serif;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.sample .lead { margin-bottom: 0; }

.sample-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.sample-pair figure {
  margin: 0;
}

.sample-pair img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #e8edf2;
  box-shadow:
    0 14px 28px rgba(16, 16, 56, 0.07),
    inset 0 0 0 1px rgba(16, 16, 56, 0.06);
}

.sample-pair figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: color-mix(in srgb, var(--ink) 58%, transparent);
}

.gallery {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 96px 0 80px;
}

.gallery-top {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}

.gallery h2 {
  font-family: Gambarino, serif;
  font-size: clamp(40px, 6vw, 68px);
  margin: 0;
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; }

.filter {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink);
  cursor: pointer;
  transition: background 700ms var(--ease), color 700ms var(--ease);
}

.filter.is-on {
  background: var(--red);
  color: #fff;
}

.wall {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.span {
  display: grid;
  grid-template-columns: 52px 1fr 1fr 1fr 52px;
  column-gap: 22px;
  align-items: start;
}

.lantern {
  grid-row: 1 / 3;
  width: 52px;
  min-height: 220px;
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 52px 180px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 180'%3E%3Cpath d='M28 54v118' stroke='%23101038' stroke-width='4'/%3E%3Cpath d='M16 176h24l-4 4H20z' fill='%23101038'/%3E%3Cpath d='M28 50h22' stroke='%23101038' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M14 28l14-14 14 14v6H14z' fill='%23101038'/%3E%3Crect x='18' y='30' width='20' height='20' fill='%23d4b25a'/%3E%3Crect x='16' y='50' width='24' height='5' fill='%23cf000c'/%3E%3Ccircle cx='50' cy='50' r='3' fill='%236b4a2a'/%3E%3C/svg%3E");
}

.lantern-l { grid-column: 1; }

.lantern-r {
  grid-column: 5;
  transform: scaleX(-1);
}

.cord {
  position: relative;
  grid-column: 2 / 5;
  grid-row: 1;
  height: 28px;
  margin: 36px -6px 0;
}

.cord::before {
  content: "";
  position: absolute;
  inset: 0;
  border-bottom: 3px solid var(--rope);
  border-radius: 50%;
}

.cord::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  height: 16px;
  background-image:
    radial-gradient(circle at 8px 8px, var(--red) 0 3px, transparent 4px),
    radial-gradient(circle at 28px 11px, var(--gold) 0 3px, transparent 4px);
  background-size: 40px 16px;
  background-repeat: repeat-x;
  animation: bulb 1s steps(2) infinite;
}

.tile {
  grid-row: 2;
  appearance: none;
  display: block;
  width: 100%;
  margin: -6px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.tile-shell {
  position: relative;
  display: block;
  padding: 12px 12px 16px;
  background: #f7f4ee;
  box-shadow:
    0 16px 28px rgba(16, 16, 56, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transform-origin: top center;
}

.tile-shell::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  width: 16px;
  height: 28px;
  margin-left: -8px;
  background: var(--red);
  border-radius: 3px 3px 6px 6px;
  box-shadow: 0 -10px 0 var(--rope);
}

.tile-core {
  display: block;
  overflow: hidden;
  background: #fff;
}

.tile img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  height: auto;
  object-fit: cover;
}

.span .tile-a img { aspect-ratio: 5 / 3; }

.span .tile-b {
  margin-top: 16px;
}

.span .tile-b img { aspect-ratio: 1 / 1; }

.span .tile-c img { aspect-ratio: 3 / 4; }

.span .tile-a .tile-shell::before { left: 42%; }

.span .tile-b .tile-shell::before { left: 58%; }

.span .tile-c .tile-shell::before { left: 42%; }

.tile-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 2px 0;
}

.tile-meta em {
  font-style: normal;
  color: color-mix(in srgb, var(--ink) 48%, transparent);
  font-size: 13px;
}

.tile.is-in .tile-shell {
  animation: hang-odd 7s var(--ease) infinite;
}

.tile.is-in:nth-of-type(even) .tile-shell {
  animation-name: hang-even;
  animation-duration: 8s;
}

.tile.is-in:hover .tile-shell,
.tile.is-in:focus-visible .tile-shell {
  animation: swing 700ms var(--ease);
}

.tile:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 6px;
}

.foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 48px;
  color: color-mix(in srgb, var(--ink) 42%, transparent);
}

.foot img { height: 13px; width: auto; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(24px);
}

.lightbox[hidden] { display: none; }

.lightbox figure {
  margin: 0;
  width: min(1100px, calc(100vw - 48px));
}

.lightbox img {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #fff;
}

.lightbox figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 16px;
}

.lightbox figcaption span {
  color: var(--red);
  font-size: 12px;
}

.lightbox figcaption [data-full-views] {
  color: color-mix(in srgb, var(--ink) 48%, transparent);
}

.lb-close,
.lb-nav {
  position: absolute;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
  cursor: pointer;
}

.lb-close { top: 24px; right: 24px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(6px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease), filter 800ms var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

.rules-copy[data-reveal].is-in {
  transform: rotate(-1.2deg);
}

@keyframes swing {
  20% { transform: rotate(2.4deg); }
  50% { transform: rotate(-1.8deg); }
  100% { transform: rotate(0deg); }
}

@keyframes hang-odd {
  0%, 100% { transform: rotate(-1.2deg); }
  50% { transform: rotate(1.6deg); }
}

@keyframes hang-even {
  0%, 100% { transform: rotate(1.4deg); }
  50% { transform: rotate(-1.4deg); }
}

@keyframes bulb {
  50% { opacity: 0.35; }
}

@keyframes crane-hoist {
  0%, 100% { transform: translateY(10px); }
  42% { transform: translateY(-18px); }
  58% { transform: translateY(-18px); }
  80% { transform: translateY(6px); }
}

@keyframes crane-swing {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6.5deg); }
}

.theme {
  width: 42px;
  height: 42px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--navy);
  cursor: pointer;
}

html.night .theme { color: var(--ink); }

.theme svg {
  display: block;
  width: 18px;
  height: 28px;
  margin: 7px auto 0;
}

.theme-bulbs { opacity: 0; }

html.night .theme-bulbs {
  opacity: 1;
  animation: bulb 1s steps(2) infinite;
}

.theme:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

html.night .rules-copy {
  background: #2a2622;
  box-shadow:
    0 14px 28px rgba(8, 6, 4, 0.36),
    inset 0 0 0 1px rgba(232, 230, 222, 0.08);
}

html.night .rules-copy::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 36'%3E%3Cpath fill='none' stroke='%23a39c93' stroke-width='2.2' stroke-linecap='round' d='M8 23V9.2c0-2.8 4.6-2.8 4.6 0v16.2c0 3.6-6.2 3.6-6.2 0V11.4c0-1.8 2.8-1.8 2.8 0V22'/%3E%3C/svg%3E");
}

html.night .sample-pair img {
  background: #2a2622;
  box-shadow:
    0 14px 28px rgba(8, 6, 4, 0.36),
    inset 0 0 0 1px rgba(232, 230, 222, 0.08);
}

html.night .tile-shell {
  box-shadow:
    0 16px 28px rgba(12, 10, 8, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

html.night .light {
  background: var(--gold);
  box-shadow: 0 0 8px 2px rgba(212, 160, 23, 0.16);
}

html.night .lantern {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 180'%3E%3Cpath d='M28 54v118' stroke='%23c8c6be' stroke-width='4'/%3E%3Cpath d='M16 176h24l-4 4H20z' fill='%23c8c6be'/%3E%3Cpath d='M28 50h22' stroke='%23c8c6be' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M14 28l14-14 14 14v6H14z' fill='%23c8c6be'/%3E%3Crect x='18' y='30' width='20' height='20' fill='%23d4b25a'/%3E%3Crect x='16' y='50' width='24' height='5' fill='%23cf000c'/%3E%3Ccircle cx='50' cy='50' r='3' fill='%236b4a2a'/%3E%3C/svg%3E");
}

html,
body,
.island,
.island-links a,
.lead,
.rule,
.rule p,
.filter,
.foot,
.lightbox,
.lb-close,
.lb-nav,
.tile-meta em,
.flake,
.light,
.burger,
.menu-x,
.theme,
.brand img,
.fir::before,
.drift,
.crane,
.crane-glass,
.rules-copy {
  transition-property: color, background-color, box-shadow, border-color, opacity, filter;
  transition-duration: 700ms;
  transition-timing-function: var(--ease);
}

@media (min-width: 768px) and (max-width: 1679px) {
  .hero {
    --crane-r: 0%;
    --crane-w: min(200px, 15.5vw);
    --crane-h: min(52vh, 400px);
    --c-r: 0.2%;
    --c-w: min(118px, 10.5vw);
    --c-h: min(44vh, 340px);
    --b-l: 91%;
    --b-w: 52px;
    --b-h: min(36vh, 260px);
    --a-w: 66px;
    --a-h: min(22vh, 190px);
  }

  .hero-aside {
    padding-right: max(8px, calc(0.66 * var(--crane-w) - (100vw - min(1320px, 100vw - 48px)) / 2 + 24px));
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero { gap: 28px; }
  .hero-aside { padding-right: 0; }
}

@media (max-width: 767px) {
  .island {
    gap: 12px;
    padding: 8px 8px 8px 14px;
  }

  .island-links { gap: 8px; }

  .island-links a {
    font-size: 12px;
    white-space: nowrap;
  }

  .hero,
  .rules,
  .sample,
  .gallery,
  .foot {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 100dvh;
    align-items: center;
    padding-top: 108px;
    padding-bottom: 120px;
    gap: 32px;
  }

  .hero-yard {
    --drift-h: 11%;
    --fir-root: 3.6%;
    --a-l: 2%;
    --a-w: 46px;
    --a-h: 86px;
    --c-r: 2%;
    --c-w: 54px;
    --c-h: 98px;
    --crane-r: 3%;
    --crane-w: 90px;
    --crane-h: 82px;
  }

  .fir-b,
  .festoon-join { display: none; }

  .fir-a {
    left: var(--a-l);
    bottom: var(--fir-root);
    top: auto;
    width: var(--a-w);
    height: var(--a-h);
  }

  .fir-c {
    right: var(--c-r);
    bottom: var(--fir-root);
    top: auto;
    width: var(--c-w);
    height: var(--c-h);
  }

  .festoon-top {
    top: 4px;
    left: 14%;
    right: 16%;
  }

  .rules {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 64px;
  }

  .sample-pair {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .rules-copy,
  .rules-copy[data-reveal],
  .rules-copy[data-reveal].is-in {
    transform: none;
  }

  .span .tile-a img,
  .span .tile-b img,
  .span .tile-c img { aspect-ratio: 5 / 4; }

  .span .tile-a { margin-top: 0; }

  .span .tile-b { margin-top: 12px; }

  .span .tile-c { margin-top: 20px; }

  .rule b { font-size: 24px; }

  .span {
    grid-template-columns: 1fr;
    row-gap: 28px;
  }

  .lantern { display: none; }

  .cord {
    grid-column: 1;
    margin: 0 8px;
  }

  .tile {
    grid-column: 1;
    grid-row: auto;
    margin-top: -4px;
  }

  .foot { flex-direction: column; gap: 10px; }
  .lb-prev, .lb-next { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    filter: none !important;
  }

  .snowfall,
  .lights,
  .fir::after,
  .festoon::after,
  .festoon-bulb { display: none; }

  .tile.is-in:nth-of-type(odd) .tile-shell { transform: rotate(-1.2deg); }
  .tile.is-in:nth-of-type(even) .tile-shell { transform: rotate(1.4deg); }
}
