:root {
  --paper: #f4efe4;
  --paper-deep: #e8ddca;
  --ink: #221f1c;
  --muted: #6c665d;
  --sage: #47664f;
  --sage-dark: #2f4a39;
  --blush: #d7aaa0;
  --gold: #a87836;
  --white: #fffaf1;
  --shadow: 0 22px 60px rgba(60, 45, 28, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 8%, rgba(71, 102, 79, 0.12), transparent 22rem),
    radial-gradient(circle at 88% 74%, rgba(215, 170, 160, 0.16), transparent 18rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.48) 0 25%, transparent 25% 50%, rgba(255, 255, 255, 0.28) 50% 75%, transparent 75%),
    var(--paper);
  background-size: auto, auto, 18px 18px, auto;
  font-family: "Songti SC", "Noto Serif SC", "STSong", "Times New Roman", serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(70, 55, 35, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 55, 35, 0.035) 1px, transparent 1px);
  background-size: 5px 5px;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  gap: clamp(10px, 2.2vw, 28px);
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 5vw, 64px);
  background: rgba(244, 239, 228, 0.78);
  border-bottom: 1px solid rgba(47, 74, 57, 0.13);
  backdrop-filter: blur(16px);
}

.brand {
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0;
}

nav {
  display: flex;
  gap: clamp(12px, 3vw, 34px);
  align-items: center;
  color: var(--sage-dark);
  font-family: "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  font-size: 14px;
}

nav a {
  text-decoration: none;
}

.language-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0;
  padding: 4px 7px;
  background: rgba(255, 250, 241, 0.54);
  border: 1px solid rgba(168, 120, 54, 0.24);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(60, 45, 28, 0.05);
}

.language-switch button {
  position: relative;
  min-width: 36px;
  min-height: 26px;
  padding: 4px 8px;
  color: rgba(47, 74, 57, 0.68);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: "Avenir Next", "PingFang SC", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  transition: color 180ms ease;
}

.language-switch button + button {
  border-left: 1px solid rgba(168, 120, 54, 0.25);
}

.language-switch button.is-active {
  color: var(--sage-dark);
}

.language-switch button.is-active::after {
  position: absolute;
  right: 9px;
  bottom: 2px;
  left: 9px;
  height: 1px;
  content: "";
  background: var(--gold);
  border-radius: 999px;
}

.language-switch button:hover {
  color: var(--sage-dark);
}

.nav-rsvp {
  padding: 9px 14px;
  color: var(--white);
  background: var(--sage-dark);
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 100svh;
  padding: 88px 20px 42px;
  overflow: hidden;
}

.hero-inner {
  width: min(100%, 760px);
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--sage-dark);
  font-family: "Avenir Next", "PingFang SC", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.photo-arch {
  width: min(70vw, 360px);
  aspect-ratio: 0.72;
  margin: 0 auto 18px;
  overflow: hidden;
  border: 8px solid rgba(255, 250, 241, 0.78);
  border-bottom-width: 12px;
  border-radius: 48% 48% 6px 6px / 28% 28% 6px 6px;
  box-shadow: var(--shadow);
  background: var(--paper-deep);
}

.photo-arch picture,
.photo-arch img {
  width: 100%;
  height: 100%;
  display: block;
}

.photo-arch img {
  object-fit: cover;
  object-position: center center;
}

.soft-line {
  margin: 0 0 8px;
  font-size: clamp(18px, 3vw, 25px);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 8vw, 78px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 span {
  color: var(--gold);
  font-size: 0.72em;
}

.date-line {
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: clamp(18px, 3vw, 26px);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 460px);
  margin: 0 auto 26px;
}

.countdown div {
  padding: 14px 10px 12px;
  background: rgba(255, 250, 241, 0.7);
  border: 1px solid rgba(71, 102, 79, 0.16);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(60, 45, 28, 0.08);
}

.countdown strong {
  display: block;
  color: var(--sage-dark);
  font-family: "Avenir Next", Arial, sans-serif;
  font-size: clamp(26px, 6vw, 42px);
  line-height: 1;
}

.countdown span {
  color: var(--muted);
  font-family: "PingFang SC", Arial, sans-serif;
  font-size: 13px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid var(--sage-dark);
  border-radius: 999px;
  cursor: pointer;
  font-family: "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-action {
  color: var(--white);
  background: var(--sage-dark);
  box-shadow: 0 12px 26px rgba(47, 74, 57, 0.22);
}

.secondary-action {
  color: var(--sage-dark);
  background: rgba(255, 250, 241, 0.64);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(47, 74, 57, 0.18);
}

.leaf {
  position: absolute;
  width: clamp(150px, 24vw, 250px);
  height: clamp(190px, 32vw, 310px);
  opacity: 0.84;
  pointer-events: none;
  background-image: url("assets/foliage-cutout.png");
  background-image: image-set(
    url("assets/foliage-cutout.webp") type("image/webp"),
    url("assets/foliage-cutout.png") type("image/png")
  );
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  mix-blend-mode: normal;
  filter: brightness(1.02) saturate(1.08) contrast(1.06);
}

.leaf-left {
  top: 96px;
  left: max(-48px, 2vw);
  transform: scaleX(-1) rotate(-7deg);
}

.section {
  padding: clamp(46px, 7vw, 82px) clamp(20px, 6vw, 76px);
}

.section-heading {
  width: min(100%, 900px);
  margin: 0 auto 30px;
  text-align: center;
}

h2 {
  margin: 0;
  font-size: clamp(32px, 6vw, 58px);
  font-weight: 500;
}

.timeline,
.info-grid,
.rsvp-layout {
  width: min(100%, 980px);
  margin: 0 auto;
}

.timeline {
  display: grid;
  gap: 18px;
}

.event-card,
.info-card,
.survey-card,
.rsvp-copy {
  background: rgba(255, 250, 241, 0.72);
  border: 1px solid rgba(71, 102, 79, 0.16);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(60, 45, 28, 0.08);
}

.event-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: clamp(20px, 4vw, 32px);
}

.time {
  color: var(--gold);
  font-family: "Avenir Next", Arial, sans-serif;
  font-size: clamp(30px, 6vw, 48px);
  font-weight: 700;
  line-height: 1;
}

h3 {
  margin: 0 0 8px;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 500;
}

.event-card p,
.info-card p,
.rsvp-copy p,
.site-footer p {
  margin: 0;
  color: var(--muted);
  font-family: "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.8;
}

.muted {
  margin-top: 8px !important;
}

.map-link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--sage-dark);
  font-family: "PingFang SC", Arial, sans-serif;
  font-weight: 700;
  text-underline-offset: 5px;
}

.guest-section {
  background: rgba(255, 250, 241, 0.28);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.info-card {
  padding: clamp(22px, 4vw, 34px);
}

.info-card.wide {
  grid-column: 1 / -1;
}

.rsvp-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
  width: min(100%, 900px);
}

.rsvp-copy {
  padding: clamp(22px, 4vw, 34px);
}

.rsvp-copy {
  position: static;
}

.rsvp-copy h2 {
  margin-bottom: 18px;
}

.rsvp-copy .secondary-action {
  margin-top: 24px;
}

.survey-card {
  padding: clamp(22px, 4vw, 34px);
}

.rsvp-form {
  display: grid;
  gap: 18px;
  font-family: "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

.attending-fields {
  display: grid;
  gap: 18px;
}

.attending-fields.is-disabled {
  opacity: 0.54;
}

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

.form-field span,
.form-fieldset legend {
  color: var(--sage-dark);
  font-size: 15px;
  font-weight: 700;
}

.form-field input,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(47, 74, 57, 0.18);
  border-radius: 8px;
  font: inherit;
  line-height: 1.5;
}

.form-field textarea {
  min-height: 112px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: rgba(47, 74, 57, 0.58);
  box-shadow: 0 0 0 3px rgba(71, 102, 79, 0.12);
  outline: none;
}

.form-fieldset {
  display: grid;
  gap: 11px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.option-grid label {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(47, 74, 57, 0.14);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.35;
}

.option-grid input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--sage-dark);
  flex: 0 0 auto;
}

.companion-field {
  margin-top: 2px;
}

.hotel-details {
  display: grid;
  gap: 16px;
  margin-top: 4px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(47, 74, 57, 0.12);
  border-radius: 8px;
}

.is-hidden {
  display: none;
}

.inline-link {
  color: var(--sage-dark);
  font-weight: 700;
  text-underline-offset: 4px;
}

.form-note {
  margin: -2px 0 1px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.form-submit {
  width: 100%;
  border: 0;
}

.form-submit:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.form-status {
  min-height: 28px;
  margin: 0;
  color: var(--sage-dark);
  font-family: "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.form-status[data-type="error"] {
  color: #8a3d2f;
}

.form-status[data-type="success"] {
  color: var(--sage-dark);
}

.site-footer {
  padding: 30px 20px 42px;
  text-align: center;
}

@media (max-width: 760px) {
  .site-header {
    padding: 13px 16px;
  }

  nav {
    gap: 10px;
    font-size: 13px;
  }

  .brand {
    max-width: 132px;
    font-size: 18px;
  }

  .language-switch button {
    min-width: 34px;
    padding-inline: 7px;
  }

  .hero {
    padding-top: 82px;
  }

  .photo-arch {
    width: min(78vw, 330px);
  }

  h1 {
    font-size: clamp(34px, 8vw, 54px);
    line-height: 1.12;
  }

  h2 {
    font-size: clamp(28px, 7vw, 42px);
    line-height: 1.2;
  }

  h3 {
    font-size: clamp(20px, 5vw, 28px);
  }

  .soft-line {
    font-size: 18px;
  }

  .date-line {
    font-size: 18px;
  }

  .event-card {
    grid-template-columns: 1fr;
  }

  .info-grid,
  .rsvp-layout {
    grid-template-columns: 1fr;
  }

  .rsvp-copy {
    position: static;
    padding: 22px 18px;
  }

  .option-grid-three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .site-header {
    padding: 12px 14px;
  }

  .brand {
    max-width: 112px;
    font-size: 16px;
  }

  nav {
    font-size: 12px;
  }

  .language-switch {
    padding: 3px 5px;
  }

  .language-switch button {
    min-width: 31px;
    min-height: 24px;
    padding-inline: 6px;
    font-size: 11px;
  }

  .section {
    padding: 36px 14px;
  }

  .hero {
    padding: 76px 16px 34px;
  }

  .eyebrow {
    font-size: 11px;
  }

  .photo-arch {
    width: min(76vw, 292px);
    margin-bottom: 14px;
    border-width: 7px;
    border-bottom-width: 10px;
  }

  .soft-line {
    margin-bottom: 6px;
    font-size: 16px;
  }

  h1 {
    font-size: clamp(31px, 8.4vw, 38px);
    line-height: 1.14;
  }

  h1 span {
    font-size: 0.62em;
  }

  .date-line {
    margin: 10px 0 14px;
    font-size: 16px;
  }

  .rsvp-section {
    padding-inline: 10px;
  }

  .rsvp-layout {
    gap: 14px;
  }

  .rsvp-copy h2 {
    margin-bottom: 12px;
    font-size: clamp(25px, 7.2vw, 31px);
    line-height: 1.2;
  }

  .rsvp-copy p {
    font-size: 14px;
    line-height: 1.75;
  }

  .survey-card {
    border-radius: 8px;
    padding: 22px 18px;
  }

  .rsvp-form {
    gap: 15px;
  }

  .attending-fields {
    gap: 15px;
  }

  .form-field span,
  .form-fieldset legend {
    font-size: 14px;
  }

  .option-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .option-grid label,
  .form-field input,
  .form-field textarea {
    font-size: 14px;
  }

  .form-note,
  .form-status {
    font-size: 13px;
  }

  nav a:not(.nav-rsvp) {
    display: none;
  }

  .countdown {
    gap: 7px;
  }

  .countdown div {
    padding-inline: 6px;
  }
}
