:root {
  --bg: #080604;
  --panel: rgba(15, 12, 9, 0.88);
  --panel-strong: rgba(22, 16, 10, 0.96);
  --line: rgba(255, 125, 25, 0.34);
  --line-strong: rgba(255, 125, 25, 0.72);
  --orange: #ff6a00;
  --gold: #ffd39a;
  --cream: #fff3dd;
  --muted: rgba(255, 240, 220, 0.7);
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.5);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--cream);
}

body {
  min-width: 320px;
  overflow-x: hidden;
}

.share-preview-image {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.intro-cinematic {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 96, 0, 0.3), transparent 30%),
    #050302;
  pointer-events: none;
}

body.is-ready .intro-cinematic {
  animation: introExit 650ms 1.8s ease both;
}

.intro-grid {
  position: absolute;
  inset: -20%;
  background:
    linear-gradient(rgba(255, 106, 0, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 106, 0, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.36;
  transform: perspective(600px) rotateX(62deg) translateY(14%);
  animation: gridRush 1.9s ease-out both;
}

.intro-line {
  position: absolute;
  width: 160%;
  height: 5px;
  background: linear-gradient(90deg, transparent, #ff5a00, #ffe0a3, #ff5a00, transparent);
  box-shadow: 0 0 34px rgba(255, 106, 0, 0.9);
  transform: translateX(-120%) rotate(-11deg);
  animation: introSlash 1.45s 0.35s cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

.intro-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.intro-copy span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
  opacity: 0;
  animation: introSmallIn 420ms 180ms ease both;
}

.intro-copy strong {
  color: var(--orange);
  font-size: clamp(54px, 16vw, 96px);
  line-height: 0.92;
  font-weight: 1000;
  text-shadow:
    0 0 18px rgba(255, 106, 0, 0.72),
    0 0 54px rgba(255, 106, 0, 0.38);
  opacity: 0;
  animation: introTitleIn 680ms 300ms cubic-bezier(0.16, 0.95, 0.22, 1.1) both;
}

.intro-copy em {
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 126, 32, 0.64);
  color: var(--cream);
  font-size: 17px;
  font-style: normal;
  font-weight: 950;
  opacity: 0;
  background: rgba(0, 0, 0, 0.44);
  animation: introSmallIn 520ms 760ms ease both;
}

body.is-ready .hero-content > *,
body.is-ready .section-header,
body.is-ready .invite-form,
body.is-ready .success-card {
  animation-fill-mode: both;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100svh;
  background:
    linear-gradient(115deg, rgba(255, 104, 0, 0.16), transparent 38%),
    radial-gradient(circle at 50% 8%, rgba(255, 105, 0, 0.32), transparent 34%),
    #090604;
}

.hero-screen,
.form-screen,
.success-screen {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}

.hero-screen {
  display: grid;
  align-items: end;
  padding: max(24px, env(safe-area-inset-top)) 22px max(28px, env(safe-area-inset-bottom));
}

.cover-art {
  position: absolute;
  inset: 0;
  background-image: url("/assets/ip-cover.jpg");
  background-position: 50% 38%;
  background-size: cover;
  transform: scale(1.03);
  animation: coverDrift 12s ease-out both;
}

.cover-art::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.28) 38%, rgba(0, 0, 0, 0.82)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.74), transparent 48%, rgba(0, 0, 0, 0.16));
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(170deg, transparent 10%, rgba(255, 106, 0, 0.12) 42%, transparent 56%),
    radial-gradient(circle at 12% 82%, rgba(255, 122, 0, 0.36), transparent 28%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: glowBreath 3.6s ease-in-out infinite alternate;
}

.light-sweep {
  position: absolute;
  inset: -18% -40%;
  background: linear-gradient(112deg, transparent 34%, rgba(255, 124, 28, 0.18) 47%, rgba(255, 219, 154, 0.5) 50%, rgba(255, 111, 0, 0.14) 53%, transparent 66%);
  filter: blur(0.5px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-34%) rotate(-7deg);
  animation: heroSweep 3.4s 0.45s ease-in-out infinite;
}

.spark-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.spark-field span {
  position: absolute;
  width: 90px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 126, 22, 0.9), transparent);
  box-shadow: 0 0 16px rgba(255, 106, 0, 0.68);
  opacity: 0;
  transform: translate3d(-120px, 0, 0) rotate(-10deg);
  animation: sparkMove 2.8s linear infinite;
}

.spark-field span:nth-child(1) {
  top: 16%;
  left: 3%;
  animation-delay: 0.4s;
}

.spark-field span:nth-child(2) {
  top: 36%;
  left: 62%;
  width: 64px;
  animation-delay: 1.4s;
}

.spark-field span:nth-child(3) {
  top: 62%;
  left: 18%;
  width: 120px;
  animation-delay: 2.2s;
}

.spark-field span:nth-child(4) {
  top: 79%;
  left: 52%;
  width: 82px;
  animation-delay: 3.1s;
}

.spark-field span:nth-child(5) {
  top: 90%;
  left: 4%;
  width: 140px;
  animation-delay: 1.9s;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 32px 0 8px;
}

.hero-content::before {
  position: absolute;
  top: -18px;
  left: -16px;
  width: min(86vw, 420px);
  height: 2px;
  content: "";
  background: linear-gradient(90deg, #ff5a00, rgba(255, 224, 163, 0.8), transparent);
  box-shadow: 0 0 28px rgba(255, 106, 0, 0.82);
  transform-origin: left center;
  animation: headlineLaser 2.4s 2.2s ease-in-out infinite;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  line-height: 0.93;
  text-shadow: 0 0 28px rgba(255, 103, 0, 0.48);
  animation: titleGlowPulse 2.4s 2.3s ease-in-out infinite;
}

body.is-ready .hero-content .eyebrow {
  animation: riseIn 620ms 120ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

body.is-ready .hero-content h1 span {
  animation: titleSlam 760ms 260ms cubic-bezier(0.16, 0.95, 0.22, 1.1) both;
}

body.is-ready .hero-content h1 strong {
  animation: titleBarIn 780ms 430ms cubic-bezier(0.16, 0.95, 0.22, 1.1) both;
}

body.is-ready .hero-copy {
  animation: riseIn 680ms 620ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

body.is-ready .hero-date {
  animation: riseIn 680ms 760ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

body.is-ready .hero-content .primary-button {
  animation: riseIn 680ms 900ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

h1 span,
h1 strong {
  display: block;
  font-size: clamp(52px, 17vw, 92px);
  font-weight: 1000;
}

h1 strong {
  width: fit-content;
  margin-top: 8px;
  padding: 2px 14px 6px;
  color: #120906;
  background: linear-gradient(120deg, #fff0c9, #ff8c1a 58%, #ff4d00);
  box-shadow: 0 0 34px rgba(255, 106, 0, 0.5);
}

.hero-copy {
  margin-bottom: 18px;
  color: #fff4df;
  font-size: clamp(22px, 7vw, 34px);
  font-weight: 950;
  line-height: 1.08;
}

.hero-date {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-date span {
  position: relative;
  overflow: hidden;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.46);
  color: var(--gold);
  font-size: 15px;
  font-weight: 900;
  box-shadow: inset 0 0 20px rgba(255, 106, 0, 0.14);
  animation: dateFloat 2.6s ease-in-out infinite;
}

.hero-date span:nth-child(2) {
  animation-delay: 0.25s;
}

.hero-date span::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-120%);
  animation: chipShine 3.7s ease-in-out infinite;
}

.hero-date span:nth-child(2)::after {
  animation-delay: 1.2s;
}

.primary-button {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(120deg, #ff4b00, #ff8c1a 48%, #ffe0a3);
  color: #170904;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 14px 42px rgba(255, 92, 0, 0.38);
  transition:
    transform 180ms ease,
    filter 180ms ease;
  animation: buttonPulse 1.9s 2.5s ease-in-out infinite;
}

.primary-button::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 24%, rgba(255, 255, 255, 0.48), transparent 76%);
  transform: translateX(-130%);
  animation: buttonShine 2.8s 1.4s ease-in-out infinite;
}

.primary-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.primary-button:active {
  transform: translateY(1px) scale(0.99);
}

.primary-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.35) brightness(0.78);
}

.form-screen,
.success-screen {
  padding: max(28px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
}

.form-ambient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(158deg, rgba(255, 106, 0, 0.16), transparent 36%),
    repeating-linear-gradient(170deg, transparent 0 18px, rgba(255, 106, 0, 0.06) 19px 20px);
  pointer-events: none;
  animation: ambientSlide 12s linear infinite;
}

.section-header,
.invite-form,
.success-card {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  margin-inline: auto;
}

.section-header {
  margin-bottom: 22px;
  padding-top: 16px;
}

body.is-ready .form-screen:not([hidden]) .section-header {
  animation: riseIn 520ms 40ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

body.is-ready .form-screen:not([hidden]) .invite-form {
  animation: cardIn 620ms 120ms cubic-bezier(0.18, 0.92, 0.24, 1) both;
}

.section-header h2,
.success-card h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 11vw, 56px);
  line-height: 1.03;
  font-weight: 1000;
}

.invite-form,
.success-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 106, 0, 0.13), transparent 32%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.invite-form {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span,
.date-field legend {
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
}

.field input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(255, 208, 148, 0.2);
  border-radius: 6px;
  outline: 0;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.48);
  color: var(--cream);
  font-size: 17px;
}

.field input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.18);
}

.field input::placeholder {
  color: rgba(255, 242, 222, 0.42);
}

.date-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.date-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 9px;
}

.transport-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.date-options label {
  min-width: 0;
}

.date-options input {
  position: absolute;
  opacity: 0;
}

.date-options span {
  display: grid;
  min-height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 208, 148, 0.22);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.date-options span:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 208, 148, 0.46);
}

.date-options input:checked + span {
  border-color: var(--line-strong);
  background: linear-gradient(120deg, rgba(255, 81, 0, 0.94), rgba(255, 147, 26, 0.86));
  color: #120704;
  box-shadow: 0 0 28px rgba(255, 106, 0, 0.24);
  animation: selectedPop 220ms ease-out both;
}

.form-error {
  min-height: 22px;
  margin: -2px 0 0;
  color: #ffceb2;
  font-size: 14px;
  font-weight: 800;
}

.submit-button {
  margin-top: -2px;
}

.success-screen {
  display: grid;
  align-items: center;
  background:
    linear-gradient(160deg, rgba(255, 106, 0, 0.2), transparent 34%),
    radial-gradient(circle at 18% 18%, rgba(255, 121, 15, 0.3), transparent 26%),
    #080604;
}

.success-card {
  padding: 22px;
}

body.is-ready .success-screen:not([hidden]) .success-card {
  animation: successPop 700ms 80ms cubic-bezier(0.18, 0.92, 0.24, 1) both;
}

.success-card h2 {
  margin-bottom: 20px;
  font-size: clamp(30px, 9vw, 48px);
}

.summary-list {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
}

.summary-list div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid rgba(255, 208, 148, 0.14);
}

.summary-list dt {
  color: var(--gold);
  font-size: 14px;
  font-weight: 900;
}

.summary-list dd {
  margin: 0;
  color: var(--cream);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.45;
}

.editable-message {
  white-space: pre-line;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.34);
  color: #fff1da;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.7;
}

.hero-screen.is-exiting {
  animation: screenFadeOut 320ms ease both;
}

.form-screen.is-exiting {
  animation: screenFadeOut 280ms ease both;
}

[hidden] {
  display: none !important;
}

@keyframes coverDrift {
  from {
    transform: scale(1.1) translate3d(0, 10px, 0);
  }

  to {
    transform: scale(1.03) translate3d(0, 0, 0);
  }
}

@keyframes introExit {
  to {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.08);
  }
}

@keyframes gridRush {
  from {
    opacity: 0;
    transform: perspective(600px) rotateX(62deg) translateY(28%) scale(1.24);
  }

  to {
    opacity: 0.36;
    transform: perspective(600px) rotateX(62deg) translateY(14%) scale(1);
  }
}

@keyframes introSlash {
  0% {
    opacity: 0;
    transform: translateX(-120%) rotate(-11deg);
  }

  22% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(120%) rotate(-11deg);
  }
}

@keyframes introSmallIn {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes introTitleIn {
  0% {
    opacity: 0;
    transform: translate3d(-26px, 0, 0) skewX(-10deg) scale(0.9);
    filter: blur(8px);
  }

  72% {
    opacity: 1;
    transform: translate3d(2px, 0, 0) skewX(-2deg) scale(1.03);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) skewX(0deg) scale(1);
    filter: blur(0);
  }
}

@keyframes headlineLaser {
  0%,
  100% {
    opacity: 0.28;
    transform: scaleX(0.72);
  }

  48% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes titleGlowPulse {
  0%,
  100% {
    text-shadow: 0 0 18px rgba(255, 103, 0, 0.45);
    filter: brightness(1);
  }

  50% {
    text-shadow:
      0 0 20px rgba(255, 103, 0, 0.76),
      0 0 58px rgba(255, 103, 0, 0.42);
    filter: brightness(1.14);
  }
}

@keyframes dateFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -4px, 0);
  }
}

@keyframes buttonPulse {
  0%,
  100% {
    box-shadow:
      0 14px 42px rgba(255, 92, 0, 0.38),
      0 0 0 rgba(255, 106, 0, 0);
  }

  50% {
    box-shadow:
      0 16px 52px rgba(255, 92, 0, 0.58),
      0 0 0 7px rgba(255, 106, 0, 0.16);
  }
}

@keyframes glowBreath {
  from {
    opacity: 0.68;
  }

  to {
    opacity: 1;
  }
}

@keyframes heroSweep {
  0%,
  58% {
    opacity: 0;
    transform: translateX(-40%) rotate(-7deg);
  }

  68% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(44%) rotate(-7deg);
  }
}

@keyframes sparkMove {
  0% {
    opacity: 0;
    transform: translate3d(-140px, 0, 0) rotate(-10deg);
  }

  16% {
    opacity: 0.9;
  }

  82% {
    opacity: 0.74;
  }

  100% {
    opacity: 0;
    transform: translate3d(260px, -58px, 0) rotate(-10deg);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes titleSlam {
  from {
    opacity: 0;
    transform: translate3d(-22px, 0, 0) skewX(-8deg) scaleX(0.92);
    filter: blur(5px);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) skewX(0deg) scaleX(1);
    filter: blur(0);
  }
}

@keyframes titleBarIn {
  from {
    opacity: 0;
    transform: translate3d(-12px, 10px, 0) scaleX(0.74);
    transform-origin: left center;
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scaleX(1);
    transform-origin: left center;
  }
}

@keyframes chipShine {
  0%,
  45% {
    transform: translateX(-120%);
  }

  70%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes buttonShine {
  0%,
  46% {
    transform: translateX(-130%);
  }

  72%,
  100% {
    transform: translateX(130%);
  }
}

@keyframes ambientSlide {
  from {
    background-position:
      0 0,
      0 0;
  }

  to {
    background-position:
      0 0,
      0 220px;
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes selectedPop {
  0% {
    transform: scale(0.96);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes successPop {
  from {
    opacity: 0;
    transform: translate3d(0, 26px, 0) scale(0.96);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes screenFadeOut {
  to {
    opacity: 0;
    transform: translate3d(0, -10px, 0) scale(0.99);
  }
}

@media (min-width: 700px) {
  .hero-screen {
    align-items: center;
    padding-inline: 48px;
  }

  .cover-art {
    background-position: 50% 28%;
  }

  .hero-content {
    margin-left: clamp(22px, 8vw, 120px);
    margin-right: auto;
  }

  .primary-button {
    width: min(100%, 360px);
  }

  .form-screen,
  .success-screen {
    padding-inline: 28px;
  }

  .invite-form,
  .success-card {
    padding: 24px;
  }
}

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