/* PlushieCare's invite page, in the website's own look (site/templates/_site.css): the felt Patchwork at dusk, Red Hat
   Display, ink on cream, chunky outlined pills and felt stickers with stitched seams. The licence is in
   fonts/OFL-RedHatDisplay.txt. No inline styles anywhere: the Content-Security-Policy (vercel.json) allows only this file. */
@font-face { font-family: 'Red Hat Display'; src: url('/fonts/RedHatDisplay-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Red Hat Display'; src: url('/fonts/RedHatDisplay-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Red Hat Display'; src: url('/fonts/RedHatDisplay-Black.ttf') format('truetype'); font-weight: 900; font-display: swap; }

:root {
  --ink: #17171C; --ink-soft: #3E3456; --muted: #5E5964; --cream: #FFF8EE; --surface: #FFFFFF;
  --lilac: #C9B8FF; --select: #EDE6FF; --lime: #B5E655; --butter: #FFE27A; --peach: #FFE0CC; --sky: #DCE7FF;
  --navy: #1B2150; --navy-2: #2A2F66; --thread: #F4C35A; --wrap: 1160px; --gutter: 16px;
  --felt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .24 0 0 0 0 .2 0 0 0 0 .34 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --seam: 2px dashed rgba(62, 52, 86, 0.45);
  --spring: cubic-bezier(.2, .9, .3, 1.25);
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Stickers hang over their edges on purpose; nothing may push the page sideways on a phone. */
html, body, main, .foot { overflow-x: clip; }
body { margin: 0; background: var(--felt), var(--cream); color: var(--ink); font: 400 18px/1.6 'Red Hat Display', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 900; letter-spacing: -0.03em; line-height: 1.02; margin: 0; }
p { margin: 0; }
figure { margin: 0; }
:focus-visible { outline: 3px solid var(--thread); outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.kicker { font-size: 13px; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.lead { font-size: clamp(17px, 1.9vw, 21px); color: #4A4458; max-width: 32em; }
.symbols { position: absolute; }

/* Buttons: the app's chunky outlined pills, which sink a little when pressed. */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 26px; border: 3px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--cream); font: inherit; font-weight: 900; font-size: 18px; line-height: 1.1; text-decoration: none; text-align: center; cursor: pointer; box-shadow: 0 5px 0 var(--ink-soft); transition: transform .15s ease, box-shadow .15s ease; -webkit-tap-highlight-color: transparent; }
.pill:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink-soft); }
.pill:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink-soft); }
.pill.soft { background: var(--surface); color: var(--ink); box-shadow: 0 5px 0 var(--ink); }
.pill.cream { background: var(--cream); color: var(--ink); box-shadow: 0 5px 0 rgba(0, 0, 0, .45); }
.pill.ghost { background: rgba(255, 248, 238, .08); color: var(--cream); border-color: var(--cream); box-shadow: none; backdrop-filter: blur(6px); }
.pill.small { padding: 8px 16px; font-size: 15px; border-width: 2.5px; box-shadow: 0 3px 0 var(--ink-soft); white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; margin-top: 28px; }

/* Felt stickers: a patch with its stitched seam, dropped onto the page. */
.sticker { display: inline-block; position: relative; padding: .04em .28em .1em; border-radius: 16px 12px 18px 10px; background: var(--felt), var(--butter); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); transform: rotate(-2.5deg); white-space: nowrap; text-shadow: none; }
.sticker::before { content: ""; position: absolute; inset: 5px; border: var(--seam); border-radius: 11px 8px 13px 7px; pointer-events: none; }
.tilt-l { transform: rotate(-5deg); }

/* Header, over the dusk. */
.nav { position: absolute; top: 0; left: 0; right: 0; z-index: 20; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: var(--wrap); margin: 0 auto; padding: 14px var(--gutter); }
.nav .brand img { height: 28px; width: auto; }
.nav nav { display: flex; align-items: center; gap: 20px; font-weight: 900; font-size: 16px; color: var(--cream); }
.nav nav > a:not(.pill) { text-decoration: none; }
.nav nav > a:not(.pill):hover { text-decoration: underline dashed; text-underline-offset: 5px; }
.nav .pill.small { background: var(--cream); color: var(--ink); border-color: var(--ink); box-shadow: 0 3px 0 rgba(0, 0, 0, .4); }
@media (max-width: 640px) { .nav .nav-how { display: none; } }

/* Hero: the Patchwork at dusk, full-bleed, with the gift standing on its glowing hills. */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; background: var(--navy); color: var(--cream); padding: 84px 0 64px; }
.hero > .wrap { position: relative; z-index: 2; width: 100%; }
.hero-art, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art img { object-fit: cover; object-position: 50% 62%; animation: drift-in 2.6s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes drift-in { from { transform: scale(1.12); filter: brightness(.6) saturate(.7); } }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 16, 44, .6) 0%, rgba(14, 16, 44, .3) 26%, rgba(14, 16, 44, .12) 44%, rgba(14, 16, 44, .7) 62%, rgba(14, 16, 44, .9) 100%); }

.invite { display: flex; flex-direction: column; align-items: center; text-align: center; }
.invite .kicker { color: var(--thread); }
.invite h1 { font-size: clamp(38px, 11vw, 56px); margin: 10px 0 0; max-width: 12ch; overflow-wrap: anywhere; text-shadow: 0 2px 30px rgba(10, 12, 40, .35); }
.invite h1.quiet { font-size: clamp(28px, 8vw, 40px); max-width: 16ch; line-height: 1.1; }
.invite h1 .sticker { animation: sticker-drop .9s .7s var(--spring) both, shine 5s 2.2s ease-in-out infinite; background: linear-gradient(110deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .7) 50%, rgba(255, 255, 255, 0) 62%) no-repeat, var(--felt), var(--butter); background-size: 260% 100%, auto, auto; background-position: 160% 0, 0 0, 0 0; }
.invite .lead { color: #E9E4F5; margin-top: 4px; }
.invite .actions { justify-content: center; width: 100%; max-width: 460px; }
.invite .actions .pill { flex: 1 1 200px; }
.soon { margin-top: 16px; font-size: 14px; font-weight: 700; color: #CFC9EA; }
/* The card arrives, piece by piece, each time it is drawn. */
.invite > * { animation: rise .8s cubic-bezier(.2, .9, .3, 1.2) both; }
.invite > :nth-child(2) { animation-delay: .08s; } .invite > :nth-child(4) { animation-delay: .16s; } .invite > :nth-child(5) { animation-delay: .22s; }
.invite > :nth-child(6) { animation-delay: .28s; } .invite > :nth-child(7) { animation-delay: .34s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes sticker-drop { from { opacity: 0; transform: translateY(-40px) rotate(-14deg) scale(1.3); } }
@keyframes shine { 0%, 65% { background-position: 160% 0, 0 0, 0 0; } 100% { background-position: -60% 0, 0 0, 0 0; } }

/* The stage: a round felt patch with a stitched seam and a warm glow, the gift ribbon on top, the plushie inside. */
.stage { position: relative; display: grid; place-items: center; width: min(220px, 58vw); aspect-ratio: 1; margin: 44px 0 20px; border-radius: 50%; background: var(--felt), radial-gradient(circle at 50% 64%, #FFF8EE 0%, #F4EEFF 74%); border: 3px solid var(--ink); box-shadow: 0 7px 0 var(--ink), 0 0 70px 24px rgba(255, 200, 110, .38); animation: patch-drop .9s .15s var(--spring) both; }
.stage::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: var(--seam); pointer-events: none; }
.stage .plushie { width: 76%; height: auto; margin-top: 6%; animation: bob 2.6s ease-in-out infinite; cursor: pointer; }
.stage .plushie.hop { animation: hop .7s var(--spring); }
.stage .bow { position: absolute; z-index: 2; top: -34px; left: 50%; width: 80px; height: auto; transform: translateX(-50%) rotate(-4deg); }
.stage .tag { position: absolute; z-index: 2; right: -22px; bottom: 4%; font-weight: 900; font-size: 17px; padding: 5px 14px; background: var(--felt), var(--peach); transform: rotate(-6deg); animation: sticker-drop .8s 1s var(--spring) both; }
/* Short phones: a smaller patch, so the way into the app stays on the first screen. */
@media (max-width: 899px) and (max-height: 720px) { .stage { width: min(170px, 46vw); margin: 40px 0 14px; } .invite h1 { font-size: clamp(34px, 10vw, 44px); } }
@keyframes patch-drop { from { opacity: 0; transform: translateY(-30px) scale(.8) rotate(-8deg); } }
@keyframes bob { 50% { translate: 0 -7px; } }
@keyframes hop { 40% { transform: translateY(-26px) rotate(6deg); } }

/* The invite code on a white felt ticket. */
.code-row { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label copy" "code copy"; align-items: center; column-gap: 12px; width: 100%; max-width: 420px; margin-top: 22px; padding: 12px 14px 12px 22px; border-radius: 22px; background: var(--felt), var(--surface); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 5px 0 rgba(0, 0, 0, .45); text-align: left; }
.code-row::before { content: ""; position: absolute; inset: 6px; border: var(--seam); border-radius: 15px; pointer-events: none; }
.code-label { grid-area: label; font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.code { grid-area: code; font-weight: 900; font-size: clamp(22px, 7.2vw, 32px); line-height: 1.15; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.copy { grid-area: copy; position: relative; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 2.5px solid var(--ink); background: var(--felt), var(--lime); color: var(--ink); font: inherit; font-weight: 900; font-size: 16px; cursor: pointer; box-shadow: 0 3px 0 var(--ink); transition: transform .15s ease, box-shadow .15s ease; -webkit-tap-highlight-color: transparent; }
.copy:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }

/* Golden motes drifting up, glints by the patch, and sparkles where you tap (invite.js). */
.motes { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.motes i { position: absolute; left: var(--x); bottom: -12px; width: var(--s); height: var(--s); border-radius: 50%; background: #FFF1C2; box-shadow: 0 0 10px 3px rgba(255, 210, 120, .7); opacity: 0; animation: mote var(--t) linear var(--d) infinite; }
@keyframes mote { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: .95; } 50% { transform: translate(var(--w), -48vh); } 80% { opacity: .55; } 100% { transform: translate(calc(var(--w) * -1), -96vh); opacity: 0; } }
.glints { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.glints i, .fx { position: absolute; width: 16px; height: 16px; background: #FFE9A8; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); filter: drop-shadow(0 0 6px rgba(255, 214, 120, .9)); }
.glints i { left: var(--x); top: var(--y); opacity: 0; animation: glint-twinkle 2.8s ease-in-out var(--d) infinite; }
.glints i:nth-child(1) { --x: 14%; --y: 34%; --d: 0s; } .glints i:nth-child(2) { --x: 82%; --y: 30%; --d: .9s; width: 11px; height: 11px; }
.glints i:nth-child(3) { --x: 10%; --y: 52%; --d: 1.7s; width: 13px; height: 13px; } .glints i:nth-child(4) { --x: 88%; --y: 50%; --d: 2.3s; width: 10px; height: 10px; }
@keyframes glint-twinkle { 0%, 100% { opacity: 0; transform: scale(.2) rotate(0); } 45% { opacity: 1; transform: scale(1.15) rotate(45deg); } 70% { opacity: .2; transform: scale(.6) rotate(80deg); } }
.fx { z-index: 3; pointer-events: none; width: var(--s, 14px); height: var(--s, 14px); margin: calc(var(--s, 14px) / -2) 0 0 calc(var(--s, 14px) / -2); animation: fx .85s cubic-bezier(.2, .8, .3, 1) forwards; }
.fx.dot { clip-path: none; border-radius: 50%; background: #FFF1C2; }
@keyframes fx { from { transform: translate(0, 0) scale(.3) rotate(0); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(1) rotate(120deg); opacity: 0; } }

/* Wider screens: the words on the left over the dark sky, the gift on the right over the glow. */
@media (min-width: 900px) {
  .hero { padding: 110px 0 90px; }
  .hero-art img { object-position: 50% 70%; }
  .hero-shade { background: linear-gradient(90deg, rgba(14, 16, 44, .86) 0%, rgba(14, 16, 44, .62) 40%, rgba(14, 16, 44, .12) 72%), linear-gradient(0deg, rgba(14, 16, 44, .55), transparent 40%); }
  .invite { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(48px, 7vw, 120px); align-items: start; align-content: center; justify-items: start; text-align: left; }
  .invite > * { grid-column: 1; }
  .invite > .stage { grid-column: 2; grid-row: 1 / span 8; align-self: center; width: clamp(300px, 30vw, 400px); margin: 40px 24px 40px 0; }
  .invite h1 { font-size: clamp(52px, 5.6vw, 86px); margin-top: 16px; }
  .invite h1.quiet { font-size: clamp(36px, 3.6vw, 52px); }
  .invite .lead { margin-top: 22px; }
  .invite .actions { justify-content: flex-start; max-width: none; }
  .invite .actions .pill { flex: 0 0 auto; }
  .stage .bow { width: 108px; top: -46px; }
  .stage .tag { font-size: 22px; padding: 6px 18px; right: -30px; }
  .glints i:nth-child(1) { --x: 58%; --y: 22%; } .glints i:nth-child(2) { --x: 90%; --y: 26%; }
  .glints i:nth-child(3) { --x: 62%; --y: 70%; } .glints i:nth-child(4) { --x: 92%; --y: 64%; }
}

/* Sections below the hero. */
.chapter { position: relative; padding: clamp(80px, 11vw, 150px) 0; }
.chapter h2, .final h2 { font-size: clamp(32px, 4.4vw, 56px); margin: 14px 0 22px; max-width: 18ch; }
.split { display: grid; gap: 56px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.05fr .95fr; gap: clamp(48px, 7vw, 110px); } }

/* What PlushieCare is, in three small steps. */
.steps { background: var(--felt), var(--sky); }
.step-list { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 22px; max-width: 520px; counter-reset: step; }
.step { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; padding: 20px 20px 22px; border-radius: 24px; background: var(--felt), var(--surface); border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); counter-increment: step; }
.step::before { content: counter(step); position: absolute; top: -14px; left: -10px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--felt), var(--lime); border: 2.5px solid var(--ink); font-weight: 900; font-size: 16px; transform: rotate(-8deg); }
.step h3 { font-size: 21px; line-height: 1.15; margin: 2px 0 6px; }
.step p { font-size: 16px; line-height: 1.5; color: var(--muted); }
.tile { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--cream); border: 2.5px solid var(--ink); }
.tile svg { width: 32px; height: 32px; }
.phone-stage { position: relative; justify-self: center; }
.phone { width: min(290px, 68vw); border-radius: 42px; border: 4px solid var(--ink); overflow: hidden; box-shadow: 0 10px 0 var(--ink); background: var(--surface); transform: rotate(-3deg); }
.phone img { width: 100%; }
.float-sticker { position: absolute; font-weight: 900; font-size: 18px; padding: 8px 16px; border-radius: 16px; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); animation: bob 3s ease-in-out infinite; }
.float-sticker.s1 { left: -34px; top: 18%; background: var(--felt), var(--lime); transform: rotate(-8deg); }
.float-sticker.s2 { right: -30px; bottom: 22%; background: var(--felt), var(--butter); transform: rotate(7deg); animation-delay: -1.2s; }
@media (max-width: 899px) { .float-sticker.s1 { left: -14px; } .float-sticker.s2 { right: -14px; } }

/* The promises, at night over the Patchwork. */
.night { background: radial-gradient(1.5px 1.5px at 12% 18%, #FFE9A8 99%, transparent), radial-gradient(1px 1px at 32% 64%, #fff 99%, transparent), radial-gradient(1.5px 1.5px at 72% 12%, #FFE9A8 99%, transparent), radial-gradient(1px 1px at 88% 48%, #fff 99%, transparent), radial-gradient(1.2px 1.2px at 52% 84%, #fff 99%, transparent), radial-gradient(1000px 520px at 85% 0%, #3A3F86 0%, transparent 60%), linear-gradient(180deg, var(--navy), var(--navy-2)); color: var(--cream); }
.night .kicker { color: var(--thread); }
.promises { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 18px; }
.promises li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; font-size: 19px; font-weight: 700; }
.promises li span { font-weight: 400; color: #D9D4EA; display: block; font-size: 17px; }
.promises svg { width: 34px; height: 34px; }
.block-photo { --rot: -2deg; position: relative; justify-self: center; width: min(420px, 100%); padding: clamp(16px, 2.6vw, 28px); border-radius: 36px; background: var(--felt), #2E3768; border: 3px solid var(--ink); box-shadow: 0 8px 0 var(--ink); transform: rotate(var(--rot)); }
.block-photo::before { content: ""; position: absolute; inset: 9px; border: 2px dashed rgba(255, 248, 238, .35); border-radius: 28px; pointer-events: none; }
.block-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 22px; border: 3px solid var(--ink); position: relative; }
.block-photo .sticker { position: absolute; z-index: 2; left: -12px; bottom: 34px; font-size: clamp(18px, 2vw, 24px); font-weight: 900; padding: 6px 16px; background: var(--felt), var(--peach); }

/* Come and say hi: a peach felt patch. */
.final { padding: clamp(80px, 11vw, 150px) 0; background: linear-gradient(180deg, var(--cream), #FFEFD9); }
.patch { position: relative; max-width: 780px; margin: 0 auto; padding: clamp(36px, 5vw, 60px) clamp(22px, 4vw, 52px); display: flex; flex-direction: column; align-items: center; text-align: center; border-radius: 34px; background: var(--felt), var(--peach); border: 3px solid var(--ink); box-shadow: 0 7px 0 var(--ink); }
.patch::before { content: ""; position: absolute; inset: 9px; border: var(--seam); border-radius: 26px; pointer-events: none; }
.patch h2 { margin-left: auto; margin-right: auto; }
.patch .actions { justify-content: center; position: relative; }

/* Footer */
.foot { background: var(--ink); color: #D6D2DE; padding: 52px 0 60px; }
.foot-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 18px; }
.foot .brand { justify-self: start; }
.foot .brand img { height: 32px; width: auto; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot nav a { text-decoration: none; font-weight: 700; color: var(--cream); }
.foot nav a:hover { text-decoration: underline dashed; }
.foot-small { font-size: 14px; max-width: 60em; }

/* Sections arrive as they scroll in (invite.js adds .js and .in). */
.js .reveal { opacity: 0; transform: translateY(44px) rotate(-1deg); transition: opacity .7s ease, transform .9s var(--spring); }
.js .reveal.in { opacity: 1; transform: none; }
.js .block-photo.reveal { transform: translateY(70px) rotate(calc(var(--rot) + 7deg)) scale(.94); }
.js .block-photo.reveal.in { transform: rotate(var(--rot)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .block-photo.reveal { transform: rotate(var(--rot)); }
}
