@import url("tokens.css");
@import url("fonts.css");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

/* ==================== Reset & base (mobile-first) ==================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin: 0 0 0.5em;
  line-height: 1.15;
  color: var(--color-purple);
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-purple);
  color: #fff;
  padding: 0.75em 1.25em;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--dur-fast);
}
.skip-link:focus {
  top: var(--space-4);
}

@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;
  }
}

/* ==================== Eyebrow / badges ==================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-magenta-dark);
}
.eyebrow::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--color-gold);
}

.text-hero {
  font-size: var(--fs-hero);
}

/* Основний заголовок хіро — суцільний, максимально контрастний.
   Шаруватий Intro Rust НЕ використовується тут: усі його шари (Base/Fill/Shade)
   мають вшиту напівтонову (крапкову) текстуру — на реченні це майже нечитабельно,
   тож текстурний шрифт лишаємо лише для короткого "штампа" (див. .stamp-badge). */
.hero-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-white);
  margin: 0.35em auto 0.5em;
}
.hero-title .hl {
  color: var(--color-gold);
}

/* Текстурний Intro Rust виявився нечитабельним на дрібному тексті (усі його шари
   мають вшиту напівтонову крапкову текстуру) — тож тут суцільний контрастний напис
   замість шаруватого ефекту. Rust варто лишити для великих promo-графік у соцмережах,
   де його вже й так використовує центр. */
.stamp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: var(--color-gold);
  box-shadow: var(--shadow-card);
  transform: rotate(-9deg);
  margin: var(--space-6) auto 0;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--on-gold);
}
.text-h1 {
  font-size: var(--fs-h1);
}
.text-h2 {
  font-size: var(--fs-h2);
}

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.9em 1.7em;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-pop), box-shadow var(--dur-fast), background var(--dur-fast),
    color var(--dur-fast);
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--color-magenta);
  color: #fff;
  box-shadow: var(--shadow-card);
}
.btn-primary:hover {
  background: var(--color-magenta-dark);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.btn-ghost {
  border-color: currentColor;
  color: var(--color-white);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
}
.btn-ghost--dark {
  color: var(--color-purple);
}
.btn-ghost--dark:hover {
  background: var(--color-purple-tint);
}

/* ==================== Header ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--color-white);
  box-shadow: 0 1px 0 rgba(33, 16, 41, 0.08);
  transition: box-shadow var(--dur-base);
}
.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(33, 16, 41, 0.1);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-weight: 700;
}
.brand img {
  width: 42px;
  height: 42px;
}
.brand-text {
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--color-purple);
}
.brand-text span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--color-ink-soft);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  height: 2.5px;
  border-radius: 2px;
  background: var(--color-purple);
  transition: transform var(--dur-fast), opacity var(--dur-fast);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

.main-nav {
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  padding: var(--space-6) var(--container-pad);
  gap: var(--space-2);
  transform: translateX(100%);
  transition: transform var(--dur-base) var(--ease-pop);
  overflow-y: auto;
}
.main-nav.is-open {
  transform: translateX(0);
}
.main-nav a {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-purple);
  padding: 0.6em 0;
  border-bottom: 1px solid var(--color-purple-tint);
}
.main-nav a[aria-current="page"] {
  color: var(--color-magenta);
}
.nav-cta {
  margin-top: var(--space-4);
}
.lang-switch {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-5);
  font-family: var(--font-heading);
  font-weight: 700;
}
.lang-switch a {
  border: none;
  padding: 0.3em 0.7em;
  border-radius: var(--radius-sm);
  color: var(--color-ink-soft);
}
.lang-switch a[aria-current="true"] {
  background: var(--color-purple-tint);
  color: var(--color-purple);
}

@media (min-width: 960px) {
  .nav-toggle {
    display: none;
  }
  .main-nav {
    position: static;
    inset: auto;
    transform: none;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: var(--space-6);
    overflow: visible;
  }
  .main-nav a {
    font-size: 0.95rem;
    padding: 0.3em 0;
    border-bottom: 2px solid transparent;
  }
  .main-nav a:hover {
    border-color: var(--color-gold);
  }
  .nav-cta {
    margin-top: 0;
  }
  .lang-switch {
    margin-top: 0;
  }
}

/* ==================== Hero ==================== */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--color-purple) 0%, var(--color-purple-dark) 65%, #33004d 100%);
  color: var(--color-white);
  padding: var(--space-8) 0 var(--space-7);
  overflow: hidden;
}
.hero-blob {
  position: absolute;
  width: 420px;
  max-width: 60vw;
  height: auto;
  pointer-events: none;
  user-select: none;
  opacity: 0.5;
  mix-blend-mode: soft-light;
}
.hero-blob--1 {
  top: -60px;
  right: -120px;
  transform: rotate(-12deg);
}
.hero-blob--2 {
  bottom: -80px;
  left: -140px;
  transform: rotate(8deg);
  opacity: 0.35;
}
.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}
.hero .eyebrow {
  color: var(--color-gold);
  justify-content: center;
}
.hero .eyebrow::before {
  background: var(--color-gold);
}
.hero .stack-heading {
  margin: 0.4em auto 0.5em;
}
.hero-lead {
  font-size: var(--fs-lead);
  color: rgba(255, 255, 255, 0.9);
  max-width: 560px;
  margin: 0 auto 1.75em;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: stretch;
}
.hero-actions .btn {
  width: 100%;
}
@media (min-width: 560px) {
  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }
  .hero-actions .btn {
    width: auto;
  }
}

.hero-stats {
  margin-top: var(--space-8);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: var(--space-6);
}
.stat-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  color: var(--color-gold);
  line-height: 1;
}
.stat-label {
  margin-top: 0.4em;
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.85);
}

/* ==================== Generic section ==================== */
.section {
  padding: var(--section-pad) 0;
}
.section--soft {
  background: var(--color-bg-soft);
}
.section-head {
  max-width: 640px;
  margin: 0 0 var(--space-6);
}
.section-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-lead {
  color: var(--color-ink-soft);
  font-size: var(--fs-lead);
}

/* ==================== "Що відбувається" / activity chips ==================== */
.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.chip {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-small);
  padding: 0.55em 1.1em;
  border-radius: var(--radius-pill);
  background: var(--color-white);
  color: var(--color-purple);
  border: 1.5px solid var(--color-purple-tint);
}
.chip:nth-child(3n + 2) {
  border-color: var(--color-magenta-tint);
}
.chip:nth-child(3n + 3) {
  background: var(--color-purple-tint);
}

.community-photo {
  margin-top: var(--space-6);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.community-photo img {
  width: 100%;
  height: auto;
}
.community-photo figcaption {
  padding: var(--space-3) var(--space-4);
  background: var(--color-white);
  font-size: var(--fs-small);
  color: var(--color-ink-soft);
}

/* ==================== Для кого / offer cards ==================== */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1000px) {
  .card-grid--5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-base) var(--ease-pop), box-shadow var(--dur-base);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-purple-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-3);
}
.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3em;
}
.card p {
  color: var(--color-ink-soft);
  font-size: var(--fs-small);
  margin: 0;
}

.audience-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 700px) {
  .audience-list {
    grid-template-columns: 1fr 1fr;
  }
}
.audience-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-purple-tint);
}
.audience-item .mark {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-gold);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-heading);
}

/* ==================== Місія/візія тизер ==================== */
.mission-teaser {
  display: grid;
  gap: var(--space-5);
}
@media (min-width: 900px) {
  .mission-teaser {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }
}
.mission-card {
  background: var(--color-purple);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}
.mission-card h3 {
  color: var(--color-gold);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.mission-card p {
  font-size: var(--fs-lead);
  color: rgba(255, 255, 255, 0.95);
}
.mission-card + .mission-card {
  background: var(--color-magenta);
}
.mission-cards {
  display: grid;
  gap: var(--space-4);
}

/* ==================== Події / placeholder ==================== */
.event-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 700px) {
  .event-list {
    grid-template-columns: repeat(3, 1fr);
  }
}
.event-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  border-top: 4px solid var(--color-gold);
}
.event-date {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-magenta);
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.event-card h3 {
  font-size: 1.05rem;
  margin: 0.3em 0;
}
.event-card p {
  color: var(--color-ink-soft);
  font-size: var(--fs-small);
}
.event-note {
  margin-top: var(--space-5);
  font-size: var(--fs-small);
  color: var(--color-ink-soft);
}

/* ==================== Community CTA ==================== */
.cta-band {
  background: linear-gradient(120deg, var(--color-magenta), var(--color-purple));
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-5);
  text-align: center;
}
.cta-band h2 {
  color: var(--color-white);
}
.cta-band .section-lead {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 auto 1.5em;
}

/* ==================== Footer ==================== */
.site-footer {
  background: #1a0c22;
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-7) 0 var(--space-5);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.footer-brand img {
  width: 40px;
  height: 40px;
}
.footer-brand span {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-white);
}
.site-footer h4 {
  color: var(--color-gold);
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
}
.footer-list li {
  margin-bottom: 0.6em;
  font-size: var(--fs-small);
}
.todo-flag {
  display: inline-block;
  margin-left: 0.5em;
  font-style: normal;
  font-size: 0.7rem;
  color: var(--color-gold);
  border: 1px dashed rgba(255, 189, 89, 0.6);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.5em;
}
.footer-list a:hover {
  color: var(--color-gold);
}
.socials {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast);
}
.socials a:hover {
  background: var(--color-magenta);
}
.footer-bottom {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: space-between;
}
.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-credit img {
  opacity: 0.8;
}

/* ==================== Scroll-reveal base state ==================== */
/* За замовчуванням (без JS) контент видимий одразу — приховуємо його
   в очікуванні анімації лише якщо JS підтвердив, що готовий її показати. */
.reveal {
  opacity: 1;
  transform: none;
}
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease-pop);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==================== Галерея ==================== */
.gallery-note {
  max-width: 640px;
  margin: 0 auto var(--space-6);
  text-align: center;
  color: var(--color-ink-soft);
  font-size: var(--fs-small);
}
.gallery-grid {
  column-count: 2;
  column-gap: var(--space-3);
}
@media (min-width: 700px) {
  .gallery-grid {
    column-count: 3;
  }
}
.gallery-item {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: var(--space-3);
  border: none;
  padding: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--dur-base);
}
.gallery-item:hover img {
  transform: scale(1.04);
}
.gallery-item figcaption,
.gallery-item .gallery-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-3);
  background: linear-gradient(0deg, rgba(33, 16, 41, 0.75), transparent);
  color: #fff;
  font-size: var(--fs-small);
  text-align: left;
  opacity: 0;
  transition: opacity var(--dur-base);
}
.gallery-item:hover .gallery-cap,
.gallery-item:focus-visible .gallery-cap {
  opacity: 1;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 8, 26, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: var(--space-5);
}
.lightbox.is-open {
  display: flex;
}
.lightbox img {
  max-width: min(90vw, 900px);
  max-height: 85vh;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
  position: absolute;
  bottom: var(--space-5);
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: var(--fs-small);
}
.lightbox-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}
.lightbox-close:hover {
  background: var(--color-magenta);
}

/* ==================== Placeholder page (stub) ==================== */
.stub-hero {
  background: var(--color-purple-tint);
  padding: var(--space-8) 0;
  text-align: center;
}
.stub-hero .eyebrow {
  justify-content: center;
  color: var(--color-magenta-dark);
}
.stub-hero .eyebrow::before {
  background: var(--color-magenta-dark);
}
