/* ==========================================================================
   Мир і Ко — design system v2
   Modern charity-tech look: bright light gradient surfaces, one confident
   gray/charcoal CTA accent, bold rounded type, floating donate card in the hero —
   the pattern used by current Ukrainian fundraising platforms.
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
html.nav-open, html.nav-open body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
body { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
button { font: inherit; }

/* ---------- Tokens ---------- */
:root {
  --ink: #14181C;
  --ink-soft: #565F68;
  --ink-faint: #8B93A0;

  --bg: #FFFFFF;
  --bg-tint: #EEF2FE;
  --surface-alt: #F4F6FB;
  --line: #E4E8F0;

  --brand: #2F55D4;
  --brand-dark: #16214A;
  --brand-darker: #0F1730;

  --accent: #4B5563;
  --accent-dark: #374151;
  --accent-tint: #F3F4F6;

  --white: #FFFFFF;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-card: 0 16px 40px -18px rgba(20, 28, 55, 0.18);
  --shadow-lift: 0 30px 70px -20px rgba(15, 23, 48, 0.28);

  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --container: 1180px;
  --section-pad: clamp(3.5rem, 7vw, 7rem);
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.62;
  font-size: 16px;
  overflow-x: clip;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

a { text-decoration: none; }
::selection { background: var(--accent-tint); color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: var(--section-pad) 0; }
.section--tight { padding: clamp(2.5rem, 4vw, 4rem) 0; }

.band-bg { background: var(--bg); }
.band-alt { background: var(--surface-alt); }
.band-dark { background: var(--brand-darker); color: rgba(255,255,255,0.92); }
.band-dark h2, .band-dark h3 { color: var(--white); }
.band-accent { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%); color: var(--white); }
.band-accent h2 { color: var(--white); }

.grid { display: grid; gap: 2rem; }
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Eyebrow pill ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--brand);
  background: var(--bg-tint);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 0.45em; height: 0.45em; border-radius: 50%; background: var(--accent); }
.band-dark .eyebrow, .band-accent .eyebrow { background: rgba(255,255,255,0.14); color: var(--white); }
.band-accent .eyebrow::before { background: var(--white); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.95rem 1.7rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 1em; height: 1em; }

.btn--accent { background: var(--accent); color: var(--white); box-shadow: 0 14px 30px -12px rgba(75, 85, 99, 0.5); }
.btn--accent:hover { background: var(--accent-dark); }

.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: #000; }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }

.btn--ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn--ghost-light:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

.btn--sm { padding: 0.65rem 1.2rem; font-size: 0.88rem; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(10px);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand__mark {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  flex-shrink: 0;
}
.footer-grid .brand__mark { filter: brightness(0) invert(1); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle svg { width: 1.2rem; height: 1.2rem; }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav__links { display: flex; align-items: center; gap: 1.7rem; font-size: 0.95rem; font-weight: 600; }
.site-nav__links a { position: relative; padding: 0.3rem 0; color: var(--ink-soft); }
.site-nav__links a:hover, .site-nav__links a.is-active { color: var(--ink); }
.site-nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.lang-switch { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.82rem; font-weight: 700; background: var(--surface-alt); border-radius: var(--radius-pill); padding: 0.2rem; }
.lang-switch a { padding: 0.35rem 0.7rem; color: var(--ink-faint); border-radius: var(--radius-pill); }
.lang-switch a.is-current { color: var(--white); background: var(--ink); }

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    inset: 0 0 auto auto;
    top: 0;
    height: 100vh;
    width: min(320px, 86vw);
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 2.5rem 1.5rem 2rem;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-lift);
  }
  .site-nav.is-open { transform: translateX(0); }
  .site-nav__links { flex-direction: column; align-items: flex-start; gap: 1.4rem; font-size: 1.05rem; margin-bottom: 2rem; }
  .site-nav .btn { width: 100%; }
  .lang-switch { align-self: flex-start; margin-bottom: 1.5rem; }
}
@media (min-width: 900px) { .nav-toggle { display: none; } }

.nav-scrim { display: none; position: fixed; inset: 0; background: rgba(10,14,30,0.4); z-index: 90; }
.nav-scrim.is-open { display: block; }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(ellipse 90% 70% at 15% 0%, var(--bg-tint) 0%, var(--bg) 60%);
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; } }

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.75rem);
  margin-bottom: 1.2rem;
}
.hero p.lede { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 2rem; max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.25rem; }

.trust-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.4rem; font-size: 0.85rem; color: var(--ink-faint); font-weight: 600; }
.trust-row strong { color: var(--ink-soft); }

/* Floating quick-donate card */
.donate-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  padding: clamp(1.75rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
}
.donate-card__label { font-size: 0.85rem; font-weight: 700; color: var(--accent); margin-bottom: 0.5rem; }
.donate-card h2 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.donate-card p.desc { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1.5rem; }
.donate-card .btn { width: 100%; margin-bottom: 1rem; }
.donate-card__note { font-size: 0.82rem; color: var(--ink-faint); line-height: 1.5; }
.donate-card__divider { height: 1px; background: var(--line); margin: 1.25rem 0; }
.donate-card__more { font-size: 0.88rem; font-weight: 700; color: var(--brand); }
.donate-card__more:hover { color: var(--accent); }

/* Featured / primary variant — used when the LiqPay card should outrank a details grid below it */
.donate-card--featured {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(2.25rem, 4vw, 3rem);
  border: 2px solid var(--accent);
  box-shadow: 0 32px 70px -24px rgba(75, 85, 99, 0.3);
  position: relative;
}
.donate-card--featured::before {
  content: "Рекомендовано";
  position: absolute;
  top: -14px;
  left: clamp(2.25rem, 4vw, 3rem);
  background: var(--accent);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
}
.donate-card--featured[data-badge]::before { content: attr(data-badge); }
.donate-card--featured .donate-card__label { font-size: 0.92rem; }
.donate-card--featured h2 { font-size: 1.85rem; }
.donate-card--featured p.desc { font-size: 1.02rem; }
.donate-card--featured .btn { font-size: 1.05rem; padding: 1.05rem 1.7rem; }

/* ---------- Inner page banner (subpages) ---------- */
.page-banner { background: var(--brand-darker); color: var(--white); padding: clamp(3.5rem, 9vw, 5.5rem) 0 clamp(2.25rem, 5vw, 3rem); }
.page-banner h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); color: var(--white); }
.page-banner .eyebrow { background: rgba(255,255,255,0.14); color: var(--white); }
.page-banner__lede { margin-top: 0.85rem; font-size: 1.05rem; color: rgba(255,255,255,0.82); max-width: 56ch; }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 860px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-grid figure img { border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.supported-badge { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.25rem; font-size: 0.9rem; color: var(--ink-soft); }
.supported-badge img { width: 150px; height: auto; border-radius: 6px; padding: 0 20px 0 0; }

.prose { color: var(--ink-soft); font-size: 1.03rem; }
.prose p + p { margin-top: 1rem; }

.section-head { margin-bottom: 2.5rem; max-width: 44ch; }

/* ---------- Activities cards ---------- */
.cards { display: grid; gap: 1.5rem; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.6rem; }
.card__body h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.card__body p { color: var(--ink-soft); font-size: 0.96rem; }

/* ---------- Partners grid ---------- */
.partners-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
@media (min-width: 640px) { .partners-grid { grid-template-columns: repeat(3, 1fr); } }
.partners-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.8rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  min-height: 130px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.partners-grid a:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.partners-grid img { max-height: 72px; width: auto; }

/* ---------- Donate reinforcement band ---------- */
.donate-cta { text-align: center; max-width: 640px; margin: 0 auto; }
.donate-cta h2 { margin-bottom: 0.9rem; }
.donate-cta p { color: rgba(255,255,255,0.9); font-size: 1.05rem; margin-bottom: 2rem; }
.donate-cta .btn-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-bottom: 1.5rem; }
.donate-cta .fine-print { font-size: 0.85rem; color: rgba(255,255,255,0.75); max-width: 52ch; margin: 0 auto; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 1.75rem; }
@media (min-width: 720px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.6rem;
}
.contact-item h4 { font-size: 0.85rem; font-weight: 700; color: var(--brand); margin-bottom: 0.6rem; }
.contact-item p, .contact-item a { color: var(--ink); font-size: 1.02rem; }
.contact-item a:hover { color: var(--accent); }

.social-row { display: flex; gap: 0.75rem; margin-top: 0.75rem; }
.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  color: var(--ink);
}
.social-row a:hover { background: var(--bg-tint); color: var(--brand); }
.social-row svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-darker); color: rgba(255,255,255,0.72); }
.footer-grid { display: grid; gap: 2.5rem; padding-top: 3.5rem; padding-bottom: 2rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-grid .brand { color: var(--white); margin-bottom: 0.85rem; }
.footer-grid h4 { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-links a { color: rgba(255,255,255,0.78); font-size: 0.94rem; }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

/* ---------- Generic content blocks (subpages) ---------- */
.kv-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .kv-grid { grid-template-columns: repeat(2, 1fr); } }

.kv-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 1.5rem 1.6rem;
}
.kv-block--wide { grid-column: 1 / -1; }
.kv-block h3 { font-size: 1.05rem; margin-bottom: 0.85rem; font-weight: 700; }
.kv-block p { margin: 0.2rem 0; color: var(--ink-soft); font-size: 0.94rem; }
.kv-block b { color: var(--ink); }
.kv-block .kv-divider { margin: 1rem 0 0.6rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-faint); }

.requisites-note { text-align: center; margin-top: 2rem; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Copy-to-clipboard field ---------- */
.copy-field { margin-bottom: 0.85rem; }
.copy-field:last-child { margin-bottom: 0; }
.copy-field__label { display: block; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.01em; color: var(--ink-faint); margin-bottom: 0.3rem; }
.copy-field__row { display: flex; flex-direction: column; align-items: stretch; gap: 0.4rem; }
.copy-field__input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
}
.copy-field__input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.copy-field__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.copy-field__btn:hover { border-color: var(--brand); }
.copy-field__btn svg { width: 1em; height: 1em; flex-shrink: 0; }
.copy-field__btn.is-copied { color: #1a8a4d; border-color: #1a8a4d; background: #eafaf1; }

.press-item { display: grid; grid-template-columns: 96px 1fr; gap: 1.25rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.press-item:first-child { border-top: none; }
.press-item img { border-radius: var(--radius-sm); object-fit: cover; width: 96px; height: 96px; }
.press-item h4 { font-size: 1rem; margin-bottom: 0.35rem; }
.press-item p { color: var(--ink-soft); font-size: 0.94rem; }
.press-outlet { font-size: 0.85rem; font-weight: 700; color: var(--brand); margin: 2.5rem 0 0.5rem; }
.press-outlet:first-child { margin-top: 0; }

.fb-embed-wrap { display: flex; justify-content: center; padding: 1rem 0; }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Skip link ---------- */
.skip-link { position: absolute; left: -999px; top: auto; background: var(--white); color: var(--ink); padding: 0.6rem 1rem; z-index: 200; border-radius: var(--radius-sm); }
.skip-link:focus { left: 1rem; top: 1rem; }
