/*
 * Invitation landing pages (/invitatii/nunta and its siblings).
 *
 * Hand-written on purpose: tailwind.css is generated from the markup that existed
 * when `npm run build:tailwind` last ran, so a utility class used only here would
 * have no rule. Everything is scoped under .ip and prefixed ip-, so nothing leaks
 * into the shared navigation and footer.
 *
 * Three states drive the motion:
 *   no script      everything is visible and still
 *   html.ip-js     elements wait for their cue (.is-in, .is-live, .is-shown)
 *   reduced motion everything is visible and still, whatever the script does
 */

.ip {
  --ink: #0f2239;
  --ink-2: #47586c;
  --ink-3: #7b8898;
  --cream: #faf6ef;
  --paper: #ffffff;
  --line: #eae1d4;
  --pink: #ff4586;
  --pink-2: #ff456d;
  --coral: #ff7452;
  --green: #1faa59;
  --frame: #101d2f;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --serif: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  position: relative;
  overflow-x: clip;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.ip *,
.ip *::before,
.ip *::after {
  box-sizing: border-box;
}

/* :where keeps these resets at zero specificity, so any ip- class can set its own spacing. */
:where(.ip) :where(h1, h2, h3, p, ul, ol) {
  margin: 0;
  padding: 0;
}

:where(.ip) :where(ul, ol) {
  list-style: none;
}

.ip em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.01em;
  background: linear-gradient(100deg, var(--pink) 10%, var(--coral) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}

.ip :focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
  border-radius: 6px;
}

.ip [id] {
  scroll-margin-top: 92px;
}

/* ───────── Buttons ───────── */

.ip-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 17px 28px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}

.ip-button--primary {
  overflow: hidden;
  color: #fff;
  background: linear-gradient(100deg, var(--pink) 0%, var(--pink-2) 55%, var(--coral) 100%);
  box-shadow: 0 12px 26px -10px rgba(255, 69, 109, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.ip-button--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.42) 50%, transparent 62%);
  translate: -130% 0;
  animation: ip-sheen 6s var(--ease) 2.4s infinite;
}

.ip-button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -12px rgba(255, 69, 109, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.ip-button--primary:active {
  transform: translateY(0) scale(0.98);
}

.ip-button--large {
  padding: 20px 34px;
  font-size: 1.08rem;
}

.ip-button__arrow {
  flex: none;
  transition: translate 0.3s var(--ease);
}

.ip-button:hover .ip-button__arrow {
  translate: 4px 0;
}

.ip-textlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}

.ip-textlink svg {
  transition: translate 0.3s var(--ease);
}

.ip-textlink:hover svg {
  translate: 4px 0;
}

/* ───────── Shared text ───────── */

.ip-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.ip-eyebrow__dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pink);
}

.ip-eyebrow__dot::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--pink);
  opacity: 0;
  animation: ip-ping 2.6s ease-out infinite;
}

.ip-title {
  margin-top: 14px;
  font-size: clamp(1.9rem, 6.4vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.ip-title em {
  font-size: 1.1em;
}

.ip-lead {
  margin-top: 14px;
  font-size: 1.05rem;
  line-height: 1.62;
  color: var(--ink-2);
  text-wrap: pretty;
}

.ip-note {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-3);
}

.ip-note a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(255, 69, 134, 0.55);
  text-underline-offset: 4px;
}

.ip-note--center {
  margin-top: 28px;
  text-align: center;
}

/* ───────── Sections ───────── */

.ip-section {
  padding: 76px max(20px, calc((100% - 1200px) / 2));
}

.ip-section--paper {
  background: var(--paper);
}

.ip-section--tight {
  padding-top: 44px;
  padding-bottom: 4px;
}

.ip-section__head {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.ip-section__head .ip-lead {
  max-width: 60ch;
  margin-inline: auto;
}

.ip-section__action {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 40px;
  text-align: center;
}

/* ───────── Hero ───────── */

/*
 * The first screen shows the end result: a couple, full screen, and their
 * invitation alive on a phone. The photo is a portrait crop on phones (the couple
 * fills the screen under the copy, the phone follows) and the wide photo behind
 * everything from 768px up. The photo is mirrored, so the couple stands right of
 * centre, between the copy and the phone.
 */

.ip-hero {
  --night: #0f1613;
  --photo-height: max(100svh, 640px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0 20px 40px;
  background: var(--night);
  color: #fff;
}

.ip-hero__photo {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: -1;
  display: block;
  height: var(--photo-height);
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}

/* The photos are stacked; the one shown fades in over the last. */
.ip-hero__photo.is-shown {
  opacity: 1;
}

/* Numbered dots, one per photo: between the copy and the phones on phones, centred at the foot of the hero from 1024px. They need the script, so without it they stay hidden. */
.ip-hero__dots {
  z-index: 5;
  display: none;
  justify-content: center;
  gap: 2px;
}

.ip-js .ip-hero__dots {
  display: flex;
}

/* A small, quiet dot inside a larger tap area. */
.ip-hero__dot {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ip-hero__dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  transition: background-color 0.4s var(--ease), scale 0.4s var(--ease);
}

.ip-hero__dot:hover::before {
  background: rgba(255, 255, 255, 0.7);
}

.ip-hero__dot.is-active::before {
  background: #fff;
  scale: 1.25;
}

.ip-hero__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  transform-origin: 55% 60%;
  animation: ip-photo-in 2.6s var(--ease) both, ip-breathe 24s ease-in-out 2.6s infinite alternate;
}

.ip-hero__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 15, 13, 0.66) 0%, rgba(10, 15, 13, 0.44) 34%, rgba(10, 15, 13, 0.06) 56%, rgba(10, 15, 13, 0.24) 78%, var(--night) 100%);
}

.ip-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

/* On phones the copy takes a little over half the screen, so the phones rise into the photo and about 40% of the first screen shows them. */
.ip-hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 54svh;
  padding: 100px 0 16px;
}

/* The claim above the headline: two balanced lines on phones, one line from 1024px. */
.ip-hero__claim {
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 122, 168, 0.7);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-wrap: balance;
  color: #ffa3c3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 18px rgba(0, 0, 0, 0.45);
}

.ip-hero__title {
  margin-top: 16px;
  font-size: clamp(2.1rem, 9.6vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25);
}

.ip-hero__title em {
  font-size: 1.12em;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.ip-hero__lead {
  max-width: 30rem;
  margin-top: 18px;
  font-size: 1.04rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.84);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.35);
  text-wrap: pretty;
}

.ip-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.ip-hero__actions .ip-button--glass {
  display: none;
}

.ip-hero__actions .ip-button--primary {
  min-width: min(100%, 280px);
}

.ip-button--glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.ip-button--glass:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ip-rise {
  animation: ip-rise 0.95s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 90ms + 60ms);
}

/*
 * The stage: three phones. The middle one carries the real invitation; the two
 * behind it are pictures, sized and placed from the middle phone's width (--pw),
 * so all three scale together. The stage is as wide as the middle phone; the
 * side phones and chips hang outside it.
 */

.ip-stage {
  --pw: 230px;
  --pt: 26px;
  position: relative;
  width: var(--pw);
  height: calc(var(--pt) + var(--pw) * 19.5 / 9 + 64px);
  margin: 16px auto 0;
}

.ip-phone {
  --s: 0.5692;
  position: absolute;
  top: var(--pt);
  left: 0;
  z-index: 3;
  width: var(--pw);
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  border: 6px solid var(--frame);
  border-radius: 38px;
  background: var(--frame);
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.14);
  animation: ip-phone-in 1.15s var(--ease) both, ip-float 8s ease-in-out infinite;
  animation-delay: 0.45s, 1.7s;
}

.ip-phone::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 50%;
  z-index: 3;
  width: 30%;
  height: 17px;
  translate: -50% 0;
  border-radius: 12px;
  background: var(--frame);
}

.ip-phone__screen {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 32px;
  object-fit: cover;
  object-position: top;
  background: #fff;
}

.ip-phone__live {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: calc(100% / var(--s));
  height: calc(100% / var(--s));
  border: 0;
  border-radius: calc(32px / var(--s));
  background: transparent;
  transform: scale(var(--s));
  transform-origin: 0 0;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}

.ip-phone.is-live .ip-phone__live {
  opacity: 1;
}

.ip-phone--left,
.ip-phone--right {
  --sw: calc(var(--pw) * 0.8);
  top: calc(var(--pt) + var(--pw) * 0.17);
  z-index: 1;
  width: var(--sw);
  animation-delay: 0.3s, 2.1s;
}

.ip-phone--left {
  left: calc((var(--pw) - var(--sw)) / 2 - var(--pw) * var(--fan, 0.66));
  rotate: -8deg;
}

.ip-phone--right {
  left: calc((var(--pw) - var(--sw)) / 2 + var(--pw) * var(--fan, 0.66));
  rotate: 8deg;
  animation-delay: 0.4s, 2.6s;
}

.ip-stage__open {
  position: absolute;
  top: calc(var(--pt) + var(--pw) * 19.5 / 9 + 18px);
  left: 50%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 13px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  cursor: pointer;
  translate: -50% 0;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.3s var(--ease), scale 0.3s var(--ease);
  animation: ip-chip-in 0.75s var(--ease) 1.75s both;
}

.ip-stage__open:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ip-stage__open:active {
  scale: 0.97;
}

.ip-stage__open svg {
  width: 22px;
  height: 22px;
  padding: 6px 5px 6px 7px;
  border-radius: 50%;
  background: linear-gradient(100deg, var(--pink), var(--coral));
}

.ip-chip {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px 9px 9px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(15, 34, 57, 0.05);
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--ink);
  text-align: left;
  white-space: nowrap;
  animation: ip-chip-in 0.75s var(--ease) both, ip-float 7s ease-in-out infinite;
}

.ip-chip__text b {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
}

.ip-chip__text small {
  font-size: 0.7rem;
  color: var(--ink-3);
}

.ip-chip__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
}

.ip-chip__icon--whatsapp {
  background: #25d366;
}

.ip-chip__icon--check {
  background: var(--green);
}

.ip-chip__number {
  flex: none;
  min-width: 34px;
  padding-left: 4px;
  font-family: var(--serif);
  font-size: 1.9rem;
  font-style: italic;
  font-weight: 600;
  font-variant-numeric: lining-nums;
  line-height: 1;
  color: var(--pink);
  text-align: center;
}

.ip-chip--sent {
  top: 0;
  left: -52px;
  animation-delay: 1.35s, 2s;
}

.ip-chip--reply {
  top: 48%;
  right: -56px;
  animation-delay: 2.15s, 2.8s;
}

.ip-chip--count {
  display: none;
}

/* ───────── Three facts ───────── */

.ip-facts {
  display: grid;
  gap: 12px;
}

.ip-fact {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

.ip-fact__icon {
  flex: none;
  width: 46px;
  height: 46px;
  padding: 10px;
  border-radius: 14px;
  background: #fff0f5;
  color: var(--pink);
}

.ip-fact h3 {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ip-fact p {
  margin-top: 3px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-2);
}

/* ───────── Gallery ───────── */

/* A grid at every width, so all the designs are in view: two columns below 900px, four from 900px, six from 1240px. */
.ip-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 14px;
  margin-top: 32px;
}

.ip-card {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* On phones the card shows the top of the invitation, where the names are; from 900px the whole screen. */
.ip-card__screen {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 20px;
  background: #efe8dc;
  box-shadow: 0 22px 44px -22px rgba(15, 34, 57, 0.55), 0 0 0 1px rgba(15, 34, 57, 0.08);
  transition: transform 0.55s var(--ease), box-shadow 0.55s var(--ease);
}

.ip-card__screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 1s var(--ease);
}

/* On phones a small round play button in the corner, so it hides nothing; from 900px the labelled pill. The whole card opens the invitation either way. */
.ip-card__peek {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.5);
  color: var(--ink);
  font-size: 0;
  font-weight: 800;
  white-space: nowrap;
}

.ip-card__peek svg {
  margin-left: 2px;
}

.ip-card__name {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 1.28rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.1;
}

.ip-card__style {
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--ink-2);
}

@media (hover: hover) and (min-width: 900px) {
  .ip-card__peek {
    opacity: 0;
    translate: -50% 10px;
    transition: opacity 0.35s var(--ease), translate 0.35s var(--ease);
  }

  .ip-card:hover .ip-card__screen,
  .ip-card:focus-visible .ip-card__screen {
    transform: translateY(-8px);
    box-shadow: 0 34px 56px -24px rgba(15, 34, 57, 0.6), 0 0 0 1px rgba(15, 34, 57, 0.08);
  }

  .ip-card:hover .ip-card__screen img,
  .ip-card:focus-visible .ip-card__screen img {
    transform: scale(1.045);
  }

  .ip-card:hover .ip-card__peek,
  .ip-card:focus-visible .ip-card__peek {
    opacity: 1;
    translate: -50% 0;
  }
}

/* ───────── Steps ───────── */

.ip-steps {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}

.ip-step {
  padding: 14px 14px 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--cream);
}

.ip-step__number {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: 20px 10px 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

.ip-step h3 {
  margin: 10px 10px 0;
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.ip-step p {
  margin: 8px 10px 0;
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.ip-scene {
  position: relative;
  height: 252px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

/* Scene 1: writing the details */

.ip-scene--write {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(160deg, #ffffff 0%, #fbf4e9 100%);
}

.ip-form {
  display: grid;
  gap: 9px;
}

.ip-form label {
  display: grid;
  gap: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.ip-form__field {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

/*
 * Typed text. --chars (letters to type) and --w (the finished width) are set on
 * the element when the text differs from the wedding page's Ana / Mihai / date,
 * which are the defaults below.
 */
.ip-typed {
  display: inline-block;
  overflow: hidden;
  padding-right: 2px;
  border-right: 2px solid transparent;
  white-space: nowrap;
}

.ip-mini {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 9px;
  height: 100%;
  padding: 14px 10px;
  overflow: hidden;
  border-radius: 16px;
  background: radial-gradient(120% 90% at 30% 0%, #3d6c57 0%, #1e4535 72%);
  box-shadow: 0 16px 32px -16px rgba(20, 60, 45, 0.8);
  color: #f3ead7;
  text-align: center;
}

.ip-mini__kicker {
  font-size: 0.47rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.75;
}

.ip-mini__names {
  display: grid;
  justify-items: center;
  font-family: var(--serif);
  font-size: 1.85rem;
  line-height: 0.98;
}

.ip-mini__names i {
  font-style: italic;
}

.ip-mini__and {
  margin: 1px 0 3px;
  font-size: 1.1rem;
  opacity: 0.8;
}

.ip-mini__date {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* A second line under the name, such as the godparents on a baptism invitation */
.ip-mini__sub {
  margin-top: -3px;
  font-family: var(--serif);
  font-size: 0.82rem;
  font-style: italic;
  opacity: 0.85;
}

/* The baptism card, in the cream and rose of the Floral design */
.ip-mini--baptism {
  background: radial-gradient(120% 90% at 30% 0%, #fffaf2 0%, #f6e3d3 78%);
  box-shadow: 0 16px 32px -16px rgba(120, 80, 60, 0.55), inset 0 0 0 1px rgba(160, 110, 80, 0.12);
  color: #6b4a3d;
}

/* Scene 2: sending the link */

.ip-scene--send {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px;
  background: #ece5dd;
}

.ip-bubble {
  max-width: 86%;
  padding: 6px;
  border-radius: 12px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.13);
  font-size: 0.82rem;
  line-height: 1.35;
  color: #111b21;
}

.ip-bubble--out {
  align-self: flex-end;
  border-top-right-radius: 4px;
  background: #d9fdd3;
  transform-origin: 100% 100%;
}

.ip-bubble--in {
  align-self: flex-start;
  padding: 8px 10px;
  border-top-left-radius: 4px;
  background: #fff;
  transform-origin: 0 100%;
}

.ip-bubble--typing {
  position: absolute;
  bottom: 14px;
  left: 14px;
  display: flex;
  gap: 4px;
  padding: 11px 12px;
  border-top-left-radius: 4px;
  background: #fff;
  opacity: 0;
}

.ip-bubble--typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9aa5ad;
}

.ip-link {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.055);
}

.ip-link img {
  display: block;
  width: 66px;
  height: 58px;
  object-fit: cover;
  object-position: 50% 40%;
}

.ip-link__text b {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.25;
}

.ip-link__text small {
  font-size: 0.68rem;
  color: #667781;
}

.ip-bubble__text {
  display: block;
  padding: 6px 4px 0;
}

.ip-bubble--in .ip-bubble__text {
  padding: 0;
}

.ip-bubble__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 0 2px;
  font-size: 0.62rem;
  color: #667781;
}

.ip-ticks {
  color: #53bdeb;
}

/* Scene 3: the guest list fills in */

.ip-scene--list {
  padding: 14px;
  background: linear-gradient(160deg, #ffffff 0%, #f5f8fb 100%);
}

.ip-list {
  display: grid;
  gap: 8px;
}

.ip-list__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 800;
}

.ip-list__total {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-2);
}

.ip-list__total b {
  font-size: 1rem;
  font-weight: 800;
  color: var(--green);
}

.ip-list__bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ecf1;
}

.ip-list__bar i {
  display: block;
  width: 78%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #39cf82, var(--green));
  transform-origin: 0 50%;
}

.ip-row {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #ebeff3;
  border-radius: 12px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.ip-row__avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9dbb, var(--pink));
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
}

.ip-row:nth-of-type(4) .ip-row__avatar {
  background: linear-gradient(135deg, #8fd0ff, #3d8bff);
}

.ip-row:nth-of-type(5) .ip-row__avatar {
  background: linear-gradient(135deg, #ffd08a, #ff9a3d);
}

.ip-row__who small {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-3);
}

.ip-pill {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
}

.ip-pill--yes {
  background: #e2f7ec;
  color: #12804a;
}

.ip-pill--wait {
  background: #fff2d2;
  color: #96690a;
}

.ip-row--flip .ip-pill--wait {
  position: absolute;
  top: 50%;
  right: 10px;
  translate: 0 -50%;
  opacity: 0;
}

/* ───────── Pair of cards ───────── */

.ip-pair {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.ip-pair__card {
  display: block;
  padding: 24px 22px;
  border: 1px solid #f4ded6;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff8f1 0%, #fdeef3 100%);
  color: inherit;
  text-decoration: none;
}

.ip-pair__card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

.ip-pair__card p {
  margin-top: 8px;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.ip-pair__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--pink);
}

.ip-pair__more svg {
  transition: translate 0.3s var(--ease);
}

.ip-pair__card--link:hover .ip-pair__more svg {
  translate: 4px 0;
}

/* ───────── After the invitation: four chapters ───────── */

/*
 * Each chapter is a big outlined number, the copy and a screen from the app.
 * The screen plays when it is scrolled to (data-scene → .is-live, like the
 * steps above). From 1024px the chapter in the middle of the window is
 * .is-current and the others step back, so the eye follows one at a time.
 */

.ip-suite {
  display: grid;
  gap: 76px;
  margin-top: 56px;
}

.ip-chapter {
  display: grid;
  align-items: center;
  gap: 30px;
}

.ip-chapter__copy {
  transition: opacity 0.6s var(--ease);
}

.ip-chapter__number {
  display: block;
  font-size: 4.4rem;
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: rgba(255, 69, 134, 0);
  -webkit-text-stroke: 1.5px var(--pink);
  transition: color 0.8s var(--ease);
}

.ip-chapter__title {
  margin-top: 14px;
  font-size: clamp(1.5rem, 5.4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.ip-chapter__text {
  max-width: 46ch;
  margin-top: 12px;
  font-size: 1rem;
  line-height: 1.62;
  color: var(--ink-2);
}

.ip-chapter__points {
  display: grid;
  gap: 8px;
  max-width: 440px;
  margin-top: 22px;
}

.ip-chapter__points li {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

.ip-chapter__points li::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 1.5px;
  background: linear-gradient(135deg, var(--pink), var(--coral));
  rotate: 45deg;
}

.ip-chapter__screen {
  position: relative;
}

.ip-chapter__screen::before {
  content: '';
  position: absolute;
  inset: 4% -8% -10%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 69, 134, 0.16), rgba(255, 116, 82, 0.06) 60%, transparent);
  pointer-events: none;
}

/* The app itself: the desktop page on a laptop, the phone page on a phone in front of it */

.ip-devices {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 12% 10% 0;
  transition: opacity 0.6s var(--ease), scale 0.6s var(--ease);
}

.ip-laptop__screen {
  overflow: hidden;
  padding: 2.2% 2.2% 0;
  border-radius: 16px 16px 0 0;
  background: #0b1220;
  box-shadow: 0 44px 80px -44px rgba(15, 34, 57, 0.65), 0 0 0 1px rgba(15, 34, 57, 0.08);
}

.ip-laptop__screen img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 6px 6px 0 0;
  object-fit: cover;
  object-position: top;
  background: #f5f7fa;
}

.ip-laptop__base {
  position: relative;
  height: 12px;
  margin: 0 -7%;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(#eceef2, #c3c8d1);
  box-shadow: 0 20px 30px -20px rgba(15, 34, 57, 0.55);
}

.ip-laptop__base::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 16%;
  height: 5px;
  translate: -50% 0;
  border-radius: 0 0 6px 6px;
  background: #b4bac4;
}

.ip-handset {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 30%;
  min-width: 104px;
  padding: 5px;
  border-radius: 24px;
  background: #0b1220;
  box-shadow: 0 34px 60px -26px rgba(15, 34, 57, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: opacity 0.8s var(--ease) 0.3s, translate 1s var(--ease) 0.3s;
}

/* The screen is a size container, so the page inside can scroll by exactly its own height (cqw). */
.ip-handset__screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  border-radius: 19px;
  background: #f5f7fa;
  container-type: inline-size;
}

.ip-handset__page {
  --end: calc(100cqw * (19.5 / 9 - var(--ratio, 3)));
  display: block;
  width: 100%;
  height: auto;
}

/* The cards under the chapters */

.ip-day__list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.ip-day__list li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(240, 214, 204, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  transition: opacity 0.6s var(--ease), translate 0.6s var(--ease);
  transition-delay: calc(var(--n) * 180ms + 150ms);
}

.ip-day__time {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 600;
  font-variant-numeric: lining-nums;
  color: var(--pink);
}

.ip-day__what b {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
}

.ip-day__what small {
  font-size: 0.76rem;
  color: var(--ink-3);
}

.ip-day__pin {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff0f5;
  color: var(--pink);
}

.ip-pair .ip-pair__card--photo {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 300px;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: #fff;
  isolation: isolate;
}

.ip-pair__card--photo img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
  transition: scale 1.2s var(--ease);
}

.ip-pair__card--photo::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(10, 16, 26, 0.84), rgba(10, 16, 26, 0.3) 62%, rgba(10, 16, 26, 0.05));
}

.ip-pair__photo-copy {
  padding: 26px 24px;
}

.ip-pair__card--photo p {
  color: rgba(255, 255, 255, 0.82);
}

.ip-pair__card--photo .ip-pair__more {
  color: #fff;
}

@media (hover: hover) {
  .ip-pair__card--photo:hover img {
    scale: 1.05;
  }
}

/* Motion for the chapters and cards (only when the script is running) */

.ip-js .ip-chapter__screen:not(.is-in) .ip-handset {
  opacity: 0;
  translate: 28px 40px;
}

/* The phone thumbs through the page while its chapter is on screen, resting at the top and at the bottom. */
.ip-js .ip-devices.is-live .ip-handset__page {
  animation: ip-scrollshot 24s ease-in-out 1.2s infinite;
}

.ip-js .ip-day:not(.is-live) .ip-day__list li {
  opacity: 0;
  translate: -14px 0;
}

.ip-js .ip-day.is-live .ip-day__pin {
  animation: ip-pin 2.8s var(--ease) infinite;
  animation-delay: calc(var(--n, 0) * 0.3s + 1.2s);
}

@keyframes ip-scrollshot {
  0%, 10% { translate: 0 0; }
  45%, 58% { translate: 0 var(--end); }
  92%, 100% { translate: 0 0; }
}

@keyframes ip-pin {
  0%, 30%, 100% { translate: 0 0; }
  10% { translate: 0 -5px; }
  20% { translate: 0 0; }
  25% { translate: 0 -2px; }
}

@media (min-width: 1024px) {
  .ip-suite {
    gap: 120px;
    margin-top: 96px;
  }

  .ip-chapter {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 64px;
    min-height: 62vh;
  }

  .ip-chapter__number {
    font-size: 6.6rem;
  }

  .ip-chapter__text {
    font-size: 1.06rem;
  }

  .ip-devices {
    max-width: 740px;
  }

  .ip-js .ip-chapter:not(.is-current) .ip-chapter__copy {
    opacity: 0.3;
  }

  .ip-js .ip-chapter:not(.is-current) .ip-devices {
    opacity: 0.55;
    scale: 0.97;
  }

  .ip-js .ip-chapter.is-current .ip-chapter__number {
    color: rgba(255, 69, 134, 0.1);
  }
}

/* ───────── Three facts: small living icons ───────── */

.ip-fact {
  position: relative;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

@media (hover: hover) {
  .ip-fact:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -28px rgba(15, 34, 57, 0.45);
  }
}

.ip-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.ip-tilt,
.ip-pencil {
  transform-box: fill-box;
}

.ip-tilt {
  transform-origin: 50% 100%;
}

.ip-pencil {
  transform-origin: 0% 100%;
}

.ip-fact__saved {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e2f7ec;
  font-size: 0.66rem;
  font-weight: 800;
  color: #12804a;
}

.ip-js .ip-fact.is-in .ip-draw {
  animation: ip-draw-loop 6.5s var(--ease) infinite both;
  animation-delay: calc(var(--d, 0s) + 0.5s);
}

.ip-js .ip-fact.is-in .ip-tilt {
  animation: ip-tilt 6.5s var(--ease) 0.3s infinite both;
}

.ip-js .ip-fact.is-in .ip-pencil {
  animation: ip-write 6.5s ease-in-out 0.5s infinite both;
}

.ip-js .ip-fact.is-in .ip-fact__saved {
  animation: ip-saved 6.5s var(--ease) 0.5s infinite both;
}

@keyframes ip-draw-loop {
  0% { stroke-dashoffset: 1; }
  16%, 90% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

@keyframes ip-tilt {
  0% { transform: rotate(-16deg) translateY(2px); }
  10% { transform: rotate(5deg); }
  16%, 100% { transform: none; }
}

@keyframes ip-write {
  0%, 30%, 100% { transform: none; }
  6% { transform: rotate(-9deg); }
  12% { transform: rotate(5deg); }
  18% { transform: rotate(-7deg); }
  24% { transform: rotate(3deg); }
}

@keyframes ip-saved {
  0%, 26% { opacity: 0; transform: translateY(4px) scale(0.85); }
  32%, 84% { opacity: 1; transform: none; }
  92%, 100% { opacity: 0; transform: translateY(-3px); }
}

/* ───────── Final call: every design drifting behind ───────── */

.ip-final__reel {
  position: absolute;
  inset: -40% -20%;
  display: grid;
  align-content: center;
  gap: 18px;
  opacity: 0.3;
  rotate: -9deg;
  pointer-events: none;
}

.ip-final__reel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(42% 30% at 50% 50%, var(--ink) 20%, rgba(15, 34, 57, 0.55) 70%, rgba(15, 34, 57, 0.2));
}

.ip-final__track {
  display: flex;
  width: max-content;
  animation: ip-reel 90s linear infinite;
}

.ip-final__row--back .ip-final__track {
  animation-duration: 110s;
  animation-direction: reverse;
}

.ip-final__track img {
  flex: none;
  width: 96px;
  height: 208px;
  margin-right: 16px;
  border-radius: 16px;
  object-fit: cover;
  object-position: top;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.7);
}

@keyframes ip-reel {
  from { translate: 0 0; }
  to { translate: -50% 0; }
}

@media (min-width: 900px) {
  .ip-final__track img {
    width: 124px;
    height: 268px;
    margin-right: 20px;
    border-radius: 20px;
  }
}

/* ───────── Price ───────── */

.ip-price {
  position: relative;
  display: grid;
  gap: 28px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 34px 24px;
  overflow: hidden;
  border-radius: 30px;
  background: var(--ink);
  color: #fff;
}

.ip-price::before {
  content: '';
  position: absolute;
  top: -180px;
  right: -160px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 69, 134, 0.34) 0%, rgba(255, 69, 134, 0) 68%);
  pointer-events: none;
}

.ip-price__copy,
.ip-price__list {
  position: relative;
}

.ip-price .ip-eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.ip-price .ip-lead {
  color: rgba(255, 255, 255, 0.82);
}

.ip-price__detail {
  margin-top: 12px;
  font-size: 0.96rem;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.68);
}

.ip-price__detail strong {
  font-weight: 800;
  color: #fff;
}

.ip-price .ip-textlink {
  margin-top: 22px;
  color: #ff9dbb;
}

.ip-price__list {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.96rem;
  font-weight: 600;
}

.ip-price__list li {
  display: flex;
  align-items: center;
  gap: 11px;
}

.ip-price__list li::before {
  content: '';
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--pink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-8.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* ───────── Questions ───────── */

.ip-faq {
  display: grid;
  gap: 10px;
  max-width: 800px;
  margin: 36px auto 0;
}

.ip-faq__item {
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

.ip-faq__item[open] {
  border-color: #f0d9cf;
  box-shadow: 0 20px 40px -30px rgba(15, 34, 57, 0.45);
}

.ip-faq__item summary {
  position: relative;
  display: block;
  padding: 19px 40px 19px 0;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}

.ip-faq__item summary::-webkit-details-marker {
  display: none;
}

.ip-faq__mark {
  position: absolute;
  top: 50%;
  right: 0;
  width: 26px;
  height: 26px;
  translate: 0 -50%;
  border-radius: 50%;
  background: #fff0f5;
  transition: rotate 0.4s var(--ease), background-color 0.4s var(--ease);
}

.ip-faq__mark::before,
.ip-faq__mark::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  translate: -50% -50%;
  border-radius: 2px;
  background: var(--pink);
  transition: rotate 0.4s var(--ease);
}

.ip-faq__mark::after {
  rotate: 90deg;
}

.ip-faq__item[open] .ip-faq__mark::after {
  rotate: 0deg;
}

.ip-faq__item p {
  padding: 0 4px 22px 0;
  font-size: 0.98rem;
  line-height: 1.68;
  color: var(--ink-2);
}

@supports (interpolate-size: allow-keywords) {
  .ip-faq__item {
    interpolate-size: allow-keywords;
  }

  .ip-faq__item::details-content {
    height: 0;
    overflow: hidden;
    transition: height 0.45s var(--ease), content-visibility 0.45s allow-discrete;
  }

  .ip-faq__item[open]::details-content {
    height: auto;
  }
}

/* ───────── Final call ───────── */

.ip-final {
  padding: 8px 20px 84px;
}

.ip-final__card {
  position: relative;
  display: grid;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px 58px;
  overflow: hidden;
  border-radius: 32px;
  background: var(--ink);
  color: #fff;
  text-align: center;
}

.ip-final__glow {
  position: absolute;
  inset: -40% -20%;
  background:
    radial-gradient(40% 40% at 22% 30%, rgba(255, 69, 134, 0.36) 0%, rgba(255, 69, 134, 0) 100%),
    radial-gradient(36% 36% at 80% 72%, rgba(222, 174, 98, 0.3) 0%, rgba(222, 174, 98, 0) 100%);
  pointer-events: none;
  animation: ip-drift 16s ease-in-out infinite alternate;
}

.ip-final__card h2 {
  position: relative;
  max-width: 17ch;
  font-size: clamp(2rem, 7vw, 3.3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.ip-final__card h2 em {
  font-size: 1.1em;
  background: linear-gradient(100deg, #ff8fb1 10%, #ffb38f 90%);
  -webkit-background-clip: text;
  background-clip: text;
}

.ip-final__card p {
  position: relative;
  margin-top: 16px;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.78);
}

.ip-final__card .ip-button {
  margin-top: 30px;
}

.ip-final__small {
  position: relative;
  margin-top: 16px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ───────── Sticky action on phones ───────── */

.ip-sticky {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  translate: 0 110%;
  transition: translate 0.5s var(--ease);
}

.ip-sticky.is-shown {
  translate: 0 0;
}

.ip-sticky .ip-button {
  width: 100%;
}

body:has(#cookie-banner:not(.hidden)) .ip-sticky {
  display: none;
}

/* ───────── Preview dialog ───────── */

/* While a design is open, the page behind it neither scrolls nor shows its scrollbar. */
html:has(.ip-preview[open]) {
  overflow: hidden;
}

.ip-preview {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #0a1422;
  color: #fff;
}

.ip-preview[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  justify-items: center;
  animation: ip-dialog-in 0.4s var(--ease);
}

.ip-preview::backdrop {
  background: rgba(8, 15, 26, 0.78);
}

.ip-preview__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px 10px 20px;
}

.ip-preview__name {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-style: italic;
  font-weight: 600;
}

.ip-preview__close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), rotate 0.4s var(--ease);
}

.ip-preview__close:hover {
  background: rgba(255, 255, 255, 0.24);
  rotate: 90deg;
}

.ip-preview__phone {
  width: 100%;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.ip-preview__phone iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.ip-preview__actions {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}

.ip-preview__actions .ip-button {
  width: 100%;
  max-width: 420px;
}

/* ───────── On the guests' phones ───────── */

/*
 * One phone tells what a guest goes through: the link arrives on WhatsApp, the
 * invitation opens and browses itself, the guest confirms. The script moves
 * data-step along (0, 1, 2) and freezes everything with .is-paused while the
 * phone is off screen. Every element's resting style is its finished state, so
 * without the script, or with reduced motion, the scene is simply still.
 */

.ip-show {
  --w: 262px;
  --wa: #008069;
  position: relative;
  display: grid;
  justify-items: center;
  gap: 40px;
  overflow: hidden;
  background:
    radial-gradient(56% 42% at 50% 52%, rgba(255, 69, 134, 0.24), transparent 72%),
    radial-gradient(40% 34% at 88% 8%, rgba(255, 116, 82, 0.16), transparent 70%),
    radial-gradient(36% 30% at 6% 92%, rgba(37, 211, 102, 0.1), transparent 70%),
    #0d1726;
  color: #fff;
}

.ip-show .ip-eyebrow,
.ip-show .ip-lead {
  color: rgba(255, 255, 255, 0.74);
}

.ip-show__head {
  max-width: 640px;
  text-align: center;
}

.ip-show__stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 22px;
  width: var(--w);
}

.ip-show__phone {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  border: 7px solid #060b14;
  border-radius: 44px;
  background: #060b14;
  box-shadow: 0 70px 110px -44px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 90px -16px rgba(255, 69, 134, 0.42);
  isolation: isolate;
}

.ip-show__phone::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 6;
  width: 30%;
  height: 19px;
  translate: -50% 0;
  border-radius: 12px;
  background: #060b14;
}

.ip-show__chat,
.ip-show__invite {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 37px;
}

.ip-show__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  padding: 0 20px 0 24px;
  font-size: 0.66rem;
}

.ip-show__status b {
  font-weight: 800;
}

/* Signal and battery, drawn with two gradients. */
.ip-show__status i {
  width: 34px;
  height: 9px;
  border-radius: 2px;
  background:
    linear-gradient(currentColor, currentColor) right / 15px 9px no-repeat,
    repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 5px) left bottom / 14px 7px no-repeat;
  opacity: 0.9;
}

/* The chat */

.ip-show__chat {
  background-color: #efeae2;
  background-image: radial-gradient(rgba(84, 66, 45, 0.07) 1px, transparent 1.6px);
  background-size: 14px 14px;
  color: #111b21;
  transition: scale 0.7s var(--ease), filter 0.7s var(--ease);
}

.ip-wa__bar {
  padding-bottom: 9px;
  background: var(--wa);
  color: #fff;
}

.ip-wa__head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 0 8px;
}

.ip-wa__avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(140deg, #f6d6c8, #e7b4a6);
  font-family: var(--serif);
  font-size: 0.72rem;
  font-style: italic;
  font-weight: 600;
  color: #7a3b2e;
}

.ip-wa__who b {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
}

.ip-wa__who small {
  font-size: 0.62rem;
  opacity: 0.82;
}

.ip-wa__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 10px;
}

.ip-wa__day {
  align-self: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
  font-size: 0.6rem;
  font-weight: 700;
  color: #54656f;
}

.ip-wa__msg {
  position: relative;
  max-width: 90%;
  padding: 4px;
  border-radius: 3px 10px 10px 10px;
  background: #fff;
  box-shadow: 0 1px 1.5px rgba(11, 20, 26, 0.16);
  transform-origin: 0 0;
}

.ip-wa__card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 7px;
  background: #f0f2f5;
}

.ip-wa__card img {
  display: block;
  width: 100%;
  height: 132px;
  object-fit: cover;
  object-position: 50% var(--card-y, 46%);
}

.ip-wa__card-text {
  display: block;
  padding: 7px 9px 8px;
}

.ip-wa__card-text b {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.25;
}

.ip-wa__card-text small {
  display: block;
  margin-top: 2px;
  font-size: 0.62rem;
  line-height: 1.3;
  color: #667781;
}

.ip-wa__card-text .ip-wa__domain {
  margin-top: 4px;
}

.ip-wa__text {
  display: block;
  padding: 7px 5px 0;
  font-size: 0.72rem;
  line-height: 1.38;
}

.ip-wa__text u {
  color: #027eb5;
  text-decoration-color: rgba(2, 126, 181, 0.5);
}

.ip-wa__time {
  display: block;
  padding: 1px 5px;
  font-size: 0.56rem;
  color: #667781;
  text-align: right;
}

.ip-wa__input {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px 16px;
}

.ip-wa__input span {
  flex: 1;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  font-size: 0.66rem;
  color: #8696a0;
}

.ip-wa__input i {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #00a884;
}

/* A finger tapping: a soft disc that swells and fades. */
.ip-show__tap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: rgba(17, 27, 33, 0.22);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
  opacity: 0;
  pointer-events: none;
}

/* The invitation, opened from the link */

.ip-show__invite {
  z-index: 2;
  background: #fff;
  opacity: 0;
  scale: 0.8;
  visibility: hidden;
  transform-origin: 50% 30%;
  transition: opacity 0.5s var(--ease), scale 0.75s var(--ease), visibility 0s linear 0.75s;
}

.ip-show[data-step='1'] .ip-show__invite,
.ip-show[data-step='2'] .ip-show__invite {
  opacity: 1;
  scale: 1;
  visibility: visible;
  transition: opacity 0.5s var(--ease), scale 0.75s var(--ease), visibility 0s;
}

.ip-show[data-step='1'] .ip-show__chat,
.ip-show[data-step='2'] .ip-show__chat {
  scale: 0.94;
  filter: brightness(0.7);
}

.ip-show__url {
  flex: none;
  padding-bottom: 8px;
  border-bottom: 1px solid #ececec;
  background: #f7f7f8;
  color: #1d2b3a;
}

.ip-show__address {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 2px 14px 0;
  padding: 6px 10px;
  border-radius: 10px;
  background: #e9eaee;
  font-size: 0.62rem;
  font-weight: 600;
}

.ip-show__view {
  --s: 0.6205;
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #fff;
}

.ip-show__view img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.ip-show__live {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% / var(--s));
  height: calc(100% / var(--s));
  border: 0;
  background: transparent;
  transform: scale(var(--s));
  transform-origin: 0 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s var(--ease);
}

.ip-show__view.is-live .ip-show__live {
  opacity: 1;
}

/* The guest confirms: a sheet rises over the invitation. */

.ip-rsvp {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: grid;
  gap: 10px;
  padding: 22px 16px 20px;
  border-radius: 26px 26px 0 0;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -12px 40px -12px rgba(15, 34, 57, 0.45);
  color: var(--ink);
  translate: 0 calc(100% + 20px);
  transition: translate 0.65s var(--ease);
}

.ip-rsvp::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 34px;
  height: 4px;
  translate: -50% 0;
  border-radius: 4px;
  background: #d9dde2;
}

.ip-show[data-step='2'] .ip-rsvp {
  translate: 0 0;
}

.ip-rsvp__title {
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ip-rsvp__choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.ip-rsvp__choice {
  padding: 9px 4px;
  border: 1.5px solid #e2e6ea;
  border-radius: 12px;
  background: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  color: var(--ink-2);
}

.ip-rsvp__choice--yes {
  border-color: var(--pink);
  background: #fff0f5;
  color: var(--pink-2);
}

.ip-rsvp__count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-2);
}

.ip-rsvp__stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ip-rsvp__stepper i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid #e2e6ea;
  border-radius: 50%;
  font-size: 0.8rem;
  font-style: normal;
  line-height: 1;
  color: var(--ink-2);
}

.ip-rsvp__number {
  display: flex;
  flex-direction: column;
  height: 1.2em;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
}

.ip-rsvp__number span {
  translate: 0 -100%;
}

.ip-rsvp__send {
  position: relative;
  display: grid;
  height: 38px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
}

.ip-rsvp__send::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--pink), var(--coral));
  opacity: 0;
}

.ip-rsvp__send > span:not(.ip-show__tap) {
  position: relative;
  grid-area: 1 / 1;
  place-self: center;
}

.ip-rsvp__send > span:first-child {
  opacity: 0;
}

/* Around the phone: what the couple sees meanwhile. */

.ip-show__chip {
  z-index: 7;
  animation: ip-float 7s ease-in-out infinite;
}

.ip-show__chip--sent,
.ip-show__chip--count {
  top: 12%;
  left: -46px;
}

.ip-show__chip--reply {
  top: 44%;
  right: -50px;
}

.ip-show__quote {
  display: block;
  font-style: italic;
}

.ip-js .ip-show__chip {
  opacity: 0;
  scale: 0.9;
  transition: opacity 0.35s var(--ease), scale 0.35s var(--ease);
}

.ip-js .ip-show[data-step='0'] .ip-show__chip--sent,
.ip-js .ip-show[data-step='2'] .ip-show__chip--reply,
.ip-js .ip-show[data-step='2'] .ip-show__chip--count {
  opacity: 1;
  scale: 1;
}

/* Without the script both chips would sit on the same spot. */
html:not(.ip-js) .ip-show__chip--count {
  display: none;
}

.ip-show__open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 13px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.3s var(--ease), scale 0.3s var(--ease);
}

.ip-show__open:hover {
  background: rgba(255, 255, 255, 0.18);
}

.ip-show__open:active {
  scale: 0.97;
}

.ip-show__open svg {
  width: 22px;
  height: 22px;
  padding: 6px 5px 6px 7px;
  border-radius: 50%;
  background: linear-gradient(100deg, var(--pink), var(--coral));
}

/* The three steps: a story bar on phones, a list beside the phone on wide screens. */

.ip-show__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 440px);
}

.ip-show__steps button {
  position: relative;
  display: grid;
  align-content: start;
  gap: 9px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--sans);
  color: rgba(255, 255, 255, 0.5);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.4s var(--ease), background-color 0.4s var(--ease);
}

.ip-show__steps button.is-active {
  color: #fff;
}

.ip-show__progress {
  display: block;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
}

.ip-show__progress::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--coral));
  transform-origin: 0 50%;
  scale: 0 1;
}

.is-done .ip-show__progress::after {
  scale: 1 1;
}

.is-active .ip-show__progress::after {
  animation: ip-progress var(--d, 6s) linear both;
}

.ip-show__number {
  display: none;
}

.ip-show__label {
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.3;
}

.ip-show__steps small {
  display: none;
}

.ip-show__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 26px;
}

.ip-show__whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  opacity: 0.86;
  transition: opacity 0.3s var(--ease);
}

.ip-show__whatsapp:hover {
  opacity: 1;
}

.ip-show__whatsapp svg {
  color: #25d366;
}

/* The scene's timing. Each step's animations restart whenever data-step is set. */

.ip-show[data-step='0'] .ip-wa__day {
  animation: ip-wa-in 0.5s var(--ease) 0.2s both;
}

.ip-show[data-step='0'] .ip-wa__msg {
  animation: ip-wa-msg 0.6s var(--ease) 0.55s both;
}

.ip-show[data-step='0'] .ip-show__chip--sent {
  animation: ip-chip-in 0.7s var(--ease) 1.1s both, ip-float 7s ease-in-out 1.8s infinite;
}

.ip-show[data-step='0'] .ip-wa__card {
  animation: ip-press 0.5s var(--ease) 3.55s;
}

.ip-show[data-step='0'] .ip-wa__card .ip-show__tap {
  animation: ip-tap 0.9s var(--ease) 3.4s;
}

.ip-show[data-step='2'] .ip-rsvp__choice--yes {
  animation: ip-choose 0.35s var(--ease) 1.2s both;
}

.ip-show[data-step='2'] .ip-rsvp__plus {
  animation: ip-press 0.4s var(--ease) 1.85s;
}

.ip-show[data-step='2'] .ip-rsvp__number span {
  animation: ip-number 0.4s var(--ease) 1.95s both;
}

.ip-show[data-step='2'] .ip-rsvp__send {
  animation: ip-press 0.45s var(--ease) 2.75s;
}

.ip-show[data-step='2'] .ip-rsvp__send .ip-show__tap {
  animation: ip-tap 0.9s var(--ease) 2.6s;
}

.ip-show[data-step='2'] .ip-rsvp__send::before,
.ip-show[data-step='2'] .ip-rsvp__send > span:first-child {
  animation: ip-cover 0.35s var(--ease) 2.95s both;
}

.ip-show[data-step='2'] .ip-rsvp__send > span:nth-child(2) {
  animation: ip-wa-in 0.4s var(--ease) 3.1s both;
}

.ip-show[data-step='2'] .ip-show__chip--count {
  animation: ip-chip-in 0.7s var(--ease) 3.3s both, ip-float 7s ease-in-out 4s infinite;
}

.ip-show[data-step='2'] .ip-show__chip--reply {
  animation: ip-chip-in 0.7s var(--ease) 3.5s both, ip-float 7s ease-in-out 4.2s infinite;
}

.ip-show.is-paused *,
.ip-show.is-paused *::before,
.ip-show.is-paused *::after {
  animation-play-state: paused !important;
}

@keyframes ip-wa-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes ip-wa-msg {
  from { opacity: 0; transform: translateY(18px) scale(0.92); }
  to { opacity: 1; transform: none; }
}

@keyframes ip-tap {
  0% { opacity: 0; transform: scale(0.4); }
  30% { opacity: 1; transform: scale(0.85); }
  100% { opacity: 0; transform: scale(1.7); }
}

@keyframes ip-press {
  0%, 100% { transform: none; }
  40% { transform: scale(0.95); }
}

@keyframes ip-choose {
  from { border-color: #e2e6ea; background: #fff; color: var(--ink-2); }
}

@keyframes ip-number {
  from { translate: 0 0; }
  to { translate: 0 -100%; }
}

@keyframes ip-cover {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes ip-progress {
  from { scale: 0 1; }
  to { scale: 1 1; }
}

@keyframes ip-progress-down {
  from { scale: 1 0; }
  to { scale: 1 1; }
}

@media (min-width: 480px) {
  .ip-show {
    --w: 290px;
  }

  .ip-wa__card img {
    height: 150px;
  }

  .ip-show__chip--sent,
  .ip-show__chip--count {
    left: -96px;
  }

  .ip-show__chip--reply {
    right: -104px;
  }
}

@media (min-width: 1024px) {
  .ip-show {
    --w: 318px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    grid-template-areas: 'stage head' 'stage steps' 'stage actions';
    align-items: start;
    justify-items: start;
    column-gap: 72px;
    row-gap: 34px;
  }

  .ip-show__head {
    grid-area: head;
    align-self: end;
    text-align: left;
  }

  .ip-show__stage {
    grid-area: stage;
    justify-self: center;
  }

  .ip-show__steps {
    grid-area: steps;
    grid-template-columns: 1fr;
    gap: 4px;
    width: 100%;
    max-width: 480px;
  }

  .ip-show__steps button {
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 4px;
    padding: 16px 18px 16px 22px;
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.55);
  }

  .ip-show__steps button.is-active {
    background: rgba(255, 255, 255, 0.06);
  }

  .ip-show__steps button:hover {
    color: #fff;
  }

  .ip-show__progress {
    position: absolute;
    top: 16px;
    bottom: 16px;
    left: 0;
    width: 3px;
    height: auto;
  }

  .ip-show__progress::after {
    transform-origin: 50% 0;
    scale: 1 0;
  }

  .is-done .ip-show__progress::after {
    scale: 1 1;
  }

  .is-active .ip-show__progress::after {
    animation-name: ip-progress-down;
  }

  .ip-show__number {
    display: grid;
    grid-row: span 2;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px currentColor;
    font-family: var(--serif);
    font-size: 1.05rem;
    font-style: italic;
    font-weight: 600;
    transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease), color 0.4s var(--ease);
  }

  .is-active .ip-show__number {
    background: linear-gradient(120deg, var(--pink), var(--coral));
    box-shadow: none;
    color: #fff;
  }

  .ip-show__label {
    font-size: 1.04rem;
  }

  .ip-show__steps small {
    display: block;
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
  }

  .ip-show__actions {
    grid-area: actions;
    justify-content: flex-start;
    padding-left: 22px;
  }

  .ip-show__chip--sent,
  .ip-show__chip--count {
    left: -150px;
  }

  .ip-show__chip--reply {
    right: -150px;
  }
}

@media (min-width: 1240px) {
  .ip-show {
    --w: 336px;
  }
}

/* ───────── Every occasion ───────── */

.ip-occasions {
  display: flex;
  gap: 14px;
  margin: 44px -20px 0;
  padding: 0 20px 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 20px;
  scrollbar-width: none;
}

.ip-occasions::-webkit-scrollbar {
  display: none;
}

.ip-occasion {
  position: relative;
  flex: 0 0 min(78%, 320px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 24px;
  background: var(--frame);
  box-shadow: 0 24px 50px -30px rgba(15, 34, 57, 0.6);
  color: #fff;
  text-decoration: none;
  scroll-snap-align: start;
  isolation: isolate;
}

.ip-occasion img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 70%;
  transition: scale 1.2s var(--ease);
}

.ip-occasion::after {
  content: '';
  position: absolute;
  inset: 40% 0 0;
  background: linear-gradient(to top, rgba(10, 16, 26, 0.78), rgba(10, 16, 26, 0.32) 55%, transparent);
}

.ip-occasion__here {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

.ip-occasion__here::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink);
}

.ip-occasion__body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 22px;
}

.ip-occasion__body b {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ip-occasion__body small {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.82);
}

.ip-occasion__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 0.82rem;
  font-weight: 700;
  transition: background-color 0.3s var(--ease);
}

.ip-occasion__more svg {
  transition: translate 0.3s var(--ease);
}

@media (hover: hover) {
  .ip-occasion:hover img {
    scale: 1.06;
  }

  .ip-occasion:hover .ip-occasion__more {
    background: rgba(255, 255, 255, 0.32);
  }

  .ip-occasion:hover .ip-occasion__more svg {
    translate: 4px 0;
  }
}

@media (min-width: 900px) {
  .ip-occasions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 52px 0 0;
    padding: 0;
    overflow: visible;
  }

  .ip-occasion {
    aspect-ratio: 3 / 4;
  }

  .ip-occasion__body b {
    font-size: 1.75rem;
  }
}

/* ───────── Motion cues (only when the script is running) ───────── */

.ip-js .ip-reveal {
  opacity: 0;
  translate: 0 30px;
  transition: opacity 0.85s var(--ease), translate 0.85s var(--ease);
  transition-delay: calc(var(--i, 0) * 85ms);
}

.ip-js .ip-reveal.is-in {
  opacity: 1;
  translate: 0 0;
}

.ip-js .ip-scene:not(.is-live) .ip-typed {
  max-width: 0;
}

.ip-js .ip-scene:not(.is-live) .ip-mini__names i,
.ip-js .ip-scene:not(.is-live) .ip-mini__sub,
.ip-js .ip-scene:not(.is-live) .ip-mini__date,
.ip-js .ip-scene:not(.is-live) .ip-bubble--out,
.ip-js .ip-scene:not(.is-live) .ip-bubble--in,
.ip-js .ip-scene:not(.is-live) .ip-row {
  opacity: 0;
}

.ip-js .ip-scene:not(.is-live) .ip-list__bar i {
  scale: 0 1;
}

.ip-js .is-live .ip-typed--bride {
  animation: ip-type-bride 10s steps(var(--chars, 3), end) infinite, ip-caret-bride 10s linear infinite;
}

.ip-js .is-live .ip-typed--groom {
  animation: ip-type-groom 10s steps(var(--chars, 5), end) infinite, ip-caret-groom 10s linear infinite;
}

.ip-js .is-live .ip-typed--date {
  animation: ip-type-date 10s steps(var(--chars, 13), end) infinite, ip-caret-date 10s linear infinite;
}

.ip-js .is-live .ip-mini__bride {
  animation: ip-mini-bride 10s var(--ease) infinite;
}

.ip-js .is-live .ip-mini__and,
.ip-js .is-live .ip-mini__groom {
  animation: ip-mini-groom 10s var(--ease) infinite;
}

.ip-js .is-live .ip-mini__date {
  animation: ip-mini-date 10s var(--ease) infinite;
}

.ip-js .is-live .ip-bubble--out {
  animation: ip-bubble-out 10s var(--ease) infinite;
}

.ip-js .is-live .ip-ticks {
  animation: ip-ticks 10s linear infinite;
}

.ip-js .is-live .ip-bubble--typing {
  animation: ip-typing 10s var(--ease) infinite;
}

.ip-js .is-live .ip-bubble--typing i {
  animation: ip-dots 1s ease-in-out infinite;
}

.ip-js .is-live .ip-bubble--typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.ip-js .is-live .ip-bubble--typing i:nth-child(3) {
  animation-delay: 0.3s;
}

.ip-js .is-live .ip-bubble--in {
  animation: ip-bubble-in 10s var(--ease) infinite;
}

.ip-js .is-live .ip-list__bar i {
  animation: ip-bar 10s var(--ease) infinite;
}

.ip-js .is-live .ip-row {
  animation: ip-row 10s var(--ease) infinite;
}

.ip-js .is-live .ip-row:nth-of-type(4) {
  animation-name: ip-row-2;
}

.ip-js .is-live .ip-row:nth-of-type(5) {
  animation-name: ip-row-3;
}

.ip-js .is-live .ip-row--flip .ip-pill--wait {
  animation: ip-pill-wait 10s var(--ease) infinite;
}

.ip-js .is-live .ip-row--flip .ip-pill--yes {
  animation: ip-pill-yes 10s var(--ease) infinite;
}

/* ───────── Keyframes ───────── */

@keyframes ip-rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes ip-phone-in {
  from { opacity: 0; transform: translateY(90px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

/* Scale only: the photo is the largest thing on the first screen and paints at once. */
@keyframes ip-photo-in {
  from { transform: scale(1.1); }
  to { transform: scale(1); }
}

@keyframes ip-breathe {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

@keyframes ip-chip-in {
  from { opacity: 0; transform: translateY(14px) scale(0.86); }
  to { opacity: 1; transform: none; }
}

@keyframes ip-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

@keyframes ip-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(60px, 40px, 0) scale(1.12); }
}

@keyframes ip-sheen {
  0% { translate: -130% 0; }
  22%, 100% { translate: 130% 0; }
}

@keyframes ip-ping {
  0% { opacity: 0.7; scale: 0.5; }
  70%, 100% { opacity: 0; scale: 1.5; }
}

@keyframes ip-dialog-in {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes ip-type-bride {
  0%, 6% { max-width: 0; }
  15%, 95% { max-width: var(--w, 2.1em); }
  100% { max-width: 0; }
}

@keyframes ip-caret-bride {
  0%, 5% { border-color: transparent; }
  6%, 17% { border-color: var(--pink); }
  18%, 100% { border-color: transparent; }
}

@keyframes ip-type-groom {
  0%, 19% { max-width: 0; }
  32%, 95% { max-width: var(--w, 3em); }
  100% { max-width: 0; }
}

@keyframes ip-caret-groom {
  0%, 18% { border-color: transparent; }
  19%, 34% { border-color: var(--pink); }
  35%, 100% { border-color: transparent; }
}

@keyframes ip-type-date {
  0%, 37% { max-width: 0; }
  58%, 95% { max-width: var(--w, 7em); }
  100% { max-width: 0; }
}

@keyframes ip-caret-date {
  0%, 36% { border-color: transparent; }
  37%, 62% { border-color: var(--pink); }
  63%, 100% { border-color: transparent; }
}

@keyframes ip-mini-bride {
  0%, 13% { opacity: 0; translate: 0 8px; }
  19%, 95% { opacity: 1; translate: 0 0; }
  100% { opacity: 0; translate: 0 0; }
}

@keyframes ip-mini-groom {
  0%, 30% { opacity: 0; translate: 0 8px; }
  36%, 95% { opacity: 1; translate: 0 0; }
  100% { opacity: 0; translate: 0 0; }
}

@keyframes ip-mini-date {
  0%, 56% { opacity: 0; translate: 0 8px; }
  62%, 95% { opacity: 1; translate: 0 0; }
  100% { opacity: 0; translate: 0 0; }
}

@keyframes ip-bubble-out {
  0%, 5% { opacity: 0; transform: translateY(16px) scale(0.9); }
  12%, 95% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}

@keyframes ip-ticks {
  0%, 28% { color: #8696a0; }
  31%, 100% { color: #53bdeb; }
}

@keyframes ip-typing {
  0%, 38% { opacity: 0; transform: translateY(8px); }
  42%, 56% { opacity: 1; transform: none; }
  59%, 100% { opacity: 0; transform: none; }
}

@keyframes ip-dots {
  0%, 100% { translate: 0 0; opacity: 0.5; }
  50% { translate: 0 -3px; opacity: 1; }
}

@keyframes ip-bubble-in {
  0%, 58% { opacity: 0; transform: translateY(12px) scale(0.9); }
  64%, 95% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}

@keyframes ip-bar {
  0%, 6% { scale: 0 1; }
  40% { scale: 0.92 1; }
  62%, 95% { scale: 1 1; }
  100% { scale: 0 1; }
}

@keyframes ip-row {
  0%, 8% { opacity: 0; translate: 0 14px; }
  15%, 95% { opacity: 1; translate: 0 0; }
  100% { opacity: 0; translate: 0 0; }
}

@keyframes ip-row-2 {
  0%, 18% { opacity: 0; translate: 0 14px; }
  25%, 95% { opacity: 1; translate: 0 0; }
  100% { opacity: 0; translate: 0 0; }
}

@keyframes ip-row-3 {
  0%, 28% { opacity: 0; translate: 0 14px; }
  35%, 95% { opacity: 1; translate: 0 0; }
  100% { opacity: 0; translate: 0 0; }
}

@keyframes ip-pill-wait {
  0%, 56% { opacity: 1; }
  60%, 100% { opacity: 0; }
}

@keyframes ip-pill-yes {
  0%, 58% { opacity: 0; scale: 0.8; }
  64%, 100% { opacity: 1; scale: 1; }
}

/* ───────── Wider screens ───────── */

@media (pointer: coarse) {
  .ip-phone__live {
    pointer-events: none;
  }
}

@media (min-width: 480px) {
  .ip-hero__actions .ip-button--glass {
    display: inline-flex;
  }

  .ip-hero__actions .ip-button--primary {
    min-width: 0;
  }

  .ip-stage {
    --pw: 250px;
  }

  .ip-phone {
    --s: 0.6214;
  }

  .ip-chip--sent {
    left: -84px;
  }

  .ip-chip--reply {
    right: -88px;
  }
}

@media (min-width: 640px) {
  .ip-chip--count {
    top: calc(var(--pt) + var(--pw) * 1.55);
    left: -96px;
    display: flex;
    animation-delay: 2.95s, 3.4s;
  }

  .ip-preview {
    background: transparent;
  }

  .ip-preview__phone {
    width: auto;
    height: 100%;
    aspect-ratio: 9 / 19;
    border: 8px solid var(--frame);
    border-radius: 40px;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
  }

  .ip-preview__bar {
    max-width: 460px;
  }
}

@media (min-width: 900px) {
  .ip-section {
    padding-top: 104px;
    padding-bottom: 104px;
  }

  .ip-section--tight {
    padding-top: 56px;
    padding-bottom: 0;
  }

  .ip-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .ip-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px 26px;
    margin-top: 48px;
  }

  .ip-card__screen {
    aspect-ratio: 9 / 19.5;
    border-radius: 26px;
  }

  .ip-card__peek {
    right: auto;
    bottom: 14px;
    left: 50%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    height: auto;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    translate: -50% 0;
  }

  .ip-card__peek svg {
    margin-left: 0;
  }

  .ip-card__name {
    margin-top: 14px;
    font-size: 1.55rem;
  }

  .ip-card__style {
    font-size: 0.85rem;
  }

  .ip-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 52px;
  }

  .ip-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
  }

  .ip-pair__card {
    padding: 30px;
  }

  .ip-price {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
    gap: 44px;
    padding: 56px;
  }

  .ip-final__card {
    padding: 96px 40px 88px;
  }

  .ip-sticky {
    display: none;
  }
}

@media (min-width: 1024px) {
  .ip-hero {
    padding: 0 40px;
  }

  /* From here the wide photo sits behind the whole hero: copy on the left, the couple in the middle, the phone on the right. */
  .ip-hero__photo {
    bottom: 0;
    height: auto;
  }

  .ip-hero__dots {
    position: absolute;
    bottom: 22px;
    left: 50%;
    translate: -50% 0;
  }

  .ip-hero__photo img {
    object-position: 50% 42%;
  }

  .ip-hero__photo::after {
    background:
      linear-gradient(90deg, rgba(10, 15, 13, 0.86) 0%, rgba(10, 15, 13, 0.68) 30%, rgba(10, 15, 13, 0.3) 44%, rgba(10, 15, 13, 0) 55%, rgba(10, 15, 13, 0) 70%, rgba(10, 15, 13, 0.34) 100%),
      linear-gradient(180deg, rgba(10, 15, 13, 0.5) 0%, rgba(10, 15, 13, 0) 24%, rgba(10, 15, 13, 0) 70%, rgba(10, 15, 13, 0.7) 100%);
  }

  .ip-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 48px;
    min-height: 100svh;
    padding: 104px 0 56px;
    text-align: left;
  }

  .ip-hero__copy {
    align-items: flex-start;
    max-width: 560px;
    min-height: 0;
    padding: 0;
  }

  .ip-hero__claim {
    font-size: 0.76rem;
    white-space: nowrap;
  }

  .ip-hero__actions {
    justify-content: flex-start;
  }

  .ip-hero__title {
    margin-top: 20px;
    font-size: clamp(3rem, 4.6vw, 4.4rem);
  }

  .ip-hero__lead {
    margin-top: 24px;
    font-size: 1.16rem;
  }

  .ip-hero__actions {
    margin-top: 32px;
  }

  /* A tighter fan than on phones, so the couple in the photo stays visible between the copy and the phones. */
  .ip-stage {
    --pw: 222px;
    --pt: 0px;
    --fan: 0.52;
    margin: 0 calc(var(--pw) * 0.48);
  }

  .ip-phone {
    --s: 0.5431;
    border-width: 7px;
    border-radius: 44px;
  }

  .ip-phone::before {
    top: 10px;
    height: 19px;
  }

  .ip-phone__screen {
    border-radius: 37px;
  }

  .ip-phone__live {
    border-radius: calc(37px / var(--s));
  }

  .ip-chip {
    padding: 11px 16px 11px 11px;
    border-radius: 18px;
  }

  .ip-chip__text b {
    font-size: 0.86rem;
  }

  .ip-chip__text small {
    font-size: 0.76rem;
  }

  .ip-chip--sent {
    top: 40px;
    left: -110px;
  }

  .ip-chip--reply {
    top: 34%;
    right: -96px;
  }

  .ip-chip--count {
    top: calc(var(--pt) + var(--pw) * 1.62);
    left: -118px;
  }
}

@media (min-width: 1240px) {
  .ip-stage {
    --pw: 262px;
  }

  .ip-phone {
    --s: 0.6475;
  }

  .ip-gallery {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 38px 20px;
  }

  .ip-card__name {
    font-size: 1.4rem;
  }

  .ip-card__style {
    font-size: 0.8rem;
  }
}

/* Short windows (laptops): a smaller phone, so the hero still ends at the bottom of the window. */
@media (min-width: 1024px) and (max-height: 820px) {
  .ip-hero__inner {
    padding: 96px 0 36px;
  }

  .ip-stage {
    --pw: 214px;
  }

  .ip-phone {
    --s: 0.5222;
  }
}

@media (min-width: 1024px) and (max-height: 700px) {
  .ip-stage {
    --pw: 190px;
  }

  .ip-phone {
    --s: 0.4595;
  }

  .ip-hero__title {
    font-size: clamp(2.6rem, 4vw, 3.4rem);
  }
}

/* ───────── People who asked their device for less motion ───────── */

@media (prefers-reduced-motion: reduce) {
  .ip *,
  .ip *::before,
  .ip *::after {
    animation: none !important;
    transition: none !important;
  }

  .ip-js .ip-reveal {
    opacity: 1;
    translate: 0 0;
  }

  .ip-js .ip-scene:not(.is-live) .ip-typed {
    max-width: none;
  }

  .ip-js .ip-scene:not(.is-live) .ip-mini__names i,
  .ip-js .ip-scene:not(.is-live) .ip-mini__sub,
  .ip-js .ip-scene:not(.is-live) .ip-mini__date,
  .ip-js .ip-scene:not(.is-live) .ip-bubble--out,
  .ip-js .ip-scene:not(.is-live) .ip-bubble--in,
  .ip-js .ip-scene:not(.is-live) .ip-row {
    opacity: 1;
  }

  .ip-js .ip-scene:not(.is-live) .ip-list__bar i {
    scale: 1 1;
  }

  .ip-js .ip-chapter__screen:not(.is-in) .ip-handset,
  .ip-js .ip-day:not(.is-live) .ip-day__list li {
    opacity: 1;
    translate: 0 0;
  }
}
