/* Youth Plug, jua rada.
   Design tokens: red #BF2933, orange #F4A42C, teal #00AB9E, ink #231F20,
   tints #FBE9EA #FEF1DC #E3F5F3 #F5F3EF. Display: Anton. Body: Satoshi (DM Sans fallback). */

/* Body face: DM Sans (self-hosted). To use Satoshi, add its @font-face in fonts.css; it is already first in the stack. */

:root {
  --red: #BF2933; --orange: #F4A42C; --teal: #00AB9E; --ink: #231F20;
  --red-tint: #FBE9EA; --orange-tint: #FEF1DC; --teal-tint: #E3F5F3; --warm: #F5F3EF;
  --muted: #4A4547;
  --g: clamp(20px, 5vw, 40px);
  --header-h: 88px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: #FFFFFF; color: var(--ink);
  font-family: 'Satoshi', 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: var(--ink); }
a:where(:not([class])):hover, .yp-rt a:hover, .yp-prose a:hover { color: var(--red); }
::selection { background: var(--orange); color: var(--ink); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; }

.skip {
  position: fixed; left: 16px; top: -80px; z-index: 200; padding: 12px 18px;
  background: var(--ink); color: #FFFFFF; border-radius: 999px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 16px; color: #FFFFFF; }

main { display: block; padding-top: var(--header-h); overflow-x: clip; }
.yp-page { overflow-x: clip; }

/* ---------- Header ---------- */
.hdr {
  position: fixed; inset: 0 0 auto; z-index: 60; height: var(--header-h);
  transition: background-color .4s ease, box-shadow .4s ease, transform .5s var(--ease-out);
}
.hdr.is-scrolled { background: rgba(255,255,255,.86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 rgba(35,31,32,.06); }
.hdr.is-hidden { transform: translateY(-100%); }
.hdr__in { max-width: 1320px; height: 100%; margin: 0 auto; padding: 0 var(--g); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hdr__logo img { height: 52px; width: auto; display: block; }
.hdr__nav { display: flex; gap: 30px; font-size: 15px; font-weight: 500; }
.hdr__nav a { position: relative; text-decoration: none; padding: 6px 0; }
.hdr__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 2px;
  background: var(--orange); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out);
}
.hdr__nav a:hover::after, .hdr__nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.hdr__nav a[aria-current="page"] { font-weight: 700; }
.hdr__nav a:hover { color: var(--ink); }
.hdr__cta {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px;
  background: var(--red); color: #FFFFFF; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none;
}
.hdr__cta:hover { color: #FFFFFF; }
.hdr__burger {
  display: none; width: 52px; height: 52px; border: 0; border-radius: 50%; background: var(--ink); color: #FFFFFF;
  cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 6px;
}
.hdr__burger span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .35s var(--ease-out); }
.menu-open .hdr__burger span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .hdr__burger span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 1080px) {
  .hdr__nav, .hdr__cta { display: none; }
  .hdr__burger { display: inline-flex; }
  :root { --header-h: 76px; }
  .hdr__logo img { height: 44px; }
}

/* ---------- Mobile menu ---------- */
.mnav {
  position: fixed; inset: 0; z-index: 55; background: var(--ink); color: #FFFFFF;
  padding: calc(var(--header-h) + 24px) var(--g) 40px; display: flex; flex-direction: column; justify-content: space-between;
  visibility: hidden; clip-path: inset(0 0 100% 0);
}
.mnav a { color: #FFFFFF; text-decoration: none; }
.mnav__links { display: flex; flex-direction: column; gap: 4px; }
.mnav__links a { font-family: 'Anton', Impact, sans-serif; text-transform: uppercase; font-size: clamp(44px, 11vw, 72px); line-height: 1.05; display: block; overflow: hidden; }
.mnav__links a span { display: inline-block; }
.mnav__links a[aria-current="page"] { color: var(--orange); }
.mnav__foot { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; color: #D9D4D0; font-size: 15px; }
.menu-open .hdr { background: transparent; box-shadow: none; backdrop-filter: none; }
.menu-open .hdr__logo img { filter: brightness(0) invert(1); }
.menu-open .hdr__burger { background: #FFFFFF; color: var(--ink); }

/* ---------- Loader: the plug ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--ink); color: #FFFFFF;
  display: none; align-items: center; justify-content: center; overflow: hidden;
}
.is-loading .loader { display: flex; }
.loader__stage { position: relative; width: min(560px, 88vw); }
.loader__svg { width: 100%; height: auto; display: block; overflow: visible; }
.loader__flash { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: #FFFFFF; transform: scale(0); }
.loader__word { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--ink); pointer-events: none; }
.loader__word b { font-family: 'Anton', Impact, sans-serif; font-weight: 400; text-transform: uppercase; font-size: clamp(56px, 12vw, 120px); line-height: .9; letter-spacing: .005em; display: block; overflow: hidden; }
.loader__word b span { display: inline-block; }
.loader__word i { font-style: normal; font-weight: 700; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.loader__status { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #8A8385; }

/* ---------- Page transition ---------- */
.pt { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.pt__panel { position: absolute; inset: 0; visibility: hidden; }
.js .pt__panel { visibility: visible; transform: translateY(101%); }
.pt__panel:nth-child(1) { background: var(--orange); }
.pt__panel:nth-child(2) { background: var(--red); }
.pt__panel:nth-child(3) { background: var(--ink); display: flex; align-items: center; justify-content: center; }
.pt__panel img { width: 120px; height: auto; filter: brightness(0) invert(1); opacity: 0; }
.is-entering .pt__panel { transform: translateY(0); }
.is-entering .pt__panel img { opacity: 1; }

/* ---------- Lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 95; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(20,17,18,.88); }
.lb.is-open { display: flex; }
.lb__frame { position: relative; width: min(420px, 100%); aspect-ratio: 9 / 16; max-height: 86vh; border-radius: 28px; overflow: hidden; background: #000; box-shadow: 0 40px 120px rgba(0,0,0,.5); }
.lb__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lb__close { position: absolute; right: 20px; top: 20px; width: 52px; height: 52px; border: 0; border-radius: 50%; background: #FFFFFF; color: var(--ink); font-size: 22px; font-weight: 700; cursor: pointer; }

/* ---------- Components carried over from the design ---------- */
.m-lift { transition: transform .45s var(--ease-out), box-shadow .45s ease; }
.m-lift:hover { transform: translateY(-6px); }
.m-zoom { overflow: hidden; }
.m-zoom img { transition: transform .8s var(--ease-out); will-change: transform; }
.m-zoom:hover img { transform: scale(1.05); }
.m-btn { transition: background-color .25s ease, color .25s ease; will-change: transform; }
.m-btn:hover { filter: brightness(1.06); }

.m-track { display: flex; gap: 56px; align-items: center; width: max-content; animation: m-marquee 36s linear infinite; }
@keyframes m-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.m-logo { filter: grayscale(1); opacity: .6; transition: filter .3s ease, opacity .3s ease; }
.m-logo:hover { filter: none; opacity: 1; }
.t-up { animation: t-up 40s linear infinite; }
.t-down { animation: t-down 46s linear infinite; }
@keyframes t-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes t-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.t-wall:hover .t-up, .t-wall:hover .t-down { animation-play-state: paused; }
.m-pulse { animation: m-pulse 2.2s ease-out infinite; }
@keyframes m-pulse { 0% { box-shadow: 0 0 0 0 rgba(191,41,51,.55); } 100% { box-shadow: 0 0 0 30px rgba(191,41,51,0); } }
.chip { position: relative; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--ink) !important; color: #FFFFFF; }
.chip:has(input:focus-visible) { outline: 3px solid var(--red); outline-offset: 2px; }
.f-in:focus { outline: 3px solid var(--red); outline-offset: 2px; background: #FFFFFF !important; }
.form-note { font-size: 15px; font-weight: 700; color: #00786F; }
.form-note.is-error { color: var(--red); }

/* Kibaraza bento gallery */
.kb-bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 17vw, 240px); grid-auto-flow: dense; gap: 14px; }
.kb-tile { display: block; border-radius: 24px; cursor: zoom-in; }
@media (max-width: 720px) { .kb-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; gap: 10px; } }
.lb.is-image .lb__frame { width: auto; max-width: min(1200px, 92vw); aspect-ratio: auto; max-height: 86vh; background: transparent; box-shadow: none; }
.lb.is-image .lb__frame img { display: block; max-width: 100%; max-height: 86vh; border-radius: 24px; }

/* Split text helpers */
.split-line { padding-bottom: .06em; margin-bottom: -.06em; }

@media (prefers-reduced-motion: reduce) {
  .m-track, .t-up, .t-down, .m-pulse { animation: none; }
  .m-lift, .m-zoom img, .m-btn { transition: none; }
  .m-lift:hover { transform: none; }
}

@media (max-width: 640px) {
  .hide-sm { display: none !important; }
}

/* ---------- Cookie banner ---------- */
.cc { position: fixed; left: var(--g); right: var(--g); bottom: 20px; z-index: 80; display: flex; justify-content: flex-start; pointer-events: none; }
.cc[hidden] { display: none; }
.cc__in { pointer-events: auto; width: min(560px, 100%); display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: start; padding: 22px; background: #FFFFFF; border-radius: 28px; box-shadow: 0 30px 80px rgba(35,31,32,.22), 0 0 0 1px rgba(35,31,32,.05); }
.cc__badge { width: 48px; height: 48px; border-radius: 50%; background: var(--orange-tint); display: flex; align-items: center; justify-content: center; }
.cc__title { margin: 0 0 4px; font-family: 'Anton', Impact, sans-serif; text-transform: uppercase; font-size: 22px; line-height: 1.1; }
.cc__text { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.cc__text a { font-weight: 700; }
.cc__btns { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cc__btn { min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--ink); color: #FFFFFF; font-weight: 700; font-size: 15px; cursor: pointer; transition: transform .2s ease, background-color .2s ease; }
.cc__btn:hover { transform: translateY(-2px); }
.cc__btn--ghost { background: var(--warm); color: var(--ink); }
@media (max-width: 520px) { .cc { bottom: 12px; } .cc__btns .cc__btn { flex: 1 1 auto; } }
.lb__yt { position: absolute; left: 50%; bottom: -44px; transform: translateX(-50%); white-space: nowrap; color: #FFFFFF; font-size: 14px; font-weight: 700; }
.lb__yt:hover { color: var(--orange); }
.lb__frame { overflow: visible; }
.lb__frame iframe { border-radius: 28px; }

.cs-tile .m-zoom { cursor: zoom-in; }


/* ---------- WordPress and Pencilino integration ---------- */
.yp-contents, .yp-btn-wrap { display: contents; }
.yp-icon-btn .pencil-button__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pencil-button__text { display: inline; }
.yp-rt p, .yp-rt ul, .yp-rt ol { margin: 0; }
.yp-rt--stack p + p { margin-top: 24px; }
.yp-rt a { font-weight: 700; }
.pencil-managed-region { min-width: 0; }

/* Main menu (WordPress Menus) */
.hdr__managed, .hdr__list { height: 100%; }
.hdr__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 30px; }
.hdr__list > li { position: relative; }
.hdr__list a { position: relative; display: inline-block; text-decoration: none; padding: 6px 0; }
.hdr__list a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 2px; background: var(--orange); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out); }
.hdr__list a:hover::after, .hdr__list .current-menu-item > a::after, .hdr__list .current-page-ancestor > a::after { transform: scaleX(1); transform-origin: left; }
.hdr__list .current-menu-item > a, .hdr__list .current-page-ancestor > a { font-weight: 700; }
.hdr__list .sub-menu { position: absolute; top: 100%; left: -18px; min-width: 220px; list-style: none; margin: 10px 0 0; padding: 12px; background: #FFFFFF; border-radius: 20px; box-shadow: 0 24px 60px rgba(35,31,32,.16); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .25s ease, transform .25s ease, visibility .25s; }
.hdr__list li:hover > .sub-menu, .hdr__list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.hdr__list .sub-menu a { display: block; padding: 8px 10px; }
.hdr__list .sub-menu a::after { display: none; }
.mnav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mnav__list a { font-family: 'Anton', Impact, sans-serif; text-transform: uppercase; font-size: clamp(44px, 11vw, 72px); line-height: 1.05; display: block; overflow: hidden; color: #FFFFFF; text-decoration: none; }
.mnav__list a span { display: inline-block; }
.mnav__list .current-menu-item > a { color: var(--orange); }
.mnav__list .sub-menu { list-style: none; margin: 0 0 8px; padding: 0 0 0 4px; }
.mnav__list .sub-menu a { font-size: clamp(24px, 6vw, 34px); }

/* Notebook post body (WordPress content) */
.yp-prose { display: flex; flex-direction: column; gap: 26px; font-size: 20px; line-height: 1.75; }
.yp-prose > * { margin: 0; }
.yp-prose h2 { margin-top: 24px; font-family: 'Anton', Impact, sans-serif; font-weight: 400; text-transform: uppercase; font-size: clamp(32px, 3.4vw, 44px); line-height: 1.05; }
.yp-prose h3 { font-size: 26px; line-height: 1.25; }
.yp-prose blockquote, .yp-prose .wp-block-quote { margin: 8px 0; padding: 32px 36px; background: var(--orange-tint); border: 0; border-radius: 28px; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.4; font-weight: 500; }
.yp-prose blockquote p { margin: 0; }
.yp-prose ul, .yp-prose ol { padding-left: 24px; display: flex; flex-direction: column; gap: 10px; }
.yp-prose img { border-radius: 24px; height: auto; }
.yp-prose a { font-weight: 700; }
.yp-prose > p:first-child { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.5; font-weight: 500; }

/* Pencilino edit mode switched on: everything static and visible so the editor stays aligned */
.pencil-selection-active .m-track, .pencil-selection-active .t-up, .pencil-selection-active .t-down, .pencil-selection-active .m-pulse { animation: none; }
.pencil-selection-active .loader, .pencil-selection-active .pt { display: none !important; }
.pencil-selection-active .m-lift:hover, .pencil-selection-active .m-zoom:hover img { transform: none; }
.pencil-managed-region > a[data-reel] { margin-inline: auto; }
a[data-reel] { cursor: pointer; }

/* ---------- v1.2 refinements ---------- */
.yp-nowrap { white-space: nowrap; }
.yp-red { color: var(--red); }
.yp-sticker-hot { background: var(--red) !important; color: #FFFFFF !important; }
.yp-tw-lede { margin: 0; font-size: clamp(26px, 2.8vw, 38px); line-height: 1.3; font-weight: 500; color: var(--ink); max-width: 520px; }
.yp-btn-ink { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 28px; background: var(--ink); color: #FFFFFF !important; border: 0; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; }
.yp-btn-ink:hover { color: #FFFFFF; }

/* Scribbling pen beside the Notebook headings */
.yp-pen { display: inline-block; width: .72em; height: .72em; margin-left: .18em; vertical-align: -.04em; color: var(--red); }
.yp-pen svg { width: 100%; height: 100%; overflow: visible; }
.yp-pen__body { stroke-dasharray: 160; animation: yp-pen-wiggle 2.8s ease-in-out infinite; transform-origin: 30% 70%; transform-box: fill-box; }
.yp-pen__scribble { stroke: var(--orange); stroke-dasharray: 70; stroke-dashoffset: 70; animation: yp-pen-scribble 2.8s ease-in-out infinite; }
@keyframes yp-pen-scribble { 0%, 12% { stroke-dashoffset: 70; } 55%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -70; } }
@keyframes yp-pen-wiggle { 0%, 100% { transform: rotate(0deg) translateX(0); } 25% { transform: rotate(-6deg) translateX(-1px); } 55% { transform: rotate(5deg) translateX(2px); } 80% { transform: rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .yp-pen__body, .yp-pen__scribble { animation: none; stroke-dashoffset: 0; } }

/* Our FYP: fuller left column, tighter featured reel */
.yp-reels-small { max-width: none !important; }
a[data-reel].m-zoom[class*="ys-"] { max-width: 420px; }

/* Programs: six Kibaraza stats in rows of three */
.yp-stats-6 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)) !important; }
.yp-stat-word { font-size: clamp(40px, 3.6vw, 56px) !important; }

/* Contact map */
.yp-map { position: relative; aspect-ratio: 21 / 8; border-radius: 36px; overflow: hidden; background: var(--teal-tint); }
.yp-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yp-map__cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; font-size: 17px; color: var(--muted); }
.yp-map__pin { width: 44px; height: 44px; border-radius: 50% 50% 50% 0; background: var(--red); transform: rotate(-45deg); box-shadow: 0 10px 24px rgba(191,41,51,.3); }
.yp-map.is-loaded .yp-map__cover { display: none; }
@media (max-width: 720px) { .yp-map { aspect-ratio: 4 / 5; } }

/* Testimonials: one readable column on phones */
@media (max-width: 720px) {
  .t-wall { grid-template-columns: minmax(0, 1fr) !important; height: 620px !important; }
  .t-down { display: none !important; }
  .t-up { animation-duration: 60s; }
}

/* Notebook pagination */
.yp-loadmore { display: flex; justify-content: center; margin-top: 48px; }
.yp-loadmore:empty { display: none; }
.yp-loadmore .is-busy { opacity: .6; pointer-events: none; }
.yp-empty { margin: 0; font-size: 18px; color: var(--muted); }

/* Post likes */
.yp-like { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px 0 14px; margin-right: 6px; border: 2px solid var(--red); border-radius: 999px; background: #FFFFFF; color: var(--red); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: background-color .25s ease, color .25s ease, transform .2s ease; }
.yp-like:hover { transform: translateY(-2px); }
.yp-like__heart { fill: none; stroke: currentColor; stroke-width: 2; transition: fill .25s ease; }
.yp-like.is-liked { background: var(--red); color: #FFFFFF; }
.yp-like.is-liked .yp-like__heart { fill: currentColor; }
.yp-like:disabled { cursor: progress; }
.yp-like:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
