/* Little Duckling — vintage pond storybook stationery.
   Nursery keepsakes print INSIDE the invitation in a normal-flow band.
   Shared engine owns placement, opening and motion; no new font requests. */
:root {
  --c-page: #FBF7E9;
  --c-paper: #FBF7E9;
  --c-paper-2: #C6D8D7;
  --c-ink: #3E473D;
  --c-ink-soft: #455B48;
  --c-primary: #455B48;
  --c-accent: #E5C56B;
  --c-foil: #A58A43;
  --c-on-paper-2: #3E473D;
  --c-on-paper-2-soft: #455B48;
  --c-on-primary: #FBF7E9;
  --c-on-accent: #3E473D;
  --c-text-accent: #455B48;
  --c-foil-ink: #6C592D;
  --c-season: #AEBB9B;
  --c-lining: #455B48;
  --c-envelope: #AEBB9B;
  --c-photo-paper: #FFFCF2;
  --c-line: rgba(69, 91, 72, .22);
  --c-stitch: rgba(69, 91, 72, .42);
  --c-focus: #455B48;
  --font-script: 'Sacramento', 'Snell Roundhand', 'Apple Chancery', cursive;
  --font-serif: 'Lora', 'Iowan Old Style', Georgia, serif;
  --font-sans: 'Nunito', 'Avenir Next', 'Helvetica Neue', sans-serif;
  --shadow-rgb: 62, 71, 61;
  --shadow-paper: 0 1px 1px rgba(var(--shadow-rgb), .1),
                  0 6px 12px -6px rgba(var(--shadow-rgb), .18),
                  0 20px 30px -20px rgba(var(--shadow-rgb), .25);
  --shadow-lift: 0 2px 2px rgba(var(--shadow-rgb), .1),
                 0 14px 22px -10px rgba(var(--shadow-rgb), .23),
                 0 30px 44px -28px rgba(var(--shadow-rgb), .3);
  --radius-paper: 3px;
  --grain: url(../assets/shared/paper-grain.svg);
  --grain-size: 260px;
}
body {
  background: var(--c-page) var(--grain) 0 0 / var(--grain-size);
  background-blend-mode: multiply;
  color: var(--c-ink);
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.6;
}
.card, .polaroid, .tag-button, .envelope, .page {
  background-image: var(--grain);
  background-size: var(--grain-size);
  background-blend-mode: multiply;
}
:where(a, button, input, select, textarea):focus-visible { outline: 2px dashed var(--c-focus); outline-offset: 6px; }
.envelope {
  background-color: var(--c-envelope);
  color: var(--c-ink);
  border-radius: var(--radius-paper);
  box-shadow: var(--shadow-paper);
  --envelope-liner-image: url(../assets/duckling/envelope-liner.svg);
  --envelope-interior: #D9DFC9;
}
.card {
  background-color: var(--c-paper);
  color: var(--c-ink);
  border-radius: var(--radius-paper);
  --keyline: inset 0 0 0 10px var(--c-paper), inset 0 0 0 11px rgba(69, 91, 72, .3);
  box-shadow: var(--keyline), var(--shadow-paper);
  text-align: center;
}
.card :where(h1, h2, .card__names) { font-family: var(--font-script); font-weight: 400; color: var(--c-primary); line-height: 1; }
.card :where(.card__kicker, small) { font-family: var(--font-sans); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--c-ink-soft); }
/* Pond-blue date stock, deliberately distinct from Meadow's sage floral card. */
.card--alt {
  background-color: var(--c-paper-2);
  color: var(--c-on-paper-2);
  --keyline: inset 0 0 0 10px var(--c-paper-2), inset 0 0 0 11px rgba(69, 91, 72, .3);
}
.card--alt :where(.card__kicker, small, p) { color: var(--c-on-paper-2-soft); }
/* Booties, wooden duck toy and folded bib keep their own space above the words. */
.piece--invite .invite__body { gap: 4cqi; }
.piece--invite .invite__body::before {
  content: '';
  display: block;
  flex: 0 0 auto;
  width: 112%;
  max-width: calc(100% + 32px);
  aspect-ratio: 3 / 1;
  background: url(../assets/duckling/header-sprig.svg) center / contain no-repeat;
}
.piece--invite .invite__line { letter-spacing: .11em; }
.piece--invite .invite__sub { font-style: italic; }
.seal { background: url(../assets/duckling/seal.svg) center / contain no-repeat; border-radius: 50%; color: var(--c-ink); min-width: 44px; min-height: 44px; }
.polaroid { background-color: var(--c-photo-paper); color: var(--c-ink); padding: 6% 6% 20%; border-radius: 1px; box-shadow: var(--shadow-paper); text-align: center; }
.polaroid::before {
  content: '';
  position: absolute;
  top: -8px; left: 14%;
  width: 26%; height: 20px;
  rotate: -5deg;
  background: rgba(229, 197, 107, .5) var(--grain) center / 120px;
  pointer-events: none;
}
.polaroid__caption, .gallery__item .polaroid__caption { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: max(16px, 10cqi); line-height: 1.2; color: var(--c-ink); }
.gallery__item .polaroid__caption { font-size: 1.0625rem; }
.photo-frame img, .polaroid img, .gallery__photo img { filter: sepia(.04) saturate(.9) contrast(.97); }
.tag-button { background-color: var(--c-primary); color: var(--c-on-primary); border: 0; box-shadow: var(--shadow-paper); font-family: var(--font-sans); }
.tag-button::before {
  content: '';
  position: absolute;
  top: 9%; left: 50%;
  width: 9%; aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: var(--c-page);
  box-shadow: inset 0 1px 2px rgba(var(--shadow-rgb), .35);
}
.tag-button::after { content: ''; position: absolute; inset: 7%; border: 1px dashed rgba(251, 247, 233, .5); border-radius: 50%; pointer-events: none; }
.tag-button__script { font-family: var(--font-script); }
.piece--tag.tag-button .tag__main { font-size: 19cqi; line-height: 1.1; }
/* Keep the gingham inside the envelope; no pattern competes with countdown copy. */
.countdown { background: var(--c-lining) var(--grain) center / var(--grain-size); background-blend-mode: multiply; color: var(--c-paper); padding-top: 2.6rem; }
.countdown__title { font-family: var(--font-script); font-weight: 400; color: var(--c-paper); }
.countdown__unit { background: var(--c-paper); color: var(--c-ink); border-radius: 3px; }
.countdown__label { color: var(--c-ink-soft); font-family: var(--font-sans); }
.countdown__done { color: var(--c-paper); }
.page { background-color: var(--c-paper); color: var(--c-ink); box-shadow: var(--shadow-lift); }
.page__title { font-family: var(--font-script); font-weight: 400; color: var(--c-primary); }
.page__title::after { content: none; }
.page__sprig { display: block; width: 220px; max-width: 75%; height: auto; margin: .4em auto 0; }
.page :where(h2, h3) { font-family: var(--font-sans); color: var(--c-primary); }
.page :where(a:not(.btn)) { color: var(--c-text-accent); text-underline-offset: .22em; }
.field label, .field legend { font-family: var(--font-sans); color: var(--c-ink-soft); }
.field :where(input, select, textarea) { font-family: var(--font-serif); color: var(--c-ink); background-color: transparent; border: 0; border-bottom: 1.5px solid var(--c-ink-soft); border-radius: 0; min-height: 48px; }
.field :where(input, select, textarea)::placeholder { color: var(--c-ink-soft); opacity: 1; font-style: italic; }
.field :where(input[type=radio], input[type=checkbox]) { accent-color: var(--c-primary); width: 22px; height: 22px; min-height: 0; }
.field [aria-invalid=true] { border-bottom-color: #8A2E1C; }
.field .field__error, .form__summary, .form__send-error { color: #8A2E1C; }
.btn { background: var(--c-primary) var(--grain) center / 160px; color: var(--c-on-primary); font-family: var(--font-sans); border: 0; border-radius: 3px; min-height: 48px; box-shadow: 0 1px 1px rgba(var(--shadow-rgb), .2); }
.btn:hover { background-color: var(--c-ink); }
.btn--ghost { background: transparent; color: var(--c-primary); box-shadow: inset 0 0 0 1.5px currentColor; }
.choices--tickets .choice { font-family: var(--font-sans); box-shadow: inset 0 0 0 6px var(--c-paper), inset 0 0 0 7px rgba(69, 91, 72, .4), var(--shadow-paper); }
.choices--tickets .choice.is-checked { background-color: var(--c-paper-2); color: var(--c-ink); }
.choices--tickets .choice:has(input:checked) { background-color: var(--c-paper-2); color: var(--c-ink); }
.rsvp-thanks { rotate: -1deg; }
.page .rsvp-thanks__title { font-family: var(--font-script); font-weight: 400; color: var(--c-primary); }
.rsvp-thanks p { font-style: italic; }
.rsvp-thanks .demo-note { color: var(--c-ink-soft); font-style: normal; }
/* Keep nursery clusters within the phone canvas and clear of photo captions. */
@media (max-width: 1023px) {
  .collage .decor--3 { left: calc(64 * var(--u)); width: calc(34 * var(--u)); }
  .collage .decor--4 { left: calc(1 * var(--u)); top: calc((160 + var(--top)) * var(--u)); width: calc(13 * var(--u)); }
}
@media (min-width: 1024px) { .countdown { padding-top: 6.25rem; } }
