/* Kadam (नन्हे क़दम): a modern, minimal newborn announcement. Blush ground, cotton paper, soft Fraunces and
   Manrope, lots of air; the ink follows the baby (rose, dusty blue, or sage). Opening: press and hold the
   wooden stamp, twice, and two inked footprints are left on the paper. Then: hello -> the little details ->
   ten tiny toes (tap each) -> the date -> the day -> loved by -> come say hello. */

:root {
  --blush: #f4e4de;
  --blush-2: #ecd3cb;
  --paper: #fdfaf5;
  --sage: #a9bfae;
  --sky: #c9d9e6;
  --butter: #f6e7b8;
  --text: #3b3533;
  --muted: #8a7f7a;
  --line: #eadfd8;
  --print: #7f9a84;
  --print-soft: #c9d6cb;

  --f-display: "Fraunces", Georgia, serif;
  --f-body: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --f-script: "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Sans Telugu", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .42 0 0 0 0 .38 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --fx-music-bg: #fdfaf5;
  --fx-music-ring: #ecd3cb;
  --fx-music-ink: #7f9a84;
  --fx-bg: #fdfaf5;
}
.ink-girl { --print: #cf7f70; --print-soft: #f0cfc7; --fx-music-ink: #cf7f70; }
.ink-boy { --print: #6f8fb0; --print-soft: #cfdbe7; --fx-music-ink: #6f8fb0; }

html { scroll-behavior: smooth; }
html.shut, html.shut body { overflow: hidden; }
body { background: var(--paper); color: var(--text); font: 400 18px/1.65 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
::selection { background: var(--print-soft); }
:focus-visible { outline: 2px solid var(--print); outline-offset: 4px; }
.script { font-family: var(--f-script); font-style: normal; font-weight: 400; letter-spacing: 0; text-transform: none; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
html.og body > svg.defs { display: block !important; }
.fit { display: inline-block; white-space: nowrap; }

.wrap { width: min(100% - 48px, 560px); margin: 0 auto; text-align: center; }
.sec { position: relative; padding: clamp(84px, 18vw, 150px) 0; }
.kicker { font: 600 11px/1.4 var(--f-body); letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.big { margin: 18px 0 0; font: 300 clamp(40px, 11vw, 72px)/1.04 var(--f-display); font-variation-settings: "SOFT" 100, "opsz" 144; letter-spacing: -.02em; text-wrap: balance; }
.mid { margin: 14px 0 0; font: 300 clamp(32px, 8.4vw, 48px)/1.1 var(--f-display); font-variation-settings: "SOFT" 100; letter-spacing: -.015em; }
.lede { margin: 22px auto 0; max-width: 32ch; font-size: 19px; color: var(--text); text-wrap: pretty; }
.sign { margin-top: 26px; font: italic 300 22px/1.3 var(--f-display); color: var(--print); }

.link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--text); color: var(--text); background: transparent; text-decoration: none;
  font: 600 14px/1 var(--f-body); letter-spacing: .02em; cursor: pointer; transition: background .25s, color .25s, border-color .25s;
}
.link:hover { background: var(--blush); }
.link--solid { background: var(--text); color: var(--paper); }
.link--solid:hover { background: var(--print); border-color: var(--print); color: var(--paper); }
.link--big { min-height: 56px; padding: 0 28px; font-size: 16px; }

/* =================================================================== OPENING */
.gate { position: relative; min-height: 100svh; overflow: hidden; isolation: isolate; background: linear-gradient(170deg, var(--blush), #f8ece7 55%, var(--blush-2)); }
.dots i {
  position: absolute; z-index: -1; aspect-ratio: 1; border-radius: 50%;
  background: var(--sage); opacity: .45; animation: drift 10s ease-in-out infinite alternate;
}
.dots i:nth-child(3n) { background: var(--sky); }
.dots i:nth-child(3n + 1) { background: var(--butter); }
.dots i:nth-child(4n) { background: #fff; opacity: .8; }
@keyframes drift { to { translate: var(--dx, 0) -26px; } }

.gate__col {
  position: relative; z-index: 2; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: calc(28px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom));
}
.paper {
  position: relative; width: min(100%, 400px); min-height: min(74svh, 640px); padding: 30px 22px 30px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--fibre), var(--paper); border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 2px 4px rgba(90, 60, 50, .06), 0 30px 60px -28px rgba(120, 70, 60, .45);
  rotate: -1deg; transition: rotate 1.2s var(--ease);
}
.gate[data-phase="open"] .paper { rotate: 0deg; }
.paper__to { margin-bottom: 4px; font: italic 300 16px/1.3 var(--f-display); color: var(--muted); }
.paper__kicker { font: 600 11px/1.4 var(--f-body); letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.paper__kicker .script { font-size: 14px; letter-spacing: 0; }

.prints { position: relative; flex: 1; width: 100%; min-height: 250px; }
.print { position: absolute; width: 28%; max-width: 104px; fill: var(--print); opacity: 0; }
.print--l { left: 19%; top: 30%; rotate: -10deg; }
.print--r { left: 52%; top: 14%; rotate: 8deg; }
.print.on { opacity: .92; animation: inkin .7s var(--ease); }
@keyframes inkin { from { opacity: .3; scale: .97; filter: blur(1.4px); } }

.stamp { position: absolute; left: 0; top: 0; width: 116px; height: 116px; margin: -58px 0 0 -58px; pointer-events: none; transition: left .9s var(--ease), top .9s var(--ease), opacity .6s, transform .5s var(--ease); }
.stamp__shadow { position: absolute; inset: 10%; border-radius: 50%; background: rgba(110, 70, 55, .38); filter: blur(14px); translate: 10px 22px; transition: translate .45s var(--ease), filter .45s var(--ease), scale .45s var(--ease); }
.stamp__knob {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
  background:
    repeating-radial-gradient(circle at 42% 38%, transparent 0 7px, rgba(120, 80, 40, .09) 7px 8px),
    radial-gradient(circle at 34% 28%, #f6e2c6, #dfbd93 42%, #c19468 78%, #a07650);
  box-shadow: inset 0 -6px 10px rgba(90, 55, 25, .35), inset 0 4px 6px rgba(255, 245, 225, .7);
  transition: transform .45s var(--ease);
}
.stamp__mark { width: 40%; height: auto; fill: rgba(110, 72, 38, .38); }
.stamp__ring { position: absolute; inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); rotate: -90deg; }
.stamp__ring circle { fill: none; stroke: var(--print); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 0 1; }
.gate.pressing .stamp__knob { transform: scale(.9); }
.gate.pressing .stamp__shadow { translate: 2px 4px; filter: blur(3px); scale: .9; }
.gate[data-phase="idle"]:not(.pressing) .stamp__knob { animation: hover 2.6s ease-in-out infinite; }
@keyframes hover { 50% { transform: translateY(-5px) scale(1.02); } }
.gate[data-step="2"] .stamp, .gate[data-phase="open"] .stamp { opacity: 0; transform: translate(70px, -120px) scale(1.15) rotate(18deg); }

.press { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; border-radius: 12px; }
.gate[data-phase="open"] .press { pointer-events: none; }

.paper__words { display: grid; width: 100%; min-height: 168px; }
.paper__words > * { grid-area: 1 / 1; align-self: center; transition: opacity .8s var(--ease), translate .9s var(--ease), visibility 0s; }
.gate[data-phase="open"] .say, .gate:not([data-phase="open"]) .hello { opacity: 0; translate: 0 12px; visibility: hidden; transition: opacity .4s, translate .4s, visibility 0s .4s; }
.say__line { font: 300 clamp(28px, 8vw, 36px)/1.1 var(--f-display); font-variation-settings: "SOFT" 100; letter-spacing: -.01em; }
.say__sub { margin-top: 8px; font-size: 15px; color: var(--muted); }
.hello__pre { font: italic 300 26px/1.1 var(--f-display); color: var(--muted); }
.hello__name { margin: 2px 0 0; width: 100%; font: 300 clamp(60px, 18vw, 96px)/1 var(--f-display); font-variation-settings: "SOFT" 100, "opsz" 144; letter-spacing: -.03em; color: var(--text); }
.hello__hi { margin-top: 4px; font-size: 24px; line-height: 1.3; color: var(--print); }
.hello__line { margin-top: 10px; font: 600 11px/1.4 var(--f-body); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.gate[data-phase="open"] .hello__name { animation: settle 1.4s var(--ease); }
@keyframes settle { from { letter-spacing: .08em; opacity: 0; filter: blur(6px); } }

.gate__hint { min-height: 1.4em; padding: 0 72px; font: italic 300 18px/1.3 var(--f-display); color: var(--text); }
.gate__hint:empty { visibility: hidden; }
.gate__down { display: none; flex-direction: column; align-items: center; gap: 6px; min-height: 44px; padding: 4px 16px; font: 600 11px/1 var(--f-body); letter-spacing: .28em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.gate__down span { width: 1px; height: 22px; background: currentColor; animation: line 2s var(--ease) infinite; transform-origin: top; }
@keyframes line { 0% { scale: 1 0; } 50% { scale: 1 1; transform-origin: top; } 51% { transform-origin: bottom; } 100% { scale: 1 0; transform-origin: bottom; } }
.gate[data-phase="open"] .gate__down { display: flex; }
.gate[data-phase="open"] .gate__hint { display: none; }
.gate__skip {
  position: absolute; z-index: 5; right: 12px; top: calc(12px + env(safe-area-inset-top));
  min-width: 64px; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(59, 53, 51, .25); background: rgba(253, 250, 245, .7); color: var(--text); font: 600 11px/1 var(--f-body); letter-spacing: .24em; text-transform: uppercase;
}
html:not(.shut) .gate__skip { display: none; }

/* =================================================================== HELLO */
.sec--hello { background: linear-gradient(180deg, var(--blush-2), var(--paper) 40%); }

/* =================================================================== FACTS */
.sec--facts { background: var(--paper); padding-top: 40px; }
.facts__photo { display: block; width: 180px; height: 220px; margin: 26px auto 0; object-fit: cover; border-radius: 90px 90px 8px 8px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; margin: 30px 0 0; border-top: 1px solid var(--line); text-align: left; }
.facts > div { padding: 18px 4px; border-bottom: 1px solid var(--line); }
.facts > div:not(.facts__wide):nth-of-type(odd) { border-right: 1px solid var(--line); padding-right: 14px; }
.facts > div:not(.facts__wide):nth-of-type(even) { padding-left: 14px; }
.facts__wide { grid-column: 1 / -1; }
.facts dt { font: 600 11px/1.4 var(--f-body); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font: 300 22px/1.3 var(--f-display); font-variation-settings: "SOFT" 100; text-transform: none; }
.facts dd small { display: block; font: 400 15px/1.4 var(--f-body); color: var(--muted); }
.facts__name { font-size: 40px !important; line-height: 1.1 !important; }
.facts__name .script { font-size: 26px; color: var(--print); margin-left: 6px; }

/* =================================================================== TOES */
.sec--toes { background: linear-gradient(180deg, var(--paper), #f6f0ec); }
.toes { display: flex; justify-content: center; gap: clamp(18px, 8vw, 48px); margin-top: 34px; }
.toes__foot { width: clamp(108px, 32vw, 150px); height: auto; overflow: visible; }
.toes__foot--l { rotate: -6deg; margin-top: 18px; }
.toes__foot--r { rotate: 6deg; }
.toes__sole { fill: var(--blush); }
.toe { fill: var(--paper); stroke: var(--print-soft); stroke-width: 1.4; cursor: pointer; transition: fill .3s, stroke .3s; transform-box: fill-box; transform-origin: center; outline: none; }
.toe:hover { stroke: var(--print); }
.toe:focus-visible { stroke: var(--text); stroke-width: 2; }
.toe.on { fill: var(--print); stroke: var(--print); }
.toes__count { margin-top: 26px; min-height: 1.5em; font: italic 300 22px/1.4 var(--f-display); color: var(--print); }

/* =================================================================== DATE */
.sec--date { background: var(--paper); }
.date__big { margin-top: 10px; font: 200 clamp(110px, 34vw, 190px)/1 var(--f-display); font-variation-settings: "SOFT" 100, "opsz" 144; letter-spacing: -.05em; color: var(--print); }
.date__dot { color: var(--text); }
.date__words { margin-top: 6px; font: 300 21px/1.4 var(--f-display); }
.sec--date .count { display: flex; justify-content: center; gap: 22px; margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); }
.sec--date .count span { display: flex; flex-direction: column; min-width: 54px; font: 600 10px/1.3 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.sec--date .count b { font: 300 32px/1.2 var(--f-display); letter-spacing: 0; color: var(--text); }
.count__done { margin-top: 26px; font: italic 300 24px/1.3 var(--f-display); color: var(--print); }

/* =================================================================== EVENTS */
.sec--events { background: linear-gradient(180deg, var(--paper), var(--blush) 140%); }
.ev { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 30px; padding: 26px 0 30px; border-top: 1px solid var(--text); text-align: left; transition-delay: calc(var(--i) * .08s); }
.ev__time { font: italic 300 22px/1.2 var(--f-display); color: var(--print); }
.ev__name { margin: 0; font: 300 clamp(34px, 9vw, 46px)/1.1 var(--f-display); font-variation-settings: "SOFT" 100; letter-spacing: -.015em; }
.ev__name .script { font-size: .5em; color: var(--muted); vertical-align: middle; }
.ev__when { margin-top: 6px; font-weight: 600; }
.ev__where { color: var(--muted); }
.ev__note { margin-top: 8px; color: var(--text); }
.ev__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
@media (min-width: 720px) { .ev { grid-template-columns: 160px 1fr; gap: 24px; } }

/* =================================================================== LOVED BY */
.sec--loved { background: var(--blush); }
.loved__elders { margin-top: 18px; font: 300 clamp(24px, 6.6vw, 32px)/1.35 var(--f-display); font-variation-settings: "SOFT" 100; text-wrap: balance; }
.loved { list-style: none; margin: 34px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.loved li { display: flex; flex-direction: column; align-items: center; padding: 14px 20px; border-radius: 999px; background: var(--paper); min-width: 150px; }
.loved b { font-weight: 600; }
.loved span { font: 600 10px/1.4 var(--f-body); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; }

/* =================================================================== RSVP + FOOT */
.sec--rsvp { background: var(--paper); }
.rsvp__feet { display: flex; justify-content: center; gap: 6px; }
.mini { width: 26px; height: auto; fill: var(--print); rotate: -8deg; }
.mini--r { rotate: 8deg; translate: 0 -8px; }
.rsvp__btns { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 30px; }
.rsvp__tag { margin-top: 20px; font-weight: 600; color: var(--print); }
.foot { padding: 70px 20px calc(96px + env(safe-area-inset-bottom)); text-align: center; background: var(--blush-2); color: var(--text); }
.foot__name { font: 300 clamp(48px, 14vw, 72px)/1 var(--f-display); font-variation-settings: "SOFT" 100; letter-spacing: -.02em; }
.foot__line { margin-top: 8px; color: var(--muted); }
.foot__cal { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.foot__music, .foot__credit { margin-top: 12px; font-size: 14px; color: var(--muted); }
.foot__music { margin-top: 26px; }
.foot__up { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; font: 600 11px/1 var(--f-body); letter-spacing: .26em; text-transform: uppercase; color: var(--text); text-decoration: none; }

/* =================================================================== LINK-PREVIEW CARD */
.ogcard { background: linear-gradient(160deg, var(--blush), #f8ece7 60%, var(--blush-2)); font-family: var(--f-body); color: var(--text); }
.og__paper { position: absolute; left: 70px; right: 70px; top: 56px; bottom: 56px; display: flex; align-items: center; gap: 30px; padding: 30px 60px; background: var(--fibre), var(--paper); border-radius: 6px; box-shadow: 0 40px 70px -30px rgba(120, 70, 60, .5); rotate: -1deg; }
.og__feet { position: relative; flex: none; width: 300px; height: 380px; }
.og__print { position: absolute; width: 120px; fill: var(--print); opacity: .92; left: 30px; top: 110px; rotate: -10deg; }
.og__print--r { left: 150px; top: 40px; rotate: 8deg; }
.og__text { flex: 1; min-width: 0; }
.og__kicker { font: 600 20px/1.4 var(--f-body); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.og__kicker .script { font-size: 24px; letter-spacing: 0; }
.og__pre { margin-top: 10px; font: italic 300 44px/1 var(--f-display); color: var(--muted); }
.og__name { width: 100%; font: 300 150px/1 var(--f-display); font-variation-settings: "SOFT" 100, "opsz" 144; letter-spacing: -.03em; }
.og__date { margin-top: 18px; font: 600 30px/1.2 var(--f-body); color: var(--print); }
.og__venue { margin-top: 6px; font: 400 22px/1.3 var(--f-body); color: var(--muted); }

@media (min-width: 720px) { .rsvp__btns { flex-direction: row; justify-content: center; } }
.gate:not(.pressing) .stamp__ring { opacity: 0; }
