:root {
  --paper: #f7f2e8;
  --paper-deep: #eee4d2;
  --cream: #fffdf8;
  --ink: #2b2925;
  --ink-soft: #6f685e;
  --gold: #a98138;
  --gold-light: #d8bd82;
  --gold-pale: #eee1c5;
  --line: rgba(102, 78, 37, 0.16);
  --shadow: 0 22px 70px rgba(74, 58, 31, 0.09);
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", "Times New Roman", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f9f6f0 0%, #f4eee3 52%, #f8f4ec 100%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.hero {
  position: relative;
  min-height: auto;
  display: block;
  overflow: hidden;
  padding: 0;
  isolation: isolate;
  background: var(--paper);
}

.hero::before {
  display: none;
}

.hero__media {
  position: relative;
  z-index: 0;
  height: clamp(20rem, 46svh, 30rem);
  overflow: hidden;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(247, 242, 232, 0.04) 42%,
    rgba(247, 242, 232, 0.18) 70%,
    rgba(247, 242, 232, 0.78) 100%
  );
  pointer-events: none;
}

.hero__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 69% center;
  filter: saturate(0.86) contrast(0.96);
}

.hero__glow {
  display: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: -4.5rem;
  padding: 6rem 1.25rem 4rem;
  background:
    linear-gradient(180deg, rgba(247, 242, 232, 0) 0, var(--paper) 4.5rem),
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.72), transparent 42%);
  text-align: center;
}

.site-logo {
  width: clamp(8.75rem, 38vw, 11.5rem);
  height: auto;
  display: block;
  margin: 0 auto 1.8rem;
}

.hero h1 {
  margin-bottom: 1.55rem;
  font-size: clamp(2rem, 8vw, 4rem);
  letter-spacing: 0.055em;
  white-space: nowrap;
}

.hero h1 em {
  font-size: 1em;
  letter-spacing: 0.08em;
}

.eyebrow,
.section-number {
  margin: 0 0 1.4rem;
  color: var(--gold);
  font-family: "Times New Roman", serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.28em;
}

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

h1,
h2 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.35;
}

h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(2.35rem, 10vw, 5rem);
  letter-spacing: 0.05em;
}

h1 em {
  color: var(--gold);
  font-size: 0.72em;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.gold-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 7rem;
  margin: 0 auto 1.75rem;
}

.gold-rule::before,
.gold-rule::after {
  content: "";
  width: 2.75rem;
  height: 1px;
  background: var(--gold-light);
}

.gold-rule span {
  width: 0.35rem;
  height: 0.35rem;
  background: var(--gold);
  transform: rotate(45deg);
}

.hero__lead {
  margin-bottom: 1.25rem;
  color: #4f4a43;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 4vw, 1.4rem);
  letter-spacing: 0.07em;
}

.hero__copy {
  margin-bottom: 1rem;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.hero__thanks {
  margin-bottom: 2rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.button {
  min-height: 3.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.8rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:focus-visible {
  outline: 3px solid rgba(169, 129, 56, 0.35);
  outline-offset: 4px;
}

.button--primary {
  background: var(--gold);
  color: #fffdf7;
  box-shadow: 0 12px 30px rgba(139, 101, 32, 0.2);
}

.button--primary:hover {
  background: #95702d;
  box-shadow: 0 16px 36px rgba(139, 101, 32, 0.25);
}

.button__arrow {
  font-size: 1.15em;
  font-weight: 400;
}

.scroll-hint {
  display: none;
}

.section {
  padding: 5.75rem 1.25rem;
}

.container {
  width: min(100%, 1160px);
  margin: 0 auto;
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-heading h2,
.invitation-card h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 6.5vw, 2.85rem);
  letter-spacing: 0.04em;
}

.section-heading > p:last-child {
  margin: 0;
  color: var(--ink-soft);
}

.guests-section {
  background: transparent;
}

.guest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.guest-card {
  position: relative;
  min-height: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1.65rem 0.55rem 0.7rem;
  border: 1px solid rgba(102, 78, 37, 0.12);
  border-radius: 0.75rem;
  background: rgba(255, 253, 248, 0.42);
  color: #514a40;
  box-shadow: none;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.guest-card__company {
  position: absolute;
  top: 0.5rem;
  left: 0.6rem;
  right: 0.45rem;
  overflow: hidden;
  color: #9b8c74;
  font-size: 0.58rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.03em;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest-card__name {
  display: block;
  width: 100%;
  color: #514a40;
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.04em;
  text-align: center;
  overflow-wrap: anywhere;
}

.guest-card--name-only {
  padding-top: 0.7rem;
}

.guest-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 1.5rem;
  height: 1px;
  background: var(--gold-light);
  transform: translateX(-50%);
}

.guest-card:hover {
  border-color: rgba(169, 129, 56, 0.3);
  background: rgba(255, 253, 248, 0.7);
  box-shadow: 0 8px 24px rgba(66, 49, 24, 0.045);
  transform: translateY(-2px);
}

.invitation-section {
  padding: 1rem 1.25rem 5.75rem;
  background: transparent;
}

.invitation-card {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 4.75rem 1.5rem;
  border: 1px solid rgba(169, 129, 56, 0.16);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.7), transparent 42%),
    linear-gradient(145deg, rgba(238, 225, 197, 0.72), rgba(255, 253, 248, 0.66));
  color: var(--ink);
  box-shadow: 0 22px 60px rgba(91, 69, 32, 0.055);
  text-align: center;
}

.invitation-card h2 {
  color: var(--ink);
}

.invitation-card > p:not(.eyebrow, .invitation-card__note) {
  margin-bottom: 0.35rem;
  color: var(--ink-soft);
}

.invitation-card strong {
  display: block;
  margin-bottom: 2rem;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.08rem;
  letter-spacing: 0.08em;
}

.button--dark {
  background: var(--gold);
  color: #fffdf7;
  box-shadow: 0 12px 30px rgba(139, 101, 32, 0.16);
}

.button--dark:hover {
  background: #95702d;
}

.invitation-card__note {
  margin: 0.8rem 0 0;
  color: #8c8274;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.submission-status {
  min-height: 1.7rem;
  margin: 0.65rem 0 0;
  color: var(--gold);
  font-size: 0.82rem;
}

.messages-section {
  overflow: hidden;
  background: transparent;
}

.messages-section .container {
  width: min(100%, 1280px);
}

.messages-section .section-heading {
  margin-bottom: 2.25rem;
}

.message-barrage {
  display: grid;
  gap: 0.7rem;
  width: 100%;
}

.barrage__lane {
  width: 100%;
  overflow: hidden;
  padding: 0.15rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.barrage__track {
  display: flex;
  width: max-content;
  gap: 0.8rem;
  animation: barrage-left var(--barrage-duration, 34s) linear infinite;
  will-change: transform;
}

.barrage__lane:hover .barrage__track {
  animation-play-state: paused;
}

.barrage__group {
  display: flex;
  flex-shrink: 0;
  gap: 0.8rem;
}

.barrage__item {
  width: clamp(270px, 72vw, 430px);
  min-height: 4.2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(169, 129, 56, 0.2);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.58);
  box-shadow: 0 6px 20px rgba(74, 58, 31, 0.035);
}

.barrage__name {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.barrage__message {
  display: -webkit-box;
  overflow: hidden;
  color: #514b43;
  font-family: var(--serif);
  font-size: 0.87rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@keyframes barrage-left {
  to {
    transform: translateX(calc(-50% - 0.4rem));
  }
}

.guests-section {
  background: transparent;
}

.ticker {
  overflow: hidden;
  padding: 4.5rem 0;
  background: #302d27;
  color: #fffaf0;
}

.ticker__heading {
  padding: 0 1.5rem;
  text-align: center;
}

.ticker__heading .section-number {
  margin-bottom: 0.8rem;
  color: var(--gold-light);
}

.ticker__heading h2 {
  margin-bottom: 2.25rem;
  font-size: clamp(1.45rem, 5vw, 2.15rem);
  letter-spacing: 0.06em;
}

.ticker__window {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0.5rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker__track {
  display: flex;
  width: max-content;
  gap: 2rem;
  animation: ticker-scroll 55s linear infinite;
}

.ticker__track:hover {
  animation-play-state: paused;
}

.ticker__group {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-shrink: 0;
}

.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  max-width: min(80vw, 560px);
  white-space: nowrap;
}

.ticker__name {
  color: var(--gold-light);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ticker__message {
  overflow: hidden;
  color: #eee7da;
  font-family: var(--serif);
  font-size: 0.95rem;
  text-overflow: ellipsis;
}

.ticker__divider {
  width: 0.35rem;
  height: 0.35rem;
  flex: 0 0 auto;
  background: var(--gold);
  transform: rotate(45deg);
}

@keyframes ticker-scroll {
  to {
    transform: translateX(calc(-50% - 1rem));
  }
}

.message-dialog {
  width: min(calc(100% - 2rem), 520px);
  max-height: calc(100svh - 2rem);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(169, 129, 56, 0.28);
  border-radius: 1.25rem;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(29, 24, 17, 0.32);
}

.message-dialog::backdrop {
  background: rgba(35, 31, 25, 0.72);
  backdrop-filter: blur(5px);
}

.message-dialog__content {
  position: relative;
  padding: 2.5rem 1.4rem 1.5rem;
}

.message-dialog .eyebrow {
  margin-bottom: 0.7rem;
}

.message-dialog h2 {
  margin-bottom: 0.6rem;
  font-size: clamp(1.8rem, 7vw, 2.4rem);
}

.dialog-intro {
  margin-bottom: 1.6rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.65rem;
  height: 2.65rem;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover {
  background: var(--paper-deep);
}

.message-form {
  display: grid;
  text-align: left;
}

.message-form label {
  margin-bottom: 0.45rem;
  color: #4d473f;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.message-form input,
.message-form textarea {
  width: 100%;
  margin-bottom: 1.15rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(102, 78, 37, 0.23);
  border-radius: 0.7rem;
  outline: 0;
  background: #fffefa;
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.message-form textarea {
  min-height: 7.5rem;
  margin-bottom: 0.3rem;
  resize: vertical;
}

.message-form input:focus,
.message-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(169, 129, 56, 0.14);
}

.message-form input::placeholder,
.message-form textarea::placeholder {
  color: #a59c8f;
}

.character-hint {
  margin: 0 0 0.65rem;
  color: #938a7e;
  font-size: 0.72rem;
  text-align: right;
}

.form-disclosure {
  margin: 0 0 0.55rem;
  color: #786f62;
  font-size: 0.74rem;
  line-height: 1.6;
}

.form-status {
  min-height: 1.25rem;
  margin: 0 0 0.75rem;
  color: #9a6f24;
  font-size: 0.78rem;
  line-height: 1.5;
}

.button--submit {
  width: 100%;
  background: var(--gold);
  color: #fffdf7;
}

.button--submit:hover {
  background: #95702d;
}

.button--submit:disabled {
  cursor: wait;
  opacity: 0.62;
}

body.dialog-open {
  overflow: hidden;
}

.message-grid {
  display: grid;
  gap: 1rem;
}

.message-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 15rem;
  padding: 1.8rem;
  border: 1px solid rgba(169, 129, 56, 0.17);
  border-radius: 1rem;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.message-card:hover {
  box-shadow: 0 25px 65px rgba(74, 58, 31, 0.13);
  transform: translateY(-4px);
}

.message-card__quote-mark {
  height: 2.7rem;
  color: var(--gold-light);
  font-family: Georgia, serif;
  font-size: 3.5rem;
  line-height: 1;
}

.message-card blockquote {
  flex: 1;
  margin: 0 0 1.5rem;
  color: #4c4740;
  font-family: var(--serif);
  font-size: 1.03rem;
  line-height: 1.9;
}

.message-card footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.message-card footer::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--gold-light);
}

.footer {
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
}

.footer__content {
  position: relative;
  padding: 5.5rem 1.5rem 3.5rem;
  border-top: 1px solid rgba(169, 129, 56, 0.13);
  background: linear-gradient(180deg, rgba(238, 225, 197, 0.2), rgba(247, 242, 232, 0));
}

.footer__content > p {
  margin-bottom: 0.65rem;
  color: var(--ink-soft);
}

.footer__content > strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
}

.footer__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2.5rem;
  color: var(--gold-light);
  font-family: "Times New Roman", var(--serif);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.footer__meta span {
  width: 1.5rem;
  height: 1px;
  background: var(--gold-light);
}

.footer__meta p {
  margin: 0;
}

.footer__team {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #f1f1f0;
}

.footer__team::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1;
  height: 0.75rem;
  background: linear-gradient(180deg, rgba(247, 242, 232, 0.72) 0%, transparent 100%);
  pointer-events: none;
}

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

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 640px) {
  .section {
    padding-block: 7rem;
  }

  .guest-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
  }

  .message-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invitation-card {
    width: min(calc(100% - 3rem), 1040px);
    border-radius: 1.5rem;
    padding-inline: 3rem;
  }

  .message-dialog__content {
    padding: 3rem 2.5rem 2.25rem;
  }

  .barrage__item {
    width: clamp(320px, 42vw, 480px);
  }
}

@media (min-width: 960px) {
  .hero {
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 46%) minmax(0, 54%);
    align-items: stretch;
    padding: 0;
  }

  .hero__media {
    grid-column: 2;
    grid-row: 1;
    height: 100%;
    min-height: 100svh;
    border-left: 0;
    box-shadow: none;
  }

  .hero__media::after {
    background: linear-gradient(
      90deg,
      rgba(247, 242, 232, 1) 0%,
      rgba(247, 242, 232, 0.82) 10%,
      rgba(247, 242, 232, 0.28) 23%,
      rgba(247, 242, 232, 0.02) 40%,
      rgba(247, 242, 232, 0.08) 100%
    );
  }

  .hero__content {
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 0;
    padding: 4.5rem 3rem 4.5rem max(2rem, calc((100vw - 1160px) / 2));
    background:
      radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.82), transparent 46%),
      var(--paper);
    text-align: left;
  }

  .site-logo,
  .hero .gold-rule {
    margin-left: 0;
  }

  .site-logo {
    margin-right: 0;
  }

  .hero__lead,
  .hero__copy,
  .hero__thanks {
    max-width: 34rem;
  }

  .guest-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .guest-card {
    min-height: 5.75rem;
  }

  .guest-card__company {
    font-size: 0.62rem;
  }

  .guest-card__name {
    font-size: 0.98rem;
  }

  .message-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .invitation-card {
    padding-block: 7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

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

  .ticker__track {
    animation: none;
    transform: none;
  }

  .barrage__track {
    animation: none;
    transform: none;
  }

  .barrage__lane {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .ticker__window {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
}
