/* ============================================
   A Celestial Midsummer Night's Dream — V2
   ============================================ */

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

:root {
  /* Sky palette — driven by JS scroll */
  --sky-top: #0a0a2e;
  --sky-bottom: #1a1a3e;
  --star-opacity: 1;
  --text: #f0e6d3;
  --text-muted: rgba(240, 230, 211, 0.6);
  --card-bg: rgba(6, 6, 30, 0.88);
  --card-border: rgba(255, 215, 140, 0.15);
  --card-glow: rgba(255, 200, 100, 0.05);
  --accent: #d4a053;
  --accent-glow: rgba(212, 160, 83, 0.4);
  --gold: #c9a84c;
  --gold-light: #f5d98a;
  --shadow-heavy: 0 20px 60px rgba(0, 0, 0, 0.4);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  background: var(--sky-top);
}

/* Selection */
::selection {
  background: rgba(212, 160, 83, 0.3);
  color: #fff;
}

/* ===== SKY / BACKGROUND ===== */
.sky {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
}

.bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: opacity;
  transition: none;
}

#bgA { opacity: 1; }
#bgB, #bgC, #bgD { opacity: 0; }

/* ===== CANVAS LAYERS ===== */
#starCanvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: var(--star-opacity, 1);
  transition: opacity 0.8s ease;
}

#fireflyCanvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ===== CURSOR TRAIL ===== */
.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
  background: radial-gradient(circle, var(--gold-light), transparent 70%);
}

/* ===== PARTICLES ===== */
.particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.particle-float {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-light);
  opacity: 0;
  animation: particleRise linear infinite;
}

@keyframes particleRise {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  15% {
    opacity: 0.8;
  }
  85% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) scale(0);
  }
}

/* ===== PASSWORD GATE ===== */
.gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  z-index: 9999;
  background: radial-gradient(ellipse at 50% 80%, #1a1a3e 0%, #0a0a1a 100%);
  overflow: hidden;
}

.gate-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.gate-card {
  position: relative;
  width: min(480px, 100%);
  background: rgba(20, 18, 40, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 215, 140, 0.15);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 215, 140, 0.1);
  text-align: center;
  animation: gateCardIn 1s ease-out;
}

@keyframes gateCardIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gate-moon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.2rem;
  animation: moonPulse 4s ease-in-out infinite;
}

.gate-moon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(255, 215, 140, 0.3));
}

@keyframes moonPulse {
  0%, 100% { filter: drop-shadow(0 0 15px rgba(255, 215, 140, 0.2)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 30px rgba(255, 215, 140, 0.5)); transform: scale(1.04); }
}

.gate-kicker {
  margin: 0 0 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

.gate-title {
  font-family: 'Cinzel Decorative', 'Playfair Display', serif;
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
  color: var(--text);
  font-weight: 400;
}

.gate-subtitle {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.gate-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.gate-form input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 1px solid rgba(255, 215, 140, 0.2);
  border-radius: 14px;
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.gate-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(212, 160, 83, 0.15);
}

.gate-form input::placeholder {
  color: rgba(240, 230, 211, 0.35);
}

.gate-form button {
  position: relative;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #b8862d);
  color: #1a1a2e;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.gate-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 160, 83, 0.3);
}

.gate-form button:active {
  transform: translateY(0);
}

.btn-sparkle {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
}

.gate-form button:hover .btn-sparkle {
  animation: btnShimmer 0.6s ease;
}

@keyframes btnShimmer {
  to { transform: translateX(100%); }
}

.gate-error {
  grid-column: 1 / -1;
  margin: 0.5rem 0 0;
  color: #ff6b6b;
  min-height: 1.2em;
  font-size: 0.9rem;
}

.gate-fine {
  margin: 1.2rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Gate unlock animation */
.gate--unlocking {
  animation: gateDissolve 1.2s ease-in forwards;
}

@keyframes gateDissolve {
  0% {
    opacity: 1;
    filter: blur(0);
  }
  50% {
    opacity: 0.6;
    filter: blur(4px);
    transform: scale(1.02);
  }
  100% {
    opacity: 0;
    filter: blur(20px);
    transform: scale(1.08);
    pointer-events: none;
  }
}

/* Invite entrance animation */
.invite-content {
  animation: inviteReveal 1.5s ease-out 0.3s both;
}

@keyframes inviteReveal {
  from {
    opacity: 0;
    margin-top: 20px;
  }
  to {
    opacity: 1;
    margin-top: 0;
  }
}

/* ===== LAYOUT ===== */
.layout {
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

/* Left column (fixed artwork) */
.left {
  position: fixed;
  top: 0;
  left: 0;
  width: 50%;
  height: 100vh;
  overflow: hidden;
}

/* Right column flows normally, offset to the right */
.right {
  margin-left: 50%;
}

.left-art {
  position: absolute;
  top: 10%;
  left: 22%;
  transform: translateX(-50%);
  width: min(340px, 80%);
  aspect-ratio: 1 / 1;
}

.left-face {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  aspect-ratio: 1 / 1;
  z-index: 3;
  transform-origin: 55% 50%;
  will-change: transform;
  animation: faceWobble 4.8s ease-in-out infinite;
}

@keyframes faceWobble {
  0%   { transform: translateY(-50%) rotate(-2deg); }
  50%  { transform: translateY(-50%) rotate(2deg); }
  100% { transform: translateY(-50%) rotate(-2deg); }
}

.face-back {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

.face-swap {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  will-change: opacity;
  transition: opacity 200ms ease;
  pointer-events: none;
  user-select: none;
}

.face-sun  { z-index: 1; opacity: 0; }
.face-moon { z-index: 2; opacity: 1; }

/* Banners */
.banner {
  position: absolute;
  left: 70%;
  top: 40%;
  width: 100%;
  height: auto;
  z-index: 1;
  transform-origin: 70% 50%;
  will-change: transform;
}

.banner img {
  width: 100%;
  height: auto;
}

.banner-top {
  top: 32%;
  transform: translateY(-75%);
  animation: bannerFloatA 8.5s ease-in-out infinite;
  width: 120%;
}

.banner-middle {
  top: 58%;
  left: 80%;
  transform: translateY(-50%);
  animation: bannerFloatB 10.5s ease-in-out infinite;
  animation-delay: -2s;
  width: 120%;
  z-index: 0;
}

.banner-lower {
  top: 77%;
  width: 130%;
  transform: translateY(-50%);
  animation: bannerFloatC 9.5s ease-in-out infinite;
  animation-delay: -4s;
}

.banner-bottom {
  top: 100%;
  left: 50%;
  width: 150%;
  transform: translateY(-50%);
  animation: bannerFloatD 11.5s ease-in-out infinite;
  animation-delay: -6s;
}

@keyframes bannerFloatA {
  0%, 100% { transform: translateY(-50%) rotate(-0.6deg) translateX(0); }
  50%      { transform: translateY(-50%) rotate(0.6deg) translateX(3px); }
}
@keyframes bannerFloatB {
  0%, 100% { transform: translateY(-50%) rotate(0.4deg) translateX(0); }
  50%      { transform: translateY(-50%) rotate(-0.4deg) translateX(-3px); }
}
@keyframes bannerFloatC {
  0%, 100% { transform: translateY(-50%) rotate(-0.5deg) translateX(0); }
  50%      { transform: translateY(-50%) rotate(0.5deg) translateX(2px); }
}
@keyframes bannerFloatD {
  0%, 100% { transform: translateY(-50%) rotate(0.3deg) translateX(0); }
  50%      { transform: translateY(-50%) rotate(-0.3deg) translateX(-2px); }
}

/* ===== RIGHT COLUMN ===== */

.content {
  width: 100%;
  max-width: 680px;
  margin: 4rem 2rem;
}

.scroll-runway {
  height: 0; /* Content height alone provides enough scroll for 5 scenes (4500px) */
}

/* ===== CARDS ===== */
.card {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem 2.2rem;
  margin-bottom: 2rem;
  overflow: hidden;
  transition: border-color 0.4s, box-shadow 0.4s;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 140, 0.2), transparent);
}

.card:hover {
  border-color: rgba(255, 215, 140, 0.2);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2), 0 0 60px var(--card-glow);
}

.card--accent {
  background: linear-gradient(135deg, rgba(30, 20, 50, 0.6), rgba(50, 30, 60, 0.4));
  border-color: rgba(180, 130, 200, 0.15);
  text-align: center;
}

.card--rsvp {
  background: linear-gradient(135deg, rgba(60, 40, 20, 0.5), rgba(40, 25, 15, 0.4));
  border-color: rgba(212, 160, 83, 0.25);
  text-align: center;
  overflow: hidden;
}

.rsvp-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 160, 83, 0.06), transparent 50%);
  animation: rsvpGlowPulse 6s ease-in-out infinite;
}

@keyframes rsvpGlowPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}

.card-title {
  font-family: 'Cinzel Decorative', 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--gold-light);
  letter-spacing: 0.02em;
}

.glow-text {
  text-shadow: 0 0 30px rgba(212, 160, 83, 0.2);
}

.card-subtitle {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.expect-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.expect-list li {
  position: relative;
  padding-left: 1.4em;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  color: var(--text);
}

.expect-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.75rem;
  top: 0.2em;
}

.sign-off {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  margin-top: 1rem;
  color: var(--gold-light);
}

.card-body p {
  margin-bottom: 0.8rem;
  color: var(--text);
  font-size: 0.95rem;
}

.card-body p:last-child {
  margin-bottom: 0;
}

.card-body strong {
  color: var(--gold-light);
  font-weight: 500;
}

.card-heading {
  font-family: 'Cinzel Decorative', 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--gold-light);
  margin-bottom: 0.8rem;
}

/* ===== TIMELINE ===== */
.timeline {
  list-style: none;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 1rem;
  padding: 0.8rem 0;
  align-items: start;
}

.timeline-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

.timeline-item strong {
  color: var(--gold-light);
  font-size: 1rem;
  display: block;
  margin-bottom: 0.2rem;
}

.timeline-item p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0;
}

/* ===== LOCATION ===== */
.location-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--gold-light) !important;
}

.location-sub {
  color: var(--text-muted) !important;
  font-size: 0.9rem;
}

.map-wrapper {
  margin-top: 1rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 140, 0.1);
}

.map-iframe {
  display: block;
}

/* ===== DRESS CODE ===== */
.dress-code-word {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2.5rem;
  color: var(--gold-light) !important;
  text-shadow: 0 0 40px rgba(212, 160, 83, 0.3);
  margin-bottom: 0.8rem !important;
  letter-spacing: 0.05em;
}

.dress-code-hint {
  color: var(--text) !important;
  font-style: normal;
  font-size: 0.95rem;
}

/* ===== ACCOMMODATION ===== */
.accom-option {
  margin-bottom: 1.5rem;
}

.accom-option h3 {
  font-family: 'Playfair Display', serif;
  color: var(--gold-light);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.accom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 1rem;
}

.accom-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 215, 140, 0.08);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  transition: background 0.3s, border-color 0.3s;
}

.accom-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 215, 140, 0.18);
}

.accom-card h4 {
  font-family: 'Playfair Display', serif;
  color: var(--gold-light);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.accom-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

/* ===== BUTTON ===== */
.button {
  display: inline-block;
  margin-top: 1.2rem;
  padding: 0.9rem 2.2rem;
  background: linear-gradient(135deg, var(--accent), #b8862d);
  color: #1a1a2e;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.3s;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 160, 83, 0.35);
}

.button--magic::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: magicShimmer 3s ease-in-out infinite;
}

@keyframes magicShimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.fine {
  font-size: 0.85rem;
  margin-top: 1rem;
}

.muted {
  color: var(--text-muted);
}

/* ===== SCENES & CREATURES ===== */
.scene {
  position: relative;
  height: 120px;
  margin: 1rem 0;
}

.creature {
  width: 180px;
  position: absolute;
  z-index: 3;
  cursor: pointer;
  transition: filter 0.3s;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.creature:hover {
  filter: drop-shadow(0 4px 20px rgba(212, 160, 83, 0.4)) brightness(1.1);
}

/* Creature-specific positioning (preserving original layout) */
.star_1     { right: 0; }
.moon_2     { right: 0; top: -100%; }
.fairy_1    { top: -50%; }
.cat_1      { right: 0; bottom: 0; }
.comet_1    { left: -10%; top: -50%; }
.frog_1     { bottom: 0; left: -15%; }
.fox_2      { right: -10%; top: -30%; }
.ladybird_1 { bottom: 0; left: -10%; width: 40%; }
.fox_4      { right: -5%; top: -30%; }
.bird_1     { left: -10%; width: 45%; top: -110%; }
.donkey_1   { right: -10%; }
.dog_1      { right: -5%; top: -30%; }
.bottle_1   { left: -10%; top: -50%; }
.badger_1   { left: -10%; }
.bottle_2   { right: -5%; top: -30%; }

/* Creature animations — multiple layered keyframes for organic randomness */
.creature {
  will-change: transform;
}

.creature--float {
  animation: creatureWanderY 6s ease-in-out infinite, creatureWanderX 8.5s ease-in-out infinite, creatureRot 7s ease-in-out infinite;
}

.creature--hover {
  animation: creatureWanderY 5s ease-in-out infinite, creatureWanderX 7s ease-in-out infinite, creatureRot 9s ease-in-out infinite;
}

.creature--drift {
  animation: creatureDriftPath 12s ease-in-out infinite, creatureRot 6.5s ease-in-out infinite;
}

/* Each creature gets different timing via nth-child delays */
.creature:nth-child(1) { animation-delay: 0s, -2s, -1s; }
.creature:nth-child(2) { animation-delay: -3s, -5s, -4s; }
.creature:nth-child(odd) { animation-direction: normal, reverse, normal; }
.creature:nth-child(even) { animation-direction: reverse, normal, reverse; }

@keyframes creatureWanderY {
  0%, 100% { translate: 0 0; }
  20%      { translate: 0 -12px; }
  40%      { translate: 0 6px; }
  60%      { translate: 0 -18px; }
  80%      { translate: 0 3px; }
}

@keyframes creatureWanderX {
  0%, 100% { margin-left: 0; }
  25%      { margin-left: 14px; }
  50%      { margin-left: -8px; }
  75%      { margin-left: 10px; }
}

@keyframes creatureRot {
  0%, 100% { rotate: 0deg; }
  20%      { rotate: 2.5deg; }
  40%      { rotate: -3deg; }
  60%      { rotate: 1.5deg; }
  80%      { rotate: -2deg; }
}

@keyframes creatureDriftPath {
  0%, 100% { translate: 0 0; }
  15%      { translate: 12px -8px; }
  30%      { translate: -6px -16px; }
  45%      { translate: 8px -4px; }
  60%      { translate: -10px -12px; }
  75%      { translate: 4px -6px; }
  90%      { translate: -8px -14px; }
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  will-change: transform, opacity;
}

.reveal[data-reveal="fade-up"] {
  transform: translateY(40px);
}

.reveal[data-reveal="fade-left"] {
  transform: translateX(40px);
}

.reveal[data-reveal="fade-right"] {
  transform: translateX(-40px);
}

.reveal[data-reveal="scale"] {
  transform: scale(0.92);
}

.reveal[data-reveal="stagger"] {
  transform: translateY(20px);
}

.reveal--visible {
  opacity: 1 !important;
  transform: translateY(0) translateX(0) scale(1) !important;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* First card appears faster since it's in the viewport on load */
.card:first-of-type.reveal--visible {
  transition-duration: 0.5s;
}

/* Stagger delays for grids */
.accom-grid .reveal--visible:nth-child(1) { transition-delay: 0ms; }
.accom-grid .reveal--visible:nth-child(2) { transition-delay: 100ms; }
.accom-grid .reveal--visible:nth-child(3) { transition-delay: 200ms; }
.accom-grid .reveal--visible:nth-child(4) { transition-delay: 300ms; }

/* ===== SCREEN READER ONLY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== MOBILE ===== */
@media (max-width: 900px) {
  .left {
    position: relative;
    width: 100%;
    height: auto;
    min-height: unset;
    max-height: unset;
    padding: 2.5rem 1rem 1rem;
    overflow: hidden;
  }

  .right {
    margin-left: 0;
  }

  /* Switch from absolute positioning to a vertical flex stack */
  .left-art {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .left-face {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: min(280px, 70vw);
    height: min(280px, 70vw);
    aspect-ratio: auto;
    margin-bottom: -4px;
    animation: faceWobbleMobile 4.8s ease-in-out infinite;
  }

  @keyframes faceWobbleMobile {
    0%   { transform: rotate(-2deg); }
    50%  { transform: rotate(2deg); }
    100% { transform: rotate(-2deg); }
  }

  /* Banners become stacked, centered, overlapping slightly */
  .banner {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    display: block;
    margin: -8px auto 0;
  }

  .banner img {
    width: 100%;
    height: auto;
    display: block;
  }

  .banner-top {
    top: auto;
    transform: none;
    margin-top: -60px;
    animation: bannerFloatMobileA 8.5s ease-in-out infinite;
    width: min(280px, 70vw);
    z-index: 2;
}

  .banner-middle {
    top: auto;
    left: auto;
    transform: none;
    animation: bannerFloatMobileB 10.5s ease-in-out infinite;
    animation-delay: -2s;
    width: min(280px, 70vw);
    z-index: 3;
  }

  .banner-lower {
    top: auto;
    transform: none;
    animation: bannerFloatMobileC 9.5s ease-in-out infinite;
    animation-delay: -4s;
    width: min(320px, 80vw);
    z-index: 2;
  }

  .banner-bottom {
    top: auto;
    left: auto;
    transform: none;
    animation: bannerFloatMobileD 11.5s ease-in-out infinite;
    animation-delay: -6s;
    width: min(320px, 80vw);
    z-index: 1;
  }

  @keyframes bannerFloatMobileA {
    0%, 100% { transform: rotate(-0.6deg); }
    50%      { transform: rotate(0.6deg) translateX(3px); }
  }
  @keyframes bannerFloatMobileB {
    0%, 100% { transform: rotate(0.4deg); }
    50%      { transform: rotate(-0.4deg) translateX(-3px); }
  }
  @keyframes bannerFloatMobileC {
    0%, 100% { transform: rotate(-0.5deg); }
    50%      { transform: rotate(0.5deg) translateX(2px); }
  }
  @keyframes bannerFloatMobileD {
    0%, 100% { transform: rotate(0.3deg); }
    50%      { transform: rotate(-0.3deg) translateX(-2px); }
  }

  .content {
    margin: 2rem auto;
    padding: 0 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .accom-grid {
    grid-template-columns: 1fr;
  }

  .dress-code-word {
    font-size: 1.8rem;
  }

  .creature {
    width: 120px;
  }
}

@media (max-width: 480px) {
  .gate-form {
    grid-template-columns: 1fr;
  }

  .gate-card {
    padding: 2rem 1.5rem;
  }

  .card-title {
    font-size: 1.2rem;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  #starCanvas, #fireflyCanvas, .cursor-trail, .particles {
    display: none;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
