/* ============================================================
   EYP Ukraine — Website styles
   Built on the design system's landing-page skeleton
   (ui_kits/website/index.html) and extended with the language
   toggle, programme cards, join steps, and the three dynamic
   sections (events, team, partners).
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { width: min(1240px, 92vw); margin-inline: auto; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 18px; font-weight: var(--fw-bold);
}
.skip-link:focus { left: 12px; top: 12px; }

/* visible focus everywhere */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--net-sky); outline-offset: 2px;
}

/* ---------- shared brand bits ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: var(--fw-bold); font-size: var(--fs-micro);
  letter-spacing: var(--ls-wide); text-transform: uppercase;
}
.kicker::before { content: ""; width: 28px; height: 3px; background: currentColor; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: var(--fs-caption); letter-spacing: var(--ls-wide);
  text-transform: uppercase; padding: 14px 26px; border: none; cursor: pointer;
  clip-path: polygon(3% 0%, 100% 4%, 97% 100%, 0% 96%);
  transform: rotate(-2deg);
  transition: filter var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  color: #fff; background: var(--net-pink);
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: rotate(-2deg) scale(0.97); }
.btn--blue { background: var(--eyp-blue); }
.btn--yellow { background: var(--eyp-yellow); color: var(--ink); }
.btn--sky { background: var(--net-sky); }
.btn--ghost {
  background: transparent; color: var(--white);
  box-shadow: inset 0 0 0 3px var(--white); clip-path: none; transform: none;
}
.btn--ghost:hover { background: var(--white); color: var(--eyp-blue); }
.btn--ghost-blue {
  background: transparent; color: var(--eyp-blue);
  box-shadow: inset 0 0 0 3px var(--eyp-blue); clip-path: none; transform: none;
}
.btn--ghost-blue:hover { background: var(--eyp-blue); color: #fff; }

.tag {
  display: inline-block; font-weight: var(--fw-bold); font-size: var(--fs-micro);
  letter-spacing: var(--ls-wide); text-transform: uppercase; padding: 7px 15px;
  clip-path: polygon(4% 0%, 100% 8%, 96% 100%, 0% 90%); transform: rotate(-2deg);
  background: var(--eyp-yellow); color: var(--ink);
}

/* ---------- header / nav ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.94); backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--ink);
}
.nav { display: flex; align-items: center; gap: 24px; padding: 14px 0; }
.nav__logo img { height: 38px; }
.nav__links { display: flex; gap: 24px; margin-left: auto; }
.nav__links a {
  font-weight: var(--fw-semibold); font-size: 16px; padding: 4px 0;
  position: relative; color: var(--ink);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 3px; width: 0;
  background: var(--net-pink); transition: width var(--dur-base) var(--ease-out);
}
.nav__links a:hover::after, .nav__links a:focus-visible::after { width: 100%; }

/* language toggle */
.lang {
  display: inline-flex; border: 3px solid var(--ink); overflow: hidden;
  font-weight: var(--fw-bold); font-size: 14px; letter-spacing: var(--ls-wide);
}
.lang button {
  border: none; background: transparent; cursor: pointer; padding: 6px 11px;
  font: inherit; color: var(--ink); text-transform: uppercase;
  transition: background var(--dur-fast) var(--ease-out);
}
.lang button[aria-pressed="true"] { background: var(--eyp-blue); color: #fff; }
.lang button:hover[aria-pressed="false"] { background: var(--paper); }

.nav__cta { margin-left: 2px; }
.nav__burger { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; background: var(--eyp-blue); color: #fff;
  padding: 84px 0 150px; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 120px;
  background: var(--white); clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
}
.hero__grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center;
}
.hero__kicker { color: var(--eyp-yellow); margin-bottom: 22px; }
.hero h1 {
  margin: 0 0 26px; font-weight: var(--fw-black); font-size: clamp(44px, 5.4vw, 78px);
  line-height: 0.98; letter-spacing: var(--ls-tight); text-wrap: balance;
}
/* yellow highlight wipe behind the hero word */
.hero h1 .hl {
  color: var(--ink); padding: 2px 14px 6px;
  clip-path: polygon(0% 8%, 100% 0%, 99% 92%, 1% 100%);
  display: inline-block; transform: rotate(-1.5deg);
  position: relative; isolation: isolate;
  background-image: linear-gradient(var(--eyp-yellow), var(--eyp-yellow));
  background-repeat: no-repeat; background-size: 0% 100%;
}
.hl--wipe { animation: hlWipe 700ms var(--ease-out) 350ms forwards; }
@keyframes hlWipe { to { background-size: 100% 100%; } }
.hero p.lead {
  margin: 0 0 34px; font-size: clamp(18px, 1.5vw, 22px); font-weight: var(--fw-semibold);
  line-height: 1.5; max-width: 42ch; color: rgba(255,255,255,0.92);
}
.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* photo frame (zig-zag yellow offset behind the photo) */
.frame { position: relative; }
.frame__outline {
  position: absolute; inset: 22px -22px -22px 22px;
  border: var(--stroke-bold) solid var(--eyp-yellow);
  clip-path: polygon(0% 5%, 100% 0%, 99% 95%, 1% 100%);
}
.frame__img {
  position: relative; aspect-ratio: 4 / 5; background: var(--grey-300);
  clip-path: polygon(0% 5%, 100% 0%, 99% 95%, 1% 100%);
  overflow: hidden; transform: rotate(-2deg);
  display: grid; place-items: center;
}
.frame__img img { width: 100%; height: 100%; object-fit: cover; }
.frame__img span {
  color: var(--grey-700); font-weight: var(--fw-bold); font-size: var(--fs-caption);
  text-transform: uppercase; letter-spacing: var(--ls-wide); padding: 16px; text-align: center;
}
.hero .frame { transform: rotate(1deg); }

/* stat strip */
.stats { position: relative; z-index: 3; background: var(--ink); color: #fff; }
.stats__row { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.stat { padding: 26px 12px; border-right: 1px solid rgba(255,255,255,0.16); }
.stat:last-child { border-right: none; }
.stat b {
  display: block; font-weight: var(--fw-black); font-size: clamp(30px, 3vw, 44px);
  line-height: 1; color: var(--eyp-yellow);
}
.stat span {
  display: block; margin-top: 8px; font-weight: var(--fw-semibold);
  font-size: 14px; letter-spacing: var(--ls-wide); text-transform: uppercase;
  color: rgba(255,255,255,0.8);
}

/* ---------- generic section ---------- */
section { position: relative; }
.pad { padding: 96px 0; }
.sec-label { color: var(--eyp-blue); margin-bottom: 18px; }
.sec-title {
  margin: 0; font-weight: var(--fw-black); font-size: clamp(34px, 4vw, 56px);
  line-height: 1.02; letter-spacing: var(--ls-tight); text-wrap: balance;
}
.sec-head { margin-bottom: 48px; max-width: 60ch; }
.sec-head p { font-size: 19px; line-height: 1.55; color: var(--grey-700); margin: 16px 0 0; }

/* mission */
.mission__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.mission p { font-size: 20px; line-height: 1.6; font-weight: var(--fw-regular); }
.mission .lead-em { font-weight: var(--fw-semibold); }
.legit {
  margin-top: 28px; padding: 22px 24px; background: var(--paper);
  clip-path: polygon(0% 3%, 100% 0%, 100% 97%, 0% 100%);
  font-size: 16px; line-height: 1.6; color: var(--ink-soft);
}
.legit b { color: var(--eyp-blue); }
.pillars { display: flex; flex-direction: column; gap: 14px; }
.pillar {
  display: flex; gap: 18px; align-items: flex-start; padding: 22px 24px;
  background: var(--paper); clip-path: polygon(0% 3%, 100% 0%, 100% 97%, 0% 100%);
}
.pillar__no {
  font-weight: var(--fw-black); font-size: 30px; line-height: 1; color: var(--net-pink); flex: 0 0 auto;
}
.pillar h4 { margin: 0 0 4px; font-weight: var(--fw-bold); font-size: 20px; }
.pillar p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--grey-700); }

/* programmes — angled cards */
.programmes { background: var(--paper); }
.prog__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  background: var(--white); display: flex; flex-direction: column;
  box-shadow: var(--shadow-flat);
  transition: transform var(--dur-base) var(--ease-out), filter var(--dur-base) var(--ease-out);
}
.card:hover { transform: translateY(-6px); filter: brightness(1.02); }
.card__top { height: 120px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.card__top .meta {
  position: absolute; bottom: 10px; left: 14px; right: 14px;
  font-weight: var(--fw-bold); font-size: 13px; letter-spacing: var(--ls-wide);
  text-transform: uppercase; color: rgba(255,255,255,0.92);
}
.card__top span.glyph {
  font-weight: var(--fw-black); font-size: 52px; color: rgba(255,255,255,0.95); line-height: 1;
}
.card:nth-child(5n+1) .card__top { background: var(--eyp-blue); }
.card:nth-child(5n+2) .card__top { background: var(--net-pink); }
.card:nth-child(5n+3) .card__top { background: var(--net-sky); }
.card:nth-child(5n+4) .card__top { background: var(--net-indigo); }
.card:nth-child(5n+5) .card__top { background: var(--net-green); }
.card__body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.card__body h3 { margin: 0 0 12px; font-weight: var(--fw-bold); font-size: 23px; }
.card__body p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--grey-700); flex: 1; }

/* how to join — numbered steps */
.join__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-bottom: 44px; }
.step {
  display: flex; gap: 20px; align-items: flex-start; padding: 26px 28px;
  background: var(--white); border-left: 6px solid var(--eyp-yellow);
  box-shadow: var(--shadow-flat);
}
.step__no {
  flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--eyp-blue); color: #fff; font-weight: var(--fw-black); font-size: 22px;
  clip-path: polygon(6% 0, 100% 6%, 94% 100%, 0 94%);
}
.step:nth-child(4) { border-left-color: var(--net-pink); }
.step:nth-child(4) .step__no { background: var(--net-pink); }
.step h4 { margin: 0 0 6px; font-weight: var(--fw-bold); font-size: 20px; }
.step p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--grey-700); }
.join { background: var(--white); }
.join__cta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* impact band (yellow) */
.impact { background: var(--eyp-yellow); color: var(--ink); position: relative; }
.impact .pad { padding: 64px 0; }
.impact__grid { display: grid; grid-template-columns: 1.1fr 2fr; gap: 48px; align-items: center; }
.impact h2 { margin: 0; font-weight: var(--fw-black); font-size: clamp(30px, 3.4vw, 48px); line-height: 1.02; }
.impact__nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.impact__nums .n b {
  display: block; font-weight: var(--fw-black); font-size: clamp(40px, 4.5vw, 64px);
  line-height: 1; color: var(--eyp-blue);
}
.impact__nums .n span { font-weight: var(--fw-bold); font-size: 15px; text-transform: uppercase; letter-spacing: var(--ls-wide); }

/* events */
.events { background: var(--paper); }
.events__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.event {
  background: var(--white); display: flex; flex-direction: column;
  box-shadow: var(--shadow-flat);
  transition: transform var(--dur-base) var(--ease-out);
}
.event:hover { transform: translateY(-6px); }
.event__img {
  aspect-ratio: 16 / 10; background: var(--grey-300); overflow: hidden;
  display: grid; place-items: center; position: relative;
}
.event__img img { width: 100%; height: 100%; object-fit: cover; }
.event__date {
  position: absolute; top: 12px; left: 12px; background: var(--eyp-blue); color: #fff;
  font-weight: var(--fw-bold); font-size: 13px; letter-spacing: var(--ls-wide);
  padding: 6px 12px; text-transform: uppercase;
  clip-path: polygon(4% 0%, 100% 8%, 96% 100%, 0% 90%);
}
.event__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.event__body h3 { margin: 0 0 6px; font-weight: var(--fw-bold); font-size: 21px; line-height: 1.15; }
.event__loc { font-weight: var(--fw-semibold); font-size: 14px; color: var(--net-pink); text-transform: uppercase; letter-spacing: var(--ls-wide); margin: 0 0 12px; }
.event__body p { margin: 0 0 16px; font-size: 15px; line-height: 1.55; color: var(--grey-700); flex: 1; }
.event__link { font-weight: var(--fw-bold); font-size: 13px; text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--eyp-blue); display: inline-flex; gap: 7px; }
.event__link:hover { gap: 12px; }

/* team */
.team__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.member { text-align: center; }
.member__frame { position: relative; margin-bottom: 18px; }
.member__outline {
  position: absolute; inset: 12px -12px -12px 12px;
  border: var(--stroke-thin) solid var(--eyp-yellow);
  clip-path: polygon(0% 4%, 100% 0%, 99% 96%, 1% 100%);
}
.member__photo {
  position: relative; aspect-ratio: 1 / 1; background: var(--grey-300);
  clip-path: polygon(0% 4%, 100% 0%, 99% 96%, 1% 100%);
  overflow: hidden; transform: rotate(-2deg); display: grid; place-items: center;
}
.member__photo img { width: 100%; height: 100%; object-fit: cover; }
.member__photo .ph {
  font-weight: var(--fw-black); font-size: 34px; color: var(--white);
}
.member:nth-child(7n+1) .member__photo { background: var(--eyp-blue); }
.member:nth-child(7n+2) .member__photo { background: var(--net-pink); }
.member:nth-child(7n+3) .member__photo { background: var(--net-sky); }
.member:nth-child(7n+4) .member__photo { background: var(--net-indigo); }
.member:nth-child(7n+5) .member__photo { background: var(--net-green); }
.member:nth-child(7n+6) .member__photo { background: var(--net-maroon); }
.member:nth-child(7n+7) .member__photo { background: var(--eyp-blue-deep); }
.member h4 { margin: 0 0 4px; font-weight: var(--fw-bold); font-size: 18px; }
.member__role { font-size: 14px; line-height: 1.4; color: var(--grey-700); font-weight: var(--fw-semibold); }
.member__socials { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.member__socials a { width: 30px; height: 30px; display: grid; place-items: center; background: var(--paper); transition: background var(--dur-fast) var(--ease-out); clip-path: polygon(8% 0, 100% 8%, 92% 100%, 0 92%); }
.member__socials a:hover { background: var(--eyp-yellow); }

/* partners */
.partners { background: var(--white); }
.partners__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.partner {
  aspect-ratio: 3 / 2; background: var(--paper); display: grid; place-items: center;
  padding: 22px; clip-path: polygon(0% 4%, 100% 0%, 100% 96%, 0% 100%);
  transition: filter var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.partner:hover { filter: brightness(0.97); transform: translateY(-4px); }
.partner img { max-height: 70px; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: 0.78; transition: filter var(--dur-base), opacity var(--dur-base); }
.partner:hover img { filter: grayscale(0); opacity: 1; }
.partner__name { font-weight: var(--fw-bold); font-size: 18px; color: var(--grey-700); text-align: center; }

/* loading + status */
.loading { text-align: center; padding: 40px 0; color: var(--grey-700); font-weight: var(--fw-semibold); }
.skeleton { background: linear-gradient(90deg, var(--paper) 25%, #e8e8e8 50%, var(--paper) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.is-empty-note { font-size: 14px; color: var(--grey-700); margin-top: 18px; }

/* testimonial */
.quote { background: var(--white); }
.quote__box { position: relative; max-width: 900px; margin-inline: auto; text-align: center; padding: 24px 20px; }
.quote__mark { font-weight: var(--fw-black); font-size: 140px; line-height: 0.6; color: var(--net-pink); }
.quote blockquote {
  margin: 0 0 28px; font-weight: var(--fw-bold); font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.18; letter-spacing: var(--ls-tight); text-wrap: balance;
}
.quote figcaption { font-weight: var(--fw-semibold); font-size: 18px; }
.quote figcaption b { color: var(--eyp-blue); }
.quote figcaption span { display: block; color: var(--grey-700); font-size: 15px; margin-top: 2px; text-transform: uppercase; letter-spacing: var(--ls-wide); }

/* final CTA */
.final { background: var(--net-pink); color: #fff; text-align: center; position: relative; overflow: hidden; }
.final .pad { padding: 84px 0; }
.final h2 { margin: 0 0 14px; font-weight: var(--fw-black); font-size: clamp(34px, 4.4vw, 60px); line-height: 1; text-transform: uppercase; }
.final p { margin: 0 0 32px; font-size: 20px; font-weight: var(--fw-semibold); opacity: 0.95; }

/* footer */
footer { background: var(--net-slate); color: rgba(255,255,255,0.82); }
.foot { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr; gap: 40px; padding: 72px 0 40px; }
.foot__brand img { height: 40px; margin-bottom: 18px; }
.foot__brand p { font-size: 15px; line-height: 1.6; max-width: 32ch; }
.foot h5 { margin: 0 0 16px; font-weight: var(--fw-bold); font-size: 13px; text-transform: uppercase; letter-spacing: var(--ls-wide); color: #fff; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.foot a { font-size: 15px; }
.foot a:hover { color: var(--eyp-yellow); }
.foot__contact { font-size: 15px; line-height: 1.7; }
.foot__contact a { color: var(--eyp-yellow); }
.socials { display: flex; gap: 12px; margin-top: 12px; }
.socials a {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: rgba(255,255,255,0.08); transition: background var(--dur-base) var(--ease-out);
  clip-path: polygon(6% 0, 100% 6%, 94% 100%, 0 94%);
}
.socials a:hover { background: var(--eyp-yellow); color: var(--net-slate); }
.foot__bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding: 22px 0; display: flex;
  justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px;
}
.foot__legal { max-width: 60ch; line-height: 1.5; }

/* ---------- scroll-reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-tilt] { transform: translateY(16px) rotate(0deg); }
.reveal[data-tilt].in { transform: rotate(-2deg); }
/* stagger children */
.stagger > * { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(2) { transition-delay: 70ms; }
.stagger.in > *:nth-child(3) { transition-delay: 140ms; }
.stagger.in > *:nth-child(4) { transition-delay: 210ms; }
.stagger.in > *:nth-child(5) { transition-delay: 280ms; }
.stagger.in > *:nth-child(6) { transition-delay: 350ms; }
.stagger.in > *:nth-child(7) { transition-delay: 420ms; }
.stagger.in > *:nth-child(8) { transition-delay: 490ms; }

/* bilingual visibility helper */
[data-lang-hide] { display: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .cards, .events__grid { grid-template-columns: repeat(2, 1fr); }
  .team__grid { grid-template-columns: repeat(3, 1fr); }
  .partners__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 920px) {
  .nav__links { display: none; }
  .nav__burger { display: inline-flex; margin-left: auto; }
  .nav.is-open .nav__links {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: #fff; padding: 18px 4vw; gap: 14px;
    border-bottom: 3px solid #000;
  }
  .hero__grid, .mission__grid, .opp__grid, .impact__grid, .join__grid { grid-template-columns: 1fr; }
  .hero .frame, .opp .frame { max-width: 420px; }
  .cards, .events__grid { grid-template-columns: 1fr; }
  .team__grid { grid-template-columns: repeat(2, 1fr); }
  .partners__grid { grid-template-columns: repeat(2, 1fr); }
  .stats__row { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid rgba(255,255,255,0.16); }
  .foot { grid-template-columns: 1fr 1fr; }
  .pad { padding: 72px 0; }
}
@media (max-width: 560px) {
  .team__grid { grid-template-columns: 1fr 1fr; }
  .nav__logo img { height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .stagger > *, .reveal[data-tilt] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .reveal[data-tilt].in { transform: rotate(-2deg) !important; }
  .hl--wipe { animation: none; background-size: 100% 100%; }
  .skeleton { animation: none; }
  .card:hover, .event:hover, .partner:hover, .member:hover { transform: none; }
}
