/* KINDCHAIN: a light, warm charity page. Palette from brand/STYLE.md. */
@font-face { font-family: 'Bricolage'; src: url('/assets/fonts/bricolage-var.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('/assets/fonts/geist-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --coral: #e05238;
  --coral-deep: #b63c25;
  --cream: #faf2e8;
  --page: #fffaf5;
  --peach: #fde6da;
  --sage: #e4ecdc;
  --ink: #2b211c;
  --muted: #6d5f57;
  --rule: #eedfd3;
  --white: #fffdfa;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --display: 'Bricolage', 'Geist', system-ui, sans-serif;
  --body: 'Geist', system-ui, sans-serif;
  --side: clamp(20px, 4.5vw, 88px);
  --max: 1520px;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
body.is-loading { overflow: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 8px; }
.soft { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- welcome loader ---------- */
.welcome { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--page); transition: opacity .6s var(--ease), visibility .6s; }
.welcome.is-done { opacity: 0; visibility: hidden; }
.welcome-card { display: grid; justify-items: center; gap: 18px; }
.welcome-logo { width: 96px; height: 96px; border-radius: 26px; animation: breathe 2.4s var(--ease) infinite; }
.welcome-bar { width: 180px; height: 6px; border-radius: 6px; background: var(--peach); overflow: hidden; }
.welcome-bar span { display: block; height: 100%; width: 0; background: var(--coral); border-radius: 6px; }
.welcome-say { font-size: 15px; color: var(--muted); }
.welcome-say b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* ---------- top bar ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; gap: 24px; padding: 14px var(--side); background: rgba(255, 250, 245, 0); border-bottom: 1px solid transparent; transition: background .3s var(--ease), border-color .3s var(--ease), padding .3s var(--ease); }
.topbar.is-solid { background: rgba(255, 250, 245, .94); border-color: var(--rule); padding-top: 10px; padding-bottom: 10px; }
.brandlock { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brandlock img { width: 44px; height: 44px; border-radius: 12px; }
.brandlock span { font: 800 24px/1 var(--display); letter-spacing: -0.03em; }
.mainnav { display: flex; gap: 6px; margin-left: 12px; }
.mainnav a { text-decoration: none; font-weight: 500; font-size: 16px; padding: 8px 14px; border-radius: 99px; color: var(--muted); transition: color .15s var(--ease), background .15s var(--ease); }
.mainnav a:hover, .mainnav a.is-here { color: var(--ink); background: var(--peach); }
.topacts { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.roundicon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--rule); background: var(--white); color: var(--ink); transition: transform .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); }
.roundicon svg { width: 18px; height: 18px; fill: currentColor; }
.roundicon:hover { transform: translateY(-2px); border-color: var(--coral); color: var(--coral-deep); }
.cachip { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 99px; border: 1px dashed #d9c4b5; background: var(--white); color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: border-color .15s var(--ease), color .15s var(--ease); }
.cachip:hover { border-color: var(--coral); color: var(--ink); }
.cachip-dot { width: 8px; height: 8px; border-radius: 50%; background: #d9c4b5; }
.cachip.is-live { border-style: solid; color: var(--ink); }
.cachip.is-live .cachip-dot { background: var(--coral); }

/* ---------- buttons ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 99px; border: 1.5px solid transparent; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease); }
.pill:hover { transform: translateY(-2px); }
.pill:active { transform: translateY(0) scale(.98); }
.pill:disabled { opacity: .55; cursor: progress; transform: none; }
.pill-coral { background: var(--coral-deep); color: var(--cream); }
.pill-coral:hover { background: #a33420; box-shadow: 0 10px 24px -12px rgba(182, 60, 37, .7); }
.pill-line { background: var(--white); border-color: var(--ink); color: var(--ink); }
.pill-line:hover { background: var(--ink); color: var(--cream); }
.pill-ink { background: var(--ink); color: var(--cream); }
.pill-ink:hover { background: #46362e; }
.pill-big { height: 56px; padding: 0 30px; font-size: 17px; }
.textbtn { background: none; border: 0; padding: 4px 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 15px; transition: color .15s var(--ease); }
.textbtn:hover { color: var(--coral-deep); }

/* ---------- type ---------- */
.title2 { margin: 0; font: 800 clamp(34px, 3.6vw, 64px)/1.04 var(--display); letter-spacing: -0.035em; }
.title3 { margin: 0; font: 700 22px/1.2 var(--display); letter-spacing: -0.02em; }

/* ---------- waves ---------- */
.wave { position: absolute; left: 0; width: 100%; height: clamp(28px, 3.4vw, 60px); pointer-events: none; }
.wave-peach, .wave-cream { bottom: -1px; }
.wave-peach path { fill: var(--coral); }
.wave-cream path { fill: var(--page); }
.wave-top { top: -1px; transform: scaleY(-1); }
.wave-top path { fill: var(--page); }
.wave-coral { transform: rotate(180deg); }

/* ---------- hero ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 80px); align-items: center; min-height: 100svh; padding: 120px var(--side) clamp(80px, 8vw, 130px); }
.hero-title { margin: 0 0 28px; font: 800 clamp(44px, 5.4vw, 128px)/1.0 var(--display); letter-spacing: -0.045em; }
.rise { display: block; overflow: hidden; padding-bottom: .06em; }
.rise > span { display: inline-block; white-space: nowrap; }
.coralword { color: var(--coral); }
.hero-lede { max-width: 34em; font-size: clamp(17px, 1.25vw, 22px); color: var(--muted); }
.hero-acts { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 30px; }
.hero-trust { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }
.hero-trust svg { width: 22px; height: 22px; color: var(--coral-deep); flex: none; }
.livepanel { position: relative; margin: 0; height: clamp(420px, 68vh, 900px); border-radius: 36px; background: var(--peach); overflow: hidden; }
#loom { position: absolute; inset: 0; width: 100%; height: 100%; }
.livepanel-cap { position: absolute; left: 22px; bottom: 20px; right: 22px; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.livedot { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); flex: none; animation: livepulse 2s var(--ease) infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(224, 82, 56, .5); } 100% { box-shadow: 0 0 0 12px rgba(224, 82, 56, 0); } }
.loom-tip { position: absolute; z-index: 3; transform: translate(-50%, calc(-100% - 16px)); padding: 10px 14px; border-radius: 14px; background: var(--white); border: 1px solid var(--rule); box-shadow: 0 12px 30px -16px rgba(43, 33, 28, .35); font-size: 14px; line-height: 1.45; white-space: nowrap; pointer-events: none; }
.loom-tip b { font-family: var(--display); }
.loom-empty { position: absolute; z-index: 2; transform: translateX(-50%); text-align: center; font-size: 15px; color: var(--muted); width: max-content; max-width: 80%; }
.loom-empty b { color: var(--ink); font: 700 20px/1.3 var(--display); }

/* ---------- impact band ---------- */
.impact { position: relative; background: var(--coral); color: var(--cream); padding: clamp(40px, 4vw, 70px) var(--side) clamp(70px, 7vw, 120px); }
.impact-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: var(--max); margin: 0 auto; }
.impact-cell { padding: 10px clamp(14px, 2vw, 36px); border-left: 1px solid rgba(250, 242, 232, .45); }
.impact-cell:first-child { border-left: 0; padding-left: 0; }
.impact-n { font: 800 clamp(40px, 4.6vw, 96px)/1 var(--display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.impact-l { margin-top: 10px; font-size: clamp(15px, 1.1vw, 18px); opacity: .92; }
.feedstrip { max-width: var(--max); margin: clamp(30px, 3vw, 50px) auto 0; overflow: hidden; border-top: 1px solid rgba(250, 242, 232, .45); padding-top: 18px; }
.feedstrip-run { display: flex; gap: 48px; width: max-content; animation: drift 60s linear infinite; }
.feedstrip-run span { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; font-size: 16px; }
.feedstrip-run span::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--cream); }
@keyframes drift { to { transform: translateX(-50%); } }

/* ---------- give room ---------- */
.giveroom { padding: clamp(70px, 7vw, 130px) var(--side); max-width: calc(var(--max) + 2 * var(--side)); margin: 0 auto; }
.giveroom-head { max-width: 760px; margin-bottom: clamp(30px, 3vw, 54px); }
.giveroom-head .soft { margin-top: 14px; font-size: 18px; }
.yourturn { margin-bottom: 28px; padding: 24px 28px; border-radius: 24px; background: var(--sage); }
.yourturn-big { font: 800 clamp(24px, 2.2vw, 36px)/1.15 var(--display); letter-spacing: -0.03em; }
.yourturn-big span { color: var(--coral-deep); }
.givegrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(20px, 2.4vw, 40px); align-items: start; }
.askcard { position: relative; padding: clamp(30px, 3.4vw, 60px); border-radius: 32px; background: var(--peach); }
.quotemark { display: block; width: clamp(48px, 4vw, 72px); height: auto; margin-bottom: 22px; fill: var(--coral); }
.askcard-quote { margin: 0 0 22px; font: 700 clamp(26px, 2.5vw, 44px)/1.2 var(--display); letter-spacing: -0.025em; overflow-wrap: anywhere; }
.askcard-who { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 26px; }
.askcard-who a { font-weight: 600; text-decoration-color: var(--coral); text-underline-offset: 4px; }
.whoface { width: 34px; height: 34px; border-radius: 50%; background: var(--coral); box-shadow: inset 0 0 0 7px var(--peach), 0 0 0 1.5px var(--coral); }
.holdertag { padding: 4px 12px; border-radius: 99px; background: var(--sage); font-size: 13px; font-weight: 500; }
.amounts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.amt { height: 44px; padding: 0 20px; border-radius: 99px; border: 1.5px solid #e9c9b8; background: var(--white); font-weight: 600; cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease); }
.amt:hover { border-color: var(--coral); }
.amt.is-on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.askcard-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.flowline { margin-top: 16px; min-height: 1.6em; font-size: 15px; color: var(--muted); }
.flowline.is-good { color: #3f6b36; }
.flowline.is-bad { color: var(--coral-deep); }
.flowline a { color: var(--ink); }
.linequeue { padding: 8px 4px; }
.linequeue .title3 { margin-bottom: 16px; }
.nextup { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.nextup li { padding: 18px 20px; border-radius: 20px; background: var(--white); border: 1px solid var(--rule); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.nextup li:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -22px rgba(43, 33, 28, .4); }
.nextup li.quiet { background: none; border-style: dashed; color: var(--muted); }
.nextup li.quiet:hover { transform: none; box-shadow: none; }
.nextup .who { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--muted); }
.nextup .who b { color: var(--ink); }
.nextup p { margin: 6px 0 4px; overflow-wrap: anywhere; }

/* ---------- how ---------- */
.howband { position: relative; background: var(--sage); padding: clamp(90px, 8vw, 150px) var(--side) clamp(70px, 7vw, 120px); text-align: center; }
.howgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); max-width: var(--max); margin: clamp(30px, 3vw, 56px) auto 0; text-align: left; }
.howcard { padding: clamp(26px, 2.6vw, 44px); border-radius: 28px; background: var(--white); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.howcard:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -28px rgba(43, 33, 28, .45); }
.howicon { width: 56px; height: 56px; margin-bottom: 22px; fill: none; stroke: var(--coral); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.howcard:hover .howicon { transform: translateX(4px) rotate(-4deg); }
.howcard .title3 { margin-bottom: 10px; font-size: clamp(22px, 1.7vw, 30px); }
.howcard p { color: var(--muted); }
.memo { padding: 1px 8px; border-radius: 6px; background: var(--peach); color: var(--ink); font-weight: 500; }

/* ---------- newest feed ---------- */
.newest { padding: clamp(70px, 7vw, 130px) var(--side) 20px; max-width: calc(var(--max) + 2 * var(--side)); margin: 0 auto; }
.newest-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 14px 40px; margin-bottom: clamp(26px, 2.6vw, 44px); }
.newest-head .soft { max-width: 30em; }
.giftfeed { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.giftfeed a { display: grid; gap: 6px; height: 100%; padding: 22px; border-radius: 24px; border: 1px solid var(--rule); background: var(--white); text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease); }
.giftfeed a:hover { transform: translateY(-4px); border-color: #e9c9b8; box-shadow: 0 20px 36px -26px rgba(43, 33, 28, .45); }
.giftfeed .gf-no { font: 800 30px/1 var(--display); letter-spacing: -0.03em; color: var(--coral); }
.giftfeed .gf-sol { font-weight: 600; font-size: 18px; }
.giftfeed .gf-who, .giftfeed .gf-at { font-size: 14px; color: var(--muted); }
.giftfeed .gf-at span { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.giftfeed-empty { padding: 34px; border-radius: 24px; border: 1.5px dashed #e9c9b8; text-align: center; }

/* ---------- ask ---------- */
.askband { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 56px); align-items: start; padding: clamp(70px, 7vw, 130px) var(--side); max-width: calc(var(--max) + 2 * var(--side)); margin: 0 auto; }
.askpanel { padding: clamp(28px, 3.2vw, 56px); border-radius: 32px; background: var(--sage); }
.askpanel > .soft { margin: 12px 0 26px; }
.askform-label { display: block; margin-bottom: 8px; font-weight: 600; }
.askform textarea { width: 100%; padding: 16px 18px; border-radius: 18px; border: 1.5px solid #cfd9c5; background: var(--white); font: 400 17px/1.5 var(--body); color: var(--ink); resize: vertical; transition: border-color .15s var(--ease); }
.askform textarea:focus { outline: none; border-color: var(--ink); }
.askform-row { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 18px; font-size: 14px; }
.askform-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.askform-check.is-good { color: #3f6b36; }
.askform-check.is-bad { color: var(--coral-deep); }
.gates { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; font-size: 15px; }
.gates li { display: flex; align-items: center; gap: 10px; }
.gates li::before { content: ''; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid #b9c7ad; background: var(--white); transition: background .2s var(--ease), border-color .2s var(--ease); }
.gates li.is-met::before { background: #5b8a4f; border-color: #5b8a4f; box-shadow: inset 0 0 0 4px var(--white); }
.gates li.is-miss { color: var(--coral-deep); }
.gates li.is-miss::before { border-color: var(--coral-deep); background: var(--peach); }
.askform-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 22px; }
.sharepanel { display: grid; gap: 16px; }
.sharecard { border-radius: 28px; overflow: hidden; border: 1px solid var(--rule); }
.sharecard canvas { width: 100%; height: auto; }
.share-acts { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- kindest ---------- */
.kindest { padding: 20px var(--side) clamp(90px, 8vw, 150px); max-width: calc(var(--max) + 2 * var(--side)); margin: 0 auto; }
.kindlist { list-style: none; margin: 30px 0 0; padding: 0; counter-reset: k; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.kindlist li { counter-increment: k; display: flex; align-items: baseline; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.kindlist li::before { content: counter(k); font: 800 26px/1 var(--display); color: var(--coral); min-width: 1.4em; }
.kindlist a { font-weight: 600; text-underline-offset: 4px; text-decoration-color: var(--coral); }
.kindlist .gave { margin-left: auto; color: var(--muted); font-size: 15px; text-align: right; }
.kindlist .gave b { color: var(--ink); }
#kindEmpty { margin-top: 20px; }

/* ---------- closing ---------- */
.closing { position: relative; background: var(--coral); color: var(--cream); padding: clamp(90px, 9vw, 170px) var(--side) 60px; }
.closing-big { font: 800 clamp(48px, 8.4vw, 210px)/0.95 var(--display); letter-spacing: -0.05em; max-width: 12ch; }
.closing-row { display: flex; gap: 26px; align-items: center; margin-top: clamp(40px, 4vw, 70px); padding-top: 30px; border-top: 1px solid rgba(250, 242, 232, .45); max-width: 900px; }
.closing-row img { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 0 0 2px rgba(250, 242, 232, .6); flex: none; }
.closing-row p + p { margin-top: 8px; opacity: .9; }

/* ---------- sticky ---------- */
.stickycta { position: fixed; right: 22px; bottom: 22px; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 8px 20px 8px 8px; border-radius: 99px; background: var(--ink); color: var(--cream); text-decoration: none; font-weight: 600; box-shadow: 0 14px 30px -14px rgba(43, 33, 28, .6); transform: translateY(140%); transition: transform .4s var(--ease), opacity .3s var(--ease); }
.stickycta img { width: 30px; height: 30px; border-radius: 50%; }
.stickycta.is-up { transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .mainnav { display: none; }
  .giftfeed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 100px; }
  .livepanel { height: 420px; }
  .impact-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 26px; }
  .impact-cell:nth-child(3) { border-left: 0; padding-left: 0; }
  .givegrid, .askband, .howgrid { grid-template-columns: minmax(0, 1fr); }
  .kindlist { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar { gap: 8px; padding-left: 14px; padding-right: 14px; }
  .brandlock span { display: none; }
  .brandlock img { width: 40px; height: 40px; }
  .topacts { gap: 6px; }
  .roundicon { width: 36px; height: 36px; }
  .cachip { height: 36px; padding: 0 10px; font-size: 13px; }
  .cachip-word { display: none; }
  .topacts .pill { height: 36px; padding: 0 12px; font-size: 13px; }
  .hero-title { font-size: clamp(36px, 10.4vw, 60px); }
  .rise > span { display: inline; white-space: normal; }
  .pill-big { height: 52px; padding: 0 22px; font-size: 16px; }
  .livepanel { height: 360px; border-radius: 28px; }
  .giftfeed { grid-template-columns: minmax(0, 1fr); }
  .gates { grid-template-columns: minmax(0, 1fr); }
  .kindlist li { flex-wrap: wrap; }
  .kindlist .gave { margin-left: 0; text-align: left; width: 100%; padding-left: calc(1.4em + 18px); }
  .closing-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  #buyLink { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
