* { box-sizing: border-box; }

:root {
  --paper: #fffcf8;
  --ink: #a8355e;          /* deepest calligraphy pink — body text */
  --ink-soft: #c8648a;
  --rule: #efc6d3;
  --serif: 'Cormorant Garamond', 'Cormorant', Garamond, 'Times New Roman', serif;
  --script: 'Italianno', 'Snell Roundhand', 'Apple Chancery', cursive;

  /* Each flower column is 478 × 1274. It stands full height at the window's
     edge and tucks partly off-screen when the window is too narrow to keep
     ~660px clear in the middle. */
  --bloom-h: 100svh;
  --bloom-w: calc(var(--bloom-h) * 478 / 1274);
  --tuck: clamp(0px, var(--bloom-w) - (50vw - 330px), var(--bloom-w) * .55);

  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
}

body { margin: 0; background: var(--paper); overflow-x: clip; position: relative; }
.garden-foot { display: none; }

/* ---------- Watercolor lettering ----------
   .script tints font text with the wash; .ink-art uses the calligrapher's own
   lettering (cut from the invite) as a mask over the same wash. */
.script, .ink-art {
  background:
    radial-gradient(14% 60% at 12% 40%, #b02d5c 0%, transparent 70%),
    radial-gradient(10% 50% at 58% 65%, #b8325f 0%, transparent 70%),
    radial-gradient(12% 70% at 86% 30%, #a92a58 0%, transparent 70%),
    linear-gradient(100deg, #e88aab 0%, #cf4f7d 28%, #e27499 52%, #c23a6a 74%, #df7ba0 100%);
}
.script {
  font-family: var(--script);
  font-weight: 400;
  color: #c2416f;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Flowers at the window edges ---------- */
.garden { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.bloom {
  position: absolute;
  bottom: 0;
  height: var(--bloom-h);
  width: var(--bloom-w);
  user-select: none;
  /* a soft-edged mask that sweeps upward, so the flowers paint in from the ground */
  -webkit-mask-image: linear-gradient(to top, #000 40%, transparent 60%);
          mask-image: linear-gradient(to top, #000 40%, transparent 60%);
  -webkit-mask-size: 100% 250%;
          mask-size: 100% 250%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: 0 100%;
          mask-position: 0 100%;
  animation:
    paint-in 2.6s cubic-bezier(.22, .61, .36, 1) both,
    sway 9s ease-in-out 2.6s infinite alternate;
}
.bloom-left  { left: 0;  translate: calc(-1 * var(--tuck)) 0; transform-origin: 0 100%;   --drift: -40px; }
.bloom-right { right: 0; translate: var(--tuck) 0;            transform-origin: 100% 100%; --drift: 40px;
               animation-delay: .18s, 2.78s; animation-direction: normal, alternate-reverse; }

@keyframes paint-in {
  from {
    opacity: 0;
    transform: translateX(var(--drift)) scale(.97);
    -webkit-mask-position: 0 0;
            mask-position: 0 0;
  }
  25% { opacity: 1; }
  to {
    opacity: 1;
    transform: none;
    -webkit-mask-position: 0 100%;
            mask-position: 0 100%;
  }
}
@keyframes sway { from { rotate: 0deg; } to { rotate: .5deg; } }

/* ---------- Content column ---------- */
.content {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  width: min(680px, 100% - 40px);
  margin-inline: auto;
  padding-block: clamp(32px, 6vh, 90px) clamp(24px, 4vh, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ink-art {
  /* a deeper version of the wash, so the thin pen strokes hold their color */
  background:
    radial-gradient(14% 60% at 12% 40%, #9e2452 0%, transparent 70%),
    radial-gradient(10% 50% at 58% 65%, #a52a56 0%, transparent 70%),
    radial-gradient(12% 70% at 86% 30%, #95224e 0%, transparent 70%),
    linear-gradient(100deg, #d76a91 0%, #bf3e6c 28%, #d0628a 52%, #b0305f 74%, #cd668d 100%);
  display: block;
  margin: 0 auto;
  -webkit-mask: var(--art) center / contain no-repeat;
          mask: var(--art) center / contain no-repeat;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.names-art {
  --art: url('assets/names-ink.png');
  width: min(100%, clamp(340px, 38vw, 600px));
  aspect-ratio: 819 / 182;
}

.dateline {
  margin: .8rem 0 0;
  font-size: clamp(.95rem, .85rem + .4vw, 1.15rem);
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink);
}
.dateline i { font-style: normal; color: var(--ink-soft); padding-inline: .35em; }

.sprig {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: clamp(16px, 3vh, 32px) 0 clamp(4px, 1vh, 10px);
}
.sprig::before, .sprig::after { content: ''; width: 56px; height: 1px; background: linear-gradient(90deg, transparent, var(--rule)); }
.sprig::after { transform: scaleX(-1); }
.sprig img { height: 34px; width: auto; rotate: 18deg; }

/* ---------- Schedule ---------- */
.weekend-art {
  --art: url('assets/weekend-ink.png');
  width: clamp(230px, 20vw, 300px);
  aspect-ratio: 624 / 174;
  margin-bottom: clamp(8px, 1.6vh, 16px);
}

.schedule {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.schedule li {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 clamp(10px, 2vw, 22px);
}
.schedule li + li { border-left: 1px solid var(--rule); }
.schedule .day   { font-size: 2.7rem; line-height: 1; padding: 0 .2em; }
.schedule .date  { font-size: .82rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; margin-top: .15rem; }
.schedule .event { font-size: 1.22rem; line-height: 1.3; margin-top: .4rem; color: #8f2b4f; text-wrap: balance; }

/* ---------- Sign-up ---------- */
.signup { width: min(100%, 470px); margin-top: clamp(24px, 4.5vh, 48px); }

.intro { margin: 0 0 .8rem; font-size: 1.15rem; font-style: italic; line-height: 1.35; }

form { display: flex; gap: 8px; font-size: 1rem; }
label { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button:disabled { opacity: .7; cursor: progress; }

input, button { min-height: 46px; border-radius: 999px; font: inherit; }

input {
  flex: 1;
  min-width: 0;
  padding: 0 1.2em;
  border: 1px solid #ebbccb;
  background: rgb(255 255 255 / .85);
  color: #7d2b49;
  font-size: 1.1rem;
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder { color: #c98aa2; font-style: italic; }
input:focus { outline: none; border-color: var(--ink-soft); box-shadow: 0 0 0 3px rgb(216 106 146 / .18); }

button {
  border: 0;
  padding: 0 1.5em;
  color: #fff;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  background:
    radial-gradient(120% 140% at 20% 10%, rgb(255 255 255 / .22), transparent 55%),
    linear-gradient(135deg, #d9658f, #c2416f 55%, #b3345f);
  box-shadow: 0 2px 10px rgb(179 52 95 / .22);
  transition: filter .2s, transform .2s;
}
button:hover { filter: brightness(.94) saturate(1.08); transform: translateY(-1px); }
button:active { transform: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
input:focus-visible { outline: none; }

.status { margin: .5rem 0 0; min-height: 1.3em; font-style: italic; }

/* ---------- Goose ---------- */
.signup { position: relative; }
.goose {
  display: block;
  width: 124px;
  height: auto;
  margin: 0 auto 12px;
  transform-origin: 50% 100%;
  animation: goose-in 1.2s cubic-bezier(.34, 1.4, .64, 1) 1.5s both;
  transition: rotate .4s ease;
}
.goose:hover { animation: goose-wiggle .7s ease-in-out; }
@keyframes goose-in { from { opacity: 0; transform: translateY(14px) rotate(-8deg); } }
@keyframes goose-wiggle { 25% { rotate: -5deg; } 60% { rotate: 4deg; } }

/* wide screens: Goose stands beside the form instead of above it */
@media (min-width: 1100px) {
  .goose {
    position: absolute;
    left: calc(100% + clamp(20px, 5vw - 30px, 70px));
    bottom: 0;
    width: clamp(120px, 11vw, 160px);
    margin: 0;
  }
}

/* ---------- Footer ---------- */
footer { margin-top: clamp(12px, 3vh, 36px); }
.venue { display: block; width: clamp(170px, 18vh, 230px); height: auto; margin: 0 auto 6px; }
footer p { margin: 0; font-size: .8rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Content entrance ---------- */
.content > * { animation: rise 1.1s ease-out both; }
.hero    { animation-delay: .5s; }
.sprig   { animation-delay: .75s; }
.weekend { animation-delay: .9s; }
.signup  { animation-delay: 1.05s; }
footer   { animation-delay: 1.2s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Phones & portrait tablets: flowers crown the top corners
   and gather again around the venue at the bottom of the page ---------- */
@keyframes fade-in { from { opacity: 0; } }

@media (max-width: 900px) {
  :root {
    --bloom-h: min(125vw, 980px);
    --tuck: calc(var(--bloom-w) * .34);
  }
  .garden, .garden-foot { position: absolute; inset: 0 0 auto; height: var(--bloom-h); overflow: hidden; }
  .garden-foot { display: block; inset: auto 0 0; }
  .bloom { animation: fade-in 1.8s ease-out both; }
  .bloom-right { animation-delay: .15s; }
  .garden .bloom {
    top: 0; bottom: auto;
    -webkit-mask-image: linear-gradient(#000 30%, transparent 52%);
            mask-image: linear-gradient(#000 30%, transparent 52%);
    -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
  }
  .garden-foot .bloom {
    -webkit-mask-image: linear-gradient(to top, #000 22%, transparent 40%);
            mask-image: linear-gradient(to top, #000 22%, transparent 40%);
    -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
  }

  .content {
    justify-content: flex-start;
    padding-top: min(44vw, 330px);
    padding-bottom: min(30vw, 230px);
  }
  .names-art { width: min(100%, 92vw, 480px); }
  .dateline { letter-spacing: .18em; }
  .venue { width: min(56vw, 260px); }
}

@media (max-width: 560px) {
  .dateline i { display: block; height: 0; overflow: hidden; }
  .schedule { grid-template-columns: 1fr; gap: 16px; }
  .schedule li + li { border-left: 0; }
  .schedule li + li::before { content: ''; width: 40px; height: 1px; background: var(--rule); margin-bottom: 14px; }
  form { flex-direction: column; gap: 10px; }
  input { text-align: center; }
  input, button { min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .bloom, .content > *, .goose { animation: none; }
}
