/* fonts: self-hosted latin subsets (SIL Open Font License) */
@font-face { font-family: "Dancing Script"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/dancing-script-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("assets/fonts/figtree-var.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Parkinsans"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("assets/fonts/parkinsans-var.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Aventurina: tokens */
:root {
  --bg: #F5F8F6;
  --paper: #FCFDFC;
  --ink: #163636;
  --ink-2: #4A6462;
  --turq: #5FB3B8;          /* wall-lettering turquoise: fills and large marks only */
  --turq-ink: #2F8A90;      /* wordmark and script titles */
  --accent: #1D6A6F;        /* the one accent: buttons, links */
  --accent-hover: #175A5E;
  --mint: #D7EEEA;
  --butter: #F7E6A1;
  --line: rgba(22, 54, 54, 0.12);

  --f-script: "Dancing Script", cursive;
  --f-display: "Parkinsans", system-ui, sans-serif;
  --f-body: "Figtree", system-ui, sans-serif;

  /* type ramp: 14 / 17 / 21 / 27 / 34 / 44 / 58 / 72 */
  --t-sm: 0.875rem;
  --t-base: 1.0625rem;
  --t-md: 1.3125rem;
  --t-lg: 1.6875rem;
  --t-xl: clamp(2.125rem, 1.6rem + 1.6vw, 2.75rem);
  --t-2xl: clamp(2.75rem, 2rem + 2.4vw, 3.625rem);
  --t-hero: clamp(2.125rem, 1rem + 4.6vw, 4.5rem);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 40px; --s7: 64px; --s8: 96px; --s9: 144px;

  --r: 8px;
  --r-pill: 999px;

  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1200px;
  --section: clamp(64px, 9vw, 112px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in: cubic-bezier(0.64, 0, 0.78, 0);
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; scrollbar-color: var(--turq) var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--t-base)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
::selection { background: var(--butter); color: var(--ink); }
input { caret-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip-link {
  position: absolute; left: var(--s4); top: -100px; z-index: 100;
  background: var(--accent); color: var(--paper); padding: var(--s3) var(--s4); border-radius: var(--r);
}
.skip-link:focus { top: var(--s4); }

/* type */
.wordmark {
  font: 700 2.125rem/1 var(--f-script);
  color: var(--turq-ink);
  text-decoration: none;
  letter-spacing: 0;
}
.wordmark:hover { color: var(--turq-ink); }
.wordmark--lg { font-size: var(--t-2xl); }

.h2 {
  font: 700 var(--t-xl)/1.12 var(--f-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 22ch;
}
.h3 { font: 600 var(--t-md)/1.25 var(--f-display); letter-spacing: -0.01em; }
.lede { font-size: var(--t-md); line-height: 1.5; color: var(--ink-2); max-width: 46ch; margin-top: var(--s4); text-wrap: pretty; }
.script-title {
  font: 700 var(--t-2xl)/1.1 var(--f-script);
  color: var(--turq-ink);
  padding-bottom: 0.08em;
}

/* buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  padding: 14px 24px 14px 20px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--paper);
  font: 600 var(--t-base)/1 var(--f-display);
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
}
.btn { transition: background-color 180ms var(--ease-out), transform 120ms var(--ease-out); }
.btn:hover { background: var(--accent-hover); color: var(--paper); }
.btn:active { transform: scale(0.96); }
.btn__icon { width: 20px; height: 20px; flex: none; }
.btn--sm { min-height: 44px; padding: 10px 18px 10px 14px; font-size: var(--t-sm); }
.btn--sm .btn__icon { width: 18px; height: 18px; }
.btn--light { background: var(--paper); color: var(--ink); padding-inline: 24px; }
.btn--light:hover { background: var(--butter); color: var(--ink); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px;
  font: 600 var(--t-base)/1 var(--f-display);
  color: var(--accent);
  text-decoration: underline;
}
.link-arrow::after { content: "→"; transition: transform 180ms var(--ease-out); }
.link-arrow:hover::after { transform: translateX(3px); }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: var(--s5); min-height: 72px; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: clamp(12px, 1.6vw, 24px); }
.site-nav a {
  font: 500 var(--t-sm)/1 var(--f-display);
  color: var(--ink);
  text-decoration: none;
  padding: 14px 2px;
  display: inline-block;
}
.site-nav a:hover { color: var(--accent); text-decoration: underline; }

/* hero */
.hero { padding-block: clamp(32px, 5vw, 72px) clamp(48px, 6vw, 80px); }
.hero__grid { display: grid; gap: var(--s6); align-items: center; }
.hero__title {
  font: 700 var(--t-hero)/1.02 var(--f-display);
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 14ch;
}
.hero__sub { font-size: var(--t-md); line-height: 1.5; color: var(--ink-2); max-width: 34ch; margin-top: var(--s5); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s5); margin-top: var(--s6); }
.hero { overflow-x: clip; }
.hero__media { position: relative; isolation: isolate; padding: 0 clamp(8px, 2vw, 20px) clamp(16px, 3vw, 32px) 0; }
.hero__media::before {
  content: "";
  position: absolute; z-index: -1;
  inset: 10% 0 0 6%;
  background: var(--butter);
  transform: rotate(-3.5deg);
  --notch: 8px; --gap: 22px;
  -webkit-mask:
    radial-gradient(circle at 50% 0, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) top / var(--gap) 51% repeat-x,
    radial-gradient(circle at 50% 100%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) bottom / var(--gap) 51% repeat-x;
  mask:
    radial-gradient(circle at 50% 0, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) top / var(--gap) 51% repeat-x,
    radial-gradient(circle at 50% 100%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) bottom / var(--gap) 51% repeat-x;
}
.hero__media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--r);
  outline: 1px solid rgba(0, 0, 0, 0.08); outline-offset: -1px;
}

/* facts band */
.facts { background: var(--mint); padding-block: var(--s6); }
.facts__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s5) var(--s4); }
.facts__list li { display: flex; flex-direction: column; gap: var(--s1); }
.facts__big {
  font: 600 var(--t-md)/1.2 var(--f-display);
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
  font-variant-numeric: tabular-nums;
}
.facts__tel { text-decoration: none; }
.facts__tel:hover { color: var(--accent); text-decoration: underline; }
.facts__star { width: 18px; height: 18px; fill: var(--accent); }
.facts__small { font-size: var(--t-sm); color: var(--ink-2); }

/* sections */
.section { padding-block: var(--section); }

/* includes: bento */
.bento { display: grid; gap: var(--s4); margin-top: var(--s6); }
.cell {
  border-radius: var(--r);
  overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
}
.cell p { color: var(--ink-2); margin-top: var(--s2); max-width: 36ch; }
.cell--text { padding: var(--s5); justify-content: flex-end; min-height: 200px; border: 0; }
.cell__quote { margin: 0 0 auto; padding-bottom: var(--s6); }
.cell__quote p { font: 600 var(--t-lg)/1.2 var(--f-display); letter-spacing: -0.02em; color: var(--ink); margin: 0; max-width: 14ch; text-wrap: balance; }
.cell__quote cite { display: block; font: 400 var(--t-sm)/1.4 var(--f-body); font-style: normal; color: var(--ink); margin-top: var(--s2); }
.cell--turq { background: var(--turq); }
.cell--turq p { color: var(--ink); }
.cell--butter { background: var(--butter); }
.cell--butter p { color: var(--ink); }
.cell--photo.cell--butter { border: 0; }
.cell--photo img { width: 100%; flex: 1 1 auto; aspect-ratio: 4 / 3; object-fit: cover; }
.cell__body { padding: var(--s4) var(--s5) var(--s5); }

/* themes rail */
.themes {
  background: var(--butter);
  --notch: 11px; --gap: 30px;
  -webkit-mask:
    radial-gradient(circle at 50% 0, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) top / var(--gap) 51% repeat-x,
    radial-gradient(circle at 50% 100%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) bottom / var(--gap) 51% repeat-x;
  mask:
    radial-gradient(circle at 50% 0, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) top / var(--gap) 51% repeat-x,
    radial-gradient(circle at 50% 100%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) bottom / var(--gap) 51% repeat-x;
}
.themes .script-title { font-size: clamp(2.75rem, 1.6rem + 4vw, 4.5rem); color: var(--accent); }
.themes .lede { color: var(--ink); }
.themes__head { margin-bottom: var(--s6); display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s5); }
.rail-nav { display: none; gap: var(--s3); flex: none; }
.rail-nav__btn {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out), transform 120ms var(--ease-out);
}
.rail-nav__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.rail-nav__btn:hover:not(:disabled) { background: var(--accent); color: var(--paper); }
.rail-nav__btn:active:not(:disabled) { transform: scale(0.96); }
.rail-nav__btn:disabled { opacity: 0.35; cursor: default; }
.rail {
  --inset: max(var(--gutter), (100vw - var(--wrap)) / 2);
  display: flex; gap: var(--s4);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--inset);
  padding: 0 var(--inset) var(--s4);
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--inset), #000 calc(100% - var(--inset)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--inset), #000 calc(100% - var(--inset)), transparent);
}
.rail__item { flex: none; scroll-snap-align: start; }
.rail__item img {
  height: clamp(300px, 32vw, 440px);
  width: auto;
  max-width: 82vw;
  object-fit: cover;
  border-radius: var(--r);
  outline: 1px solid rgba(0, 0, 0, 0.08); outline-offset: -1px;
}
.rail__cap { font: 600 var(--t-base)/1.3 var(--f-display); margin-top: var(--s3); }

/* other events: full-bleed photo + card */
.events { padding-top: 0; }
.events__media img { width: 100%; height: clamp(320px, 52vw, 620px); object-fit: cover; }
.events__inner { position: relative; margin-top: calc(var(--s8) * -1); }
.events__card {
  background: var(--paper);
  border-radius: var(--r);
  padding: clamp(24px, 4vw, 40px);
  max-width: 560px;
}
.events__card p { color: var(--ink-2); margin-top: var(--s4); max-width: 40ch; }

/* the place: mosaic */
.place { padding-top: var(--s7); }
.mosaic { display: grid; gap: var(--s4); margin-top: var(--s6); }
.mosaic figure { border-radius: var(--r); overflow: hidden; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; outline: 1px solid rgba(0, 0, 0, 0.08); outline-offset: -1px; }

/* reviews */
.reviews { background: var(--mint); }
.reviews__grid { display: grid; gap: var(--s6); }
.reviews__num { font: 700 4.5rem/1 var(--f-display); letter-spacing: -0.03em; margin-top: var(--s5); font-variant-numeric: tabular-nums; }
.reviews__num span { font-size: var(--t-md); font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.stars { display: block; width: 132px; height: auto; margin-top: var(--s3); }
.stars__track { fill: rgba(22, 54, 54, 0.16); }
.stars__fill { fill: var(--accent); }
.reviews__count { color: var(--ink-2); margin-top: var(--s2); margin-bottom: var(--s3); }
.reviews__quotes { display: grid; gap: var(--s6); }
.quote blockquote { margin: 0; }
.quote p { font: 500 var(--t-md)/1.45 var(--f-display); letter-spacing: -0.01em; max-width: 40ch; }
.quote figcaption { font-size: var(--t-sm); color: var(--ink-2); margin-top: var(--s3); }

/* invitation */
.invite-section { background: var(--turq); }
.invite-section__head { text-align: center; display: flex; flex-direction: column; align-items: center; margin-bottom: var(--s6); }
.invite-section .lede { color: var(--ink); }
.envelope {
  --env-h: clamp(96px, 16vw, 150px);
  --tuck: 36px;
  position: relative;
  width: min(760px, 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding-bottom: calc(var(--env-h) - var(--tuck));
}
.envelope__back, .envelope__front, .envelope__flap { position: absolute; left: 0; right: 0; }
.envelope__back { bottom: 0; height: var(--env-h); background: #E4EEEB; border-radius: 0 0 var(--r) var(--r); z-index: 1; }
.envelope__flap {
  bottom: var(--env-h);
  height: calc(var(--env-h) * 0.75);
  background: #D5E4E0;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  z-index: 1;
}
.envelope__front {
  bottom: 0; height: var(--env-h);
  background: var(--paper);
  clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
  border-radius: 0 0 var(--r) var(--r);
  z-index: 3;
}
.invite-shadow {
  position: relative; z-index: 2;
  width: calc(100% - 2 * clamp(12px, 3vw, 28px));
  margin-inline: auto;
  filter: drop-shadow(0 20px 22px rgba(22, 54, 54, 0.22)) drop-shadow(0 2px 3px rgba(22, 54, 54, 0.12));
}
.invite {
  --notch: 7px;
  --gap: 20px;
  background: var(--butter);
  padding: clamp(40px, 6vw, 64px) clamp(20px, 5vw, 56px) calc(var(--tuck) + var(--s6));
  -webkit-mask:
    radial-gradient(circle at 50% 0, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) top / var(--gap) 51% repeat-x,
    radial-gradient(circle at 50% 100%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) bottom / var(--gap) 51% repeat-x;
  mask:
    radial-gradient(circle at 50% 0, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) top / var(--gap) 51% repeat-x,
    radial-gradient(circle at 50% 100%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) bottom / var(--gap) 51% repeat-x;
}
.invite__greeting { font: 700 var(--t-2xl)/1.1 var(--f-script); color: var(--accent); padding-bottom: 0.05em; }
.invite__text { font-size: var(--t-md); line-height: 2.5; margin-top: var(--s3); max-width: none; }
.blank { display: inline-flex; flex-direction: column; vertical-align: top; line-height: 1.2; margin-inline: 2px; }
.blank input {
  font: 600 var(--t-md)/1.2 var(--f-display);
  color: var(--accent);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  padding: 4px 2px 2px;
  width: 100%;
  min-height: 40px;
  appearance: textfield;
  -moz-appearance: textfield;
}
.blank input::-webkit-outer-spin-button,
.blank input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.blank input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; background: rgba(252, 253, 252, 0.6); }
.blank span { font: 500 0.8125rem/1.2 var(--f-body); color: var(--ink-2); margin-top: 4px; }
.blank--name { width: 12ch; }
.blank--name input { font: 700 1.625rem/1.1 var(--f-script); padding-top: 0; }
.blank--num { width: 4ch; text-align: center; }
.blank--num input { text-align: center; }
.blank--date { width: 11.5ch; }
.blank input[type="date"]:invalid { color: var(--ink-2); font-weight: 400; }
.invite__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s5); margin-top: var(--s6); }
.invite__note { font-size: var(--t-sm); color: var(--ink-2); max-width: 32ch; }

/* visit */
.visit__grid { display: grid; gap: var(--s6); align-items: start; }
.visit__address { font: 500 var(--t-md)/1.5 var(--f-display); font-style: normal; margin-top: var(--s5); margin-bottom: var(--s2); }
.hours { border-collapse: collapse; margin-top: var(--s6); width: 100%; max-width: 420px; font-variant-numeric: tabular-nums; }
.hours caption { text-align: left; font: 600 var(--t-base)/1.3 var(--f-display); padding-bottom: var(--s2); }
.hours th, .hours td { text-align: left; padding: var(--s3) 0; border-top: 1px solid var(--line); font-weight: 400; }
.hours td { text-align: right; }
.contact-list { margin-top: var(--s6); display: grid; gap: var(--s4); }
.contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-list span { font-size: var(--t-sm); color: var(--ink-2); }
.contact-list a { font: 500 var(--t-base)/1.4 var(--f-display); overflow-wrap: anywhere; }
.visit__map { position: relative; border-radius: var(--r); overflow: hidden; background: var(--mint); aspect-ratio: 4 / 3; }
.visit__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* footer */
.site-footer { background: var(--mint); padding-block: var(--s7); }
.site-footer__inner { display: grid; gap: var(--s5); align-items: end; }
.site-footer p { color: var(--ink-2); }
.site-footer .wordmark { color: var(--turq-ink); }
.site-footer a { font-weight: 500; }
.site-footer .site-footer__cta { justify-self: start; }

/* >= 640 */
@media (min-width: 640px) {
  .facts__list { grid-template-columns: repeat(4, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .mosaic { grid-template-columns: repeat(2, 1fr); }
  .mosaic__a { grid-column: 1 / -1; }
  .rail-nav { display: flex; }
  .site-footer__inner { grid-template-columns: 1.4fr 1fr 1fr; }
  .site-footer .site-footer__cta { grid-column: 1 / -1; }
}

/* >= 960 */
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1fr 1.05fr; gap: var(--s7); }
  .bento {
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
      "anim  juegos juegos candy"
      "cater cater  deco   parri";
    grid-auto-rows: 440px;
  }
  .cell--animadores { grid-area: anim; }
  .cell--juegos { grid-area: juegos; }
  .cell--candy { grid-area: candy; }
  .cell--catering { grid-area: cater; }
  .cell--deco { grid-area: deco; }
  .cell--patio { grid-area: parri; }
  .cell--photo img { aspect-ratio: auto; flex: 1 1 0; min-height: 0; }
  .mosaic { grid-template-columns: 1.55fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); height: 620px; }
  .mosaic__a { grid-column: auto; grid-row: 1 / 3; }
  .reviews__grid { grid-template-columns: 1fr 1.6fr; gap: var(--s8); }
  .reviews__quotes { grid-template-columns: 1fr 1fr; }
  .reviews__quotes .quote:first-child { grid-column: 1 / -1; }
  .reviews__quotes .quote:first-child p { font-size: var(--t-lg); }
  .visit__grid { grid-template-columns: 1fr 1.25fr; gap: var(--s8); }
  .site-footer__inner { grid-template-columns: 1.2fr 1fr 0.8fr auto; }
  .site-footer .site-footer__cta { grid-column: auto; }
}

/* small screens */
@media (max-width: 979px) {
  .site-nav { display: none; }
  .site-header__inner { justify-content: space-between; }
}
@media (max-width: 420px) {
  .site-header__inner { gap: var(--s3); }
  .site-header .wordmark { font-size: 1.75rem; }
  .site-header .btn--sm { padding-inline: 12px; }
  .site-header .btn__icon { display: none; }
}

/* motion: progressive enhancement, only when JS runs and motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  /* hero: copy rises, photo opens, the invitation card tilts in behind it */
  .hero__title, .hero__sub, .hero__actions { animation: rise 700ms var(--ease-out) both; }
  .hero__sub { animation-delay: 90ms; }
  .hero__actions { animation-delay: 180ms; }
  .hero__media img { animation: open 1000ms var(--ease-out-quint) 120ms both; }
  .hero__media::before { animation: tilt-in 1100ms var(--ease-out-quint) 380ms both; }

  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 45ms);
  }
  html.js [data-reveal].is-in { opacity: 1; transform: none; }

  /* the observed wrapper stays unclipped (IntersectionObserver ignores fully clipped targets) */
  html.js [data-wipe] > * {
    clip-path: inset(100% 0 0 0 round var(--r));
    transition: clip-path 900ms var(--ease-out-quint);
    transition-delay: calc(var(--i, 0) * 50ms);
  }
  html.js [data-wipe].is-in > * { clip-path: inset(0 0 0 0 round var(--r)); }

  /* invitation: the card rises out of the envelope once, when it comes into view */
  html.js .envelope { clip-path: inset(-100vh -100vw 0 -100vw); }
  html.js .envelope .invite-shadow {
    transform: translateY(52%);
    transition: transform 1100ms var(--ease-out-quint);
  }
  html.js .envelope.is-in .invite-shadow { transform: none; }
}

@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes open {
  from { clip-path: inset(6% 6% 6% 6% round var(--r)); transform: scale(1.04); }
  to { clip-path: inset(0 0 0 0 round var(--r)); transform: none; }
}
@keyframes tilt-in { from { opacity: 0; transform: rotate(0deg) translate(-12px, -12px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
