/* Motion, loader and the newer components (videos, guides, donors, contact dock). */

/* Smooth cross-page transitions in browsers that support them */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .25s ease both; }
::view-transition-new(root) { animation: vt-in .35s ease both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Logo loader (first page of a visit only) ---------- */
.loader {
  position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(ellipse at 50% 42%, #FFFDF8 0%, var(--cream) 55%, #F3E9D6 100%);
  transition: transform .75s cubic-bezier(.76,0,.24,1), visibility .75s;
}
.loader.done { transform: translateY(-102%); visibility: hidden; pointer-events: none; }
.no-loader .loader { display: none; }
.loader-edge { flex: none; }
.loader-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; text-align: center; }
.loader-badge { position: relative; width: 196px; height: 196px; display: grid; place-items: center; margin-bottom: 18px; animation: badgeIn .7s cubic-bezier(.2,.9,.3,1.25) both; }
.loader-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--leaf) 0 22%, transparent 22% 25%, var(--sun) 25% 47%, transparent 47% 50%, var(--rose) 50% 72%, transparent 72% 75%, #8CCBE0 75% 97%, transparent 97%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
  animation: spin 2.4s linear infinite;
}
.loader-plate { width: 164px; height: 164px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 14px 34px -14px rgba(42,32,36,.45), inset 0 0 0 1px rgba(42,32,36,.05); }
.loader-plate img { width: 128px; height: 128px; animation: beat 1.3s ease-in-out infinite; }
.loader-welcome { font-size: 1.25rem; color: var(--leaf-deep); margin: 0; animation: fadeUp .6s .25s both; }
.loader-note {
  font: 700 clamp(1.6rem, 4vw, 2.1rem)/1.1 var(--font-hand); color: var(--rose); margin: 0; padding-bottom: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M4 12C70 4 170 3 296 9' fill='none' stroke='%23F4CD18' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") left bottom / 0% 10px no-repeat;
  animation: fadeUp .6s .4s both, underline .9s .8s cubic-bezier(.6,0,.2,1) forwards;
}
.loader-dots { display: flex; gap: 8px; margin-top: 22px; }
.loader-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--leaf); animation: dot 1s ease-in-out infinite; }
.loader-dots i:nth-child(2) { background: var(--sun-deep); animation-delay: .15s; }
.loader-dots i:nth-child(3) { background: var(--rose); animation-delay: .3s; }
.loader.done .loader-badge { transform: scale(1.06); transition: transform .5s; }
@keyframes badgeIn { from { opacity: 0; transform: scale(.7) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes beat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.08); } 28% { transform: scale(.98); } 42% { transform: scale(1.05); } 60% { transform: scale(1); } }
@keyframes underline { to { background-size: 100% 10px; } }
@keyframes dot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-8px); opacity: 1; } }
@media (max-width: 480px) { .loader-badge { width: 160px; height: 160px; } .loader-plate { width: 134px; height: 134px; } .loader-plate img { width: 104px; height: 104px; } }

/* ---------- Hero entrance ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-40px) rotate(var(--r, 0deg)) scale(.92); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }
.js [data-anim] { opacity: 0; }
.js.ready [data-anim] { animation: fadeUp .7s cubic-bezier(.2,.8,.2,1) both; }
.js.ready [data-anim="2"] { animation-delay: .08s; }
.js.ready [data-anim="3"] { animation-delay: .18s; }
.js.ready [data-anim="4"] { animation-delay: .28s; }
.js.ready [data-anim="5"] { animation-delay: .38s; }
.scrapbook .s1 { --r: -4deg; } .scrapbook .s2 { --r: 5deg; } .scrapbook .s3 { --r: -2deg; }
.js.ready .scrapbook .snap { animation: dropIn .8s cubic-bezier(.2,.9,.25,1.2) both; }
.js.ready .scrapbook .s1 { animation-delay: .3s; }
.js.ready .scrapbook .s2 { animation-delay: .5s; }
.js.ready .scrapbook .s3 { animation-delay: .7s; }
.js.ready .scrapbook .sticky { animation: fadeUp .6s .95s both; }
.scrapbook .snap:hover { animation: none; }
.hero h1 .hl::after { transform-origin: left; }
.js.ready .hero h1 .hl::after { animation: draw .7s .75s cubic-bezier(.6,0,.2,1) both; }
@keyframes draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.hero-alt { margin: 16px 0 0; color: var(--ink-2); font-weight: 600; }
.hero-alt a { font-weight: 800; }

/* Staggered reveal for groups */
.reveal { transition-delay: var(--d, 0s); }

/* ---------- Different-ability ribbon ---------- */
.ribbon { background: var(--leaf-deep); color: #fff; overflow: hidden; padding: 16px 0; transform: rotate(-1.2deg); margin: 6px -10px 18px; box-shadow: 0 10px 24px -16px rgba(42,32,36,.6); }
.ribbon-track { display: flex; align-items: center; gap: 28px; width: max-content; animation: marquee 38s linear infinite; }
.ribbon-track span { font: 800 clamp(1.3rem, 2.4vw, 1.9rem)/1 var(--font-display); white-space: nowrap; }
.ribbon-track span.amharic { font-family: var(--font-ethiopic); color: var(--sun); }
.ribbon-track i { font-style: normal; color: var(--rose); font-size: 1.4rem; }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Big quote band ---------- */
.quote-band { position: relative; overflow: hidden; }
.big-quote { font: 800 clamp(2.4rem, 6vw, 4.8rem)/1.02 var(--font-display); text-align: center; margin: 0; letter-spacing: -.02em; color: var(--ink); }
.big-quote s { text-decoration-color: var(--rose); text-decoration-thickness: .09em; color: var(--ink-2); }
.big-quote span { color: var(--leaf-deep); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 30' preserveAspectRatio='none'%3E%3Cpath d='M4 20C60 8 140 6 296 14' fill='none' stroke='%23D9486F' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E") bottom/100% .28em no-repeat; padding-bottom: .08em; }
.quote-band::before, .quote-band::after { content: "♥"; position: absolute; font-size: 7rem; color: rgba(217,72,111,.14); }
.quote-band::before { left: 4%; top: 10%; transform: rotate(-16deg); animation: float 7s ease-in-out infinite; }
.quote-band::after { right: 5%; bottom: 6%; transform: rotate(14deg); animation: float 8s 1s ease-in-out infinite; }
@keyframes float { 50% { translate: 0 -14px; } }

/* ---------- Count-up numbers ---------- */
.stat b { font-variant-numeric: tabular-nums; }

/* ---------- One number, three ways ---------- */
.talk-row { display: flex; flex-wrap: wrap; gap: 8px; }
.talk { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; font: 700 .98rem/1 var(--font-display); text-decoration: none; color: #fff; min-height: 44px; transition: transform .15s; }
.talk:hover { transform: translateY(-2px); color: #fff; }
.talk-call { background: var(--leaf); }
.talk-wa { background: #1F9D55; }
.talk-tg { background: #2A8BC9; }
.talk-row.big .talk { padding: 14px 20px; font-size: 1.1rem; min-height: 52px; }

.dock { position: fixed; right: 16px; bottom: 16px; z-index: 55; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.dock-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; background: var(--rose); color: #fff; font: 700 1rem/1 var(--font-display); padding: 14px 18px; border-radius: 999px; box-shadow: 0 12px 26px -10px rgba(217,72,111,.8); transition: transform .2s; }
.dock-btn:hover { transform: translateY(-2px); }
.dock-btn .ic { width: 22px; height: 22px; }
.dock-menu { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.dock-menu .talk { box-shadow: 0 8px 18px -10px rgba(42,32,36,.6); opacity: 0; transform: translateY(12px) scale(.95); pointer-events: none; transition: opacity .2s, transform .25s; }
.dock.open .dock-menu .talk { opacity: 1; transform: none; pointer-events: auto; }
.dock.open .dock-menu .talk:nth-child(2) { transition-delay: .04s; }
.dock.open .dock-menu .talk:nth-child(1) { transition-delay: .08s; }
.nav-open .dock { display: none; }
@media (max-width: 520px) { .dock-btn span { display: none; } .dock-btn { padding: 14px; } }

/* ---------- Burger that morphs into a cross ---------- */
.nav-toggle .ic { display: none !important; }
.burger { width: 22px; height: 16px; position: relative; display: block; }
.burger i { position: absolute; left: 0; right: 0; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform .3s, opacity .2s, top .3s; }
.burger i:nth-child(1) { top: 0; } .burger i:nth-child(2) { top: 7px; } .burger i:nth-child(3) { top: 14px; }
.nav-open .burger i:nth-child(1) { top: 7px; transform: rotate(45deg); }
.nav-open .burger i:nth-child(2) { opacity: 0; }
.nav-open .burger i:nth-child(3) { top: 7px; transform: rotate(-45deg); }
.nav-open .site-nav li { animation: fadeUp .4s both; }
.nav-open .site-nav li:nth-child(2) { animation-delay: .04s; } .nav-open .site-nav li:nth-child(3) { animation-delay: .08s; }
.nav-open .site-nav li:nth-child(4) { animation-delay: .12s; } .nav-open .site-nav li:nth-child(5) { animation-delay: .16s; }
.nav-open .site-nav li:nth-child(6) { animation-delay: .2s; } .nav-open .site-nav li:nth-child(7) { animation-delay: .24s; }

/* ---------- Videos ---------- */
.videos { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; }
.video-card { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; background: var(--cream); border-radius: 8px; padding: 10px; text-align: left; border: 0; cursor: pointer; font: inherit; color: inherit; transition: transform .2s, background .2s; }
.video-card:hover { transform: translateX(4px); background: var(--cream-2); }
.video-card .thumb { position: relative; aspect-ratio: 16/9; border-radius: 4px; overflow: hidden; background: var(--ink); }
.video-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-card .thumb .ic { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--sun); color: var(--ink); }
.video-card b { display: block; font: 700 1.05rem/1.25 var(--font-display); margin-bottom: 4px; }
.video-card small { color: var(--ink-2); font-weight: 600; }
.video-meta { margin-top: 14px; }
.video-meta h3 { margin-bottom: 4px; }
.video-meta p { color: var(--ink-2); margin: 0; }
.lang { display: inline-block; font: 800 .72rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: var(--sun-soft); color: var(--ink); margin-left: 6px; vertical-align: middle; }
@media (max-width: 860px) { .videos { grid-template-columns: 1fr; } .videos .video-feature { grid-row: auto; } }
@media (max-width: 420px) { .video-card { grid-template-columns: 112px 1fr; } }

/* ---------- Guides (articles) ---------- */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.6vw, 30px); }
@media (max-width: 960px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .article-grid { grid-template-columns: 1fr; } }
.guide { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--paper-warm); border-radius: 6px; overflow: hidden; box-shadow: 0 1px 2px rgba(42,32,36,.1), 0 16px 30px -18px rgba(42,32,36,.45); transition: transform .25s, box-shadow .25s; }
.guide:hover { transform: translateY(-5px); color: var(--ink); box-shadow: 0 2px 4px rgba(42,32,36,.1), 0 26px 40px -20px rgba(42,32,36,.5); }
.guide .cover { aspect-ratio: 16/10; overflow: hidden; }
.guide .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.guide:hover .cover img { transform: scale(1.05); }
.guide .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.guide h3 { margin: 0; font-size: 1.3rem; }
.guide p { margin: 0; color: var(--ink-2); font-size: .98rem; flex: 1; }
.guide .mins { font: 700 1.15rem/1 var(--font-hand); color: var(--rose); }
.guide.featured { grid-column: span 2; flex-direction: row; }
.guide.featured .cover { aspect-ratio: auto; flex: 1.1; min-height: 280px; }
.guide.featured .body { flex: 1; justify-content: center; padding: 28px; }
.guide.featured h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
@media (max-width: 760px) { .guide.featured { grid-column: auto; flex-direction: column; } .guide.featured .cover { min-height: 0; aspect-ratio: 16/10; } }

.read-progress { position: fixed; top: 0; left: 0; height: 4px; width: 100%; z-index: 70; background: var(--rose); transform-origin: left; transform: scaleX(0); }
.article-head { padding: clamp(36px, 6vw, 72px) 0 24px; }
.article-head h1 { max-width: 20ch; }
.article-head .eyebrow a { color: inherit; text-decoration: none; }
.article-meta { font: 700 1.3rem/1 var(--font-hand); color: var(--ink-2); }
.article-cover { max-width: 860px; margin: 0 auto 40px; transform: rotate(-1deg); }
.article-cover img { aspect-ratio: 16/9; }
.article-body h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-top: 1.6em; }
.article-body ul { padding-left: 1.2em; margin: 0 0 1.4em; }
.article-body li { margin-bottom: .5em; }
.article-body li::marker { color: var(--rose); }
.article-body .note { background: var(--sun-soft); border-radius: 8px; padding: 14px 18px; margin-top: 2em; }
.article-body p:first-of-type::first-letter { float: none; font: inherit; color: inherit; margin: 0; }
.article-help { max-width: 70ch; margin: 48px auto clamp(56px, 8vw, 96px); background: var(--leaf-deep); color: #E6EFE1; border-radius: 8px; padding: 26px 28px; }
.article-help h2 { color: var(--sun); font: 700 2rem/1 var(--font-hand); }

/* ---------- Donor wall ---------- */
.donor-wall { columns: 3 300px; column-gap: 22px; }
.donor { break-inside: avoid; margin: 0 0 22px; background: var(--paper-warm); border-radius: 4px; padding: 22px 22px 20px; box-shadow: 0 1px 2px rgba(42,32,36,.1), 0 14px 26px -16px rgba(42,32,36,.45); position: relative; }
.donor:nth-child(3n+1) { transform: rotate(-1deg); } .donor:nth-child(3n+2) { transform: rotate(.8deg); }
.donor::before { content: ""; position: absolute; top: -10px; left: 50%; width: 80px; height: 22px; transform: translateX(-50%) rotate(-2deg); background: rgba(244,205,24,.6); }
.donor:nth-child(3n+2)::before { background: rgba(217,72,111,.4); } .donor:nth-child(3n)::before { background: rgba(140,203,224,.7); }
.donor h3 { font: 700 1.9rem/1.05 var(--font-hand); color: var(--leaf-deep); margin: 0 0 4px; }
.donor .where { font-weight: 800; font-size: .85rem; color: var(--ink-2); letter-spacing: .03em; margin-bottom: 10px; display: block; }
.donor p { margin: 0; color: var(--ink); }
.donor a { font-weight: 800; font-size: .92rem; display: inline-block; margin-top: 10px; }
.donor.community { background: var(--sun-soft); }
.thanks-hero h1 .amharic { display: block; font-size: .6em; color: var(--rose); margin-top: 8px; }

/* Footer bits */
.footer-motto { font-size: 1.5rem; color: var(--sun); margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  .js [data-anim] { opacity: 1; }
  .ribbon-track { animation: none; }
  .loader { display: none; }
}

/* ---------- Fixes from screenshot review ---------- */
html, body { overflow-x: clip; }
/* A blurred header would trap the fixed drawer inside it, so keep it solid. */
.site-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav-open .site-header { z-index: 65; }
.section { padding: clamp(56px, 7.5vw, 104px) 0; }
.section-tight { padding: clamp(28px, 4vw, 48px) 0; }
.scrapbook .s1 { width: 52%; left: 2%; }
.scrapbook .s2 { width: 42%; right: 0; }
.scrapbook .s3 { width: 42%; right: 2%; }
.scrapbook .sticky { left: 6%; bottom: 0; }
.videos { align-items: start; }
.video-list { display: grid; gap: 12px; }
.donor-wall { columns: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 22px; align-items: start; }
.donor { margin: 0; }
@media (max-width: 900px) { .donor-wall { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .donor-wall { grid-template-columns: 1fr; } }
.site-header { background: var(--cream); }
@media (max-width: 860px) {
  .telebirr .phone { width: min(230px, 62vw); transform: rotate(1.5deg); }
  .tb-steps button { padding: 10px 12px; }
  .tb-steps .d { display: none; }
  .tb-steps button[aria-current="step"] .d { display: block; }
}
.telebirr { grid-template-areas: "intro phone" "list phone"; align-items: start; row-gap: 0; }
.tb-intro { grid-area: intro; } .tb-list { grid-area: list; } .telebirr .phone-wrap { grid-area: phone; align-self: center; }
@media (max-width: 860px) { .telebirr { grid-template-areas: "intro" "phone" "list"; row-gap: 18px; } }
