:root {
  --paper: #f4efe7;
  --paper-deep: #e8ded0;
  --ink: #342b28;
  --muted: #6b5d57;
  --terracotta: #b65c27;
  --terracotta-dark: #8f3f18;
  --blue: #a9c4cd;
  --gold: #bd8f4e;
  --white: #fffdf9;
  --serif: "Noto Serif TC", serif;
  --sans: "Noto Sans TC", sans-serif;
  --script: "Cormorant Garamond", serif;
  --shadow: 0 24px 70px rgb(61 42 29 / 14%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  line-height: 1.8;
}

body::before {
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: .16;
  background-image: url("assets/paper.jpg");
  background-size: 720px auto;
  mix-blend-mode: multiply;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--terracotta-dark);
  outline-offset: 3px;
}

.hero :focus-visible,
.finale :focus-visible,
.countdown-section :focus-visible {
  outline-color: var(--white);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 6vw, 4.6rem);
  font-weight: 500;
  line-height: 1.35;
}

.section-inner {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.eyebrow {
  margin-bottom: 1rem;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.eyebrow.accent {
  color: var(--terracotta-dark);
}

.hero {
  position: relative;
  min-height: min(92svh, 880px);
  overflow: hidden;
  color: var(--white);
  background: #594a43;
}

.hero__image,
.hero__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  object-fit: cover;
  object-position: center 45%;
  animation: hero-scale 14s ease-out both;
}

.hero__veil {
  background: linear-gradient(180deg, rgb(30 23 21 / 10%) 28%, rgb(30 20 17 / 72%) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: min(92svh, 880px);
  flex-direction: column;
  justify-content: flex-end;
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
  padding-bottom: clamp(5rem, 12vh, 8rem);
}

.hero__names {
  display: flex;
  align-items: center;
  gap: clamp(.5rem, 2vw, 2rem);
  margin-bottom: 1rem;
  font-family: var(--script);
  font-size: clamp(4.4rem, 14vw, 10rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  line-height: .7;
}

.hero__names i {
  color: #f2c1a1;
  font-size: .55em;
  font-weight: 400;
}

.hero__date {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.hero__date strong {
  font-family: var(--script);
  font-size: 2.8rem;
  font-weight: 400;
  letter-spacing: 0;
}

.scroll-cue {
  position: absolute;
  z-index: 2;
  right: 32px;
  bottom: 32px;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--white);
  font-family: var(--sans);
  font-size: .62rem;
  letter-spacing: .18em;
  text-decoration: none;
  text-transform: uppercase;
}

.scroll-cue svg {
  width: 16px;
  animation: bob 1.8s ease-in-out infinite;
}

.paper-section {
  position: relative;
  overflow: hidden;
  background-color: var(--paper);
  background-image: radial-gradient(circle at 16% 24%, rgb(182 92 39 / 7%) 0 1px, transparent 2px), radial-gradient(circle at 78% 68%, rgb(169 196 205 / 16%) 0 1px, transparent 2px);
  background-size: 28px 28px, 36px 36px;
}

.invitation {
  min-height: 74svh;
}

.invitation__inner {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 74svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: 7rem;
  text-align: center;
}

.invitation__copy {
  margin: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 2.2;
}

.monogram {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  color: var(--terracotta-dark);
  font-size: 1.15rem;
  letter-spacing: .16em;
}

.monogram i {
  color: var(--terracotta);
  font-size: .72rem;
}

.pressed-flower {
  position: absolute;
  z-index: 1;
  width: clamp(190px, 27vw, 380px);
  pointer-events: none;
}

.pressed-flower--left {
  left: max(-80px, -5vw);
  bottom: -60px;
  rotate: -13deg;
}

.pressed-flower--right {
  right: max(-70px, -4vw);
  top: -70px;
  rotate: 168deg;
}

.date-section {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--blue);
}

.date-grid {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(380px, 1.15fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
}

.date-card {
  padding: clamp(2rem, 4vw, 4rem);
  background: var(--white);
  box-shadow: var(--shadow);
}

.date-card__calendar {
  display: grid;
  width: min-content;
  margin: 2.2rem 0;
  color: var(--terracotta-dark);
  line-height: 1;
}

.date-card__calendar span {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .2em;
}

.date-card__calendar strong {
  font-family: var(--script);
  font-size: 6.5rem;
  font-weight: 400;
}

.date-card h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.photo-frame {
  margin: 0;
}

.photo-frame img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.photo-frame figcaption,
.gallery-feature figcaption {
  margin-top: 1rem;
  color: rgb(52 43 40 / 70%);
  font-family: var(--script);
  font-size: 1.25rem;
  font-style: italic;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-top: 2rem;
}

.button-row--center {
  justify-content: center;
}

.button,
.icon-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: .82rem;
  letter-spacing: .06em;
  text-decoration: none;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}

.button {
  padding: .75rem 1.25rem;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-2px);
}

.button svg,
.icon-button svg {
  width: 18px;
}

.button--primary {
  color: var(--white);
  background: var(--terracotta-dark);
}

.button--ghost {
  border-color: rgb(52 43 40 / 28%);
  color: var(--ink);
  background: transparent;
}

.button--light {
  color: var(--ink);
  background: var(--white);
}

.button--outline-light {
  border-color: rgb(255 255 255 / 55%);
  color: var(--white);
}

.button--large {
  min-height: 56px;
  padding-inline: 2.2rem;
  font-size: .92rem;
}

.icon-button {
  width: 46px;
  padding: 0;
  border-color: rgb(52 43 40 / 22%);
  color: var(--ink);
  background: transparent;
}

.calendar-menu {
  position: relative;
}

.calendar-menu__list {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  left: 0;
  min-width: 218px;
  padding: .3rem;
  border: 1px solid var(--paper-deep);
  background: var(--white);
  box-shadow: var(--shadow);
}

.calendar-menu__list[hidden] {
  display: none;
}

.calendar-menu__list > * {
  display: flex;
  width: 100%;
  align-items: center;
  gap: .6rem;
  padding: .7rem .8rem;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-family: var(--sans);
  font-size: .82rem;
  text-align: left;
  text-decoration: none;
}

.calendar-menu__list > *:hover {
  background: var(--paper);
}

.calendar-menu__list svg {
  width: 17px;
  color: var(--terracotta-dark);
}

.countdown-section {
  color: var(--white);
  background: var(--terracotta-dark);
}

.countdown {
  padding-block: 4.5rem;
  text-align: center;
}

.countdown__units {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 760px;
  margin: 2rem auto 0;
}

.countdown__units div {
  position: relative;
  display: grid;
  gap: .2rem;
}

.countdown__units div + div::before {
  position: absolute;
  left: 0;
  top: 20%;
  width: 1px;
  height: 60%;
  background: rgb(255 255 255 / 24%);
  content: "";
}

.countdown__units strong {
  font-family: var(--script);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: 1;
}

.countdown__units span {
  font-family: var(--sans);
  font-size: .65rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.timeline-section {
  padding: clamp(5rem, 10vw, 9rem) 0;
}

.timeline-section .section-inner {
  max-width: 820px;
}

.timeline {
  margin-top: 3rem;
}

.timeline__item {
  display: grid;
  grid-template-columns: 90px 48px 1fr;
  gap: 1.2rem;
  align-items: start;
  padding: 1.5rem 0;
}

.timeline__time {
  padding-top: .55rem;
  color: var(--terracotta-dark);
  font-family: var(--script);
  font-size: 2rem;
}

.timeline__mark {
  position: relative;
  z-index: 1;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--terracotta);
  border-radius: 50%;
  color: var(--terracotta);
  background: var(--paper);
}

.timeline__mark svg {
  width: 19px;
}

.timeline__item:not(:last-child) .timeline__mark::after {
  position: absolute;
  z-index: -1;
  top: 47px;
  width: 1px;
  height: 88px;
  background: var(--terracotta);
  content: "";
}

.timeline__item h3 {
  margin-bottom: .2rem;
  font-size: 1.3rem;
  font-weight: 500;
}

.timeline__item p {
  margin-bottom: 0;
  color: var(--muted);
}

.venue-section {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--white);
}

.venue-section > .section-inner {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 3rem 6rem;
}

.venue-heading address {
  color: var(--muted);
  font-style: normal;
}

.venue-name {
  margin-bottom: .5rem;
  color: var(--terracotta-dark);
  font-size: 1.2rem;
}

.transport {
  align-self: start;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--paper-deep);
}

.segmented-control button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 0;
  border-radius: 2px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-family: var(--sans);
  font-size: .78rem;
}

.segmented-control button[aria-selected="true"] {
  color: var(--terracotta-dark);
  background: var(--white);
  box-shadow: 0 3px 12px rgb(61 42 29 / 9%);
}

.segmented-control svg {
  width: 17px;
}

.transport__panel {
  padding: 2rem 1rem 0;
}

.transport__panel article {
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--paper-deep);
}

.transport__panel article + article {
  padding-top: 1.2rem;
}

.transport__panel h3 {
  margin-bottom: .25rem;
  color: var(--terracotta-dark);
  font-size: 1rem;
  font-weight: 600;
}

.transport__panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .9rem;
}

.transport details {
  margin-top: 1.2rem;
}

.transport summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--terracotta-dark);
  cursor: pointer;
  font-family: var(--sans);
  font-size: .85rem;
  list-style: none;
}

.transport summary::-webkit-details-marker {
  display: none;
}

.transport summary svg {
  width: 18px;
  transition: rotate .2s ease;
}

.transport details[open] summary svg {
  rotate: 180deg;
}

.transport details p {
  margin-top: .8rem;
}

.parking-list {
  display: grid;
  gap: .8rem;
  margin: 0;
  padding-left: 1.4rem;
  color: var(--muted);
}

.map-frame {
  grid-column: 1 / -1;
  margin: 2rem 0 0;
  padding: clamp(1rem, 3vw, 2rem);
  background: var(--paper);
}

.map-frame img {
  width: min(100%, 760px);
  margin-inline: auto;
}

.gallery-section {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--paper-deep);
}

.gallery-feature {
  position: relative;
  width: min(850px, 100%);
  margin: 3rem 0 0 auto;
}

.gallery-feature img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.rsvp-section {
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--paper);
  text-align: center;
}

.rsvp {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.rsvp__copy {
  margin-bottom: 2.4rem;
  color: var(--muted);
}

.finale {
  position: relative;
  display: grid;
  min-height: 88svh;
  place-items: center;
  overflow: hidden;
  color: var(--white);
  text-align: center;
}

.finale > img,
.finale__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.finale > img {
  object-fit: cover;
  object-position: center 58%;
}

.finale__veil {
  background: linear-gradient(180deg, rgb(49 38 38 / 16%), rgb(49 38 38 / 65%));
}

.finale__content {
  position: relative;
  z-index: 1;
  padding: 2rem;
  text-shadow: 0 2px 20px rgb(0 0 0 / 25%);
}

.finale__content h2 {
  margin-bottom: .5rem;
}

.finale__content .button {
  text-shadow: none;
}

footer {
  padding: 3rem 1.5rem;
  color: var(--white);
  background: var(--ink);
  text-align: center;
}

footer a {
  font-family: var(--script);
  font-size: 2rem;
  font-style: italic;
  text-decoration: none;
}

footer a span {
  color: #e7a77b;
}

footer p {
  margin: .5rem 0 0;
  color: rgb(255 255 255 / 55%);
  font-family: var(--sans);
  font-size: .66rem;
  letter-spacing: .12em;
}

.toast {
  position: fixed;
  z-index: 30;
  right: 20px;
  bottom: 20px;
  padding: .8rem 1rem;
  border-radius: 2px;
  color: var(--white);
  background: var(--ink);
  box-shadow: var(--shadow);
  font-family: var(--sans);
  font-size: .8rem;
  opacity: 0;
  pointer-events: none;
  translate: 0 10px;
  transition: opacity .2s ease, translate .2s ease;
}

.toast.is-visible {
  opacity: 1;
  translate: 0;
}

.js .observe {
  opacity: 0;
  translate: 0 28px;
  transition: opacity .8s ease, translate .8s ease;
}

.js .observe.is-visible {
  opacity: 1;
  translate: 0;
}

.js .reveal {
  opacity: 0;
  animation: reveal-up .9s cubic-bezier(.2, .7, .2, 1) forwards;
}

.hero__names.reveal {
  animation-delay: .2s;
}

.hero__date.reveal {
  animation-delay: .4s;
}

@keyframes reveal-up {
  from { opacity: 0; translate: 0 24px; }
  to { opacity: 1; translate: 0; }
}

@keyframes hero-scale {
  from { scale: 1.06; }
  to { scale: 1; }
}

@keyframes bob {
  0%, 100% { translate: 0 -2px; }
  50% { translate: 0 4px; }
}

@media (max-width: 800px) {
  .hero {
    min-height: 84svh;
  }

  .hero__content {
    min-height: 84svh;
  }

  .hero__image {
    object-position: 52% center;
  }

  .hero__names {
    flex-wrap: wrap;
    row-gap: 1rem;
  }

  .hero__names span:last-child {
    flex-basis: 100%;
  }

  .hero__date {
    flex-wrap: wrap;
    gap: .5rem 1rem;
  }

  .scroll-cue {
    right: 20px;
    bottom: 20px;
  }

  .date-grid,
  .venue-section > .section-inner {
    grid-template-columns: 1fr;
  }

  .date-card {
    position: relative;
    z-index: 1;
  }

  .photo-frame--stairs {
    margin-top: -2rem;
    margin-left: 2rem;
  }

  .venue-section > .section-inner {
    gap: 3rem;
  }

  .map-frame {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .section-inner {
    width: min(100% - 28px, 1120px);
  }

  .hero__content {
    width: min(100% - 28px, 1120px);
    padding-bottom: 5.5rem;
  }

  .hero__names {
    font-size: 4.6rem;
  }

  .hero__date span:last-child {
    flex-basis: 100%;
  }

  .pressed-flower--left {
    opacity: .6;
  }

  .date-card__calendar strong {
    font-size: 5.5rem;
  }

  .countdown__units strong {
    font-size: 2.7rem;
  }

  .countdown__units span {
    font-size: .56rem;
    letter-spacing: .08em;
  }

  .timeline__item {
    grid-template-columns: 64px 40px 1fr;
    gap: .65rem;
  }

  .timeline__time {
    font-size: 1.6rem;
  }

  .timeline__mark {
    width: 40px;
    height: 40px;
  }

  .timeline__item:not(:last-child) .timeline__mark::after {
    top: 39px;
    height: 104px;
  }

  .segmented-control button {
    flex-direction: column;
    padding: .45rem .2rem;
    line-height: 1.3;
  }

  .calendar-menu,
  .calendar-menu > .button {
    width: 100%;
  }

  .calendar-menu__list {
    right: 0;
    left: 0;
    min-width: 0;
  }

  .transport__panel {
    padding-inline: .25rem;
  }

  .finale {
    min-height: 80svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}