:root {
  color-scheme: light;
  --paper: #f5f2ec;
  --paper-deep: #ebe5dc;
  --ink: #262724;
  --muted: #625f57;
  --accent: #725b47;
  --line: #c9c2b7;
  --night: #30332f;
  --light: #f7f3eb;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --panel-gutter: clamp(1.25rem, 5vw, 5rem);
  --content-width: 90rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}

[hidden] {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

button {
  font: inherit;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
}

.layout {
  width: min(100%, var(--content-width));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.status {
  max-width: var(--content-width);
  margin: 2rem auto;
  padding-inline: var(--gutter);
}

.masthead,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.masthead {
  min-height: 5rem;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  position: relative;
  flex: none;
  aspect-ratio: 3.45;
}

.brand-logo img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.masthead-logo {
  width: clamp(6rem, 24vw, 7rem);
  height: 4.25rem;
  align-self: flex-start;
  aspect-ratio: auto;
}

.masthead-logo::before {
  position: absolute;
  inset: 0;
  background: var(--paper-deep);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 0.5rem), 0 100%);
  content: "";
}

.brand {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: -0.06em;
  white-space: nowrap;
}

.brand span {
  margin-left: 0.15rem;
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  vertical-align: middle;
}

.masthead-edition,
.overline,
.meta-label,
.chapter-line,
.countdown-values span,
.footer small {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  line-height: 1.4;
}

.masthead-edition {
  text-align: right;
}

.hero {
  display: grid;
  gap: 2rem;
  align-items: stretch;
  padding-block: 2.25rem 1.5rem;
}

.hero-copy,
.hero-media,
.section > *,
.event-detail,
.rsvp-inner > * {
  min-width: 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  container-type: inline-size;
}

.overline,
.meta-label {
  color: var(--accent);
}

.overline {
  margin-bottom: clamp(2.8rem, 7vw, 6rem);
}

.hero-kicker {
  margin-bottom: 0.7rem;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 3vw, 1.4rem);
  font-style: italic;
}

.hero-names {
  display: flex;
  align-items: baseline;
  gap: 0.22em;
  width: 100%;
  font-size: clamp(2rem, 14cqi, 5.5rem);
  letter-spacing: -0.075em;
  line-height: 1;
  white-space: nowrap;
}

.hero-names .ampersand {
  color: var(--accent);
  font-size: 0.65em;
  font-style: italic;
}

.hero-meta {
  width: min(100%, 23rem);
  margin-top: clamp(3.5rem, 8vw, 6.5rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--ink);
}

.event-date {
  margin-top: 0.6rem;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.2;
}

.hero-location {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-deep);
}

.hero-media::after {
  position: absolute;
  inset: 0.9rem;
  border: 1px solid rgb(255 255 255 / 50%);
  content: "";
  pointer-events: none;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.chapter-line {
  display: flex;
  justify-content: space-between;
  padding-block: 1.8rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.chapter-line span:last-child {
  flex: none;
}

.arrow-diagonal,
.arrow-down {
  position: relative;
  display: inline-block;
  flex: none;
  width: 1rem;
  height: 1rem;
}

.arrow-diagonal::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.35rem;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(-45deg);
  content: "";
}

.arrow-diagonal::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 0.45rem;
  height: 0.45rem;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  content: "";
}

.arrow-down::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 0.85rem;
  background: currentColor;
  content: "";
}

.arrow-down::after {
  position: absolute;
  right: 0.3rem;
  bottom: 0.1rem;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  content: "";
}

.section {
  padding-block: clamp(4rem, 7vw, 7.5rem);
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: clamp(2.6rem, 5vw, 4.5rem);
}

.section-heading h2,
.location h2,
.dress-code h2,
.gifts h2 {
  max-width: 13ch;
  font-size: clamp(3rem, 7vw, 6rem);
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.section-heading > p:last-child {
  margin-top: 1.15rem;
  color: var(--muted);
}

.location h2 {
  font-size: clamp(3rem, 6vw, 5.5rem);
}

.section-kicker {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intro-message {
  max-width: 20ch;
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6.6vw, 5.5rem);
  letter-spacing: -0.052em;
  line-height: 1.18;
}

.event-details {
  display: grid;
  gap: 3rem;
}

.event-detail {
  padding-top: 1.25rem;
  border-top: 1px solid var(--ink);
}

.event-detail h3 {
  margin-block: 0.4rem 0.7rem;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  letter-spacing: -0.05em;
}

.detail-time {
  font-family: var(--serif);
  font-size: 1.65rem;
}

.detail-place {
  margin-top: 0.2rem;
  color: var(--muted);
}

.location {
  display: grid;
  gap: 2rem;
  align-items: start;
  background: var(--paper-deep);
  padding-inline: var(--panel-gutter);
}

.location-copy {
  min-width: 0;
}

.location-copy .location-name {
  margin-bottom: 0.6rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#address {
  max-width: 25ch;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.3vw, 2.5rem);
  line-height: 1.3;
}

.location-map {
  grid-column: 1 / -1;
  width: 100%;
  height: clamp(15rem, 54vw, 28rem);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
}

.location-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

#maps-link {
  display: inline-flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-self: start;
  gap: 2rem;
  min-height: 44px;
  padding-block: 0.5rem;
  border-bottom: 1px solid currentColor;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: gap 180ms ease;
}

#maps-link:hover {
  gap: 2.5rem;
}

.countdown-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.countdown-values > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--ink);
  text-align: center;
}

.countdown-values strong {
  font-family: var(--serif);
  font-size: clamp(2.35rem, 10vw, 7.5rem);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.07em;
  line-height: 1.1;
}

.countdown-values span {
  margin-top: 0.6rem;
  color: var(--accent);
}

.countdown-complete {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 4rem);
}

.dress-code {
  display: grid;
  gap: 3rem;
  align-items: start;
}

.dress-code-value {
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.7rem, 7vw, 5.5rem);
  font-style: italic;
  letter-spacing: -0.05em;
  line-height: 1.2;
}

.gallery {
  display: grid;
  gap: 3rem;
}

.gallery figure {
  min-width: 0;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  background: var(--paper-deep);
}

.rsvp {
  margin-block: 1rem;
  padding: clamp(3rem, 7vw, 7rem) var(--panel-gutter);
  color: var(--light);
  background: var(--night);
}

.rsvp-inner {
  display: grid;
  gap: 2rem;
}

.rsvp h2 {
  max-width: 12ch;
  font-size: clamp(3rem, 7.5vw, 7rem);
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.rsvp-inner > div {
  align-self: end;
}

.rsvp-inner > div > p:first-child {
  max-width: 31ch;
  margin-bottom: 2rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.7vw, 2rem);
}

.rsvp button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100%, 22rem);
  min-height: 52px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--light);
  color: var(--light);
  background: transparent;
  text-align: left;
}

.rsvp button:disabled {
  cursor: not-allowed;
}

.rsvp .note {
  max-width: 36ch;
  margin-top: 1rem;
  color: #e1d9cf;
  font-size: 0.78rem;
}

.gifts {
  display: grid;
  gap: 1rem;
}

.gifts > p {
  max-width: 35ch;
  color: var(--muted);
}

.footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}

.footer-names {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 4vw, 1.6rem);
}

.footer-brand {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.2rem 0.75rem;
}

.footer-logo {
  width: clamp(7rem, 28vw, 8rem);
}

.footer-brand small {
  grid-column: 1 / -1;
  grid-row: 2;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.footer-brand > .brand-logo,
.footer-brand > .brand {
  grid-column: 1;
  grid-row: 1;
}

.footer-social {
  display: flex;
  grid-column: 2;
  grid-row: 1;
  align-items: center;
  gap: 0.25rem;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--accent);
  transition: color 180ms ease, transform 180ms ease;
}

.footer-social-icon {
  display: block;
  width: 19px;
  height: 19px;
  background-color: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

@media (hover: hover) {
  .footer-social a:hover {
    color: var(--ink);
    transform: translateY(-2px);
  }
}

@media (max-width: 25rem) {
  .masthead {
    gap: 0.5rem;
  }
}

@media (min-width: 48rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    padding-block: 3rem;
  }

  .hero-media {
    min-height: 0;
    aspect-ratio: 4 / 5;
  }

  .location,
  .dress-code,
  .gifts {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  }

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

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
  }

  .gallery figure:only-child {
    grid-column: 1 / -1;
    width: min(100%, 35rem);
    margin-inline: auto;
  }

  .rsvp-inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 3rem;
  }

  .footer-brand {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-social {
    grid-column: 1;
    grid-row: 3;
    margin-inline-start: -0.75rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy {
    animation: appear 700ms ease-out both;
  }

  .hero-media {
    animation: appear 900ms ease-out 120ms both;
  }

  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(12px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

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

  #maps-link {
    transition: none;
  }
}
