:root {
  --ivory: #f8f6f2;
  --olive: #6f7d5c;
  --taupe: #b7a89a;
  --charcoal: #3f3a36;
  --champagne: #dccfb8;
  --cinnabar: #8e5348;
  --gold: #c4a574;
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --cn: "Noto Serif SC", "Songti SC", serif;
  --measure: 38rem;
  --page: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  position: relative;
  margin: 0;
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  background-color: #f3efe6;
  background-image: url("assets/texture-parchment.png");
  background-size: 42rem;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("assets/pattern-girih.png");
  background-size: 26rem;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

body > .cn-wash {
  z-index: 0;
}

.cn-wash {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.cn-wash img {
  position: absolute;
  height: auto;
  max-width: none;
}

.cn-cloud {
  width: min(17rem, 38vw);
  opacity: 0.15;
}

.cn-cloud-ne {
  top: 6.75rem;
  left: calc(50% + 16rem);
  width: min(13rem, 32vw);
}

.cn-cloud-mid {
  top: 36%;
  left: max(0, calc(50% - 34rem));
  width: min(18rem, 42vw);
  transform: scaleX(-1);
}

.cn-cloud-sw {
  bottom: 5%;
  left: max(0.5rem, calc(50% - 32rem));
  width: min(12rem, 30vw);
  transform: scaleX(-1);
}

.cn-xi {
  width: 7.25rem;
  opacity: 0.09;
}

.cn-xi-ne {
  top: 18%;
  right: max(0.4rem, calc(50% - 30rem));
}

.cn-xi-sw {
  bottom: 14%;
  left: max(0.8rem, calc(50% + 12rem));
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--olive);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--charcoal);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.5rem 0.75rem;
  background: var(--olive);
  color: var(--ivory);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  background: color-mix(in srgb, var(--ivory) 96%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--taupe) 45%, transparent);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--charcoal);
  text-transform: lowercase;
}

.xi-wordmark {
  font-size: 0.82rem;
  color: var(--gold);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--taupe);
  background: transparent;
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
}

.site-nav {
  display: flex;
  gap: 1.15rem;
}

.site-nav a {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--charcoal);
}

.site-nav a:hover {
  color: var(--olive);
}

.hero {
  max-width: 34rem;
  margin: 0 auto;
  padding: 2.4rem 1rem 1.5rem;
  text-align: center;
  scroll-margin-top: 4.5rem;
}

.invitation {
  position: relative;
  isolation: isolate;
  background: none;
  border: 0;
  padding: 0;
  box-shadow: 0 22px 50px color-mix(in srgb, var(--charcoal) 12%, transparent);
}

.invitation-art {
  display: block;
  width: 100%;
  height: auto;
}

.invitation-veil {
  position: absolute;
  z-index: 1;
  top: 10.2%;
  left: 8.8%;
  right: 8.8%;
  bottom: 5.8%;
  pointer-events: none;
  background: radial-gradient(
    78% 70% at 50% 44%,
    color-mix(in srgb, var(--ivory) 76%, transparent) 0%,
    color-mix(in srgb, var(--ivory) 54%, transparent) 58%,
    color-mix(in srgb, var(--ivory) 30%, transparent) 100%
  );
  clip-path: polygon(
    4.5% 100%,
    4.5% 33%,
    7% 21%,
    16% 12%,
    28% 7%,
    50% 3.4%,
    72% 7%,
    84% 12%,
    93% 21%,
    95.5% 33%,
    95.5% 100%
  );
}

.invitation-copy {
  position: absolute;
  z-index: 2;
  top: 15%;
  left: 16%;
  right: 16%;
  bottom: 13%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-shadow: 0 0 1.15rem color-mix(in srgb, var(--ivory) 88%, transparent);
}

.xi {
  font-family: var(--cn);
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
}

.xi-apex {
  position: absolute;
  z-index: 3;
  top: 4.6%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.95rem;
  color: var(--gold);
  text-shadow: 0 0 0.4rem color-mix(in srgb, var(--ivory) 70%, transparent);
}

.xi-names {
  display: block;
  font-size: 1.2rem;
  margin: 0.4rem auto 0.25rem;
  color: var(--gold);
}

.eyebrow,
.section-kicker,
.tag,
.time {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive);
}

.branch {
  width: 11rem;
  height: 1.6rem;
  margin: 1.1rem auto;
  display: block;
  color: var(--olive);
}

.hero h1,
section h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 0.3rem 0;
}

.hero h1 {
  font-size: clamp(1.85rem, 5.4vw, 2.65rem);
  line-height: 1.12;
  font-weight: 400;
}

.lede {
  font-family: var(--serif);
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  font-style: italic;
  color: color-mix(in srgb, var(--charcoal) 82%, var(--taupe));
  margin: 0.7rem 0 1.1rem;
}

.when {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  margin: 0 0 0.2rem;
}

.where {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: color-mix(in srgb, var(--charcoal) 75%, var(--taupe));
}

.tag {
  margin-bottom: 1.15rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.45rem;
  background: var(--olive);
  color: var(--ivory);
  text-decoration: none;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.68rem;
  border: 1px solid var(--olive);
}

.btn:hover {
  background: transparent;
  color: var(--olive);
}

.btn[aria-disabled="true"] {
  cursor: default;
  opacity: 0.78;
}

.btn[aria-disabled="true"]:hover {
  background: var(--olive);
  color: var(--ivory);
}

section {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4.2rem 1.5rem;
  text-align: center;
  border-top: 1px solid color-mix(in srgb, var(--champagne) 80%, var(--taupe));
}

.section-kicker {
  margin: 0;
}

section h2 {
  font-size: 2.35rem;
}

section h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  margin: 0 0 0.4rem;
}

.place-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
}

.venue-view {
  margin: 1.6rem 0 0.4rem;
  border: 1px solid var(--champagne);
  overflow: hidden;
  line-height: 0;
}

.venue-view img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 15.5rem;
  object-fit: cover;
  object-position: center 45%;
}

.note,
.quiet {
  color: var(--taupe);
  font-size: 0.95rem;
}

.timeline {
  list-style: none;
  margin: 2rem 0 1rem;
  padding: 0;
  text-align: left;
}

.timeline li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--champagne) 85%, var(--taupe));
  align-items: baseline;
}

.event {
  font-family: var(--serif);
  font-size: 1.35rem;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin: 1rem auto 0.4rem;
  color: var(--olive);
  width: min(18rem, 90%);
}

.ornament svg {
  width: 2.15rem;
  height: 1.1rem;
  flex: none;
}

.xi-ornament {
  font-size: 0.95rem;
  color: var(--gold);
  flex: none;
  line-height: 1;
}

.ornament-girih {
  width: min(22rem, 92%);
  gap: 0;
  margin-top: 1rem;
  margin-bottom: 0.2rem;
}

.ornament-girih .motif-divider {
  flex: 1;
  width: auto;
  min-width: 0;
  height: auto;
  margin: 0;
}

.ornament-star {
  width: 1.15rem !important;
  height: 1.15rem !important;
}

.ornament > span:not(.xi) {
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--olive) 45%, var(--champagne));
}

.flip {
  transform: scaleX(-1);
}

.motif {
  display: block;
  margin-inline: auto;
  pointer-events: none;
  user-select: none;
}

.motif-divider {
  width: min(22rem, 92%);
  height: auto;
  margin: 1.05rem auto 0.35rem;
  opacity: 0.92;
}

.motif-star {
  width: 4.4rem;
  height: auto;
  margin: 1.15rem auto 1.1rem;
  opacity: 0.92;
}

.motif-xi-tassel {
  width: 3rem;
  height: auto;
  margin: 0.15rem auto 0.85rem;
}

.motif-arch {
  width: 7.5rem;
  height: auto;
  margin: 0.15rem auto 0.2rem;
  opacity: 0.88;
}

.panel {
  position: relative;
  margin-top: 2rem;
  padding: 1.55rem 1.6rem 1.5rem;
  border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--champagne));
  background:
    url("assets/lentil-nw.png") top 0.12rem left 0.12rem / 1.68rem auto no-repeat,
    url("assets/lentil-ne.png") top 0.12rem right 0.12rem / 1.68rem auto no-repeat,
    url("assets/lentil-sw.png") bottom 0.12rem left 0.12rem / 1.68rem auto no-repeat,
    url("assets/lentil-se.png") bottom 0.12rem right 0.12rem / 1.68rem auto no-repeat,
    color-mix(in srgb, var(--champagne) 18%, var(--ivory));
  text-align: left;
}

.rsvp .btn {
  margin: 0.6rem 0 1rem;
}

.faq {
  text-align: left;
  margin: 2rem 0 0;
}

.faq > div {
  padding: 1.1rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--champagne) 85%, var(--taupe));
}

.faq dt {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.faq dd {
  margin: 0;
}

.site-footer {
  padding: 3rem 1.5rem 4rem;
  text-align: center;
  color: var(--olive);
  font-family: var(--serif);
  font-size: 1.15rem;
}

.site-footer p {
  margin: 0.15rem 0;
}

.footer-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}

.footer-xi {
  width: 1.35rem;
  height: auto;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--taupe);
    padding: 0.5rem 0 0.8rem;
  }

  .site-header.is-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 0.7rem 1.5rem;
  }

  .hero {
    padding: 1.2rem 0.7rem 0.8rem;
  }

  .invitation-copy {
    top: 16%;
    left: 14%;
    right: 14%;
    bottom: 12%;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .panel {
    padding: 1.65rem 1.5rem 1.55rem;
    background-size: 1.38rem auto, 1.38rem auto, 1.38rem auto, 1.38rem auto;
  }

  .cn-cloud-mid {
    display: none;
  }

  .cn-cloud-ne,
  .cn-cloud-sw {
    opacity: 0.12;
    width: 9rem;
  }

  .cn-xi {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
