:root {
  --ink: #20211f;
  --muted: #636760;
  --charcoal: #1b1c19;
  --charcoal-soft: #2c2f2a;
  --sage: #68745f;
  --sage-deep: #435247;
  --sage-soft: #eef1ec;
  --sage-pale: #f6f7f3;
  --pearl: #fbfbfa;
  --pearl-deep: #f0f2ee;
  --silver: #d8ddd6;
  --champagne: #9d9688;
  --pink: var(--sage);
  --pink-deep: var(--charcoal);
  --pink-soft: var(--sage-pale);
  --pink-pale: var(--sage-soft);
  --green: var(--sage-deep);
  --mint: var(--pearl-deep);
  --gold: var(--champagne);
  --white: #ffffff;
  --line: var(--silver);
  --shadow: 0 16px 44px rgba(32, 33, 31, 0.11);
  --soft-shadow: 0 10px 30px rgba(32, 33, 31, 0.08);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.invitation-locked,
body.invitation-locked {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  padding-bottom: 86px;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(32, 33, 31, 0.026) 1px, transparent 1px),
    linear-gradient(180deg, rgba(32, 33, 31, 0.018) 1px, transparent 1px),
    var(--sage-pale);
  background-size: 42px 42px;
  font-family: var(--sans);
  line-height: 1.68;
}

body.invitation-locked {
  position: fixed;
  inset: 0;
  width: 100%;
  touch-action: none;
}

body.invitation-locked .hero {
  min-height: 100svh;
}

body.invitation-locked .top-nav,
body.invitation-locked .audio-toggle {
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.audio-toggle {
  position: fixed;
  right: 14px;
  bottom: 78px;
  z-index: 30;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--white);
  background: rgba(27, 28, 25, 0.94);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: 90svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
  background: var(--pink-deep);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  inset: 14px;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 0 0 1px rgba(27, 28, 25, 0.32);
}

.hero::after {
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 4;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
}

.hero-photo {
  position: absolute;
  inset: 0;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(27, 28, 25, 0.08), rgba(27, 28, 25, 0.84)),
    linear-gradient(90deg, rgba(27, 28, 25, 0.34), transparent 38%, rgba(27, 28, 25, 0.22));
}

.hero-photo img,
.hero-photo .photo-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo .hero-image {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 142%;
  max-width: none;
  object-position: center bottom;
}

.top-nav {
  position: fixed;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background: rgba(251, 251, 250, 0.94);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(12px);
}

.top-nav a {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 8px;
  color: var(--pink-deep);
  background: linear-gradient(180deg, var(--white), var(--pearl));
  font-size: 0.76rem;
  font-weight: 800;
}

.hero-content {
  position: relative;
  z-index: 5;
  width: min(560px, 100%);
  padding: 108px 20px 62px;
  margin: 0 auto;
  text-align: center;
}

.hero-content::before {
  content: "Ar & Az";
  display: inline-grid;
  place-items: center;
  min-width: 96px;
  min-height: 34px;
  margin: 0 auto 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 700;
}

.eyebrow,
.section-kicker,
.role,
.event-name {
  margin: 0 0 8px;
  color: var(--pink);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: var(--white);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  line-height: 1.05;
  font-weight: 700;
}

h1 {
  font-size: 3rem;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.34);
}

h2 {
  font-size: 2.18rem;
  color: var(--pink-deep);
}

h3 {
  font-size: 1.58rem;
  color: var(--pink-deep);
}

.quote {
  max-width: 470px;
  margin: 18px auto 26px;
  color: rgba(255, 255, 255, 0.93);
  font-size: 0.98rem;
}

.guest-card {
  position: relative;
  display: grid;
  gap: 4px;
  overflow: hidden;
  width: min(100%, 360px);
  margin: 0 auto 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  padding: 18px 16px;
  color: var(--pink-deep);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 247, 243, 0.94));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.guest-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(104, 116, 95, 0.24);
  pointer-events: none;
}

.guest-card > * {
  position: relative;
}

.guest-card span,
.guest-card small {
  color: var(--muted);
  font-size: 0.8rem;
}

.guest-card strong {
  font-family: var(--serif);
  font-size: 1.56rem;
  line-height: 1.12;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--white);
  background: linear-gradient(180deg, var(--charcoal-soft), var(--charcoal));
  box-shadow: var(--soft-shadow);
}

.secondary-button {
  border: 1px solid var(--pink);
  color: var(--pink-deep);
  background: linear-gradient(180deg, var(--white), var(--pearl));
}

section {
  position: relative;
  padding: 58px 18px;
  overflow: hidden;
}

section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(760px, calc(100% - 36px));
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(104, 116, 95, 0.42), transparent);
  transform: translateX(-50%);
}

.section-inner {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.section-inner.narrow {
  width: min(780px, 100%);
  text-align: center;
}

.lead {
  max-width: 720px;
  margin: 14px auto 30px;
  color: var(--muted);
  text-align: center;
}

.section-inner > h2,
.section-inner.narrow > h2 {
  position: relative;
  padding-bottom: 31px;
}

.section-inner > h2::after,
.section-inner.narrow > h2::after {
  content: "";
  position: absolute;
  bottom: 14px;
  left: 50%;
  width: 96px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(157, 150, 136, 0.86), transparent);
  transform: translateX(-50%);
}

.section-inner > h2::before,
.section-inner.narrow > h2::before {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 50%;
  z-index: 1;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(157, 150, 136, 0.72);
  background: var(--pearl);
  transform: translateX(-50%) rotate(45deg);
}

.intro-section,
.story-section,
.rsvp-section,
.gift-section {
  background: var(--pink-pale);
}

.couple-section,
.gallery-section {
  background: var(--white);
}

.intro-section::after,
.couple-section::after,
.event-section::after,
.story-section::after,
.gallery-section::after,
.rsvp-section::after,
.gift-section::after {
  content: "Ar & Az";
  position: absolute;
  right: 16px;
  bottom: 10px;
  z-index: 0;
  color: rgba(67, 82, 71, 0.055);
  font-family: var(--serif);
  font-size: 3.35rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

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

.countdown div {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 8px 16px;
  background: linear-gradient(180deg, var(--white), var(--pearl));
  box-shadow: var(--soft-shadow);
}

.countdown div::before {
  content: "";
  position: absolute;
  top: 7px;
  right: 8px;
  left: 8px;
  height: 1px;
  background: rgba(104, 116, 95, 0.22);
}

.countdown strong {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
  color: var(--pink-deep);
}

.countdown span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.couple-section {
  text-align: center;
}

.couple-grid,
.event-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.person-card,
.event-card,
.timeline article {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--white), var(--pearl));
  box-shadow: var(--soft-shadow);
}

.person-card::before,
.event-card::before,
.timeline article::before,
.gift-address::before,
.gift-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--sage), transparent);
}

.person-card::after,
.event-card::after,
.timeline article::after,
.gift-address::after,
.gift-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  background:
    linear-gradient(var(--champagne), var(--champagne)) top left / 24px 1px no-repeat,
    linear-gradient(var(--champagne), var(--champagne)) top left / 1px 24px no-repeat,
    linear-gradient(var(--champagne), var(--champagne)) top right / 24px 1px no-repeat,
    linear-gradient(var(--champagne), var(--champagne)) top right / 1px 24px no-repeat,
    linear-gradient(var(--champagne), var(--champagne)) bottom left / 24px 1px no-repeat,
    linear-gradient(var(--champagne), var(--champagne)) bottom left / 1px 24px no-repeat,
    linear-gradient(var(--champagne), var(--champagne)) bottom right / 24px 1px no-repeat,
    linear-gradient(var(--champagne), var(--champagne)) bottom right / 1px 24px no-repeat;
  opacity: 0.42;
}

.person-card {
  padding: 16px;
}

.portrait,
.gallery-grid figure,
.video-slot {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--pink-pale);
}

.portrait {
  aspect-ratio: 2 / 3;
  margin-bottom: 18px;
  border: 1px solid rgba(104, 116, 95, 0.18);
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.78);
}

.portrait img,
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bride-photo {
  object-position: center center;
}

.groom-photo {
  object-position: center center;
}

.nickname {
  margin: 8px 0 10px;
  color: var(--pink);
  font-weight: 800;
}

.person-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.event-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(240, 242, 238, 0.9)),
    var(--mint);
}

.event-section .section-inner,
.gallery-section .section-inner,
.story-section .section-inner {
  text-align: center;
}

.event-grid {
  margin-top: 28px;
  text-align: left;
}

.event-card {
  padding: 20px;
}

.event-card p {
  color: var(--muted);
}

.event-card p:last-child {
  margin-bottom: 0;
}

.primary-event {
  border-color: rgba(104, 116, 95, 0.46);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 241, 236, 0.92));
}

.primary-event .event-name {
  color: var(--green);
}

.location-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.invite-section {
  background:
    linear-gradient(180deg, rgba(251, 251, 250, 0.74), rgba(246, 247, 243, 0.94)),
    var(--pink-soft);
}

.invite-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 26px 0 0;
  list-style: none;
  text-align: left;
}

.invite-list li {
  position: relative;
  border-bottom: 1px solid var(--line);
  padding: 0 0 10px 22px;
  color: var(--muted);
}

.invite-list li::before {
  content: "";
  position: absolute;
  top: 0.78em;
  left: 2px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--sage);
  transform: translateY(-50%) rotate(45deg);
}

.timeline {
  position: relative;
  display: grid;
  gap: 14px;
  margin-top: 28px;
  text-align: left;
}

.timeline article {
  position: relative;
  padding: 72px 18px 20px;
}

.timeline span {
  position: absolute;
  top: 20px;
  left: 18px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(180deg, var(--sage), var(--sage-deep));
  font-weight: 900;
}

.timeline p {
  color: var(--muted);
}

.gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.gallery-grid figure {
  aspect-ratio: 2 / 3;
  margin: 0;
  border: 1px solid rgba(104, 116, 95, 0.18);
  box-shadow: var(--soft-shadow);
}

.gallery-grid figure::after,
.video-slot::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  pointer-events: none;
}

.gallery-grid figure:nth-child(2),
.gallery-grid figure:nth-child(4) {
  aspect-ratio: 2 / 3;
}

.gallery-grid figure:nth-child(5) {
  aspect-ratio: 2 / 3;
}

.gallery-grid figure:nth-child(7),
.gallery-grid figure:nth-child(8) {
  aspect-ratio: 2 / 3;
}

.gallery-grid figure:nth-child(9) {
  aspect-ratio: 2 / 3;
}

.video-slot {
  aspect-ratio: 9 / 16;
  width: min(100%, 430px);
  margin-top: 18px;
  margin-right: auto;
  margin-left: auto;
  border: 1px solid rgba(104, 116, 95, 0.2);
  box-shadow: var(--soft-shadow);
}

.video-slot video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111111;
}

.video-slot .video-placeholder {
  display: none;
}

.video-fallback {
  display: none;
}

.photo-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
  color: var(--pink-deep);
  background:
    linear-gradient(135deg, rgba(104, 116, 95, 0.14), rgba(67, 82, 71, 0.12)),
    var(--white);
}

.photo-placeholder[hidden] {
  display: none !important;
}

.photo-placeholder span,
.photo-placeholder small {
  color: var(--muted);
}

.photo-placeholder strong {
  font-family: var(--serif);
  font-size: 1.62rem;
  line-height: 1.1;
}

.replaceable-image:not([src]),
.replaceable-image.is-missing,
.video-slot.is-missing video {
  display: none;
}

.video-slot.is-missing .video-placeholder {
  display: grid;
}

.video-slot.is-missing .video-fallback {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: auto;
  margin: 96px auto 0;
}

.rsvp-form {
  display: grid;
  gap: 14px;
  margin-top: 26px;
  text-align: left;
}

.rsvp-form label {
  display: grid;
  gap: 8px;
  color: var(--pink-deep);
  font-weight: 800;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: linear-gradient(180deg, var(--white), var(--pearl));
}

.rsvp-form textarea {
  resize: vertical;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.gift-section {
  background: var(--white);
}

.gift-address,
.gift-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--white), var(--pink-soft));
  box-shadow: var(--soft-shadow);
}

.gift-address {
  margin-top: 26px;
  padding: 18px;
  text-align: left;
}

.gift-address h3 {
  font-size: 1.46rem;
}

.gift-address p {
  margin: 10px 0 0;
  color: var(--muted);
}

.gift-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  text-align: left;
}

.gift-card {
  padding: 16px;
}

.gift-card span {
  display: block;
  color: var(--pink);
  font-weight: 900;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.gift-card strong {
  display: block;
  margin-top: 4px;
  color: var(--pink-deep);
  font-size: 1.24rem;
  word-break: break-word;
}

.gift-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 12px;
  border: 1px solid rgba(104, 116, 95, 0.34);
  border-radius: 8px;
  padding: 9px 13px;
  color: var(--pink-deep);
  background: var(--white);
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
}

.copy-button.is-copied {
  color: var(--white);
  background: var(--green);
  border-color: var(--green);
}

.closing-section {
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, var(--charcoal-soft), var(--charcoal));
  background-size: 34px 34px, auto;
}

.closing-section h2,
.closing-section p {
  color: var(--white);
}

.closing-date {
  margin-bottom: 0;
  font-weight: 800;
}

@media (min-width: 520px) {
  .primary-button,
  .secondary-button {
    width: auto;
  }

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

@media (min-width: 780px) {
  body {
    padding-bottom: 0;
  }

  .audio-toggle {
    right: 16px;
    bottom: 16px;
    font-size: 0.9rem;
  }

  .hero {
    min-height: 92vh;
  }

  .top-nav {
    position: absolute;
    top: 18px;
    right: auto;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    width: min(92vw, 560px);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    background: rgba(251, 251, 250, 0.18);
  }

  .top-nav a {
    min-height: 38px;
    padding: 8px 12px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(27, 28, 25, 0.48);
  }

  .hero-content {
    width: min(920px, 100%);
    padding: 130px 24px 88px;
  }

  .hero-photo .hero-image {
    height: 124%;
  }

  h1 {
    font-size: 4.6rem;
  }

  h2 {
    font-size: 2.85rem;
  }

  h3 {
    font-size: 1.85rem;
  }

  .quote {
    max-width: 690px;
    font-size: 1.05rem;
  }

  .guest-card {
    margin-bottom: 22px;
  }

  section {
    padding: 88px 24px;
  }

  .lead {
    margin-bottom: 42px;
  }

  .couple-grid,
  .event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

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

  .person-card {
    padding: 22px;
  }

  .event-card {
    padding: 28px;
  }

  .location-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 26px;
  }

  .invite-list {
    text-align: center;
  }

  .invite-list li {
    padding-left: 0;
  }

  .invite-list li::before {
    display: none;
  }

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

  .timeline {
    gap: 18px;
  }

  .timeline article {
    padding: 28px 28px 28px 86px;
  }

  .timeline span {
    top: 28px;
    left: 28px;
    width: 42px;
    height: 42px;
  }

  .intro-section::after,
  .couple-section::after,
  .event-section::after,
  .story-section::after,
  .gallery-section::after,
  .rsvp-section::after,
  .gift-section::after {
    right: 28px;
    bottom: 18px;
    font-size: 5.35rem;
  }

  .person-card::after,
  .event-card::after,
  .timeline article::after,
  .gift-address::after,
  .gift-card::after {
    inset: 14px;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 2.65rem;
  }

  h2 {
    font-size: 1.95rem;
  }

  .quote {
    font-size: 0.94rem;
  }

  .top-nav a {
    font-size: 0.7rem;
  }
}
