/* ============================================================
   Let's make a big deal of it — Morgan + Spencer, 10.02.27
   Static site. Palette taken from the printed save the dates.
   ============================================================ */

:root {
  --cream: #FAEFD3;
  --sky: #31A6DF;
  --orange: #EE4B1C;
  --red: #D2291F;
  --red-dark: #B01F09;
  --red-deep: #AE1800;
  --red-bright: #FF563C;
  --gold: #F2B32C;
  --ink: #17130F;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--cream);
  font-family: Archivo, system-ui, -apple-system, sans-serif;
  color: var(--ink);
}

a { color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.defs { position: absolute; }

/* paper grain laid over each section */
.grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .16;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.final .grain { opacity: .18; }

/* ── OPENING ANIMATION ───────────────────────────────────── */
.intro {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--cream);
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  animation: peelAway 620ms cubic-bezier(.5, 0, .7, .25) 3820ms forwards;
}
.intro[hidden] { display: none; }

.intro-stage { position: relative; width: min(88vw, 78svh); aspect-ratio: 1 / 1; }

.intro-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.intro-star { animation: starPop 480ms cubic-bezier(.25, 1.2, .5, 1) 3500ms both; }

.intro-monarch {
  position: absolute;
  left: -12%;
  top: 104%;
  width: 34%;
  height: auto;
  animation: flightPath 3400ms cubic-bezier(.33, 0, .5, 1) 180ms both,
             bob 2600ms ease-in-out 180ms infinite;
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--sky);
  padding: clamp(20px, 4svh, 80px) clamp(20px, 5vw, 72px) clamp(20px, 4svh, 96px);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(12px, 2.2svh, 56px);
}

.hero-head { position: relative; }

.hero-title {
  margin: 0;
  font-family: 'Archivo Black', Archivo, sans-serif;
  font-weight: 400;
  color: var(--cream);
  line-height: .8;
  letter-spacing: -.025em;
  font-size: min(9.9vw, 17.5svh, 210px);
  text-shadow: .055em .055em 0 var(--orange);
  filter: url(#stdInk);
  animation: riseIn 700ms ease-out 100ms both;
}
.hero-title .line { display: block; white-space: nowrap; }
.hero-title .w { display: inline; }
.hero-title .indent-1 { margin-left: clamp(0px, 3.4vw, 72px); }
.hero-title .indent-2 { margin-left: clamp(0px, 2vw, 44px); }

.perch { position: relative; display: inline-block; }
.perch-monarch {
  position: absolute;
  right: -1.15em;
  top: -.06em;
  width: 1.2em;
  height: auto;
  transform-origin: 60% 70%;
  animation: flutter 5s ease-in-out infinite;
}

.hero-info {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2.4svh, 28px);
  max-width: 640px;
}

.lede {
  margin: 0;
  font-size: clamp(16px, 4.2vw, 24px);
  font-weight: 700;
  font-style: italic;
  color: var(--ink);
  text-wrap: pretty;
}

.names {
  margin: 0;
  font-family: 'Archivo Black', Archivo, sans-serif;
  font-size: clamp(15px, 3.8vw, 21px);
  letter-spacing: .06em;
  color: var(--red-deep);
  text-transform: uppercase;
}

.rule { display: block; width: 100%; max-width: 560px; height: 7px; }

.date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: clamp(10px, 3vw, 22px);
  padding: clamp(4px, 1svh, 10px) 0;
}
.date {
  margin: 0;
  font-family: 'Archivo Black', Archivo, sans-serif;
  font-size: min(7vw, 5.4svh, 52px);
  color: var(--red-bright);
  letter-spacing: -.01em;
  text-transform: uppercase;
  filter: url(#stdInkSoft);
}
.place {
  margin: 0;
  font-size: clamp(13px, 3.2vw, 17px);
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--red-deep);
  text-transform: uppercase;
}

.cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 14px 24px 14px 18px;
  background: var(--red);
  color: var(--cream);
  text-decoration: none;
  font-family: 'Archivo Black', Archivo, sans-serif;
  font-size: clamp(15px, 4vw, 19px);
  letter-spacing: .04em;
  border: 2px solid var(--ink);
  transition: background 160ms;
}
.cta:hover,
.cta:focus-visible { background: var(--red-dark); color: var(--cream); }

/* ── FRIDGE ──────────────────────────────────────────────── */
.fridge {
  position: relative;
  overflow: hidden;
  background: var(--orange);
  padding: clamp(64px, 12vw, 140px) clamp(20px, 5vw, 72px) clamp(72px, 13vw, 150px);
}

.fridge-title {
  position: relative;
  margin: 0 0 clamp(20px, 4vw, 32px);
  font-family: 'Archivo Black', Archivo, sans-serif;
  font-weight: 400;
  color: var(--cream);
  line-height: .86;
  font-size: clamp(44px, 12vw, 124px);
  letter-spacing: -.02em;
  filter: url(#stdInk);
  max-width: 9ch;
}

.fridge-copy {
  position: relative;
  margin: 0 0 clamp(44px, 8vw, 80px);
  font-size: clamp(17px, 4.4vw, 24px);
  line-height: 1.4;
  color: var(--cream);
  font-weight: 500;
  max-width: 34ch;
}

.prints {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(46px, 9vw, 90px);
  align-items: flex-start;
}

.print {
  position: relative;
  display: block;
  text-decoration: none;
  transform-origin: 50% 0;
  transition: transform 220ms ease;
}
.print-big { width: min(100%, 300px); transform: rotate(-2.4deg); }
.print-big:hover,
.print-big:focus-visible { transform: rotate(-.8deg); }
.print-little { width: min(100%, 252px); transform: rotate(3deg); margin-top: clamp(0px, 3vw, 44px); }
.print-little:hover,
.print-little:focus-visible { transform: rotate(1.2deg); }

/* strips of tape holding each print to the page */
.tape {
  position: absolute;
  background: rgba(246, 234, 211, .62);
  border-left: 1px dashed rgba(23, 19, 15, .25);
  border-right: 1px dashed rgba(23, 19, 15, .25);
}
.tape-left { top: -16px; left: 26%; width: 86px; height: 30px; transform: rotate(-4deg); }
.tape-right { top: -14px; right: 18%; width: 74px; height: 26px; transform: rotate(6deg); }

.frame {
  display: block;
  background: var(--cream);
  border: 2px solid var(--ink);
  padding: clamp(18px, 4vw, 26px);
  box-shadow: 10px 12px 0 rgba(23, 19, 15, .35);
}
.print-little .frame { padding: clamp(12px, 2.6vw, 16px); box-shadow: 8px 10px 0 rgba(23, 19, 15, .35); }
.frame img { display: block; width: 100%; height: auto; }

.print-label {
  display: block;
  margin-top: 16px;
  font-family: 'Archivo Black', Archivo, sans-serif;
  font-size: clamp(18px, 4.6vw, 24px);
  color: var(--cream);
}
.print-little .print-label { font-size: clamp(17px, 4.2vw, 21px); letter-spacing: -.01em; }
.nowrap { white-space: nowrap; }

.print-meta {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ── FUTURE RSVP (styles ready; section is commented out in index.html) ── */
.rsvp {
  position: relative;
  background: var(--cream);
  padding: clamp(64px, 12vw, 140px) clamp(20px, 5vw, 72px);
}
.rsvp-title {
  margin: 0 0 18px;
  font-family: 'Archivo Black', Archivo, sans-serif;
  font-weight: 400;
  color: var(--red);
  font-size: clamp(40px, 10vw, 110px);
  line-height: .86;
  filter: url(#stdInk);
}
.rsvp-copy { margin: 0 0 32px; font-size: clamp(17px, 4.4vw, 24px); font-weight: 500; }
.rsvp-embed { border: 2px solid var(--ink); width: 100%; }

/* ── CLOSING ─────────────────────────────────────────────── */
.final {
  position: relative;
  overflow: hidden;
  background: var(--cream);
  min-height: 88svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(30px, 6vw, 56px);
  padding: clamp(72px, 14vw, 150px) clamp(20px, 5vw, 72px);
}

.drifter {
  position: absolute;
  top: 12%;
  left: 0;
  width: clamp(74px, 15vw, 170px);
  height: auto;
  animation: drift 58s linear infinite;
}

.final-title {
  position: relative;
  margin: 0;
  font-family: 'Archivo Black', Archivo, sans-serif;
  font-weight: 400;
  color: var(--red);
  line-height: .82;
  font-size: clamp(62px, 17vw, 190px);
  letter-spacing: -.025em;
  filter: url(#stdInk);
  max-width: 16ch;
}

.final-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: clamp(14px, 4vw, 36px);
  border-top: 2px solid var(--ink);
  padding-top: clamp(16px, 3vw, 24px);
}
.final-date {
  margin: 0;
  font-family: 'Archivo Black', Archivo, sans-serif;
  font-size: clamp(30px, 8vw, 64px);
  letter-spacing: -.01em;
}
.final-place {
  margin: 0;
  font-size: clamp(13px, 3.4vw, 18px);
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.fineprint {
  position: relative;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  opacity: .6;
}

/* ── MOTION ──────────────────────────────────────────────── */
@keyframes flightPath {
  0%   { left: -12%; top: 104%; transform: translate(-50%, -50%) rotate(12deg) scale(.78); }
  20%  { left: 16%;  top: 84%;  transform: translate(-50%, -50%) rotate(6deg) scale(.84); }
  40%  { left: 38%;  top: 68%;  transform: translate(-50%, -50%) rotate(-6deg) scale(.9); }
  58%  { left: 52%;  top: 56%;  transform: translate(-50%, -50%) rotate(-2deg) scale(.95); }
  76%  { left: 64%;  top: 42%;  transform: translate(-50%, -50%) rotate(-9deg) scale(.98); }
  100% { left: 74%;  top: 24%;  transform: translate(-50%, -50%) rotate(-4deg) scale(1); }
}
@keyframes bob { 0%, 100% { margin-top: -1.2%; } 50% { margin-top: 1.2%; } }
@keyframes starPop {
  0%   { transform: scale(0) rotate(-40deg); opacity: 0; }
  55%  { transform: scale(1.18) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes peelAway {
  from { transform: none; opacity: 1; }
  to   { transform: translate(26vw, -30vh) rotate(-5deg); opacity: 0; }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px) rotate(-1deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes drift {
  0%   { transform: translate(-12vw, 8vh) rotate(-8deg); }
  50%  { transform: translate(45vw, -2vh) rotate(6deg); }
  100% { transform: translate(105vw, 10vh) rotate(-4deg); }
}
@keyframes flutter {
  0%, 100% { transform: rotate(-3deg) scaleX(1); }
  50%      { transform: rotate(2deg) scaleX(.9); }
}

/* ── PHONES ──────────────────────────────────────────────
   Shorter lines let the headline run far larger and fill the screen. */
@media (max-width: 620px) {
  .hero-title .w { display: block; }
  .hero-title .indent-1,
  .hero-title .indent-2 { margin-left: 0; }
  .hero-title { font-size: 21vw; line-height: .86; }
  .hero {
    min-height: 100svh;
    padding: 26px 18px 34px;
    gap: 20px;
    justify-content: space-between;
  }
  .hero-info { gap: 12px; }
  .perch-monarch { right: -1.05em; width: 1.05em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
