:root {
  --ivory: #fbf7ee;
  --paper: #fffaf1;
  --champagne: #e8d3b8;
  --sand: #d8bea1;
  --rose: #d8b8ad;
  --cocoa: #7a6258;
  --dark: #2f2a25;
  --muted: #776b61;
  --line: rgba(92, 70, 57, 0.18);
  --shadow: 0 24px 70px rgba(67, 48, 38, 0.14);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(216, 184, 173, 0.26), transparent 32%),
    radial-gradient(circle at 90% 0%, rgba(232, 211, 184, 0.38), transparent 28%),
    linear-gradient(180deg, #fffaf3 0%, #f7efe5 50%, #fffaf3 100%);
  color: var(--dark);
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
}

button, a { font: inherit; }
a { color: inherit; }

.page-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 18px 56px;
  position: relative;
}

.screen {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  padding: 56px 0;
}

.content-section {
  width: min(980px, 100%);
  margin: 0 auto 92px;
  padding: clamp(28px, 5vw, 54px);
  background: rgba(255, 250, 241, 0.72);
  border: 1px solid rgba(122, 98, 88, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.45;
  pointer-events: none;
}
.ambient-one {
  width: 230px;
  height: 230px;
  background: rgba(216, 184, 173, 0.45);
  left: 2%;
  top: 18%;
}
.ambient-two {
  width: 170px;
  height: 170px;
  background: rgba(232, 211, 184, 0.65);
  right: 7%;
  bottom: 15%;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cocoa);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
  font-weight: 700;
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  margin: 0;
  line-height: 0.98;
}
h1 { font-size: clamp(48px, 10vw, 96px); }
h2 { font-size: clamp(38px, 7vw, 72px); margin-bottom: 20px; }
h3 { font-size: 30px; margin-bottom: 12px; }
p { line-height: 1.7; }
.lead, .section-note { color: var(--muted); font-size: 18px; }

.primary-button,
.secondary-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border-radius: 999px;
  padding: 0 22px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.primary-button {
  border: 0;
  background: var(--dark);
  color: var(--paper);
  box-shadow: 0 12px 30px rgba(47, 42, 37, 0.2);
}
.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 250, 241, .9);
  color: var(--dark);
}
.text-link { color: var(--cocoa); padding: 0; min-height: auto; }
.primary-button:hover,
.secondary-button:hover { transform: translateY(-2px); }

.envelope-card {
  width: min(560px, 100%);
  min-height: 680px;
  text-align: center;
  padding: 38px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.envelope {
  width: min(420px, 92vw);
  height: 280px;
  border: 0;
  background: transparent;
  position: relative;
  cursor: pointer;
  perspective: 1200px;
  margin: 8px 0 14px;
}
.envelope-body,
.envelope-flap {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  box-shadow: 0 25px 55px rgba(72, 48, 32, 0.18);
}
.envelope-body {
  background:
    linear-gradient(135deg, transparent 50%, rgba(255,255,255,.24) 50.2%),
    linear-gradient(225deg, transparent 50%, rgba(255,255,255,.18) 50.2%),
    linear-gradient(180deg, #ecd9bf 0%, #d8bea1 100%);
  border: 1px solid rgba(97, 69, 53, .16);
}
.envelope-flap {
  height: 58%;
  bottom: auto;
  transform-origin: top center;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(180deg, #f2dec4 0%, #d3b292 100%);
  transition: transform .75s cubic-bezier(.21,.84,.32,1.02);
  z-index: 3;
}
.envelope.open .envelope-flap { transform: rotateX(168deg); }
.wax-seal {
  position: absolute;
  left: 50%;
  top: 47%;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #a17a6e, #795247 70%);
  color: #fff4e8;
  display: grid;
  place-items: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  line-height: .82;
  box-shadow: inset 0 3px 10px rgba(255,255,255,.18), 0 12px 26px rgba(74, 38, 28, .22);
  z-index: 5;
}
.envelope-label {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 40px;
  z-index: 4;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(26px, 7vw, 40px);
  color: #5d463b;
}

.postcard,
.ticket {
  width: min(760px, 100%);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.52), transparent 35%),
    var(--paper);
  border: 1px solid rgba(122, 98, 88, .18);
  box-shadow: var(--shadow);
  padding: clamp(34px, 7vw, 78px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.postcard::before,
.ticket::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(122, 98, 88, .16);
  border-radius: 24px;
  pointer-events: none;
}
.postcard h2,
.ticket h2 { font-size: clamp(50px, 10vw, 92px); }
.date-line,
.postcard-text { font-size: 20px; color: var(--muted); }
.compact { max-width: 560px; }

.story-grid,
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.story-item,
.info-card {
  background: rgba(255, 255, 255, .44);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
}
.story-number {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--cocoa);
  letter-spacing: .18em;
  font-weight: 700;
}
.story-item p,
.info-card p { color: var(--muted); margin-bottom: 0; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.photo-card {
  margin: 0;
  padding: 12px 12px 18px;
  background: #fffdf8;
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(58, 39, 27, .1);
  transform: rotate(-1deg);
}
.photo-card:nth-child(even) { transform: rotate(1.2deg); }
.photo-card img,
.photo-placeholder,
.venue-photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  object-fit: cover;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(216,184,173,.32), rgba(232,211,184,.44)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 8px, rgba(255,255,255,.16) 8px 16px);
  color: rgba(61, 50, 43, .58);
  font-weight: 700;
}
figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; }

.date-section { text-align: center; }
.date-build {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 28px);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.date-build span {
  min-width: 130px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255,255,255,.48);
  border: 1px solid var(--line);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(38px, 8vw, 68px);
}

.timeline {
  position: relative;
  display: grid;
  gap: 16px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 113px;
  top: 22px;
  bottom: 22px;
  width: 1px;
  background: var(--line);
}
.timeline-row {
  display: grid;
  grid-template-columns: 82px 46px 1fr;
  gap: 18px;
  align-items: center;
  position: relative;
}
.timeline-time { font-weight: 800; color: var(--cocoa); font-size: 18px; }
.timeline-dot {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  z-index: 2;
}
.timeline-title {
  padding: 18px 20px;
  background: rgba(255,255,255,.42);
  border: 1px solid var(--line);
  border-radius: 18px;
  font-weight: 700;
}

.venue-card {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 24px;
  align-items: stretch;
}
.big-address { font-size: 21px; color: var(--cocoa); }
.venue-photo-placeholder { aspect-ratio: auto; min-height: 340px; }

.palette {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.palette-item {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 16px 10px;
  background: rgba(255,255,255,.42);
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
}
.palette-color {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: inset 0 2px 6px rgba(255,255,255,.5);
}

.ticket-screen { min-height: 90svh; }
.ticket { text-align: left; }
.ticket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.ticket-code {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--cocoa);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}
.ticket-recipient {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--cocoa);
  font-size: 34px;
  margin: 10px 0 0;
}
.ticket-line {
  border-top: 1px dashed rgba(122,98,88,.32);
  margin: 28px 0;
}
.ticket-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
}
.ticket-details div {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.42);
}
dt { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
dd { margin: 0; font-weight: 800; }
.ticket-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

body.ticket-only .page-shell > section:not(.ticket-screen) { display: none; }
body.ticket-only .ticket-screen { min-height: 100svh; }

.not-found-screen { text-align: center; }

@media (max-width: 760px) {
  .page-shell { padding-inline: 12px; }
  .content-section { margin-bottom: 54px; padding: 26px 18px; border-radius: 24px; }
  .screen { padding-block: 30px; }
  .envelope-card { min-height: 610px; padding-inline: 0; }
  .envelope { height: 230px; }
  .story-grid,
  .info-grid,
  .gallery-grid,
  .venue-card,
  .ticket-details { grid-template-columns: 1fr; }
  .palette { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline::before { left: 93px; }
  .timeline-row { grid-template-columns: 64px 42px 1fr; gap: 12px; }
  .timeline-time { font-size: 16px; }
  .timeline-dot { width: 42px; height: 42px; }
  .timeline-title { padding: 14px 15px; }
  .postcard, .ticket { padding: 36px 20px; border-radius: 26px; }
  .postcard::before, .ticket::before { inset: 10px; border-radius: 18px; }
  .ticket-actions { flex-direction: column; }
  .ticket-actions > * { width: 100%; }
}
