:root {
  --bg: #120c0e;
  --bg-2: #1b1214;
  --surface: #241719;
  --border: rgba(250, 224, 3, 0.14);
  --text: #f4ece4;
  --muted: #b9a9a3;
  --red: #c4262e;
  --red-deep: #8e1a20;
  --gold: #fae003;
  --gold-soft: #ffd84a;
  --radius: 18px;
  --wall: 18px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --font-display: "Cinzel", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 2px, transparent 2px);
  background-size: 140px 56px, 140px 112px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--gold-soft); }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.4rem, 7vw, 5rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 4.5vw, 3rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 800; }

.gold {
  background: linear-gradient(100deg, var(--gold) 0%, #ffb400 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.container { width: min(1180px, 100% - 2 * (var(--wall) + 16px)); margin-inline: auto; }
.center { text-align: center; margin-top: 2.5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.9em 1.6em;
  border-radius: 999px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(196, 38, 46, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(196, 38, 46, 0.55); }
.btn--ghost {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: none;
}
.btn--ghost:hover { background: rgba(250, 224, 3, 0.1); box-shadow: 0 0 24px rgba(250, 224, 3, 0.25); }
.btn--small { padding: 0.5em 1.2em; font-size: 0.9rem; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px max(calc(var(--wall) + 16px), calc((100% - 1180px) / 2));
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}
.nav.is-scrolled {
  background: rgba(18, 12, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
}
.nav__brand img { border-radius: 50%; border: 2px solid var(--gold); background: #fff; }
.nav__brand em { font-style: normal; color: var(--gold); }
.nav__links { display: flex; align-items: center; gap: 22px; }
.nav__links a:not(.btn) {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}
.nav__links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.25s;
}
.nav__links a:not(.btn):hover::after { transform: scaleX(1); }
.nav__toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 120px 16px 80px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 35%, rgba(196, 38, 46, 0.45), transparent 70%),
    radial-gradient(ellipse 40% 30% at 50% 40%, rgba(250, 224, 3, 0.12), transparent 70%),
    linear-gradient(180deg, #1a0d10 0%, var(--bg) 100%);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(250, 224, 3, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 224, 3, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
}
.hero__inner { position: relative; max-width: 820px; }
.hero__logo {
  width: 150px;
  height: 150px;
  margin: 0 auto 1.6rem;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--gold);
  box-shadow: 0 0 0 8px rgba(196, 38, 46, 0.35), 0 0 80px rgba(250, 224, 3, 0.35);
  overflow: hidden;
  animation: float 6s ease-in-out infinite;
}
.hero__logo img { width: 100%; height: 100%; object-fit: cover; }
.hero__lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 640px; margin: 0 auto 2rem; }
.hero__lead strong { color: var(--text); }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

.hero__dice .die {
  position: absolute;
  font-size: clamp(3rem, 8vw, 6rem);
  color: rgba(250, 224, 3, 0.12);
  animation: spin 18s linear infinite;
  pointer-events: none;
}
.die--1 { top: 18%; left: 8%; }
.die--2 { bottom: 16%; right: 9%; animation-duration: 24s !important; animation-direction: reverse !important; }
.die--3 { top: 22%; right: 16%; font-size: 2.5rem !important; animation-duration: 14s !important; }

.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  translate: -50% 0;
  width: 26px;
  height: 42px;
  border: 2px solid var(--muted);
  border-radius: 14px;
}
.hero__scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--gold);
  animation: scrolldot 1.8s ease-in-out infinite;
}

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 130px) 0; position: relative; }
.section--dark { background: rgba(27, 18, 20, 0.55); }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 3.5rem; }
.section__head p:last-child { color: var(--muted); }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split--reverse .split__text { order: 2; }
.split__text p { color: var(--muted); }
.split__text p strong { color: var(--text); }
.split__media { position: relative; min-height: 420px; }

.pills { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pills li {
  padding: 0.45em 1em;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 500;
}

.polaroid {
  margin: 0;
  padding: 12px 12px 14px;
  background: #fbf6ee;
  color: #3a2a2a;
  border-radius: 6px;
  box-shadow: var(--shadow);
  transition: transform 0.4s ease;
}
.polaroid img { aspect-ratio: 1; object-fit: cover; border-radius: 3px; }
.polaroid--tilt-r img { aspect-ratio: 4 / 5; object-position: center 60%; }
.polaroid figcaption { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; text-align: center; padding-top: 10px; }
.polaroid--tilt-r { width: 78%; margin-left: auto; transform: rotate(3deg); }
.polaroid--tilt-l { position: absolute; width: 38%; top: -34px; left: -14px; transform: rotate(-6deg); }
.polaroid--small img { aspect-ratio: 4 / 5; }
.polaroid:hover { transform: rotate(0) scale(1.03); z-index: 2; }

.poster {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: var(--shadow), 0 0 60px rgba(196, 38, 46, 0.25);
  transform: perspective(1000px) rotateY(-6deg);
  transition: transform 0.5s;
}
.poster:hover { transform: perspective(1000px) rotateY(0); }

/* ---------- Info grid ---------- */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 1.8rem 0 2rem; }
.info {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
}
.info__label { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.info__value { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }
.info__sub { font-size: 0.85rem; color: var(--muted); }

/* ---------- CTA ---------- */
.section--cta {
  background:
    radial-gradient(ellipse 70% 80% at 50% 100%, rgba(196, 38, 46, 0.5), transparent 70%),
    var(--bg);
  text-align: center;
}
.cta { max-width: 760px; }
.cta > p:not(.eyebrow) { color: var(--muted); margin-bottom: 2rem; }
.cta address { font-style: normal; margin-top: 2.2rem; color: var(--text); }
.cta__docs { margin-top: 2rem; font-size: 0.9rem; }
.cta__docs a { color: var(--muted); }
.cta__docs a:hover { color: var(--gold); }

/* ---------- Torre: muri e rampe ---------- */
.tower-wall {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 30;
  width: var(--wall);
  pointer-events: none;
  background-color: #2c1f1c;
  background-image:
    linear-gradient(#140c0b 3px, transparent 3px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent 60%);
  background-size: 100% 34px, 100% 100%;
}
.tower-wall--l { left: 0; box-shadow: inset -2px 0 0 rgba(250, 224, 3, 0.35), 6px 0 18px rgba(0, 0, 0, 0.5); }
.tower-wall--r { right: 0; transform: scaleX(-1); box-shadow: inset -2px 0 0 rgba(250, 224, 3, 0.35), 6px 0 18px rgba(0, 0, 0, 0.5); }

.baffle {
  position: relative;
  z-index: 2;
  height: clamp(150px, 30vw, 420px);
  margin: calc(-1 * clamp(56px, 8vw, 104px)) 0;
  pointer-events: none;
  filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.55));
}
.baffle svg { display: block; width: 100%; height: 100%; overflow: visible; }

.hero__hint {
  margin: 2.6rem 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Dice thrower ---------- */
.dice {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  overflow: hidden;
}
.dice__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.dice__shadow {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0) 68%);
  filter: blur(2px);
  will-change: transform;
}

/* Numero che compare sopra il dado quando si ferma */
.dice-pop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 46;
  pointer-events: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  color: #fff3c4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  opacity: 0;
}
.dice-pop.is-crit { color: var(--gold); text-shadow: 0 0 14px rgba(250, 224, 3, 0.8), 0 2px 10px rgba(0, 0, 0, 0.8); }
.dice-pop.is-fumble { color: #ff6b6b; }
.dice-pop.is-on { animation: dicepop 1.6s ease-out forwards; }
@keyframes dicepop {
  0% { opacity: 0; transform: var(--at) translateY(6px) scale(0.6); }
  15% { opacity: 1; transform: var(--at) translateY(-6px) scale(1.15); }
  30% { transform: var(--at) translateY(-10px) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: var(--at) translateY(-26px) scale(1); }
}

/* Pannello con l'ultimo tiro */
.dice-hud {
  position: fixed;
  left: calc(var(--wall) + 12px);
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 47;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  border-radius: 999px;
  background: rgba(27, 18, 20, 0.88);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.dice-hud__set {
  max-width: 9.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.35em 0.7em;
  border: 1px dashed var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 700 0.75rem var(--font-body);
  letter-spacing: 0.06em;
  cursor: pointer;
}
.dice-hud__set:hover, .dice-hud__set[aria-expanded="true"] { color: var(--gold); border-color: var(--gold); }
.dice-hud__value.is-pop { animation: hudpop 0.45s ease-out; }
@keyframes hudpop { 0% { transform: scale(0.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* Pannello per scegliere i dadi */
.dice-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  width: 220px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(27, 18, 20, 0.96);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.dice-panel__title {
  margin: 0 0 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}
.dice-panel__row { display: grid; grid-template-columns: 1fr 30px 2ch 30px; align-items: center; gap: 8px; padding: 3px 0; }
.dice-panel__type { font-family: var(--font-display); font-weight: 800; }
.dice-panel__type::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 3px;
  background: var(--c);
  box-shadow: 0 0 0 1px rgba(250, 224, 3, 0.6);
}
.dice-panel__type--d4 { --c: #4fae6c; }
.dice-panel__type--d6 { --c: #3f7bd0; }
.dice-panel__type--d8 { --c: #8a5cc9; }
.dice-panel__type--d10 { --c: #2ea3a3; }
.dice-panel__type--d12 { --c: #e08a3c; }
.dice-panel__type--d20 { --c: #d4323a; }
.dice-panel__row output { text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.dice-panel__row button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.dice-panel__row button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.dice-panel__row button:disabled { opacity: 0.35; cursor: default; }
.dice-panel__detail { margin: 10px 0 0; font-size: 0.8rem; color: var(--muted); line-height: 1.4; }
.dice-hud__value {
  min-width: 2ch;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.3rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.dice-hud__value.is-crit { color: var(--gold); }
.dice-hud__value.is-fumble { color: #ff6b6b; }
.dice-hud__btn {
  padding: 0.5em 1em;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: #fff;
  font: 700 0.85rem var(--font-body);
  cursor: pointer;
}
.dice-hud__btn--ghost { padding: 0.45em 0.7em; background: transparent; border: 1px solid var(--border); }
.dice-hud__btn--ghost.is-on { border-color: var(--gold); }
.dice-hud__btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Vassoio dei dadi in fondo alla pagina */
.tray-zone {
  position: relative;
  z-index: 2;
  height: clamp(240px, 26vw, 320px);
  margin: calc(-1 * clamp(40px, 6vw, 80px)) 0 40px;
  pointer-events: none;
}
.tray-zone__funnel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.55));
}
.tray {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(640px, 100% - 2 * (var(--wall) + 16px));
  height: clamp(140px, 16vw, 180px);
  padding: 12px;
  border-radius: 28px;
  background: linear-gradient(180deg, #7a4426, #3a1d10);
  border: 2px solid rgba(250, 224, 3, 0.4);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.15), 0 24px 50px rgba(0, 0, 0, 0.6);
}
.tray__felt {
  display: grid;
  place-items: center;
  height: 100%;
  border-radius: 18px;
  background: radial-gradient(ellipse at 50% 40%, #8e1a20, #3d090d 75%);
  box-shadow: inset 0 8px 22px rgba(0, 0, 0, 0.7);
}
.tray__total {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 5rem);
  color: rgba(250, 224, 3, 0.16);
  user-select: none;
}

/* ---------- Calendar ---------- */
.calendar { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.calendar__status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 36px 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.calendar__status a { font-weight: 600; }
.event {
  display: flex;
  gap: 18px;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface) 0%, #1c1214 100%);
  border: 1px solid var(--border);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.event:hover { transform: translateY(-4px); border-color: rgba(250, 224, 3, 0.4); box-shadow: var(--shadow); }
.event__date {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 80px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  box-shadow: 0 8px 20px rgba(196, 38, 46, 0.35);
  line-height: 1;
}
.event__day { font-family: var(--font-display); font-size: 2rem; font-weight: 900; }
.event__month { margin-top: 4px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); }
.event__body { min-width: 0; }
.event__body h3 { margin: 0 0 0.3em; font-size: 1.1rem; }
.event__meta { margin: 0; font-size: 0.88rem; color: var(--gold-soft); }
.event__desc { margin: 0.5em 0 0; font-size: 0.92rem; color: var(--muted); }
.event__link { display: inline-block; margin-top: 0.6em; font-size: 0.85rem; font-weight: 600; }
.calendar__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 2.5rem; }
.calendar__embed {
  grid-column: 1 / -1;
  width: 100%;
  height: 560px;
  border: 0;
  border-radius: var(--radius);
  background: #fff;
}

/* ---------- Eventi fatti ---------- */
.story { display: flex; flex-direction: column; gap: clamp(48px, 7vw, 90px); max-width: 1040px; margin: 0 auto; }
.story__item { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.story__item:nth-child(even) .story__photo { order: 2; }
.story__photo {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--surface);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
  transition: transform 0.4s ease;
}
.story__item:nth-child(even) .story__photo { transform: rotate(1.5deg); }
.story__photo:hover { transform: rotate(0) scale(1.02) !important; }
.story__photo--poster { aspect-ratio: 1; width: min(100%, 420px); justify-self: center; }
.story__photo--portrait { aspect-ratio: 4 / 5; width: min(100%, 420px); justify-self: center; }
.story__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.story__photo:hover img { transform: scale(1.06); }
.story__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px rgba(250, 224, 3, 0.25);
}
.story__text time { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); }
.story__text h3 { margin: 0.35em 0 0.4em; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.story__text p { margin: 0; color: var(--muted); }

.more-events { margin: clamp(56px, 8vw, 96px) auto 0; max-width: 760px; text-align: center; }
.more-events > p { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; margin: 0 0 1rem; }
.more-events ul { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.more-events li {
  padding: 0.5em 1.1em;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.92rem;
}
.more-events li span { margin-left: 6px; color: var(--gold); font-weight: 600; font-size: 0.8rem; }

/* ---------- Footer ---------- */
.footer { padding: 56px 0 36px; border-top: 1px solid var(--border); background: #0d0809; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand img { border-radius: 50%; background: #fff; border: 2px solid var(--gold); }
.footer__brand div { display: flex; flex-direction: column; }
.footer__brand span { color: var(--muted); font-size: 0.9rem; }
.footer__social { display: flex; gap: 12px; }
.footer__social a {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.footer__social a:hover { background: var(--gold); color: var(--bg); transform: translateY(-3px); }
.footer__copy { width: 100%; text-align: center; color: var(--muted); font-size: 0.85rem; margin: 12px 0 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 4, 5, 0.92);
  backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 88vh; border-radius: 12px; box-shadow: var(--shadow); }
.lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Embers ---------- */
.embers { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.embers i {
  position: absolute;
  bottom: -10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px 2px rgba(250, 180, 3, 0.7);
  opacity: 0;
  animation: ember linear infinite;
}
main, .footer, .nav { position: relative; z-index: 1; }
main { overflow-x: clip; }
.nav { position: fixed; z-index: 50; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Animations ---------- */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scrolldot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes ember {
  0% { opacity: 0; transform: translate(0, 0) scale(1); }
  10% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(var(--drift, 30px), -100vh) scale(0.3); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__text { order: 0; }
  .story__item { grid-template-columns: 1fr; }
  .story__item:nth-child(even) .story__photo { order: 0; }
  .split__media { min-height: 0; max-width: 520px; margin: 0 auto; width: 100%; }
}

@media (max-width: 820px) {
  .nav__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(36, 23, 25, 0.8);
    cursor: pointer;
  }
  .nav__toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav__links {
    position: fixed;
    top: 72px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    border-radius: var(--radius);
    background: rgba(27, 18, 20, 0.97);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.25s, transform 0.25s;
  }
  .nav.is-open .nav__links { opacity: 1; pointer-events: auto; transform: none; }
  .nav__links a:not(.btn) { padding: 8px; }
  .nav { background: rgba(18, 12, 14, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .info-grid { grid-template-columns: 1fr; }
  .calendar { grid-template-columns: 1fr; }
  :root { --wall: 8px; }
  .hero__logo { width: 120px; height: 120px; }
  .polaroid--tilt-r { width: 88%; }
  .polaroid--tilt-l { display: none; }
  .btn { width: 100%; justify-content: center; }
  .nav__links .btn { width: auto; }
}
