﻿:root {
  color-scheme: light;
  --olive: #72784f;
  --olive-soft: #8a8e67;
  --olive-deep: #30351f;
  --envelope: #f4eee2;
  --envelope-deep: #e4d8c5;
  --ivory: #fbf5ea;
  --paper: #fffaf1;
  --warm-paper: #f6efe3;
  --sand: #d8c9b3;
  --taupe: #6f6658;
  --ink: #25231d;
  --line: rgba(48, 53, 31, 0.18);
  --line-light: rgba(255, 250, 241, 0.34);
  --shadow: 0 24px 70px rgba(15, 15, 10, 0.28);
  --script: "Great Vibes";
  --serif: "Cormorant Garamond";
  --text-size: 16px;
  --small-size: 12px;
  --label-size: 11px;
  --heading-size: 54px;
  --subheading-size: 32px;
  --display-size: 76px;
  --section-space: 58px;
  --section-gap: 30px;
  --content-gap: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html[data-preview="invitation"] .envelope-screen,
html[data-preview="wedding-date"] .envelope-screen,
html[data-preview="wedding-date"] .cover,
html[data-preview="details"] .envelope-screen,
html[data-preview="details"] .cover,
html[data-preview="details"] .date-panel {
  display: none;
}

html[data-preview="gallery"] .envelope-screen,
html[data-preview="gallery"] .cover,
html[data-preview="gallery"] .date-panel,
html[data-preview="gallery"] .events,
html[data-preview="gallery"] .rsvp,
html[data-preview="gallery"] .guest-info,
html[data-preview="gallery"] .closing {
  display: none;
}

html[data-preview="gallery"] .gallery {
  min-height: 100svh;
  padding-top: clamp(32px, 7vw, 48px);
  padding-bottom: clamp(24px, 5vw, 32px);
  align-content: center;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(255, 250, 241, 0.08), transparent 34rem),
    linear-gradient(180deg, #171a12 0%, #282b1b 48%, #11130e 100%);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--text-size);
  line-height: 1.7;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

.invitation-card {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(48, 53, 31, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
  box-shadow: var(--shadow);
}

.envelope-screen {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: space-between;
  justify-items: center;
  overflow: hidden;
  padding: clamp(22px, 4.2vh, 34px) clamp(24px, 7vw, 44px) clamp(54px, 8vh, 76px);
  background:
    url("assets/envelope.png") center 54% / min(152vw, 780px) auto no-repeat,
    radial-gradient(ellipse at 50% 24%, rgba(255, 250, 241, 0.04), transparent 38%),
    radial-gradient(ellipse at 50% 70%, rgba(255, 250, 241, 0.02), transparent 34%),
    linear-gradient(180deg, #1f2417 0%, #2b3120 48%, #12140e 100%);
  color: var(--ivory);
  text-align: center;
  isolation: isolate;
}

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

.envelope-screen::before {
  content: none;
}

.envelope-screen::after {
  content: none;
}

.envelope-screen__content {
  position: absolute;
  top: clamp(18px, 3.2vh, 38px);
  left: 50%;
  z-index: 2;
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

.envelope-screen__content.reveal {
  transform: translate(-50%, 10px);
}

.envelope-screen__content.reveal.is-visible {
  transform: translate(-50%, 0);
}

.envelope-screen h1 {
  width: min(calc(100vw - 72px), 320px);
  margin: 0;
  color: var(--ivory);
  font-family: var(--script);
  font-size: clamp(2rem, 7.8vw, 3.05rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.02;
  overflow-wrap: anywhere;
  text-transform: none;
}

.open-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: inline-grid;
  width: clamp(76px, 15vw, 88px);
  height: clamp(76px, 15vw, 88px);
  place-items: center;
  border: 0;
  border-radius: 46% 54% 49% 51% / 52% 47% 53% 48%;
  background:
    radial-gradient(circle at 36% 29%, rgba(255, 229, 178, 0.98), rgba(202, 145, 78, 0.98) 55%, rgba(138, 80, 38, 0.98));
  box-shadow:
    0 11px 18px rgba(86, 65, 39, 0.2);
  color: #2d2116;
  font-family: var(--serif);
  font-size: clamp(0.42rem, 1.45vw, 0.54rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  text-transform: none;
  transform: translate(-50%, -50%);
}

.open-seal.reveal {
  transform: translate(-50%, calc(-50% + 10px));
}

.open-seal.reveal.is-visible {
  transform: translate(-50%, -50%);
}

.open-seal span {
  padding-left: 0.08em;
}

.envelope-screen__note {
  position: absolute;
  bottom: clamp(44px, 7vh, 70px);
  left: 50%;
  z-index: 2;
  width: min(100%, 31ch);
  margin: 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 4.1vw, 1.28rem);
  line-height: 1.45;
  transform: translateX(-50%);
}

.heart-outline {
  display: inline-block;
  width: 1.05em;
  height: 1em;
  margin-left: 0.16em;
  transform: translateY(0.16em);
}

.heart-outline path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.envelope-screen__note.reveal {
  transform: translate(-50%, 14px);
}

.envelope-screen__note.reveal.is-visible {
  transform: translate(-50%, 0);
}

.panel {
  padding: var(--section-space) clamp(26px, 7vw, 48px);
  background: var(--paper);
}

.cover {
  position: relative;
  min-height: 100svh;
  display: grid;
  overflow: hidden;
  isolation: isolate;
  align-items: start;
  justify-items: center;
  padding: clamp(30px, 6vh, 58px) clamp(26px, 7vw, 48px);
  color: var(--ivory);
  text-align: center;
}

.cover__image,
.cover__shade {
  position: absolute;
  inset: 0;
}

.cover__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% center;
  z-index: -2;
}

.cover__shade {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(246, 239, 227, 0.7) 0%, rgba(246, 239, 227, 0.28) 27%, rgba(48, 53, 31, 0.2) 58%, rgba(17, 18, 13, 0.42) 100%),
    linear-gradient(90deg, rgba(17, 18, 13, 0.28), rgba(17, 18, 13, 0.04), rgba(17, 18, 13, 0.22));
}

.cover__content {
  width: 100%;
  color: var(--olive-deep);
  text-shadow: 0 2px 22px rgba(255, 250, 241, 0.35);
}

.cover__note {
  position: absolute;
  right: 18px;
  left: 18px;
  bottom: clamp(14px, 2.6vh, 24px);
  z-index: 1;
  width: auto;
  margin: 0;
  color: var(--ivory);
  font-family: var(--script);
  font-size: 25px;
  font-style: italic;
  line-height: 1.28;
  text-align: center;
  text-wrap: balance;
  transform: none;
}

.cover__note .heart-outline {
  width: 0.72em;
  height: 0.68em;
  margin-left: 0.08em;
  transform: translateY(0.04em);
}

.line-icon,
.event__icon {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: currentColor;
}

.line-icon svg,
.event__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.kicker {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--label-size);
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.35;
  text-transform: uppercase;
}

.cover h1 {
  margin: 0;
  font-family: var(--script);
  font-size: var(--display-size);
  font-style: italic;
  font-weight: 400;
  line-height: 0.82;
  text-wrap: balance;
}

.cover h1 span {
  display: block;
  margin: 6px 0;
  font-family: var(--serif);
  font-size: 0.28em;
  font-style: italic;
}

.photo-card {
  margin: 0;
  border: 10px solid var(--paper);
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(48, 44, 34, 0.18);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.date-panel {
  background: var(--warm-paper);
  text-align: center;
}

.calendar-date {
  width: 100%;
  display: grid;
  justify-items: center;
  overflow: visible;
  text-align: center;
}

.calendar-date__greeting {
  width: min(100%, 24ch);
  margin: 0 0 10px;
  color: var(--olive-deep);
  font-family: var(--script);
  font-size: 40px;
  font-style: italic;
  font-weight: 400;
  line-height: 0.98;
}

.calendar-date h2 {
  color: var(--olive-deep);
  font-family: var(--serif);
  max-width: 100%;
  padding: 0 0.18em;
  font-size: var(--subheading-size);
  font-style: normal;
  font-weight: 400;
  line-height: 1.15;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: min(100%, 282px);
  gap: 0;
}

.calendar-weekdays {
  margin-top: 28px;
  color: var(--olive-deep);
  font-size: var(--text-size);
  letter-spacing: 0.04em;
}

.calendar-days {
  margin-top: 10px;
  align-items: center;
  color: var(--olive-deep);
  font-size: var(--text-size);
}

.calendar-days span,
.calendar-days strong {
  display: grid;
  min-height: 44px;
  place-items: center;
  font-weight: 400;
}

.calendar-days strong {
  position: relative;
  color: var(--olive-deep);
  font-weight: 400;
  z-index: 0;
}

.calendar-days strong::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 34px;
  height: 32px;
  background: #d9bf79;
  clip-path: polygon(50% 88%, 16% 54%, 10% 34%, 18% 18%, 34% 12%, 50% 25%, 66% 12%, 82% 18%, 90% 34%, 84% 54%);
  transform: translateY(3px);
}

.calendar-date p {
  max-width: 28ch;
  margin: 28px auto 0;
  color: var(--olive-deep);
  font-size: var(--text-size);
  line-height: 1.35;
}

.calendar-date .calendar-date__greeting {
  width: min(100%, 24ch);
  margin: 0 0 10px;
  font-size: 40px;
  line-height: 0.98;
}

.section-title {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: var(--section-gap);
  color: var(--olive-deep);
  text-align: center;
}

.section-title .line-icon {
  color: var(--olive);
}

h2,
h3 {
  margin: 0;
  color: var(--olive-deep);
  font-family: var(--script);
  font-weight: 400;
  line-height: 1.05;
}

h2 {
  font-size: var(--heading-size);
  text-wrap: balance;
}

.events {
  background: var(--warm-paper);
  min-height: 0;
}

.events.panel {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
}

.event {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.event:last-child {
  border-bottom: 1px solid var(--line);
}

.event__icon {
  display: none;
  color: var(--olive);
}

.event-illustration {
  width: min(100%, 196px);
  margin: 0 auto 4px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.event-illustration img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: transparent;
  mix-blend-mode: normal;
  filter: none;
  opacity: 1;
}

.event__label,
.choice-field__label,
.input-field span {
  margin: 0;
  color: var(--olive-deep);
  font-family: var(--serif);
  font-size: var(--label-size);
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.35;
  text-transform: uppercase;
}

.event h3 {
  font-family: var(--serif);
  font-size: var(--subheading-size);
  line-height: 1;
}

.event__place,
.event__address {
  margin: 0;
}

.event__place {
  font-size: var(--text-size);
  font-weight: 700;
}

.event__address {
  max-width: 28ch;
  color: var(--taupe);
  font-size: var(--text-size);
  line-height: 1.35;
}

.event a {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  border: 1px solid rgba(48, 53, 31, 0.34);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--olive-deep);
  font-family: var(--serif);
  font-size: var(--label-size);
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.events .section-title {
  margin-bottom: var(--section-gap);
}

.events .section-title .line-icon {
  width: 24px;
  height: 24px;
}

.events h2 {
  font-size: var(--heading-size);
}

.gallery {
  background: var(--warm-paper);
}

.rsvp {
  background: var(--warm-paper);
}

.rsvp-form {
  display: grid;
  gap: 24px;
}

.choice-field,
.input-field {
  display: grid;
  gap: 12px;
  text-align: center;
}

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

.button-group--stack {
  grid-template-columns: 1fr;
}

.button-group button,
.input-field input {
  min-height: 46px;
  border: 1px solid rgba(48, 53, 31, 0.34);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.72);
  color: var(--olive-deep);
  font: inherit;
}

.button-group button {
  cursor: pointer;
  font-family: var(--serif);
  font-size: var(--label-size);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.25;
  padding: 10px 14px;
  text-transform: uppercase;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button-group button:hover {
  transform: translateY(-1px);
}

.button-group button.is-selected {
  border-color: var(--olive-deep);
  background: var(--olive);
  color: var(--ivory);
}

.input-field input {
  width: 100%;
  padding: 10px 18px;
  text-align: center;
}

.input-field input::placeholder {
  color: rgba(111, 102, 88, 0.68);
}

.input-field input:focus,
.button-group button:focus-visible {
  outline: 2px solid rgba(114, 120, 79, 0.38);
  outline-offset: 3px;
}

.guest-info {
  background: var(--paper);
}

.note-list {
  display: grid;
  gap: var(--content-gap);
}

.note {
  padding: 24px 22px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.62);
  text-align: center;
}

.note h3 {
  font-size: var(--subheading-size);
}

.note p {
  max-width: 30ch;
  margin: 12px auto 0;
  color: var(--taupe);
  font-size: var(--text-size);
  line-height: 1.5;
}

.gallery__carousel {
  position: relative;
}

.gallery__viewport {
  overflow: hidden;
  padding-inline: 0;
}

.gallery__track {
  display: flex;
  gap: 18px;
  align-items: stretch;
  will-change: transform;
  transition: transform 560ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.gallery__slide {
  flex: 0 0 min(82%, 372px);
  margin: 0;
}

.gallery__slide img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(48, 53, 31, 0.18);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.76);
  color: var(--olive-deep);
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 10px 24px rgba(43, 35, 20, 0.1);
}

.gallery__nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery__nav--prev {
  left: 6px;
}

.gallery__nav--next {
  right: 6px;
}

.gallery__carousel .reveal {
  opacity: 1;
  transform: none;
}

#gallery-title {
  font-family: var(--script);
  font-style: italic;
  font-size: var(--heading-size);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.gallery .section-title {
  gap: 8px;
}

.gallery .section-title .line-icon {
  width: 24px;
  height: 24px;
}

.gallery.panel {
  padding-bottom: var(--section-space);
}

.rsvp.panel {
  background: var(--warm-paper);
}

.guest-info.panel {
  background: var(--paper);
}

.events.panel {
  padding-bottom: var(--section-space);
}

.closing {
  padding: var(--section-space) clamp(26px, 7vw, 48px);
  background: var(--olive);
  color: var(--ivory);
  text-align: center;
}

.photo-card--closing {
  border-color: rgba(255, 250, 241, 0.9);
  box-shadow: 0 18px 50px rgba(19, 20, 13, 0.2);
}

.photo-card--closing img {
  aspect-ratio: 4 / 5.1;
  object-position: 50% 50%;
}

.closing__text {
  margin-top: var(--section-gap);
}

.closing__text p {
  max-width: 18ch;
  margin: 0 auto 18px;
  font-family: var(--script);
  font-size: var(--heading-size);
  line-height: 1.05;
}

.closing__text strong {
  font-family: var(--serif);
  font-size: var(--label-size);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 760px) {
  body {
    padding: 38px 0;
  }

  .invitation-card {
    border: 10px solid #fffaf1;
  }

  .gallery__grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery .photo-card:first-child {
    grid-column: 1 / -1;
  }

  .gallery .photo-card:first-child img {
    aspect-ratio: 4 / 4.6;
  }
}

@media (max-width: 390px) {
  .panel {
    padding-inline: 24px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}



.form-message {
  min-height: 1.5em;
  margin: -4px 0 0;
  color: var(--olive-deep);
  font-size: var(--text-size);
  line-height: 1.4;
  text-align: center;
}

.form-message.is-muted {
  color: var(--taupe);
}

.form-message.is-success {
  color: var(--olive-deep);
  font-weight: 700;
}

.form-message.is-error {
  color: #8a3d2f;
  font-weight: 700;
}

.rsvp-details {
  display: grid;
  gap: 24px;
}

.rsvp-details.is-hidden {
  display: none;
}
