:root {
  --white: #fff;
  --ivory: #faf8f5;
  --ink: #16120f;
  --muted: #625b55;
  --line: rgba(22, 18, 15, 0.13);
  --gold: #a8854a;
  --wine: #6e1f2c;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Pinyon Script', 'Cormorant Garamond', cursive;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font: 300 16px/1.75 Montserrat, system-ui, sans-serif; color-scheme: light; overflow-x: hidden; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 6.2vw, 5rem); }
h2 { font-size: clamp(2.1rem, 4vw, 3.1rem); }
h3 { font: 500 1.5rem/1.25 var(--serif); }
.wrap { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }

/* outlined buttons */
.button { display: inline-block; border: 1px solid var(--ink); border-radius: 999px; padding: 0.95rem 2rem; font-size: 0.88rem; font-weight: 400; letter-spacing: 0.02em; text-decoration: none; white-space: nowrap; transition: background-color 0.35s, color 0.35s; }
.button:hover { background: var(--ink); color: var(--white); }
.button.small { padding: 0.45rem 1.25rem; font-size: 0.8rem; }
.button.light { border-color: rgba(255, 255, 255, 0.65); color: var(--white); }
.button.light:hover { background: var(--white); color: var(--ink); }


/* The glow behind the phone must not widen the page on small screens. */
main { overflow-x: clip; }
.hero { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 3rem; padding-block: 3.5rem 4.5rem; }
.lead { margin-top: 1.75rem; max-width: 31rem; color: var(--muted); font-size: 1.05rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.75rem; margin-top: 2.5rem; }
.plain { font-size: 0.88rem; text-underline-offset: 6px; text-decoration-color: var(--gold); }

/* ---------- header and footer: lettered like the invitations ---------- */
.bar { position: relative; background: linear-gradient(#f9f4ec, var(--white)); }
.bar .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; padding-block: 1rem 1.25rem; }
.bar::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent); }
.bar .wrap::after { content: ''; position: absolute; left: 50%; bottom: -3px; width: 7px; height: 7px; translate: -50% 0; rotate: 45deg; background: var(--gold); }
.bar nav { display: flex; gap: 2.25rem; font: italic 500 1.15rem/1 var(--serif); }
.bar nav a { text-decoration: none; color: var(--muted); transition: color 0.3s; }
.bar nav a:hover { color: var(--wine); }
.bar .button { justify-self: end; border-color: var(--gold); color: var(--wine); font: italic 500 1.1rem/1.2 var(--serif); }
.bar .button:hover { background: var(--wine); border-color: var(--wine); color: #f9eee0; }
.wordmark { display: inline-flex; flex-direction: column; align-items: center; justify-self: start; text-decoration: none; line-height: 1; }
.wordmark span { font: 400 2.4rem/1.1 var(--script); color: var(--wine); }
.wordmark small { font: 500 0.85rem/1.2 var(--serif); letter-spacing: 0.08em; color: #8a6a35; }

.foot { background: linear-gradient(#2e0b12, #1f070c); color: #e9d9cc; text-align: center; padding-block: 0 2.5rem; }
.foot .wrap { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; padding-top: 2.75rem; border-top: 1px solid rgba(196, 158, 88, 0.35); }
.foot a { text-decoration: none; transition: color 0.3s; }
.foot a:hover { color: #f3d9a8; }
.foot .wordmark { justify-self: center; }
.foot .wordmark span { font-size: 3.2rem; color: #f3d9a8; }
.foot .wordmark small { color: #c9a56a; }
.foot .divider { width: 11rem; height: auto; margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 2rem; font: italic 500 1.2rem/1.4 var(--serif); }
.foot p { font-size: 0.85rem; }
.foot .fine { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.75rem; font-size: 0.75rem; color: #b79c8f; }

/* ---------- phone ---------- */
.demo { justify-self: center; position: relative; width: min(100%, 20rem); }
.demo::before { content: ''; position: absolute; inset: -10% -28% 4%; background: radial-gradient(closest-side, rgba(214, 182, 128, 0.34), rgba(214, 182, 128, 0)); animation: breathe 7s ease-in-out infinite; pointer-events: none; }
.phone { position: relative; aspect-ratio: 9 / 18.6; padding: 10px; border-radius: 3.1rem; background: linear-gradient(145deg, #4a4642, #0d0c0b 30%, #1d1a18 70%, #57514b); box-shadow: 0 50px 80px -40px rgba(40, 24, 12, 0.55), 0 12px 24px -12px rgba(40, 24, 12, 0.35); }
.phone::after { content: ''; position: absolute; top: 20px; left: 50%; width: 28%; height: 22px; translate: -50% 0; border-radius: 20px; background: #070606; z-index: 9; }
.screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 2.55rem; background: var(--ivory); container-type: size; isolation: isolate; user-select: none; }
.petals { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 7; pointer-events: none; }
.feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; cursor: grab; }
.feed::-webkit-scrollbar { display: none; }
.feed:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }
.slide { position: relative; height: 100cqh; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3.2cqw; padding: 14cqw 10cqw; text-align: center; font-family: var(--serif); font-weight: 500; color: #33261f; background: radial-gradient(120% 70% at 50% 0%, #fffdf9, #f4ece1); }
.s-church, .s-reception { background: radial-gradient(120% 80% at 50% 10%, #fdf7f4, #f0e0da); }
.s-verse { background: radial-gradient(100% 80% at 50% 45%, #7d2533, #43101a); color: #f7e9d7; }
.slide p { line-height: 1.3; }
.slide .small { font-style: italic; font-size: 5.4cqw; }
.slide .title { font-size: 9.4cqw; color: var(--wine); }
.slide .place { font-size: 6.6cqw; font-weight: 600; }
.slide .couple { display: flex; flex-direction: column; align-items: center; font: 400 19cqw/1.15 var(--script); color: var(--wine); }
.couple span { padding-inline: 3cqw; background: linear-gradient(100deg, #5d1723 35%, #c79a52 50%, #5d1723 65%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite; }
.couple i { font: italic 400 8cqw/1 var(--serif); color: var(--gold); }
.slide .small-couple { flex-direction: row; align-items: center; gap: 1cqw; font-size: 9.5cqw; }
.small-couple span { background: none; color: #f3d9a8; animation: none; }
.slide .verse { font-size: 9cqw; font-style: italic; text-wrap: balance; }
.slide .day { font-size: 42cqw; font-weight: 400; line-height: 0.95; color: var(--wine); font-variant-numeric: lining-nums; }
.slide .count { display: flex; gap: 6cqw; font: 300 3.4cqw/1.3 Montserrat, sans-serif; }
.count span { display: flex; flex-direction: column; min-width: 15cqw; }
.count b { font: 500 9cqw/1.1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.slide .chips { display: flex; gap: 3cqw; margin-top: 3cqw; font: 400 3.4cqw/1.3 Montserrat, sans-serif; }
.chips span { border: 1px solid var(--gold); border-radius: 99px; padding: 2cqw 4cqw; }

.slide svg { fill: none; stroke: var(--gold); stroke-width: 0.9; stroke-linecap: round; stroke-linejoin: round; }
.slide svg * { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.6s ease 0.35s; }
.slide.on svg * { stroke-dashoffset: 0; }
.flourish { width: 40cqw; flex: none; }
.window { width: 30cqw; flex: none; }
.rings { width: 40cqw; flex: none; }
.sprig { position: absolute; width: 36cqw; pointer-events: none; }
.slide .sprig.left { left: -2cqw; bottom: 0; }
.slide .sprig.right { right: -2cqw; top: 0; rotate: 180deg; }

.rise { opacity: 0; translate: 0 6cqw; filter: blur(6px); transition: opacity 0.9s ease, translate 1.2s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.9s ease; }
.on .rise { opacity: 1; translate: 0 0; filter: none; transition-delay: 0.9s; }
.on .rise:nth-of-type(1) { transition-delay: 0.45s; }
.on .rise:nth-of-type(2) { transition-delay: 0.65s; }
.on .rise:nth-of-type(3) { transition-delay: 0.85s; }
.on .rise:nth-of-type(4) { transition-delay: 1.05s; }

/* ---------- cover ---------- */
.cover { position: absolute; inset: 0; z-index: 5; perspective: 1100px; font-family: var(--serif); font-weight: 500; color: #3a2a20; text-align: center; }
.door { position: absolute; top: 0; bottom: 0; width: 50.3%; overflow: hidden; background: linear-gradient(105deg, #fbf6ee, #efe5d6 70%, #e6d9c6); transition: transform 1.7s cubic-bezier(0.7, 0, 0.25, 1) 0.95s, filter 1.7s ease 0.95s; backface-visibility: hidden; }
.door::after { content: ''; position: absolute; inset: 5cqw; border: 1px solid rgba(168, 133, 74, 0.55); }
.door.left { left: 0; transform-origin: left; box-shadow: 4px 0 14px -6px rgba(60, 36, 16, 0.35); }
.door.left::after { right: 0; border-right: 0; }
.door.right { right: 0; transform-origin: right; }
.door.right::after { left: 0; border-left: 0; }
.door svg { position: absolute; width: 33cqw; fill: none; stroke: var(--gold); stroke-width: 0.8; opacity: 0.75; }
.door.left svg { left: 4cqw; bottom: 6cqw; }
.door.right svg { right: 4cqw; top: 6cqw; rotate: 180deg; }
.cover-text { position: absolute; left: 0; right: 0; transition: opacity 0.5s; pointer-events: none; font-style: italic; font-size: 5.8cqw; }
.cover-text.top { top: 15cqh; }
.cover-text strong { display: block; margin-top: 2cqw; font: 400 11.5cqw/1.5 var(--script); color: var(--wine); }
.cover-text.bottom { bottom: 14cqh; animation: breathe 2.6s ease-in-out infinite; }
.ribbon { position: absolute; left: 0; right: 0; top: calc(55% - 3.5cqw); height: 7cqw; background: linear-gradient(#8a2c3b, #6e1f2c 45%, #571521); box-shadow: 0 5px 9px -4px rgba(50, 10, 16, 0.5); transition: opacity 1.1s ease 0.4s; }
.seal { position: absolute; top: 55%; left: 50%; translate: -50% -50%; width: 43cqw; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; filter: drop-shadow(0 7px 7px rgba(50, 8, 12, 0.45)) drop-shadow(0 1px 2px rgba(50, 8, 12, 0.5)); transition: scale 0.25s, filter 0.3s ease-out; }
.seal:hover { scale: 1.05; }
.seal:active { scale: 0.96; }
.seal::before { content: ''; position: absolute; inset: 2%; border: 1px solid rgba(168, 133, 74, 0.8); border-radius: 50%; animation: ring 2.6s ease-out infinite; }
.wax { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 1s ease-out, scale 1.6s cubic-bezier(0.25, 0.6, 0.3, 1), filter 0.7s ease-out; }
/* opening: the wax softens into warm light and is gone */
.seal::after { content: ''; position: absolute; inset: -18%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 244, 214, 1), rgba(240, 204, 128, 0.6) 55%, rgba(222, 178, 104, 0)); opacity: 0; pointer-events: none; }
.opened .wax { opacity: 0; scale: 1.2; filter: blur(9px) brightness(2.4) saturate(1.15); }
.opened .seal::after { animation: dissolve-glow 1.8s ease-out forwards; }
@keyframes dissolve-glow { 0% { opacity: 0; scale: 0.65; } 35% { opacity: 1; } 100% { opacity: 0; scale: 1.55; } }
.opened .seal { pointer-events: none; filter: none; } /* a shadow would muddy the glow */
.opened .seal::before { display: none; }
.opened .cover-text { opacity: 0; animation: none; }
.opened .ribbon { opacity: 0; }
.opened .door.left { transform: rotateY(-108deg); filter: brightness(0.82); }
.opened .door.right { transform: rotateY(108deg); filter: brightness(0.82); }
.slide.s-cover { padding: 0; }

.dots { position: absolute; z-index: 6; right: 3.5cqw; top: 50%; translate: 0 -50%; display: flex; flex-direction: column; gap: 2cqw; }
.dots span { width: 4px; height: 4px; border-radius: 4px; background: var(--gold); opacity: 0.4; transition: height 0.5s, opacity 0.5s; }
.dots span.on { height: 16px; opacity: 1; }

figcaption { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; margin-top: 1.5rem; font-size: 0.76rem; color: var(--muted); text-align: center; }

/* ---------- page ---------- */
.statement { background: var(--ivory); padding-block: 6rem; text-align: center; }
.statement p { max-width: 52rem; font: italic 400 clamp(1.7rem, 3.4vw, 2.6rem)/1.4 var(--serif); text-wrap: balance; }
.block { padding-block: 6.5rem; }
.head { max-width: 40rem; margin: 0 auto 3.5rem; text-align: center; }
.head p { margin-top: 1rem; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.grid article { background: var(--white); padding: 2.75rem 2rem; text-align: center; }
.grid p, .steps p { margin-top: 0.75rem; color: var(--muted); font-size: 0.92rem; }
.occasions { background: var(--ivory); padding-block: 6rem; text-align: center; }
.occasions ul { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 1.5rem; }
.occasions li { border-top: 1px solid var(--line); padding: 1.75rem 0.5rem; font: italic 500 1.5rem/1.25 var(--serif); }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; text-align: center; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 3.5rem; height: 3.5rem; margin: 0 auto 1.5rem; border: 1px solid var(--gold); border-radius: 50%; font: 500 1.5rem/1 var(--serif); font-variant-numeric: lining-nums; }
.questions { max-width: 48rem; padding-top: 0; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; gap: 1rem; cursor: pointer; padding-block: 1.35rem; font: 500 1.35rem/1.3 var(--serif); list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--gold); }
details[open] summary::after { content: '\2212'; }
details p { padding-bottom: 1.5rem; color: var(--muted); font-size: 0.92rem; }
.closing { background: radial-gradient(90% 140% at 50% 0%, #6e2130, #2e0b12); color: var(--white); text-align: center; padding-block: 6.5rem; }
.closing h2 { max-width: 34rem; margin-inline: auto; }
.closing p { margin: 1rem 0 2.25rem; color: #e9d9cc; }

.intro > * { animation: arrive 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.intro > :nth-child(2) { animation-delay: 0.15s; }
.intro > :nth-child(3) { animation-delay: 0.3s; }
@keyframes arrive { from { opacity: 0; translate: 0 18px; } }
@keyframes breathe { 50% { opacity: 0.45; } }
@keyframes ring { from { opacity: 0.9; scale: 0.96; } to { opacity: 0; scale: 1.35; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }

@media (max-width: 60rem) {
  .bar nav { display: none; }
  .bar .wrap { grid-template-columns: 1fr auto; }
  .hero { grid-template-columns: minmax(0, 1fr); text-align: center; padding-block: 1.5rem 4rem; gap: 2.5rem; }
  .lead { margin-inline: auto; }
  .cta { justify-content: center; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .occasions ul { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 36rem) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .block, .statement, .occasions, .closing { padding-block: 4.25rem; }
  .questions { padding-top: 0; }
}
@media (max-width: 23rem) { .bar .button { display: none; } .bar .wrap { grid-template-columns: 1fr; } .bar .wordmark { justify-self: center; } }
/* Ornaments and the sample's heading belong to the phone and tablet layout. */
.adorn, .demo-head, .cta .see, .hero > .drift { display: none; }

/* ---------- phones and tablets: headline first on an arched invitation card,
   then the sample in a section of its own so it can't be mistaken for the page ---------- */
@media (max-width: 60rem) {
  :root { --hero-top: #6c1e2d; }
  .bar { background: var(--hero-top); }
  .bar::after { left: 1.25rem; right: 1.25rem; opacity: 0.45; }
  .bar .wrap::after { display: none; }
  .bar .wordmark span { color: #f3d9a8; }
  .bar .wordmark small { color: #d3ae72; }
  .bar .button { border-color: rgba(243, 217, 168, 0.65); color: #f9eee0; }
  .bar .button:hover { background: #f9eee0; border-color: #f9eee0; color: var(--wine); }

  .hero { width: 100%; padding: 0; gap: 0; }
  .hero > .drift { display: block; z-index: 0; }
  .hero > .drift i { background: #e3c27e; }
  .hero > .drift i.petal { background: #d58a96; }

  .intro {
    position: relative;
    isolation: isolate;
    padding: 1.25rem max(2.1rem, calc(50% - 14rem)) 4.25rem;
    background: linear-gradient(var(--hero-top), #33080f);
  }
  /* the card, and the fine gold line inside it */
  .intro::before, .intro::after { content: ''; position: absolute; z-index: -1; pointer-events: none; }
  .intro::before { inset: 3.75rem max(1rem, calc(50% - 15rem)) 1.5rem; border-radius: 50% 50% 1.25rem 1.25rem / 10rem 10rem 1.25rem 1.25rem; background: radial-gradient(100% 70% at 50% 0%, #fffdf9, #f6eee1); box-shadow: 0 28px 44px -22px rgba(0, 0, 0, 0.7); }
  .intro::after { inset: 4.25rem max(1.5rem, calc(50% - 14.5rem)) 2rem; border: 1px solid rgba(168, 133, 74, 0.6); border-radius: 50% 50% 0.9rem 0.9rem / 9.5rem 9.5rem 0.9rem 0.9rem; }

  .adorn { display: block; }
  .intro > .adorn { animation: none; }
  .intro .closing-seal { width: 5.25rem; height: 5.25rem; margin-bottom: 1.5rem; }
  .intro h1 { font-size: clamp(2.35rem, 10.5vw, 3.6rem); }
  .adorn.rule .divider { width: 9rem; height: auto; margin-top: 1.1rem; }
  .intro .lead { margin-top: 1rem; font-size: 0.94rem; font-weight: 400; color: #51463f; }
  .intro .cta { flex-direction: column; gap: 0.8rem; margin-top: 1.75rem; }
  .intro .cta .button { display: block; width: min(100%, 17rem); text-align: center; font-weight: 500; }
  .intro .cta > .button:not(.see) { order: -1; border-color: var(--wine); background: var(--wine); color: #fbefe0; }
  .intro .cta .see { border-color: var(--gold); color: var(--wine); }
  .intro .cta .plain { font-size: 0.8rem; margin-top: 0.35rem; }
  .corners .branch { position: absolute; bottom: 2.1rem; width: 2.75rem; opacity: 0.55; pointer-events: none; }
  .corners .branch.left { left: max(1.7rem, calc(50% - 14.3rem)); }
  .corners .branch.right { right: max(1.7rem, calc(50% - 14.3rem)); transform: scaleX(-1); }

  .demo { width: 100%; padding: 3.25rem 1.25rem 3.5rem; background: linear-gradient(#f6efe4, #fdfbf8); scroll-margin-top: 0; }
  .demo::before { display: none; }
  .demo-head { display: block; margin-bottom: 1.75rem; text-align: center; }
  .demo-head h2 { font-size: 2.2rem; }
  .demo-head p { max-width: 18rem; margin: 0.6rem auto 0; font-size: 0.85rem; color: var(--muted); }
  /* never wider than lets the whole sample fit the screen's height */
  .demo .phone { width: min(72%, 17rem); width: min(72%, 17rem, 34svh); margin-inline: auto; }
  .demo figcaption { display: none; }
}

/* short screens: tighten the card so the main button shows without scrolling */
@media (max-width: 60rem) and (max-height: 40rem) {
  .intro .closing-seal { width: 3.75rem; height: 3.75rem; margin-bottom: 0.75rem; }
  .intro::before { top: 3.1rem; }
  .intro::after { top: 3.6rem; }
  .intro h1 { font-size: 2.05rem; }
  .adorn.rule .divider { margin-top: 0.5rem; width: 7rem; }
  .intro .lead { margin-top: 0.5rem; font-size: 0.82rem; line-height: 1.55; }
  .intro .cta { margin-top: 0.9rem; gap: 0.55rem; }
  .intro .cta .button { padding-block: 0.65rem; }
  .demo { padding-block: 1.75rem; }
  .demo-head { margin-bottom: 1rem; }
  .demo-head h2 { font-size: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
