@font-face {
  font-family: "Fraunces Wedding";
  src: url("./assets/fraunces-semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces Wedding";
  src: url("./assets/fraunces-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Glacial";
  src: url("./assets/glacial-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f5eddd;
  --paper-light: #fbf5e9;
  --ink: #3f1d0f;
  --muted: #6f5a4e;
  --green: #46791f;
  --green-soft: #82a46c;
  --line: rgba(63, 29, 15, 0.16);
  --white: #fffaf0;
  --shadow: 0 20px 50px rgba(63, 29, 15, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 22% 10%, rgba(255, 255, 255, 0.62), transparent 22%),
    radial-gradient(circle at 78% 42%, rgba(255, 255, 255, 0.36), transparent 26%),
    linear-gradient(180deg, #f9f2e3 0%, var(--paper) 52%, #f2e8d7 100%);
  font-family: "Glacial", "Avenir Next", "Gill Sans", sans-serif;
  line-height: 1.45;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(63, 29, 15, 0.08) 0.7px, transparent 0.8px),
    linear-gradient(95deg, rgba(255, 255, 255, 0.18), transparent 28%, rgba(63, 29, 15, 0.04));
  background-size: 8px 8px, auto;
  opacity: 0.45;
}

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

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

button {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 14px;
  top: 12px;
  transform: translateY(-150%);
  z-index: 40;
  background: var(--ink);
  color: var(--paper-light);
  padding: 9px 13px;
  border-radius: 999px;
}

.skip-link:focus {
  transform: translateY(0);
}

.invite {
  width: min(100%, 640px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(63, 29, 15, 0.04), transparent 9%, transparent 91%, rgba(63, 29, 15, 0.04)),
    transparent;
}

.cover {
  min-height: 58vh;
  display: grid;
  justify-items: center;
  align-content: start;
  padding: 26px 30px 0;
  text-align: center;
}

.monogram {
  width: 44px;
  height: 86px;
  display: grid;
  place-items: center;
  margin-bottom: 36px;
  border: 1px solid rgba(63, 29, 15, 0.72);
  border-radius: 999px;
  font-family: "Fraunces Wedding", Georgia, serif;
  font-size: 23px;
  line-height: 0.82;
}

.monogram i {
  width: 24px;
  height: 8px;
  position: relative;
  display: block;
}

.monogram i::before,
.monogram i::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 4px;
  height: 1px;
  background: var(--green-soft);
}

.monogram i::before {
  transform: rotate(11deg);
}

.monogram i::after {
  transform: rotate(-11deg);
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Fraunces Wedding", Georgia, serif;
  font-weight: 600;
}

h1 {
  display: grid;
  justify-items: center;
  gap: 0;
  margin: 0 0 48px;
  font-size: clamp(56px, 15vw, 88px);
  line-height: 0.92;
}

h1 em {
  color: var(--green-soft);
  font-family: "Fraunces Wedding", Georgia, serif;
  font-size: 0.82em;
  font-style: normal;
  line-height: 0.9;
}

.intro {
  max-width: 440px;
  margin: 0;
  color: #442419;
  font-size: clamp(19px, 4.7vw, 25px);
  line-height: 1.32;
}

.flower-break {
  height: 172px;
  margin-top: -12px;
  overflow: hidden;
}

.flower-break img {
  width: 126%;
  height: 650px;
  max-width: none;
  display: block;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0.94;
  transform: translate(-10%, -455px);
}

.countdown-section {
  margin-top: -1px;
  background: var(--green);
  color: var(--paper-light);
}

.countdown {
  min-height: 112px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  gap: 6px;
  padding: 16px 18px 12px;
  text-align: center;
}

.countdown div {
  min-width: 0;
}

.countdown strong,
.countdown i {
  font-family: "Courier New", monospace;
  font-size: clamp(42px, 11.6vw, 66px);
  font-weight: 400;
  line-height: 0.98;
}

.countdown i {
  display: block;
  transform: translateY(-9px);
  font-style: normal;
}

.countdown span {
  display: block;
  margin-top: 10px;
  font-family: "Courier New", monospace;
  font-size: clamp(13px, 3.4vw, 18px);
  text-transform: uppercase;
}

.event-details {
  min-height: 292px;
  display: grid;
  grid-template-columns: 1fr 180px 1fr;
  align-items: center;
  gap: 14px;
  padding: 16px 34px 10px;
}

.date-block,
.place-block {
  display: grid;
  gap: 12px;
  font-family: "Fraunces Wedding", Georgia, serif;
  line-height: 1;
}

.date-block {
  justify-self: start;
  text-align: left;
}

.place-block {
  justify-self: end;
  text-align: right;
}

.date-block span,
.place-block span {
  font-size: clamp(34px, 8vw, 46px);
}

.date-block strong,
.place-block strong {
  font-size: clamp(34px, 7.5vw, 45px);
  font-weight: 600;
}

.place-block strong {
  max-width: 180px;
  line-height: 1.05;
}

.photo-orbit {
  width: 178px;
  height: 178px;
  display: grid;
  place-items: center;
  justify-self: center;
  position: relative;
}

.photo-orbit::before,
.photo-orbit::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid var(--green);
  border-radius: 46% 54% 50% 50%;
}

.photo-orbit::after {
  inset: 6px -4px -5px 4px;
  border-width: 2px;
  opacity: 0.82;
  transform: rotate(-9deg);
}

.photo-placeholder {
  width: 156px;
  height: 156px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.16)),
    radial-gradient(circle at 35% 35%, #e5ded1, #b9b1a5 48%, #817a71 100%);
  color: rgba(255, 250, 240, 0.84);
  filter: grayscale(1);
  font-family: "Fraunces Wedding", Georgia, serif;
  font-size: 48px;
}

.photo-placeholder em {
  color: var(--white);
  font-style: normal;
  font-size: 28px;
}

.actions {
  display: grid;
  justify-items: center;
  padding: 18px 28px 0;
  text-align: center;
}

.hint {
  margin-bottom: 38px;
  color: var(--muted);
  font-size: 14px;
}

.action-grid {
  width: min(100%, 420px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}

.action-link {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 9px;
  color: var(--green);
}

.action-link strong {
  max-width: 96px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.05;
  transform: rotate(-12deg);
}

.action-link:nth-child(2) strong {
  transform: rotate(11deg);
}

.action-link:nth-child(3) strong {
  transform: rotate(8deg);
}

.icon {
  width: 46px;
  height: 46px;
  display: block;
  position: relative;
  color: var(--green);
}

.icon.pin::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  background: currentColor;
  transform: rotate(-45deg);
}

.icon.pin::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 12px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--paper);
}

.icon.whatsapp {
  border: 5px solid currentColor;
  border-radius: 999px;
}

.icon.whatsapp::before {
  content: "";
  position: absolute;
  left: 5px;
  bottom: -8px;
  width: 13px;
  height: 13px;
  border-left: 5px solid currentColor;
  border-bottom: 5px solid currentColor;
  transform: rotate(-18deg);
}

.icon.whatsapp::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 13px;
  width: 16px;
  height: 10px;
  border-left: 5px solid currentColor;
  border-bottom: 5px solid currentColor;
  border-radius: 0 0 0 12px;
  transform: rotate(-45deg);
}

.icon.gift {
  border: 5px solid currentColor;
  border-top-width: 9px;
  transform: translateY(6px);
}

.icon.gift::before {
  content: "";
  position: absolute;
  left: 18px;
  top: -9px;
  bottom: -5px;
  width: 5px;
  background: currentColor;
}

.icon.gift::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: -21px;
  height: 18px;
  border: 5px solid currentColor;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}

.note {
  max-width: 190px;
  margin: 36px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.flower-break.bottom {
  height: 205px;
  margin-top: 24px;
}

.flower-break.bottom img {
  width: 138%;
  transform: translate(-14%, -420px);
}

.panel {
  padding: 74px 30px;
  border-top: 1px solid var(--line);
}

.kicker {
  margin-bottom: 14px;
  color: var(--green);
  font-size: 12px;
  text-transform: uppercase;
}

.panel h2,
.cart-header h2 {
  margin: 0 0 28px;
  font-size: clamp(42px, 10vw, 62px);
  line-height: 0.98;
}

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

.rsvp-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.rsvp-form input,
.rsvp-form textarea,
.gift-toolbar select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 11px 0;
  outline: none;
}

.rsvp-form input:focus,
.rsvp-form textarea:focus,
.gift-toolbar select:focus {
  border-color: var(--ink);
}

.rsvp-form textarea {
  resize: vertical;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 11px 18px;
  background: transparent;
  cursor: pointer;
}

.button.primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--paper-light);
}

.button.ghost {
  color: var(--ink);
}

.form-status,
.copy-status {
  min-height: 22px;
  margin: 0;
  color: var(--green);
}

.gift-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.gift-toolbar select {
  max-width: 190px;
  padding-right: 10px;
}

.gift-grid {
  display: grid;
  gap: 12px;
}

.gift-card {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.gift-art {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green);
  font-family: "Fraunces Wedding", Georgia, serif;
  font-size: 26px;
}

.gift-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.18;
}

.gift-card strong {
  display: block;
  color: var(--ink);
  font-family: "Fraunces Wedding", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
}

.gift-card .button {
  min-height: 38px;
  padding: 8px 12px;
  border-color: var(--green);
  color: var(--green);
}

.cart-button {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 18;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: var(--green);
  color: var(--paper-light);
  padding: 9px 12px 9px 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.cart-button strong {
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.24);
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100%, 420px);
  z-index: 32;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--paper-light);
  border-left: 1px solid var(--line);
  box-shadow: -22px 0 60px rgba(63, 29, 15, 0.18);
  transform: translateX(105%);
  transition: transform 230ms ease;
}

.cart-panel.is-open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 24px;
  border-bottom: 1px solid var(--line);
}

.close-cart {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  position: relative;
  cursor: pointer;
}

.close-cart::before,
.close-cart::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 20px;
  height: 1px;
  background: var(--ink);
}

.close-cart::before {
  transform: rotate(45deg);
}

.close-cart::after {
  transform: rotate(-45deg);
}

.cart-items {
  overflow: auto;
  padding: 12px 24px;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(63, 29, 15, 0.10);
}

.cart-line p {
  margin-bottom: 4px;
}

.cart-line small,
.cart-summary p,
.cart-empty {
  color: var(--muted);
}

.cart-line button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.cart-summary {
  display: grid;
  gap: 12px;
  padding: 24px;
  border-top: 1px solid var(--line);
}

.cart-summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.cart-summary > div strong {
  font-family: "Fraunces Wedding", Georgia, serif;
  font-size: 30px;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(24, 10, 3, 0.26);
}

@media (max-width: 520px) {
  .cover {
    min-height: 57vh;
    padding-top: 22px;
  }

  .monogram {
    margin-bottom: 28px;
  }

  h1 {
    margin-bottom: 42px;
  }

  .flower-break {
    height: 150px;
  }

  .flower-break img {
    width: 152%;
    transform: translate(-17%, -478px);
  }

  .event-details {
    grid-template-columns: 1fr 142px 1fr;
    gap: 10px;
    padding-inline: 20px;
  }

  .photo-orbit {
    width: 142px;
    height: 142px;
  }

  .photo-placeholder {
    width: 124px;
    height: 124px;
    font-size: 40px;
  }

  .action-grid {
    gap: 6px;
  }

  .gift-card {
    grid-template-columns: 54px 1fr;
  }

  .gift-card strong,
  .gift-card .button {
    grid-column: 2;
  }

  .gift-card .button {
    justify-self: start;
  }
}

@media (min-width: 720px) {
  .invite {
    margin-block: 28px;
    border: 1px solid rgba(63, 29, 15, 0.08);
    box-shadow: 0 18px 80px rgba(63, 29, 15, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
