.hero {
  height: 100vh;
  position: relative;
  color: var(--ink);
}

/* French vintage: paper + ink + ornament */
.hero-dual {
  position: relative;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.95), rgba(246, 240, 230, 0.98));
}

.hero-dual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 520px at 50% 10%, rgba(176, 141, 87, 0.14), transparent 62%),
    linear-gradient(90deg, rgba(28, 35, 48, 0.06), transparent 28%, transparent 72%, rgba(28, 35, 48, 0.06));
  pointer-events: none;
  z-index: 2;
}

.hero-dual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(1200px 680px at 50% 50%, transparent 62%, rgba(0,0,0,0.16));
  pointer-events: none;
  z-index: 2;
}

.hero-invite-frame {
  position: absolute;
  top: clamp(22px, 4vw, 54px);
  left: 50%;
  z-index: 4;
  width: min(1180px, calc(100vw - 92px));
  min-height: 104px;
  transform: translateX(-50%);
  pointer-events: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(18px, 3.4vw, 44px);
  color: rgba(28, 35, 48, 0.72);
}

.hero-invite-frame::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -18px;
  width: min(980px, 86vw);
  height: 132px;
  transform: translateX(-50%);
  border-radius: 0 0 999px 999px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 250, 242, 0.76), rgba(255, 250, 242, 0.26) 58%, transparent 74%),
    radial-gradient(ellipse at 50% 20%, rgba(176, 141, 87, 0.20), transparent 68%);
  border-bottom: 1px solid rgba(176, 141, 87, 0.28);
  box-shadow: 0 18px 60px rgba(0,0,0,0.06);
  mask-image: linear-gradient(black 0 76%, transparent 100%);
}

.hero-invite-frame::after {
  content: "";
  position: absolute;
  left: clamp(18px, 3vw, 52px);
  right: clamp(18px, 3vw, 52px);
  top: 50%;
  height: 1px;
  background:
    linear-gradient(90deg,
      transparent,
      rgba(176, 141, 87, 0.20) 12%,
      rgba(176, 141, 87, 0.70) 46%,
      rgba(176, 141, 87, 0.70) 54%,
      rgba(176, 141, 87, 0.20) 88%,
      transparent
    );
  box-shadow: 0 0 18px rgba(176, 141, 87, 0.24);
}

.frame-title {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  width: 172px;
  height: 72px;
  padding: 0 18px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.72), transparent 58%),
    rgba(255, 250, 242, 0.54);
  border: 1px solid rgba(176, 141, 87, 0.34);
  backdrop-filter: blur(9px);
  box-shadow:
    inset 0 0 0 6px rgba(176, 141, 87, 0.055),
    0 16px 42px rgba(0,0,0,0.10);
}

.frame-title::before,
.frame-title::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(176, 141, 87, 0.50);
  box-shadow: 0 0 0 4px rgba(176, 141, 87, 0.08);
  transform: translateY(-50%);
}

.frame-title::before {
  left: 10px;
}

.frame-title::after {
  right: 10px;
}

.frame-title span {
  font-family: "Cinzel", "Cormorant Garamond", ui-serif, serif;
  font-size: 9px;
  letter-spacing: 3.2px;
  text-transform: uppercase;
  color: rgba(143, 115, 71, 0.86);
}

.frame-title strong {
  font-family: "Cormorant Garamond", "Noto Serif TC", ui-serif, serif;
  font-size: 17px;
  letter-spacing: 2.6px;
  font-weight: 600;
  color: rgba(28, 35, 48, 0.74);
}

.frame-corner {
  position: relative;
  z-index: 1;
  height: 58px;
}

.frame-corner {
  min-width: 0;
}

.frame-corner::before,
.frame-corner::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(176, 141, 87, 0.56));
}

.frame-corner.left {
  background:
    linear-gradient(90deg, transparent, rgba(255,250,242,0.28) 38%, transparent 78%);
}

.frame-corner.right {
  background:
    linear-gradient(270deg, transparent, rgba(255,250,242,0.28) 38%, transparent 78%);
}

.frame-corner::after {
  width: 46px;
  height: 28px;
  top: 16px;
  border-top: 1px solid rgba(176, 141, 87, 0.30);
  border-bottom: 1px solid rgba(176, 141, 87, 0.18);
  border-radius: 999px 999px 0 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(176,141,87,0.16), transparent 62%),
    rgba(255, 250, 242, 0.28);
}

.frame-corner.left::before {
  right: 0;
}

.frame-corner.left::after {
  right: -5px;
}

.frame-corner.right::before {
  left: 0;
  transform: scaleX(-1);
}

.frame-corner.right::after {
  left: -5px;
}

@media (min-width: 1280px) {
  .hero-invite-frame {
    width: min(1360px, calc(100vw - 112px));
    min-height: 112px;
  }

  .frame-title {
    width: 190px;
    height: 78px;
  }
}

/* Side ornaments to reduce empty space */
.hero-side {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(120px, 10vw);
  z-index: 3;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
}

.hero-side-left { left: 14px; }
.hero-side-right { right: 14px; }

.hero-side-inner {
  height: min(640px, 70vh);
  width: 100%;
  border-left: 1px solid rgba(28, 35, 48, 0.12);
  border-right: 1px solid rgba(28, 35, 48, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.hero-side-text {
  font-family: "Cinzel", "Cormorant Garamond", ui-serif, serif;
  font-size: 12px;
  letter-spacing: 4px;
  color: rgba(28, 35, 48, 0.48);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.hero-flourish {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(176, 141, 87, 0.22);
  background:
    radial-gradient(circle at 30% 30%, rgba(176, 141, 87, 0.12), transparent 60%),
    conic-gradient(from 180deg, rgba(176,141,87,0.0), rgba(176,141,87,0.18), rgba(176,141,87,0.0));
  mask-image: radial-gradient(circle at 50% 50%, black 52%, transparent 70%);
}

.hero-photo {
  background-size: cover;
  background-position: center;
  filter: saturate(0.82) contrast(1.05) brightness(0.98);
  transform: scale(1.06);
  animation: heroKenBurns 16s ease-in-out infinite alternate;
}

.hero-photo.left {
  background-image: var(--hero-left-img);
}

.hero-photo.right {
  background-image: var(--hero-right-img);
  animation-delay: -6s;
}

@keyframes heroKenBurns {
  0% { transform: scale(1.05) translate3d(0px, 0px, 0); }
  100% { transform: scale(1.12) translate3d(10px, -8px, 0); }
}

/* Center title */
.hero-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 3;
}

/* Entrance wow: assemble card on first load after opening */
html.entered .hero-card {
  animation: cardAssemble 900ms cubic-bezier(.2,.8,.2,1) both;
}

html.entered .title-foil {
  animation-delay: 250ms;
}

@keyframes cardAssemble {
  0% { opacity: 0; transform: translateY(18px) scale(0.985); filter: blur(6px); }
  60% { opacity: 1; transform: translateY(0) scale(1.0); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1.0); filter: blur(0); }
}

.hero-card {
  position: relative;
  padding: 44px 60px 40px;
  min-width: min(680px, calc(100vw - 40px));
  background: rgba(255, 250, 242, 0.86);
  color: var(--ink);
  border: 1px solid rgba(28, 35, 48, 0.12);
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
}

@media (min-width: 1200px) {
  .hero-card {
    min-width: min(820px, calc(100vw - 120px));
    padding: 54px 74px 48px;
  }
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 14px;
  border: 1px solid rgba(176, 141, 87, 0.40);
  pointer-events: none;
}

.hero-ornament {
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 18%, black 30%, transparent 60%);
  opacity: 0.9;
  background:
    conic-gradient(from 200deg at 50% 18%, rgba(176,141,87,0.0), rgba(176,141,87,0.28), rgba(176,141,87,0.0)),
    radial-gradient(420px 220px at 50% 18%, rgba(176,141,87,0.14), transparent 65%);
}

.hero-kicker {
  font-family: "Noto Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(28, 35, 48, 0.74);
  margin-bottom: 14px;
}

.hero-title {
  font-family: "Cormorant Garamond", "Cinzel", "Noto Serif TC", ui-serif, serif;
  font-size: clamp(34px, 4.5vw, 54px);
  letter-spacing: 6px;
  font-weight: 600;
  margin-bottom: 14px;
}

.title-foil {
  display: inline-block;
  background-image:
    linear-gradient(90deg,
      rgba(240, 228, 195, 0.85),
      rgba(176, 141, 87, 0.95),
      rgba(255, 244, 217, 0.90),
      rgba(143, 115, 71, 0.98),
      rgba(240, 228, 195, 0.85)
    );
  background-size: 240% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 1px 0 rgba(0,0,0,0.18),
    0 10px 26px rgba(176, 141, 87, 0.14);
  animation: foilSweep 5.4s ease-in-out infinite;
}

@keyframes foilSweep {
  0% { background-position: 0% 50%; filter: brightness(1.02); }
  50% { background-position: 100% 50%; filter: brightness(1.12); }
  100% { background-position: 0% 50%; filter: brightness(1.02); }
}

.text-only .dot {
  display: block;
  width: 6px;
  height: 6px;
  background: rgba(28, 35, 48, 0.46);
  border-radius: 50%;
  margin: 14px auto 14px;
}

.hero-sub {
  font-family: "Noto Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  letter-spacing: 2px;
  color: rgba(28, 35, 48, 0.74);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 4;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: rgba(28, 35, 48, 0.82);
  text-decoration: none;
  font-family: "Noto Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  animation: scrollCueFloat 2.4s ease-in-out infinite;
}

.scroll-cue::before {
  content: "";
  width: 1px;
  height: 22px;
  background: linear-gradient(180deg, transparent, rgba(176, 141, 87, 0.88));
  box-shadow: 0 0 18px rgba(176, 141, 87, 0.32);
}

.scroll-cue-kicker {
  font-family: "Cinzel", "Cormorant Garamond", ui-serif, serif;
  font-size: 10px;
  letter-spacing: 4.8px;
  text-transform: uppercase;
  color: rgba(176, 141, 87, 0.92);
}

.scroll-cue-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(176, 141, 87, 0.42);
  background:
    linear-gradient(120deg, rgba(255,255,255,0.48), transparent 40%),
    rgba(255, 250, 242, 0.72);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2.2px;
  box-shadow:
    0 14px 40px rgba(0,0,0,0.16),
    inset 0 0 0 1px rgba(255,255,255,0.32);
  text-shadow: 0 1px 0 rgba(255,255,255,0.55);
}

.scroll-cue-text::before,
.scroll-cue-text::after {
  content: "";
  width: 18px;
  height: 1px;
  background: rgba(176, 141, 87, 0.36);
}

.hero-form-ticket {
  position: absolute;
  right: clamp(22px, 4vw, 56px);
  bottom: clamp(34px, 6vh, 72px);
  z-index: 4;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 154px;
  padding: 14px 18px 13px;
  border-radius: 16px;
  border: 1px solid rgba(176, 141, 87, 0.36);
  background: rgba(255, 250, 242, 0.78);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 18px 54px rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
  transform: rotate(-2deg);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.hero-form-ticket::before,
.hero-form-ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(246, 240, 230, 0.96);
  transform: translateY(-50%);
}

.hero-form-ticket::before {
  left: -7px;
}

.hero-form-ticket::after {
  right: -7px;
}

.hero-form-ticket:hover {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 0 24px 70px rgba(0,0,0,0.22);
  background: rgba(255, 250, 242, 0.90);
}

.hero-form-ticket span:last-child {
  font-weight: 600;
  letter-spacing: 1px;
}

.ticket-small {
  font-family: "Cinzel", "Cormorant Garamond", ui-serif, serif;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(176, 141, 87, 0.92);
}

.scroll-cue i {
  width: 2px;
  height: 58px;
  overflow: hidden;
  background: rgba(176, 141, 87, 0.24);
  position: relative;
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(176, 141, 87, 0.26);
}

.scroll-cue i::before {
  content: "";
  position: absolute;
  left: 0;
  top: -65%;
  width: 100%;
  height: 72%;
  background: linear-gradient(180deg, transparent, rgba(255, 246, 218, 0.95), rgba(176, 141, 87, 0.98));
  animation: scrollLightDrop 1.75s cubic-bezier(.45,0,.2,1) infinite;
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(176, 141, 87, 0.92);
  border-bottom: 2px solid rgba(176, 141, 87, 0.92);
  transform: translateX(-50%) rotate(45deg);
  filter: drop-shadow(0 0 8px rgba(176, 141, 87, 0.34));
}

@keyframes scrollCueFloat {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.82; }
  50% { transform: translate(-50%, 5px); opacity: 1; }
}

@keyframes scrollLightDrop {
  0% { top: -70%; opacity: 0; }
  18% { opacity: 1; }
  72%, 100% { top: 100%; opacity: 0; }
}

@media (max-width: 768px) {
  .hero,
  .hero-dual {
    height: 100svh;
    min-height: 620px;
    max-height: 860px;
  }

  @supports (height: 100dvh) {
    .hero,
    .hero-dual {
      height: 100dvh;
    }
  }

  .hero-dual {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 1fr;
  }

  .hero-invite-frame {
    top: 8px;
    width: calc(100vw - 24px);
    min-height: 58px;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-invite-frame::before {
    top: -18px;
    width: min(280px, 72vw);
    height: 82px;
    border-radius: 0 0 999px 999px;
    background:
      radial-gradient(ellipse at 50% 0%, rgba(15, 16, 18, 0.28), rgba(15, 16, 18, 0.08) 58%, transparent 76%),
      radial-gradient(ellipse at 50% 18%, rgba(176, 141, 87, 0.20), transparent 70%);
    border-bottom-color: rgba(255, 244, 217, 0.22);
  }

  .hero-invite-frame::after {
    left: 34px;
    right: 34px;
    top: 48px;
    background: linear-gradient(90deg, transparent, rgba(255, 244, 217, 0.44), transparent);
  }

  .frame-corner {
    display: none;
  }

  .frame-title {
    align-self: start;
    justify-self: center;
    width: 132px;
    height: 48px;
    margin-top: 6px;
    padding: 0 12px;
    background:
      radial-gradient(circle at 50% 0%, rgba(255,255,255,0.16), transparent 56%),
      rgba(28, 35, 48, 0.30);
    border-color: rgba(255, 244, 217, 0.22);
    box-shadow:
      inset 0 0 0 4px rgba(255, 244, 217, 0.045),
      0 14px 32px rgba(0,0,0,0.14);
  }

  .frame-title span {
    font-size: 7px;
    letter-spacing: 2.2px;
    color: rgba(255, 244, 217, 0.86);
  }

  .frame-title strong {
    font-size: 10px;
    letter-spacing: 1.6px;
    color: rgba(255, 255, 255, 0.88);
  }

  .frame-title::before,
  .frame-title::after {
    width: 6px;
    height: 6px;
  }

  .hero-center-text {
    top: 68%;
    width: min(238px, calc(100vw - 92px));
  }

  .hero-photo.left {
    grid-column: 1;
    background-image: var(--hero-left-mobile-img);
    background-size: auto 112%;
    background-position: 44% 100%;
  }

  .hero-photo.right {
    grid-column: 2;
    background-image: var(--hero-right-mobile-img);
    background-size: auto 112%;
    background-position: 48% 100%;
  }

  .hero-photo {
    animation: none;
    transform: none;
  }

  .hero-card {
    width: 100%;
    min-width: 0;
    padding: 16px 15px 15px;
    border-radius: 14px;
    background: rgba(255, 250, 242, 0.82);
    box-shadow: 0 18px 52px rgba(0,0,0,0.20);
    backdrop-filter: blur(8px);
  }

  .hero-card::before {
    inset: 7px;
    border-radius: 10px;
  }

  .hero-title {
    font-size: 23px;
    letter-spacing: 2px;
    margin-bottom: 6px;
  }

  .hero-kicker {
    font-size: 9px;
    letter-spacing: 1.6px;
    margin-bottom: 7px;
  }

  .text-only .dot {
    margin: 9px auto 9px;
  }

  .hero-sub,
  .hero-date {
    font-size: 12px;
    letter-spacing: 1.2px;
  }

  .hero-side {
    display: none;
  }

  .scroll-cue {
    bottom: max(18px, env(safe-area-inset-bottom));
    color: rgba(255, 255, 255, 0.94);
    text-shadow: 0 2px 18px rgba(0,0,0,0.35);
  }

  .scroll-cue-text {
    background: rgba(28, 35, 48, 0.46);
    color: rgba(255, 255, 255, 0.96);
    border-color: rgba(255, 244, 217, 0.42);
    box-shadow:
      0 16px 44px rgba(0,0,0,0.26),
      inset 0 0 0 1px rgba(255,255,255,0.12);
    text-shadow: 0 2px 10px rgba(0,0,0,0.38);
  }

  .scroll-cue-kicker {
    color: rgba(255, 244, 217, 0.92);
    text-shadow: 0 2px 12px rgba(0,0,0,0.34);
  }

  .hero-form-ticket {
    right: 16px;
    bottom: max(78px, calc(env(safe-area-inset-bottom) + 72px));
    min-width: 136px;
    padding: 12px 14px 11px;
    border-radius: 14px;
  }
}

@media (max-width: 390px) {
  .hero-center-text {
    top: 70%;
    width: min(218px, calc(100vw - 98px));
  }

  .hero-photo.right {
    background-size: auto 120%;
    background-position: 38% 100%;
  }

  .hero-title {
    font-size: 21px;
  }

  .hero-card {
    padding: 15px 14px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo,
  .title-foil,
  .scroll-cue,
  .scroll-cue i::before {
    animation: none;
  }
}
