:root {
  --sky: #bbd8f5; --coral: #fa7f66; --pink: #e882b4; --cream: #fdfcf6; --lilac: #d9aff8; --navy: #053d5e;
  --ink: #1f3442; --soft: #f2efe4; --r: 36px;
  --header-h: 72px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0; font-family: Montserrat, system-ui, sans-serif; font-size: 16px; line-height: 1.6;
  background: var(--cream); color: var(--ink); overflow-x: hidden;
}
body.nav-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.15; margin: 0 0 .6em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; margin-bottom: .2em; }
p { margin: 0 0 1em; }
.muted { opacity: .7; }
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
section { padding-block: clamp(56px, 8vw, 96px); }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 60ch; }

/* Кнопки */
.btn {
  display: inline-block; font: 700 .9rem/1.2 Montserrat, sans-serif; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; text-align: center; cursor: pointer; border: 2px solid transparent; border-radius: 999px;
  padding: 15px 26px; background: var(--coral); color: var(--navy); transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--navy); color: var(--cream); }
.btn.dark { background: var(--navy); color: var(--cream); }
.btn.dark:hover { background: var(--coral); color: var(--navy); }
.btn.ghost-dark { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn.ghost-dark:hover { background: var(--navy); color: var(--cream); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.on-dark:focus-visible, .hero :focus-visible, .carousel :focus-visible, .site-footer :focus-visible { outline-color: var(--sky); }

/* Шапка */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h); display: flex; align-items: center; gap: 16px;
  padding-inline: 20px; background: var(--cream);
}
.logo { display: flex; align-items: center; text-decoration: none; color: var(--navy); font-weight: 800; font-size: 1.35rem; margin-right: auto; }
#site-nav { display: flex; align-items: center; gap: 28px; }
#site-nav a:not(.btn) { text-decoration: none; text-transform: uppercase; font-weight: 700; font-size: .8rem; letter-spacing: .05em; color: var(--navy); padding-block: 6px; border-bottom: 3px solid transparent; }
#site-nav a:not(.btn):hover, #site-nav a[aria-current] { border-bottom-color: var(--coral); }
#site-nav .nav-cta { padding: 12px 22px; font-size: .8rem; }
.icon-link { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--navy); transition: background .2s; }
.icon-link:hover { background: var(--sky); }
#burger { display: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--sky); cursor: pointer; padding: 0; position: relative; }
#burger span { position: absolute; left: 12px; right: 12px; height: 3px; background: var(--navy); border-radius: 2px; transition: transform .25s, top .25s, opacity .2s; }
#burger span:nth-child(1) { top: 14px; } #burger span:nth-child(2) { top: 21px; } #burger span:nth-child(3) { top: 28px; }
#burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
#burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
#burger[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* Перший екран */
.hero { padding: 0; background: var(--navy); color: #fff; }
.slider { position: relative; height: calc(100svh - var(--header-h)); min-height: 520px; max-height: 860px; overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1s ease, visibility 0s 1s; }
.slide.active { opacity: 1; visibility: visible; z-index: 1; transition: opacity 1s ease; }
.slide picture, .slide img { width: 100%; height: 100%; object-fit: cover; }
.slider::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(5,61,94,.35) 0%, rgba(5,61,94,.88) 100%); }
.m-only { display: none; }
.hero-copy { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; max-width: 1120px; margin-inline: auto; padding: 0 20px clamp(36px, 7vw, 72px); }
.hero-copy h1 { color: #fff; max-width: 16ch; text-transform: uppercase; margin-bottom: .4em; }
.hero-copy p { max-width: 50ch; font-size: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; margin-top: 8px; }
.slider-btn {
  position: absolute; z-index: 4; top: 42%; width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: rgba(253,252,246,.9); color: var(--navy); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.slider-btn:hover { background: var(--coral); }
.slider-btn.prev { left: 20px; } .slider-btn.next { right: 20px; }

/* Значок прогресу збору */
.progress-badge { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--navy); --p: 0; --ring: 84px; --track: var(--sky); --inner: var(--cream); }
.progress-badge .ring {
  flex: none; width: var(--ring); height: var(--ring); border-radius: 50%; position: relative; display: grid; place-items: center;
  background: conic-gradient(var(--coral) calc(var(--p) * 1%), var(--track) 0);
}
.progress-badge .ring::before { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: var(--inner); }
.progress-badge .ring b { position: relative; font-weight: 800; font-size: calc(var(--ring) * .26); }
.progress-badge .ring b::after { content: '%'; font-size: .6em; margin-left: 1px; }
.badge-text { display: grid; line-height: 1.3; }
.badge-text strong { font-weight: 800; }
.badge-text small { font-size: .85rem; font-weight: 500; }
.progress-badge:hover .ring { filter: brightness(1.04); }
.progress-badge:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.progress-badge.on-dark { color: #fff; --track: rgba(253,252,246,.3); --inner: var(--navy); }
.progress-badge.big { --ring: 168px; flex-direction: column; text-align: center; gap: 16px; }
.progress-badge.big .ring::before { inset: 18px; }
.progress-badge.big .badge-text strong { font-size: 1.15rem; }

/* Чим ми займаємось */
.activities { background: var(--soft); border-radius: 0 0 var(--r) var(--r); }
.split { max-width: 1120px; margin-inline: auto; padding-inline: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.split > *, .about-grid > *, .help-grid > * { min-width: 0; }
.activity-photo { position: sticky; top: calc(var(--header-h) + 24px); }
.activity-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--r); }
.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.tab {
  display: inline-flex; align-items: center; gap: 10px; font: 700 .9rem Montserrat, sans-serif; color: var(--navy);
  background: transparent; border: 2px solid var(--navy); border-radius: 999px; padding: 10px 18px; cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--navy); color: var(--cream); }
.tab:hover:not([aria-selected="true"]) { background: var(--sky); }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--navy); }
.tab[aria-selected="true"] .dot { border-color: var(--cream); }
.c-coral { background: var(--coral); } .c-sky { background: var(--sky); } .c-pink { background: var(--pink); }
.tab-panel[hidden] { display: none; }
.tab-panel .btn { margin-top: 8px; }
#camps-list { display: grid; gap: 12px; margin: 20px 0; }
.mini-card { background: #fff; border-radius: 20px; padding: 14px 18px; }
.mini-card p { margin: 0; font-size: .9rem; }

/* Про нас */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.lined .item { padding-block: 22px; border-bottom: 2px dashed var(--navy); }
.lined .item:first-child { padding-top: 0; }
.lined .item:last-child { border-bottom: 0; }
.lined h3 { margin-bottom: .3em; }
.lined p { margin: 0; }
.lined.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; margin-block: 32px; }
.lined.three .item { border-bottom: 0; padding: 0; }

/* Карусель */
.carousel { background: var(--navy); color: var(--cream); text-align: center; }
.car-slides { display: grid; max-width: 760px; margin-inline: auto; }
.car-slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .6s; }
.car-slide.active { opacity: 1; visibility: visible; }
.car-slide h2 { color: var(--coral); font-size: clamp(1.8rem, 5vw, 3rem); }
.car-slide p { font-size: clamp(1.05rem, 2.4vw, 1.35rem); margin: 0; }
.car-controls { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 36px; }
.car-btn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--cream); background: transparent; color: var(--cream); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.car-btn:hover { background: var(--cream); color: var(--navy); }
.car-dots { display: flex; gap: 10px; }
.car-dot { width: 14px; height: 14px; padding: 0; border-radius: 50%; border: 2px solid var(--cream); background: transparent; cursor: pointer; }
.car-dot.active { background: var(--coral); border-color: var(--coral); }

/* Міста */
.locations h2 { max-width: 20ch; }
#cities { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.city { background: var(--sky); border-radius: 999px; padding: 10px 20px; display: inline-flex; gap: 10px; align-items: center; color: var(--navy); }
.city:nth-child(3n+2) { background: var(--lilac); }
.city:nth-child(3n) { background: #f8c9dd; }
.city span { font-size: .75rem; font-weight: 700; background: var(--cream); border-radius: 999px; padding: 1px 10px; }

/* Новини */
.news { background: var(--soft); border-radius: var(--r); }
#news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-top: 28px; }
.card { background: #fff; border-radius: 28px; padding: 24px; overflow: hidden; }
.card img { margin: -24px -24px 18px; width: calc(100% + 48px); max-width: none; aspect-ratio: 16/9; object-fit: cover; }
.card time { font-size: .85rem; font-weight: 700; color: #b3472f; }
.card h3 { margin: .2em 0 .4em; }
.card p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }

/* Допомога */
.help { background: var(--pink); margin-top: -36px; padding-top: calc(clamp(56px, 8vw, 96px) + 36px); }
.help h2 { max-width: 18ch; }
.help-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.help .progress-badge { justify-self: center; --track: rgba(253,252,246,.55); }
.help .btn.dark { background: var(--navy); }

/* Контакти */
.contacts { background: var(--lilac); }
.contacts-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.contacts p { max-width: 46ch; margin: 0; }
.contact-links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-start; }

/* Підвал */
.site-footer { background: var(--navy); color: var(--cream); padding-block: 44px; }
.foot-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.foot-links a { text-decoration: none; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-end { display: flex; align-items: center; gap: 18px; }
.foot-end p { margin: 0; font-size: .85rem; }
.site-footer .icon-link { color: var(--cream); }
.site-footer .icon-link:hover { background: rgba(253,252,246,.15); }

/* Фандрейзинг */
.fund-hero { background: var(--sky); border-radius: 0 0 var(--r) var(--r); }
.fund-hero .progress-badge { --track: rgba(253,252,246,.7); }
.fund-hero h1 { margin-bottom: .3em; }
.fund-hero .help-grid { grid-template-columns: 1.3fr 1fr; }
.ways .hero-actions { margin-top: 8px; }
.lined a { text-decoration-thickness: 2px; text-underline-offset: 3px; }

.locations, .news, .help, .contacts, .site-footer { content-visibility: auto; contain-intrinsic-size: auto 420px; }

@media (max-width: 960px) {
  .split, .about-grid, .help-grid, .fund-hero .help-grid, .contacts-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .activity-photo { position: static; }
  .activity-photo img { aspect-ratio: 16/10; }
  .lined.three { grid-template-columns: 1fr; gap: 0; }
  .lined.three .item { padding-block: 20px; border-bottom: 2px dashed var(--navy); }
  .lined.three .item:first-child { padding-top: 0; }
  .lined.three .item:last-child { border-bottom: 0; }
  .help .progress-badge, .fund-hero .progress-badge { justify-self: start; }
}
@media (max-width: 860px) {
  #burger { display: block; }
  #site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 40; background: var(--cream); flex-direction: column; justify-content: center; gap: 22px;
    transform: translateY(-12px); opacity: 0; transition: transform .3s, opacity .3s; visibility: hidden; padding: 20px;
  }
  #site-nav.open { transform: none; opacity: 1; visibility: visible; }
  #site-nav a:not(.btn) { font-size: 1.1rem; }
  #site-nav .nav-cta { font-size: .95rem; padding: 16px 30px; }
}
@media (max-width: 700px) {
  body { font-size: 15.5px; }
  .m-only { display: block; }
  .slider { min-height: 480px; }
  .slider-btn { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-actions { gap: 20px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin-inline: -20px; padding-inline: 20px; padding-bottom: 6px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; }
  .progress-badge.big { --ring: 140px; }
  .contact-links .btn { flex: 1 1 100%; }
  .foot-grid { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
