:root {
  --bg: #FEFEFE;
  --deep: #514A8E;
  --blue: #2466A0;
  --orange: #D19044;
  --ink: #2A2A2A;
  --muted: #7A7A7A;
  --line: #E5E2DC;
  --sand: #FAF8F4;

  --wrap: 1180px;
  --pad: 24px;
  --radius: 14px;

  --font-display: 'Unbounded', 'Trebuchet MS', sans-serif;
  --font-text: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); }

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

.section { padding: 96px 0; }

.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--deep);
  margin: 0 0 12px;
}

.section__lead {
  max-width: 640px;
  color: var(--muted);
  margin: 0 0 48px;
}

/* ---------- Головний екран ---------- */

.hero {
  padding: 56px 0 0;
  overflow: hidden;
}

.hero__inner {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.hero__logo {
  width: 132px;
  height: auto;
  margin-bottom: 48px;
  opacity: 0.9;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 10.2vw, 118px);
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--deep);
  margin: 0;
}

.hero__slogan {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(16px, 2.4vw, 26px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 18px 0 0;
}

.hero__lead {
  max-width: 540px;
  margin: 28px 0 0;
  color: var(--muted);
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 36px 0 0;
  padding: 15px 28px;
  border-radius: 999px;
  background: var(--deep);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: background .25s ease, transform .25s ease;
}

.hero__cta:hover { background: #423C77; transform: translateY(-2px); }

.hero__cta svg { width: 18px; height: 18px; animation: nudge 2.4s ease-in-out infinite; }

@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

.hero__media {
  margin-top: 64px;
  padding: 0 var(--pad);
}

.hero__media img {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  height: auto;
  border-radius: var(--radius);
}

/* ---------- Про проєкт ---------- */

.section--sand {
  background: var(--sand);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about__intro { max-width: 720px; }

.about__intro p { margin: 0; font-size: clamp(17px, 2vw, 20px); }

.steps {
  list-style: none;
  margin: 56px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 24px;
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--deep);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}

.step__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--deep);
  margin: 18px 0 8px;
}

.step__text { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.about__cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 56px;
}

.about__subtitle {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
  color: var(--orange);
  margin: 0 0 12px;
}

.about__col p { margin: 0 0 18px; }

.about__col p:last-child { margin-bottom: 0; }

.about__col h3:not(:first-child) { margin-top: 32px; }

.about__col strong { color: var(--ink); font-weight: 600; }

/* ---------- Пошук і фільтри ---------- */

.tools { margin-bottom: 28px; }

.search {
  position: relative;
  max-width: 460px;
  margin-bottom: 22px;
}

.search__icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 19px;
  height: 19px;
  color: var(--muted);
  pointer-events: none;
}

.search__input {
  width: 100%;
  padding: 15px 44px 15px 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.search__input::placeholder { color: #A8A49C; }

.search__input:focus {
  outline: none;
  border-color: var(--deep);
  box-shadow: 0 0 0 3px rgba(81, 74, 142, 0.12);
}

.search__input::-webkit-search-cancel-button { display: none; }

.search__clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.search__clear:hover { background: var(--sand); color: var(--ink); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.filter__id {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--deep);
}

.filter:hover { border-color: var(--deep); color: var(--ink); }

.filter.is-active {
  background: var(--deep);
  border-color: var(--deep);
  color: #fff;
}

.filter.is-active .filter__id { color: var(--orange); }

.filters--muted .filter {
  opacity: 0.5;
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.25;
  color: var(--deep);
  margin: 34px 0 6px;
}

.counter {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Картки слів ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease, box-shadow .25s ease, border-color .25s ease;
}

.card.is-visible { opacity: 1; transform: none; }

.card:hover {
  border-color: #D8D3CA;
  box-shadow: 0 8px 24px rgba(42, 42, 42, 0.07);
}

.card__modern {
  align-self: flex-start;
  margin: 0;
  padding: 6px 12px;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.05em;
  line-height: 1.35;
  text-transform: uppercase;
}

.card__patch {
  align-self: flex-start;
  margin: 8px 0 0;
  padding: 10px 16px;
  border-radius: 9px;
  background: var(--orange);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(17px, 2.2vw, 21px);
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-transform: uppercase;
  max-width: 100%;
  overflow-wrap: anywhere;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.07);
  transition: transform .25s ease;
}

.card:hover .card__patch { transform: translate(2px, -2px) rotate(-1deg); }

.card__meaning {
  margin: 16px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.card__section {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: #A8A49C;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.empty {
  margin: 48px 0 0;
  padding: 36px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}

.empty strong { color: var(--ink); font-family: var(--font-display); font-weight: 600; }

/* ---------- Партнери та організатори ---------- */

.logos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.logo { text-align: center; }

.logo__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.logo__box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 108px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.logo__box img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

.logo__link:hover .logo__box {
  border-color: #D8D3CA;
  box-shadow: 0 6px 20px rgba(42, 42, 42, 0.07);
}

.logo__name {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

.logo__link:hover .logo__name { color: var(--deep); }

.logo__note {
  display: block;
  margin: 6px auto 0;
  max-width: 260px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* плейсхолдер, поки логотип не покладено в папку */
.logo__box--missing {
  border-style: dashed;
  background: transparent;
}

.logo__missing {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #B9B4AB;
  text-align: center;
  line-height: 1.4;
}

.organizers {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

.organizers__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 28px;
}

.logos--organizers { grid-template-columns: repeat(3, 1fr); }

.logo--big .logo__box { height: 150px; padding: 24px 28px; }

.logo--big .logo__name {
  margin-top: 14px;
  font-size: 15px;
  color: var(--ink);
}

.logo__box--pair img { max-width: 44%; }

/* логотип із власним світлим тлом — підганяємо тло рамки під нього,
   щоб не було сірого прямокутника всередині білої картки */
.logo__box--flat {
  background: #E6E6E6;
  border-color: #DCDCDC;
}

/* ---------- Фотозвіт ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.shot {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--sand);
  overflow: hidden;
  cursor: pointer;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.shot:hover img { transform: scale(1.03); }

.shot--stub {
  border-style: dashed;
  background: var(--sand);
  cursor: default;
}

.shot--stub::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 46%, var(--line) 46%, var(--line) 54%, transparent 54%);
  opacity: 0.5;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(26, 24, 40, 0.92);
}

.lightbox[hidden] { display: none; }

.lightbox__img {
  max-width: 100%;
  max-height: 84vh;
  border-radius: 8px;
}

.lightbox__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.lightbox__btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease;
}

.lightbox__btn:hover { background: rgba(255, 255, 255, 0.22); }

.lightbox__close { top: 20px; right: 20px; font-size: 26px; }
.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }

body.is-locked { overflow: hidden; }

/* ---------- Підвал ---------- */

.footer {
  border-top: 1px solid var(--line);
  background: var(--sand);
  padding: 64px 0 56px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.footer__logo { width: 148px; height: auto; }

.footer__slogan {
  margin: 16px 0 0;
  max-width: 240px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.footer__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--deep);
  margin: 0 0 14px;
}

.footer__col p { margin: 0 0 8px; font-size: 15px; color: var(--muted); }

.footer__col a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); white-space: nowrap; }

.footer__col a:hover { color: var(--deep); border-color: var(--deep); }

.footer__hashtag {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--orange) !important;
  font-size: 15px !important;
}

.footer__links { display: flex; gap: 16px; }

.footer__year { color: #A8A49C !important; font-size: 14px !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .card { opacity: 1; transform: none; }
}

/* ---------- Адаптив ---------- */

@media (max-width: 900px) {
  .section { padding: 72px 0; }
  .hero { padding-top: 36px; }
  .hero__logo { margin-bottom: 32px; width: 112px; }
  .hero__media { margin-top: 48px; }
  .steps { margin: 44px 0; gap: 14px; }
  .step { padding: 22px 20px 20px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .about__cols { grid-template-columns: 1fr; gap: 32px; }
  .logos--partners { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .steps { grid-template-columns: 1fr; }

  /* фільтри — один рядок із горизонтальним прокручуванням */
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    margin: 0 calc(var(--pad) * -1);
    padding: 2px var(--pad) 8px;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: 0 0 auto; scroll-snap-align: start; }

  .logos { grid-template-columns: 1fr 1fr; }
  .logos--organizers { grid-template-columns: 1fr; }
  .logo__box { height: 92px; }
  .logo--big .logo__box { height: 118px; }
  .organizers { margin-top: 48px; padding-top: 36px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 12px; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer__brand { grid-column: 1 / -1; }
  .lightbox { padding: 16px; }
  .lightbox__btn { width: 42px; height: 42px; }
  .lightbox__prev { left: 10px; }
  .lightbox__next { right: 10px; }
}

@media (max-width: 700px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  :root { --pad: 20px; }
  .section { padding: 56px 0; }
  .hero__cta { width: 100%; justify-content: center; }
  .grid { gap: 12px; }
  .card { padding: 16px 14px 14px; }
  .card__meaning { margin: 12px 0 14px; font-size: 13px; }
  .filter { font-size: 13px; padding: 8px 13px; }
}

@media (max-width: 520px) {
  /* на вузькому екрані два стовпці лишають опису партнера смужку
     завширшки 150px — тому переходимо в один */
  .logos--partners { grid-template-columns: 1fr; }
  .logo__note { max-width: 320px; }
}

@media (max-width: 460px) {
  .grid { grid-template-columns: 1fr; }
}
