/* Convite editorial em cereja e rosa-papel, com retrato em arco e tipografia expressiva. */
@font-face {
  font-family: Fraunces;
  src: url("/assets/fraunces.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Fraunces;
  src: url("/assets/fraunces-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 550;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fff7f3;
  --surface: #fffbf8;
  --rose-paper: #fce5e7;
  --rose-detail: #efb7c2;
  --ink: #332027;
  --ink-soft: #68505a;
  --cherry: #a52345;
  --cherry-deep: #811735;
  --rule: #e9cfd1;
  --field-rule: #aa838a;
  --ticket-rule: #c67a90;
  --focus: #851c46;
  --font-display: Fraunces, Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --page-gutter: clamp(1.25rem, 5vw, 4.75rem);
  --page-max: 75rem;
  --portrait-shape: 50% 50% 0.9rem 0.9rem / 42% 42% 0.9rem 0.9rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.55 var(--font-body);
}
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
a { color: inherit; }
em { font-style: italic; font-weight: 550; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.visually-hidden, .form-error:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.page-width {
  width: min(var(--page-max), calc(100% - 2 * var(--page-gutter)));
  margin-inline: auto;
}
.skip-link {
  position: fixed;
  z-index: 5;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--surface);
  transform: translateY(calc(-100% - 1rem));
}
.skip-link:focus { transform: none; }
.site-header {
  min-height: 5.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
}
.signature {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font: italic 550 1.5rem/1.2 var(--font-display);
  text-decoration: none;
}
.sparkle {
  display: inline-block;
  width: 1.1rem;
  aspect-ratio: 1;
  flex: none;
  background: var(--cherry);
  clip-path: polygon(50% 0, 59% 32%, 68% 41%, 100% 50%, 68% 59%, 59% 68%, 50% 100%, 41% 68%, 32% 59%, 0 50%, 32% 41%, 41% 32%);
}
nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.6rem); }
.nav-link, .text-button {
  color: var(--cherry-deep);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.25em;
  transition: text-decoration-color 150ms ease;
}
.nav-link:hover, .text-button:hover { text-decoration-color: currentColor; }
button.text-button { border: 0; padding: 0.5rem 0; background: none; cursor: pointer; }
.button {
  min-height: 2.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 100vmax;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.button:active { transform: translateY(1px); }
.button-outline {
  background: transparent;
  color: var(--cherry-deep);
  border-color: var(--field-rule);
}
.button-outline:hover { background: var(--rose-paper); border-color: var(--cherry); }
.button-primary {
  background: var(--cherry);
  color: var(--surface);
  min-height: 3.25rem;
  padding-inline: 1.55rem;
}
.button-primary:hover { background: var(--cherry-deep); }
.button:disabled { cursor: wait; opacity: 0.72; }

.hero {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  align-items: center;
  column-gap: clamp(1.5rem, 5.25vw, 5rem);
  padding-block: clamp(3rem, 5.4vw, 5.7rem) clamp(2.9rem, 5vw, 5rem);
}
.hero-copy { animation: arrive 650ms cubic-bezier(.2,.75,.25,1) both; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--cherry-deep);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.105em;
}
.eyebrow::before {
  content: "";
  width: 1.8rem;
  height: 1px;
  background: currentColor;
}
.hero h1 {
  margin: 1.1rem 0 1.6rem;
  font: 600 clamp(3.9rem, 8.55vw, 8rem)/0.91 var(--font-display);
  letter-spacing: -0.041em;
  word-spacing: 0.035em;
}
.hero h1 em {
  display: block;
  margin: 0.02em 0 0 -0.025em;
  padding-right: 0.14em;
  width: fit-content;
  color: var(--cherry);
  font-size: 1.42em;
  line-height: 0.88;
  letter-spacing: -0.06em;
  animation: age-arrive 580ms 180ms cubic-bezier(.2,.83,.27,1.15) both;
}
.punchline { font-size: clamp(1.03rem, 1.52vw, 1.25rem); font-weight: 700; }
.hero-action { margin-top: 1.45rem; }
.portrait {
  position: relative;
  isolation: isolate;
  width: min(100% - 2rem, 29.5rem);
  justify-self: center;
  margin-left: 0.9rem;
  animation: arrive 760ms 80ms cubic-bezier(.2,.75,.25,1) both;
}
.portrait::before {
  position: absolute;
  content: "";
  inset: -0.85rem 1.15rem 0.95rem -0.85rem;
  z-index: -1;
  border: 1px solid var(--rose-detail);
  border-radius: var(--portrait-shape);
}
.portrait-frame {
  overflow: hidden;
  aspect-ratio: 0.91;
  border: clamp(0.45rem, 1vw, 0.75rem) solid var(--rose-paper);
  border-radius: var(--portrait-shape);
  background: var(--rose-paper);
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 48% 39%;
  animation: photo-arrive 900ms 80ms cubic-bezier(.2,.75,.25,1) both;
}
.portrait-spark {
  position: absolute;
  animation: twinkle 950ms 450ms ease-in-out;
}
.portrait-spark-large {
  width: clamp(2.1rem, 5vw, 4.15rem);
  top: 13%;
  right: -4.5%;
  transform: rotate(14deg);
}
.portrait-spark-small {
  width: clamp(0.875rem, 2.15vw, 1.8rem);
  top: 7%;
  right: 8%;
  background: var(--rose-detail);
  transform: rotate(-12deg);
  animation-delay: 850ms;
}
.portrait-spark-side {
  width: clamp(1.6rem, 3.25vw, 2.55rem);
  bottom: 10%;
  left: -4%;
  background: var(--cherry);
  transform: rotate(-18deg);
  animation-delay: 550ms;
}
@keyframes arrive {
  from { opacity: 0; transform: translateY(0.9rem); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes age-arrive {
  from { opacity: 0; transform: translateY(0.12em) scale(0.93) rotate(-5deg); }
  to { opacity: 1; transform: none; }
}
@keyframes photo-arrive {
  from { transform: scale(1.07); }
  to { transform: none; }
}
@keyframes twinkle {
  0%, 100% { scale: 1; }
  50% { scale: 1.25; }
}

.details {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: clamp(1.25rem, 3vw, 2.6rem);
  padding: 1.5rem clamp(1.15rem, 3vw, 2.5rem);
  border-radius: 1rem;
  background: var(--cherry-deep);
  color: var(--surface);
  scroll-margin-top: 1rem;
}
.details :focus-visible { outline-color: var(--surface); }
.event-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}
.event-fact {
  --fact-inset: 0rem;
  position: relative;
  padding-left: calc(3.9rem + var(--fact-inset));
}
.event-fact + .event-fact {
  --fact-inset: clamp(0.9rem, 3.15vw, 2.75rem);
  border-left: 1px dashed var(--ticket-rule);
}
.fact-icon {
  position: absolute;
  top: 50%;
  left: var(--fact-inset);
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 3rem;
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--cherry-deep);
  background: var(--rose-paper);
}
.fact-icon i { position: relative; display: block; }
.icon-calendar { width: 1rem; height: 0.94rem; border: 1.5px solid; border-radius: 0.15rem; }
.icon-calendar::before, .icon-calendar::after, .icon-pin::before {
  content: "";
  position: absolute;
}
.icon-calendar::before { inset: 0.22rem 0 auto; border-top: 1.5px solid; }
.icon-calendar::after {
  top: -0.22rem;
  left: 0.16rem;
  width: 0.1rem;
  height: 0.27rem;
  background: currentColor;
  box-shadow: 0.39rem 0 currentColor;
}
.icon-pin {
  width: 0.92rem;
  height: 0.92rem;
  border: 1.5px solid;
  border-radius: 50% 50% 50% 0;
  transform: translateY(-0.12rem) rotate(-45deg);
}
.icon-pin::before { inset: 27%; border: 1.4px solid; border-radius: 50%; }
.event-fact dt {
  color: var(--rose-detail);
  font-weight: 700;
  font-size: 0.875rem;
}
.event-fact dd {
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.35;
}
.event-fact .fact-secondary {
  color: var(--rose-paper);
  font-weight: 400;
  font-size: 1rem;
  margin-top: 0.12rem;
}
.map-link { justify-self: start; border-color: var(--rose-detail); color: var(--surface); }
.map-link:hover { color: var(--cherry-deep); border-color: var(--rose-paper); }
.host-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(1.5rem, 5.15vw, 5rem);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
.host-message {
  max-width: 31ch;
  font: 600 clamp(1.32rem, 2.7vw, 2.25rem)/1.3 var(--font-display);
  letter-spacing: -0.025em;
}
.toast { padding-left: clamp(1rem, 3vw, 2.5rem); border-left: 1px solid var(--field-rule); }
.toast h2, .response h2, .response-done h3 {
  font: 600 clamp(2rem, 4vw, 3.5rem)/1.02 var(--font-display);
  letter-spacing: -0.038em;
  word-spacing: 0.03em;
}
.toast h2 { font-size: clamp(1.65rem, 3.25vw, 2.65rem); margin-bottom: 0.45rem; }
.toast em, .response em { color: var(--cherry); }
.toast p { color: var(--ink-soft); max-width: 26rem; }

.response {
  padding-block: clamp(2.65rem, 6.6vw, 6.5rem);
  background: var(--rose-paper);
}
.response-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  align-items: start;
  column-gap: clamp(1.5rem, 7.5vw, 7rem);
}
.response-copy { padding-top: clamp(0.2rem, 3vw, 2.75rem); }
.response h2 { font-size: clamp(3rem, 6.1vw, 6rem); }
.response-copy p {
  max-width: 20rem;
  margin-top: 0.85rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
}
.response-card {
  padding: clamp(1.2rem, 4vw, 2.75rem);
  border: 1px solid var(--rule);
  border-radius: 1rem;
  background: var(--surface);
}
#rsvp-form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.4rem; }
.field label, legend { font-weight: 700; }
.optional { color: var(--ink-soft); font-size: 0.875rem; font-weight: 400; }
.note-field summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0.4rem 1.55rem 0.4rem 0;
  position: relative;
  color: var(--cherry-deep);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.note-field summary::-webkit-details-marker { display: none; }
.note-field summary::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: calc(50% - 0.3rem);
  width: 0.45rem;
  height: 0.45rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.note-field[open] summary::after { transform: translateY(0.2rem) rotate(225deg); }
.note-field textarea { margin-top: 0.35rem; }
.field :is(input, textarea) {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--field-rule);
  border-radius: 0.42rem;
  color: var(--ink);
  background: var(--surface);
}
.field textarea { resize: vertical; min-height: 5.65rem; }
.field :is(input, textarea)::placeholder { color: var(--ink-soft); opacity: 1; }
.attendance { min-width: 0; margin: 0; padding: 0; border: 0; }
.attendance legend { padding: 0; margin-bottom: 0.45rem; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.choice {
  display: flex;
  align-items: center;
  min-height: 3.1rem;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--field-rule);
  border-radius: 0.42rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.choice:has(:checked) { background: var(--rose-paper); border-color: var(--cherry); }
.choice input {
  flex: none;
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--cherry);
}
.form-error { color: var(--cherry-deep); font-weight: 700; }
.submit-button { width: 100%; }

.response-done { min-height: 17rem; display: grid; align-content: center; justify-items: start; gap: 0.85rem; }
.done-spark { width: 2.25rem; }
.response-done h3 { font-size: clamp(2.25rem, 4.8vw, 3.7rem); }
.response-done p { color: var(--ink-soft); }
.done-actions { display: flex; align-items: flex-start; flex-direction: column; gap: 0.25rem; margin-top: 0.5rem; }
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-block: 1.55rem;
}
.site-footer .signature { font-size: 1.25rem; }
.site-footer .sparkle { width: 0.9rem; }
.rsvp-dock { display: none; }

.confetti { position: fixed; z-index: 4; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute;
  top: var(--origin-y, 38%);
  left: var(--origin-x, 50%);
  width: 0.43rem;
  height: 0.8rem;
  border-radius: 0.1rem;
  background: var(--cherry);
  animation: scatter 1.35s cubic-bezier(.18,.72,.45,1) forwards;
}
.confetti i:nth-child(3n + 1) { background: var(--rose-detail); }
.confetti i:nth-child(3n + 2) { background: var(--cherry-deep); }
@keyframes scatter {
  from { opacity: 1; transform: translate(-50%, -50%) rotate(0); }
  38% { opacity: 1; transform: translate(var(--flight-x), var(--flight-peak)) rotate(var(--spin)); }
  to { opacity: 0; transform: translate(var(--flight-x), var(--flight-end)) rotate(calc(var(--spin) * 2)); }
}

@media (max-width: 820px) {
  .hero { column-gap: 1rem; }
}
@media (max-width: 680px) {
  html { scroll-padding-bottom: calc(4.75rem + env(safe-area-inset-bottom)); }
  .site-header { min-height: 3.7rem; }
  .signature { font-size: 1.29rem; gap: 0.42rem; }
  .site-header .sparkle { width: 0.95rem; }
  .site-header .button { display: none; }
  .nav-link { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    row-gap: 1.3rem;
    padding-block: 1.55rem 1.85rem;
  }
  .hero-copy { text-align: center; }
  .eyebrow { justify-content: center; }
  .eyebrow::before { display: none; }
  .hero h1 { font-size: clamp(2.55rem, 11vw, 4.4rem); margin: 0.55rem 0 0.6rem; line-height: 1; }
  .hero h1 em { display: inline-block; font-size: 1.12em; margin: 0; padding: 0 0.05em 0 0; }
  .rsvp-dock-enabled .hero-action { display: none; }
  .hero-action { margin-top: 0.8rem; }
  .punchline { font-size: 0.9375rem; }
  .portrait {
    --portrait-shape: 50% 50% 0.8rem 0.8rem / 46% 46% 0.8rem 0.8rem;
    width: min(calc(100% - 1rem), 26rem);
    margin-left: 0;
  }
  .portrait::before {
    inset: 0.4rem -0.38rem -0.25rem 0.5rem;
    transform: rotate(3deg);
    background: var(--cherry);
    border-color: transparent;
  }
  .portrait-frame {
    aspect-ratio: 1.19;
    border-width: 0.3rem;
    border-color: var(--rose-paper);
    transform: rotate(-2deg);
  }
  .portrait img { object-position: 48% 36%; }
  .portrait-spark-large { top: 17%; right: 0; width: clamp(2rem, 9vw, 3rem); }
  .portrait-spark-small { top: 10%; right: 9%; }
  .portrait-spark-side { bottom: 8%; left: -3%; background: var(--rose-detail); }
  .details { grid-template-columns: 1fr; row-gap: 0.75rem; padding: 0.95rem 1rem; }
  .event-facts { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 0.65rem; }
  .event-fact { padding-left: var(--fact-inset); }
  .event-fact + .event-fact { --fact-inset: 0.65rem; }
  .event-fact dt { display: flex; align-items: center; gap: 0.42rem; margin-bottom: 0.22rem; }
  .fact-icon { position: static; transform: none; width: 1rem; color: inherit; background: transparent; }
  .fact-icon i { scale: 0.8; }
  .event-fact dd { font-size: 1rem; }
  .event-fact .fact-secondary { font-size: 0.875rem; }
  .map-link { justify-self: end; }
  .host-note { grid-template-columns: minmax(0, 1fr); gap: 1.3rem; padding-block: 1.9rem 2.1rem; }
  .toast { padding-left: 0.9rem; }
  .response-inner { grid-template-columns: minmax(0, 1fr); row-gap: 1.35rem; }
  .response { padding-block: 2.25rem; }
  .response-card { padding: 1rem; }
  #rsvp-form { gap: 1rem; }
  .site-footer { padding-bottom: calc(5.75rem + env(safe-area-inset-bottom)); }
  .rsvp-dock {
    display: block;
    position: fixed;
    z-index: 3;
    inset: auto 0 0;
    padding: 0.55rem max(var(--page-gutter), env(safe-area-inset-right)) calc(0.55rem + env(safe-area-inset-bottom)) max(var(--page-gutter), env(safe-area-inset-left));
    border-top: 1px solid var(--rule);
    background: var(--paper);
  }
  .rsvp-dock .button { display: flex; width: min(100%, 26rem); margin-inline: auto; min-height: 3.25rem; }
}
@media (max-width: 355px) {
  .site-header .signature { font-size: 1.15rem; }
  .eyebrow { letter-spacing: 0.075em; }
  .punchline span { display: none; }
  .choice { gap: 0.4rem; padding-inline: 0.55rem; }
}
@media (max-width: 680px) and (max-height: 740px) {
  .hero { row-gap: 1rem; padding-block: 1.1rem 1.25rem; }
  .portrait-frame { aspect-ratio: 1.36; }
}
@media (max-width: 680px) and (max-height: 610px) {
  .hero { padding-block-end: 1rem; }
  .portrait-frame { min-height: 8rem; height: 30svh; }
  .portrait img { object-position: 48% 32%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
