@font-face {
  font-family: Coldia;
  src: url("assets/Coldia-ExtraLight.otf") format("opentype");
  font-weight: 200;
  font-display: swap;
}

@font-face {
  font-family: "Organic Grain";
  src: url("assets/organicgrain-regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Organic Grain";
  src: url("assets/organicgrain-italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f9f6ea;
  --plum: #351f24;
  --rose: #6f5755;
  --ink: #3a2f2a;
  --moss: #525440;
  --sage: #83866a;
  --rule: #83866a60;
  --grain: url("assets/paper.svg");
  color: var(--ink);
  background: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--grain) repeat, url("assets/parchment.svg") repeat, linear-gradient(90deg, #7a5c3214, transparent 14%, transparent 86%, #7a5c3214), var(--paper); }
a { color: inherit; text-underline-offset: 5px; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin-top: 0; }
p { line-height: 1.75; }
h1, h2, h3 { color: var(--plum); font-family: "Organic Grain", Georgia, serif; font-weight: 400; }
h1 em, h2 em { font-weight: 400; }
h2 { font-size: clamp(2.5rem, 4vw, 3.7rem); line-height: 1.15; }
.skip-link { position: absolute; z-index: 10; top: -100px; left: 20px; padding: 15px; background: var(--paper); }
.skip-link:focus { top: 15px; }
.brand-mark { display: block; background: currentColor; mask: var(--mark) center / contain no-repeat; }
[data-reveal] { transition: opacity 320ms ease-out, translate 320ms cubic-bezier(.2, .7, .2, 1); }
.reveal-pending { opacity: 0; translate: 0 8px; }
.reveal-pending:focus-within { opacity: 1; translate: 0 0; }

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  max-width: 1320px;
  margin: 0 auto;
  padding: 30px 5%;
  border-bottom: 1px solid var(--rule);
}
.header-start { display: flex; align-items: center; gap: 24px; }
.header-monogram { --mark: url("assets/monogram.svg"); flex: none; width: 56px; height: 56px; color: var(--plum); }
.wordmark { width: 210px; }
.wordmark img { opacity: .9; }
.header-link { width: fit-content; font-size: .8rem; text-decoration: none; }
.site-header > .header-link { justify-self: end; border-bottom: 1px solid var(--rose); padding-bottom: 4px; }
/* Invisible extensions give small links a 44px tap area without changing how they look. */
.header-link, .wordmark, .site-footer > a:last-child { position: relative; }
.header-link::after, .site-footer > a:last-child::after { content: ""; position: absolute; inset: -16px -4px; }
.wordmark::after { content: ""; position: absolute; inset: -8px 0; }
.header-link:active { color: var(--rose); }
@media (hover: hover) {
  .header-link:hover { color: var(--rose); }
  .button:hover:not(:disabled) { background: var(--rose); border-color: var(--rose); }
}
.eyebrow, .keepsake-caption, .form-heading > p {
  color: var(--moss);
  font: .75rem/1.7 Arial, Helvetica, sans-serif;
  text-wrap: balance;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.hero { position: relative; overflow: clip; }
.hero-copy { position: relative; max-width: 1180px; margin: 0 auto; padding: 48px 22px 0; text-align: center; }
.hero-copy .eyebrow { margin-bottom: 22px; }
h1 { margin-bottom: 20px; font-size: clamp(3.5rem, 6.4vw, 5.8rem); line-height: 1.04; letter-spacing: -.035em; }
.hero-description { margin-bottom: 23px; color: var(--rose); font-size: 1.02rem; line-height: 1.7; }
.button { display: inline-block; padding: 14px 25px; border: 1px solid var(--plum); background: var(--plum); color: var(--paper); font-size: .83rem; line-height: 1.4; text-decoration: none; cursor: pointer; touch-action: manipulation; transition: background-color 150ms ease-out, border-color 150ms ease-out, transform 100ms ease-out; }
.button:active:not(:disabled) { background: var(--rose); border-color: var(--rose); transform: scale(.98); }
.button:disabled { cursor: not-allowed; background: var(--rose); border-color: var(--rose); }
.hero-footnote { margin: 13px 0 0; color: var(--moss); font-size: .75rem; font-style: italic; }
.hero-bird { --mark: url("assets/bird.svg"); position: absolute; width: 85px; height: 80px; top: 130px; right: 9%; color: var(--moss); transform: rotate(-18deg); }
.hero-flower { --mark: url("assets/leaf.svg"); position: absolute; width: 70px; height: 100px; left: 9%; top: 210px; color: var(--rose); transform: rotate(-18deg); }
.moon { display: block; width: 25px; height: 25px; border-radius: 50%; box-shadow: -7px 3px 0 0 currentColor; }
.hero-moon { position: absolute; left: 23%; top: 80px; color: var(--sage); transform: rotate(-25deg); }

.letter-scene { position: relative; display: grid; align-content: center; margin-top: 16px; }
.letter-stage { position: relative; width: 100%; height: 470px; max-width: 1000px; margin: 0 auto; display: grid; place-items: center; }
.envelope {
  --flap-angle: -180deg;
  --letter-rise: -56%;
  --seal-opacity: 0;
  --flap-layer: 0;
  --envelope-rotation: -3deg;
  position: relative;
  width: 340px;
  height: 224px;
  margin-top: 55px;
  transform: rotate(var(--envelope-rotation));
  filter: drop-shadow(0 12px 10px #351f2428);
  /* translate and rotate stack on top of the resting tilt, so the arrival never fights it. */
  transition: translate 1100ms ease 120ms, rotate 1100ms ease 120ms, opacity 700ms ease-out 120ms;
}
/* No transition into the waiting state, so an envelope already on screen never animates away first. */
.envelope.envelope-arriving { translate: 56px 12px; rotate: 5deg; opacity: 0; transition: none; }
.envelope-back { position: absolute; inset: 0; z-index: 1; background: var(--grain), #40262e; border: 1px solid #351f24; }
.envelope-flap {
  position: absolute;
  z-index: var(--flap-layer);
  top: 0;
  width: 100%;
  height: 60%;
  background: var(--grain), #5a3d43;
  clip-path: polygon(0 0, 100% 0, 51% 100%, 49% 100%);
  transform-origin: 50% 0;
  transform: perspective(900px) rotateX(var(--flap-angle));
}
.envelope-letter {
  position: absolute;
  z-index: 2;
  inset: 12px 22px 0;
  padding: 20px 10px;
  color: var(--plum);
  background: var(--grain), var(--paper);
  border: 1px solid #bcb3a2;
  outline: 1px solid #83866a80;
  outline-offset: -9px;
  text-align: center;
  transform: translateY(var(--letter-rise));
}
.letter-flower { --mark: url("assets/flower.svg"); width: 24px; height: 24px; margin: 0 auto 12px; color: var(--rose); }
.envelope-letter p { margin-bottom: 10px; font-size: .9rem; line-height: 1.5; }
.envelope-letter p:first-of-type { font-style: italic; font-size: .8rem; }
.letter-signature { font-size: .65rem; font-style: italic; }
.envelope-pocket {
  position: absolute;
  z-index: 3;
  inset: 0;
  background: linear-gradient(33deg, #6f57552b 49.8%, transparent 50%) left / 51% 100% no-repeat,
    linear-gradient(-33deg, #20101935 49.8%, transparent 50%) right / 51% 100% no-repeat,
    var(--grain), #4b3038;
  clip-path: polygon(0 0, 50% 59%, 100% 0, 100% 100%, 0 100%);
  border: 1px solid #351f2480;
}
.envelope-seal { position: absolute; z-index: 5; top: 46%; left: calc(50% - 23px); display: grid; place-items: center; width: 46px; height: 46px; border: 3px double #a39272; border-radius: 47% 53% 50% 44%; background: var(--grain), #c8ba98; color: #685540; box-shadow: inset 1px 2px 2px #f9f6ea80, inset -1px -2px 3px #68554070, 1px 3px 3px #27161e70; opacity: var(--seal-opacity); }
.seal-mark { --mark: url("assets/flower.svg"); width: 25px; height: 25px; }
.envelope-inscription { position: absolute; z-index: 4; bottom: 23px; left: 0; width: 100%; color: #d9c9b5; text-align: center; font-size: .68rem; font-style: italic; }
.margin-note { position: absolute; width: 170px; color: var(--rose); font-family: Coldia, Georgia, serif; font-weight: 200; font-size: 1.7rem; line-height: 1.4; }
.note-left { left: 7%; top: 48%; transform: rotate(-8deg); }
.note-left::after { content: ""; display: block; width: 45px; height: 30px; margin: 12px 0 0 45px; border-bottom: 1px solid var(--sage); border-radius: 50%; transform: rotate(25deg); }
.note-right { right: 4%; top: 31%; transform: rotate(7deg); }

.intro, .details, .register { max-width: 1190px; margin: 0 auto; }
.intro { display: grid; grid-template-columns: 1fr 1.2fr; align-items: center; gap: 10%; padding: 70px 6% 110px; position: relative; }
.keepsake { width: 100%; max-width: 330px; justify-self: center; padding: 16px; border: 1px solid var(--moss); transform: rotate(-4deg); color: var(--moss); background: var(--grain), #e9e6d7; box-shadow: 4px 6px 12px #3a2f2a16; }
.keepsake-inner { display: flex; flex-direction: column; align-items: center; gap: 30px; padding: 34px 15px; border: 1px solid var(--sage); text-align: center; }
.keepsake-caption { font-size: .52rem; line-height: 1.9; letter-spacing: .17em; }
.keepsake-monogram { --mark: url("assets/monogram.svg"); width: 165px; height: 166px; }
.intro-copy h2 { margin-bottom: 25px; }
.intro-copy > p:not(.eyebrow) { max-width: 440px; font-size: .97rem; }
.intro-copy p.signature { margin: 25px 0 0; color: var(--rose); font-family: Coldia, Georgia, serif; font-weight: 200; font-size: 1.9rem; }

.details { position: relative; padding: 65px 6% 85px; }
/* The flower sits in a gap left in the vine (see .details::after), tinted like the feature icons, with no background patch. */
.details::before { content: ""; position: absolute; z-index: 1; top: -10px; left: calc(50% - 10px); width: 20px; height: 20px; background: var(--moss); mask: url("assets/flower.svg") center / contain no-repeat; }
.details-heading { text-align: center; }
.details-heading h2 { font-size: clamp(2rem, 3vw, 3rem); }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px; margin-top: 55px; }
.detail-card { text-align: center; }
.detail-icon { width: 50px; height: 50px; margin: 0 auto 22px; color: var(--moss); }
.icon-letter { --mark: url("assets/letter.svg"); }
.icon-flower { --mark: url("assets/flower.svg"); }
.icon-bird { --mark: url("assets/bird.svg"); }
.detail-card h3 { font-size: 1.45rem; margin-bottom: 14px; }
.detail-card p { color: var(--rose); font-size: .9rem; }

.register { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: 9%; padding: 90px 6% 110px; overflow-x: clip; }
.register-flower { --mark: url("assets/leaf.svg"); width: 58px; height: 65px; margin-bottom: 32px; color: var(--rose); }
.register h2 { margin: 20px 0 25px; }
.register-copy > p:not(.eyebrow) { font-size: .95rem; }
.price-note { margin: 30px 0 20px; padding: 20px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.price-note p { margin: 0; color: var(--moss); font-size: .8rem; }
.price-note strong { display: inline-block; margin-top: 9px; color: var(--plum); font-size: 1.5rem; font-weight: 400; }
.price-note strong span { font-size: .9rem; font-style: italic; }
.register-copy .fine-print { color: var(--rose); font-size: .8rem; }
/* Register links land exactly on the section divider. */
.register-anchor { position: absolute; top: 0; }
.form-card { padding: 28px 32px; border: 1px solid #aaa58e; outline: 1px solid #aaa58e; outline-offset: 5px; background: var(--grain), #eeebdd; box-shadow: 4px 7px 15px #351f2410; }
.form-heading { position: relative; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.form-heading h3 { margin-bottom: 0; font-size: 1.8rem; }
.form-heading > p { padding-right: 40px; }
.form-bird { --mark: url("assets/bird.svg"); position: absolute; right: 0; top: -7px; width: 34px; height: 34px; color: var(--moss); }
label { display: block; margin: 14px 0 6px; font: .8rem/1.4 Arial, Helvetica, sans-serif; }
label > span:not(.optional) { color: var(--rose); }
.optional { color: var(--rose); font-size: .75rem; }
input, select { width: 100%; min-width: 0; height: 44px; padding: 8px 10px; border: 1px solid #a7a58f; border-radius: 0; background: #f9f6ea90; color: var(--ink); font-size: 1rem; }
input:focus, select:focus { border-color: var(--moss); }
input:user-invalid, select:user-invalid { border-color: var(--rose); box-shadow: inset 0 0 0 1px var(--rose); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 16px; }
.form-row > div { min-width: 0; }
.form-privacy, .form-status { color: var(--rose); font-size: .8rem; line-height: 1.65; }
.form-privacy { margin: 16px 0 14px; }
.form-submit { width: 100%; }
/* Off-screen rather than display: none, which some spam bots skip. */
.form-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 8px 0 0; text-align: center; font-style: italic; }

/* Main section breaks: the folk vine on its side, centred across most of the width (whole leaves only, via round); smaller lines stay straight. */
.intro::before, .details::after, .register::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  height: 16px;
  pointer-events: none;
  background: url("assets/folk-vine.svg") center / auto 100% round;
}
.intro::before, .details::after, .register::before { top: -8px; }
.details::after { mask: linear-gradient(90deg, #000 calc(50% - 22px), transparent 0 calc(50% + 22px), #000 0); }

/* Received state: the card keeps its height (set in register.js) and swaps the form for a sealed note. */
.form-success { display: none; }
.form-card.is-registered { display: flex; flex-direction: column; justify-content: center; }
.form-card.is-registered > :not(.form-success) { display: none; }
.form-card.is-registered .form-success { display: flex; flex-direction: column; align-items: center; text-align: center; }
.success-seal { --wax: #c8ba98; position: relative; display: grid; place-items: center; width: 92px; height: 92px; margin: 12px 0 32px; animation: seal-press 420ms cubic-bezier(.2, .7, .2, 1) both; }
/* Spilled rim: a soft, uneven pool of wax pushed out round the stamp; drop-shadow follows its wavy outline. */
.success-seal::before {
  content: "";
  position: absolute;
  inset: -13px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3CradialGradient id='wax' cx='.36' cy='.3' r='.85'%3E%3Cstop offset='0' stop-color='%23d4c6a2'/%3E%3Cstop offset='1' stop-color='%23a8956d'/%3E%3C/radialGradient%3E%3Cpath fill='url(%23wax)' d='M50 3C58 2.6 68 3.2 74.8 7.1C81.5 11.1 86.4 19.6 90.3 26.8C94.1 33.9 98.1 42.3 98 50C97.9 57.7 93.4 65.9 89.4 72.8C85.4 79.6 80.3 86.7 73.8 91.1C67.2 95.6 57.8 99.7 50 99.5C42.2 99.3 33.9 94.1 27 89.8C20.1 85.5 12.5 80.4 8.9 73.8C5.2 67.1 5.1 58 5 50C4.9 42 4.4 32.5 8 25.7C11.6 19 19.7 13.5 26.7 9.7C33.8 5.9 42 3.4 50 3Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  filter: drop-shadow(1px 3px 3px #27161e59);
}
/* Pressed disc: lit from the top left, with a sunken ring where the stamp's edge sank in. */
.success-seal::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50% 48% 51% 49%;
  background: radial-gradient(circle at 34% 28%, #f1e7ca 0 8%, transparent 52%), radial-gradient(circle at 70% 76%, #9c895f5c 0 14%, transparent 60%), var(--grain), var(--wax);
  box-shadow: inset 0 0 0 6px #c4b48f, inset 0 0 0 7px #a3927266, inset 3px 4px 6px #6855406b, inset -2px -3px 4px #fbf5e2a6;
}
/* The monogram in the wax's dark shaded tone, with a pale lip on its lower-right edges so it reads as pressed in. */
.seal-impression { position: relative; z-index: 1; color: #695f4c; filter: drop-shadow(.8px .8px 0 #efe4c6d9); }
.seal-monogram { --mark: url("assets/monogram.svg"); width: 50px; height: 50px; }
.success-title { margin: 8px 0 12px; font-size: 1.8rem; outline: none; }
.success-message { max-width: 320px; margin: 0; color: var(--rose); }
.success-signature { margin: 16px 0 0; color: var(--rose); font-family: Coldia, Georgia, serif; font-weight: 200; font-size: 1.7rem; }
.confetti { position: absolute; inset: 50% auto auto 50%; }
.confetti > span { position: absolute; width: 18px; height: 18px; margin: -9px; background: currentColor; mask: var(--mark) center / contain no-repeat; opacity: 0; animation: confetti-burst 1500ms 220ms both; }
.confetti > span:nth-child(even) { animation-delay: 300ms; }
.confetti-leaf { --mark: url("assets/leaf.svg"); }
.confetti-flower { --mark: url("assets/flower.svg"); }
.confetti-letter { --mark: url("assets/letter.svg"); }
.confetti > .confetti-dot { width: 8px; height: 8px; margin: -4px; border-radius: 50%; mask: none; }
@keyframes seal-press {
  from { opacity: 0; scale: 1.35; }
  to { opacity: 1; scale: 1; }
}
/* Pops out fast, then drifts down and fades, like paper falling. */
@keyframes confetti-burst {
  0% { opacity: 0; translate: 0 0; rotate: 0deg; scale: .4; animation-timing-function: cubic-bezier(.2, .7, .3, 1); }
  12% { opacity: 1; }
  55% { opacity: 1; translate: var(--x) var(--y); scale: 1; animation-timing-function: ease-in; }
  100% { opacity: 0; translate: var(--x) calc(var(--y) + 60px); rotate: var(--r); scale: 1; }
}
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 35px max(6%, calc((100vw - 1050px) / 2)); background: var(--grain), var(--moss); color: var(--paper); }
.footer-monogram { --mark: url("assets/monogram.svg"); width: 65px; height: 65px; }
.site-footer p { margin: 0; font-style: italic; }
.site-footer p span { display: block; margin-top: 6px; font: .75rem/1.5 Arial, sans-serif; letter-spacing: .17em; text-transform: uppercase; }
.site-footer > a:last-child { font-size: .75rem; text-decoration: none; }

@media (min-width: 851px) {
  .hero { display: flex; flex-direction: column; min-height: 100vh; }
  .hero-copy { width: 100%; }
  .letter-scene { flex-grow: 1; }
  .register { min-height: 100vh; padding-top: 40px; padding-bottom: 40px; }
}

@media (max-width: 850px) {
  .hero-flower { left: 5%; width: 55px; height: 110px; }
  .hero-bird { right: 5%; width: 60px; height: 60px; }
  .hero-moon { left: 7%; }
  .margin-note { width: 110px; font-size: 1.25rem; }
  .note-left { left: 4%; }
  .note-right { right: 1%; }
  .intro { gap: 7%; }
  .keepsake-monogram { width: 130px; height: 130px; }
  .detail-grid { gap: 25px; }
  .register { gap: 7%; padding-left: 5%; padding-right: 5%; }
  .form-card { padding: 25px; }
}

@media (max-width: 600px) {
  .site-header { gap: 10px; padding: 20px 6%; }
  .header-start .header-link { display: none; }
  .header-monogram { width: 36px; height: 36px; }
  .wordmark { width: 135px; }
  .header-link-detail { display: none; }
  .hero-copy { padding: 48px 20px 0; }
  .hero-copy .eyebrow { letter-spacing: .15em; }
  h1 { font-size: clamp(3.2rem, 13vw, 4.6rem); }
  .hero-description { text-wrap: balance; }
  .hero-description br { display: none; }
  .hero-description, .intro-copy > p:not(.eyebrow), .register-copy > p:not(.eyebrow, .fine-print), .detail-card p { font-size: 1rem; }
  .hero-bird { top: 29px; right: 7%; width: 26px; height: 26px; }
  .hero-flower { top: auto; bottom: 30px; left: 4%; width: 26px; height: 56px; }
  .hero-moon { left: 10%; top: 26px; width: 13px; height: 13px; box-shadow: -4px 2px 0 currentColor; }
  .letter-scene { margin-top: 15px; }
  .letter-stage { height: 390px; }
  .envelope { width: min(76vw, 310px); height: 200px; margin-top: 25px; }
  .envelope-letter { inset: 10px 17px 0; padding-top: 15px; }
  .letter-flower { width: 20px; height: 20px; margin-bottom: 8px; }
  .envelope-letter p { font-size: .82rem; }
  .envelope-letter p:first-of-type { font-size: .73rem; }
  .letter-signature { font-size: .6rem; }
  .envelope-inscription { font-size: .6rem; }
  .margin-note { display: none; }
  .intro { grid-template-columns: 1fr; gap: 50px; padding: 55px 8% 65px; }
  .keepsake { width: 240px; padding: 12px; }
  .keepsake-inner { padding: 22px 10px; gap: 20px; }
  .intro-copy h2 { font-size: 2.8rem; }
  .details { padding: 50px 8% 35px; }
  .detail-grid { grid-template-columns: 1fr; gap: 25px; margin-top: 35px; }
  .detail-card { display: grid; grid-template-columns: 40px 1fr; column-gap: 23px; text-align: left; }
  .detail-icon { width: 37px; height: 40px; grid-row: span 2; margin: 0; }
  .detail-card h3 { margin-bottom: 10px; }
  .register { grid-template-columns: 1fr; gap: 35px; padding: 50px 8% 70px; }
  .register-flower { width: 38px; height: 65px; margin-bottom: 25px; }
  label { margin-top: 10px; }
  .form-heading { padding-bottom: 12px; }
  .form-privacy { margin: 12px 0; }
  .form-card { padding: 20px 16px; }
  .form-row { gap: 12px; }
  .form-heading h3 { font-size: 1.65rem; }
  .form-bird { width: 24px; height: 24px; }
  .site-footer { display: grid; grid-template-columns: auto 1fr; gap: 16px 20px; padding: 30px 8%; }
  .footer-monogram { width: 45px; height: 45px; }
  .site-footer p { grid-column: 1 / -1; font-size: .8rem; }
  /* Level with the monogram, above the tagline, instead of on its own bottom row. */
  .site-footer > a:last-child { grid-row: 1; grid-column: 2; justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; translate: none; transition: none; }
  .envelope { transition: none; }
  .success-seal { animation: none; }
  .confetti { display: none; }
}
