/* ============================================================
   FETAI · MK · SHTRESA KINETIKE
   Kjo shtresë nuk shton tekst. Ajo shton lëvizje.
   Ideja: faqja të mos lexohet si gazetë, por të shpaloset si
   një film i shkurtër — fotografia lëviz me rrëshqitjen, teksti
   hyn i qetë nga poshtë, dhe ari shfaqet vetëm ku duhet vëmendja.
   Ngarkohet pas fetai-mk.css, prandaj fjala e fundit është e saj.
   ============================================================ */

/* ---------- 0 · Bazat ---------- */
:root {
  --kx-ease: cubic-bezier(0.22, 0.61, 0.24, 1);
  --kx-slow: cubic-bezier(0.16, 1, 0.3, 1);
  --kx-gold: #c9a96e;
  --kx-gold-hi: #e6cf9d;
  --kx-jade: #0a1a13;
}

/* Rrëshqitja e butë vetëm aty ku përdoruesi nuk e ka ndaluar lëvizjen. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ============================================================
   1 · HYRJA E SEKSIONEVE
   Klasa .rise është e vendosur tashmë në dhjetëra blloqe.
   Deri tani nuk bënte asgjë. Tani ajo është motori i hyrjes.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .js .rise {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    filter: blur(6px);
    transition: opacity 0.9s var(--kx-slow), transform 1s var(--kx-slow), filter 0.9s var(--kx-slow);
    will-change: opacity, transform;
  }
  .js .rise.in {
    opacity: 1;
    transform: none;
    filter: none;
  }
  /* Fëmijët e një rrjeti hyjnë njëri pas tjetrit, jo të gjithë përnjëherë. */
  .js .rise.in > * { animation: kxChild 0.8s var(--kx-slow) both; }
  .js .rise.in > *:nth-child(2) { animation-delay: 0.06s; }
  .js .rise.in > *:nth-child(3) { animation-delay: 0.12s; }
  .js .rise.in > *:nth-child(4) { animation-delay: 0.18s; }
  .js .rise.in > *:nth-child(5) { animation-delay: 0.24s; }
  .js .rise.in > *:nth-child(n+6) { animation-delay: 0.3s; }
}
@keyframes kxChild {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; transform: none; }
}
html:not(.js) .rise { opacity: 1; transform: none; filter: none; }

/* Kur shfletuesi di të lidhë animacionin me rrëshqitjen, e bëjmë të vazhdueshme:
   bllokut nuk i "ndizet" hyrja, ai rrjedh bashkë me gishtin. */
/* Shënim: hyrja e blloqeve mbetet me IntersectionObserver, jo me
   animation-timeline. Arsyeja është praktike: një seksion më i lartë se
   ekrani do të rrinte i turbullt gjatë gjithë rrëshqitjes. Lëvizja e
   lidhur me rrëshqitjen përdoret vetëm aty ku ka kuptim — te kokat dhe
   te bandat e fotografive, që janë gjithmonë sa një ekran. */

/* ============================================================
   2 · KOKA E FAQES SI KAMERË
   Fotografia niset pak më e madhe dhe ulet ngadalë; teksti
   ngrihet dhe zbehet kur del nga pamja. Kjo është e gjithë
   ndjesia "makinë sportive" — një lëvizje e vetme, e ngadaltë,
   pa kërcime.
   ============================================================ */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .page-hero { view-timeline-name: --kxhero; view-timeline-axis: block; }
    .page-hero-photo img {
      animation: kxHeroZoom linear both;
      animation-timeline: --kxhero;
      animation-range: entry 0% exit 100%;
    }
    .page-hero-text {
      animation: kxHeroLift linear both;
      animation-timeline: --kxhero;
      animation-range: cover 34% exit 92%;
    }
    .page-hero .hero-seal {
      animation: kxSeal linear both;
      animation-timeline: --kxhero;
      animation-range: entry 0% exit 100%;
    }
  }
}
@keyframes kxHeroZoom {
  from { transform: scale(1.16) translate3d(0, -1.5%, 0); }
  to   { transform: scale(1.02) translate3d(0, 5%, 0); }
}
@keyframes kxHeroLift {
  0%, 40% { opacity: 1; transform: none; }
  100%    { opacity: 0.15; transform: translate3d(0, -46px, 0); }
}
@keyframes kxSeal {
  from { transform: rotate(-7deg) scale(0.94); opacity: 0.03; }
  to   { transform: rotate(6deg) scale(1.06); opacity: 0.09; }
}

/* Vija e artë nën kokë rritet kur faqja hapet. */
.page-hero-line { transform-origin: left center; }
.js .page-hero.lit .page-hero-line { animation: kxLine 1.5s var(--kx-slow) 0.25s both; }
@keyframes kxLine { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ============================================================
   3 · TITUJT QË SHKRUHEN
   Çdo h2 seksioni merr një kalim ari nga e majta në të djathtë
   kur hyn në pamje. Pa JavaScript shtesë: vetëm background-size.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .js .section-title, .js .prose-side h2 {
    background-image: linear-gradient(90deg, var(--kx-gold) 0%, var(--kx-gold) 50%, currentColor 50%, currentColor 100%);
    background-size: 220% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    transition: background-position 1.4s var(--kx-slow);
  }
  .js .section-header.in .section-title,
  .js .rise.in .prose-side h2 { background-position: 0 0; }
}

/* ============================================================
   4 · BANDË FOTOGRAFIE NË TËRË GJERËSINË
   Një ndalesë vizuale midis dy blloqeve teksti. Fotografia
   qëndron e ngulitur ndërsa faqja rrëshqet mbi të.
   ============================================================ */
.kx-band {
  position: relative;
  margin: clamp(48px, 8vw, 104px) 0;
  background: var(--kx-jade);
}
.kx-band-track { height: clamp(420px, 78vh, 760px); }
.kx-band-frame {
  position: sticky; top: 0;
  height: clamp(420px, 78vh, 760px);
  overflow: hidden;
  display: grid;
  isolation: isolate;
}
.kx-band-frame img {
  grid-area: 1 / 1;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.14);
  will-change: transform;
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .kx-band-track { view-timeline-name: --kxband; view-timeline-axis: block; }
    .kx-band-frame img {
      animation: kxBandZoom linear both;
      animation-timeline: --kxband;
      animation-range: entry 0% exit 100%;
    }
  }
}
@keyframes kxBandZoom {
  from { transform: scale(1.22) translate3d(0, -3%, 0); }
  to   { transform: scale(1.02) translate3d(0, 3%, 0); }
}
.kx-band-veil {
  grid-area: 1 / 1; z-index: 1;
  background: linear-gradient(180deg, rgba(5,16,11,0.55) 0%, rgba(5,16,11,0.12) 42%, rgba(5,16,11,0.78) 100%);
}
.kx-band-text {
  grid-area: 1 / 1; z-index: 2;
  align-self: end;
  overflow: hidden;
  padding: clamp(22px, 5vw, 64px);
  max-width: 34ch;
  color: #fff;
}
.kx-band-text b {
  display: block;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(1.6rem, 3.6vw, 2.7rem);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.kx-band-text b em { color: var(--kx-gold-hi); font-style: italic; }
.kx-band-text span {
  display: block;
  margin-top: 0.6em;
  font-size: clamp(0.9rem, 1.6vw, 1.02rem);
  opacity: 0.86;
  line-height: 1.5;
}
.kx-band-text a {
  display: inline-flex; align-items: center; gap: 0.5em;
  margin-top: 1.1em;
  color: var(--kx-gold-hi);
  text-decoration: none;
  border-bottom: 1px solid rgba(230,207,157,0.4);
  padding-bottom: 2px;
  transition: gap 0.35s var(--kx-ease), border-color 0.35s;
}
.kx-band-text a:hover { gap: 0.9em; border-color: var(--kx-gold-hi); }

/* ============================================================
   5 · SHINA HORIZONTALE E TRAJTIMEVE
   Pak fjalë, shumë fotografi. Rrëshqitet me gisht, me miun ose
   me tastierë. Çdo kartë është një derë drejt një faqeje.
   ============================================================ */
.kx-rail-wrap { margin: clamp(40px, 7vw, 92px) 0; }
.kx-rail-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1em; flex-wrap: wrap;
  margin-bottom: clamp(16px, 2.4vw, 28px);
}
.kx-rail-head h2 {
  margin: 0;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  font-weight: 500;
  line-height: 1.1;
}
.kx-rail-hint {
  font-family: Jost, system-ui, sans-serif;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0.55;
}
.kx-rail {
  display: flex; gap: clamp(12px, 1.6vw, 22px);
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-left: clamp(16px, 5vw, 64px);
  padding: 4px clamp(16px, 5vw, 64px) 22px;
  margin: 0 calc(-1 * clamp(16px, 5vw, 64px));
  scrollbar-width: thin;
  scrollbar-color: rgba(201,169,110,0.5) transparent;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}
.kx-rail.kx-drag { cursor: grabbing; scroll-snap-type: none; }
.kx-rail::-webkit-scrollbar { height: 3px; }
.kx-rail::-webkit-scrollbar-thumb { background: rgba(201,169,110,0.5); border-radius: 3px; }
.kx-card {
  position: relative;
  flex: 0 0 auto;
  width: clamp(230px, 30vw, 340px);
  aspect-ratio: 3 / 4.2;
  scroll-snap-align: start;
  border-radius: 3px;
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: #fff;
  background: #08150f;
  isolation: isolate;
  transform: translateZ(0);
  transition: transform 0.6s var(--kx-slow);
}
.kx-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 1.1s var(--kx-slow), filter 0.6s;
  filter: saturate(0.92) contrast(1.03);
}
.kx-card::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(5,16,11,0) 34%, rgba(5,16,11,0.82) 100%);
}
.kx-card-txt {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  padding: clamp(14px, 2vw, 22px);
  display: grid; gap: 0.35em;
}
.kx-card-txt b {
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(1.05rem, 1.9vw, 1.35rem);
  font-weight: 500; line-height: 1.14;
}
.kx-card-txt span {
  font-family: Jost, system-ui, sans-serif;
  font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--kx-gold-hi); opacity: 0.9;
}
.kx-card-line {
  position: absolute; z-index: 2; left: clamp(14px, 2vw, 22px); bottom: 0;
  width: 0; height: 2px; background: var(--kx-gold);
  transition: width 0.7s var(--kx-slow);
}
.kx-card:hover img, .kx-card:focus-visible img { transform: scale(1.11); filter: saturate(1) contrast(1.06); }
.kx-card:hover .kx-card-line, .kx-card:focus-visible .kx-card-line { width: calc(100% - 2 * clamp(14px, 2vw, 22px)); }
.kx-card:focus-visible { outline: 2px solid var(--kx-gold); outline-offset: 3px; }

/* ============================================================
   6 · HARTA E ZONAVE
   Një fotografi me pika. Kush prek një pikë, merr një rresht dhe
   një lidhje. Kjo zëvendëson tri paragrafë shpjegimi.
   ============================================================ */
.kx-map { margin: clamp(40px, 7vw, 92px) 0; }
.kx-map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(18px, 3vw, 48px);
  align-items: center;
}
@media (max-width: 820px) { .kx-map-grid { grid-template-columns: 1fr; } }
.kx-map-figure {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  background: #08150f;
  aspect-ratio: 4 / 5;
}
.kx-map-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kx-dot {
  position: absolute;
  width: 30px; height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.75);
  background: rgba(10,26,19,0.34);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  cursor: pointer;
  display: grid; place-items: center;
  padding: 0;
  transition: transform 0.4s var(--kx-ease), background 0.3s, border-color 0.3s;
}
.kx-dot::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--kx-gold-hi);
  box-shadow: 0 0 0 0 rgba(201,169,110,0.55);
}
@media (prefers-reduced-motion: no-preference) {
  .kx-dot::before { animation: kxPulse 2.6s ease-out infinite; }
  .kx-dot:nth-of-type(2)::before { animation-delay: 0.5s; }
  .kx-dot:nth-of-type(3)::before { animation-delay: 1s; }
  .kx-dot:nth-of-type(4)::before { animation-delay: 1.5s; }
  .kx-dot:nth-of-type(5)::before { animation-delay: 2s; }
}
@keyframes kxPulse {
  0%   { box-shadow: 0 0 0 0 rgba(201,169,110,0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(201,169,110,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,169,110,0); }
}
.kx-dot:hover, .kx-dot[aria-expanded="true"] {
  transform: scale(1.25);
  background: rgba(201,169,110,0.28);
  border-color: var(--kx-gold-hi);
}
.kx-dot:focus-visible { outline: 2px solid var(--kx-gold-hi); outline-offset: 3px; }
.kx-map-panel {
  border-left: 2px solid rgba(201,169,110,0.4);
  padding-left: clamp(14px, 2vw, 26px);
  min-height: 8.5em;
}
.kx-map-panel .kx-mp {
  display: none;
  animation: kxFadeIn 0.5s var(--kx-slow) both;
}
.kx-map-panel .kx-mp.on { display: block; }
.kx-map-panel h3 {
  margin: 0 0 0.3em;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-weight: 500;
}
.kx-map-panel p { margin: 0 0 0.7em; line-height: 1.55; }
.kx-map-panel a {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-family: Jost, system-ui, sans-serif;
  font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none;
  transition: gap 0.35s var(--kx-ease);
}
.kx-map-panel a:hover { gap: 0.8em; }
@keyframes kxFadeIn { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
html:not(.js) .kx-map-panel .kx-mp { display: block; margin-bottom: 1.2em; }
html:not(.js) .kx-dot { display: none; }

/* ============================================================
   7 · TEKSTI QË RRI I PALOSUR
   Përgjigjja qëndron e dukshme. Shpjegimi i gjatë rri i palosur,
   por mbetet në faqe — motorët e kërkimit dhe modelet e lexojnë,
   syri nuk lodhet.
   ============================================================ */
.kx-more { margin-top: 0.4em; }
.kx-more > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: Jost, system-ui, sans-serif;
  font-size: 0.78rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--kx-gold);
  padding: 0.55em 0;
  transition: gap 0.35s var(--kx-ease), color 0.3s;
}
.kx-more > summary::-webkit-details-marker { display: none; }
.kx-more > summary::after {
  content: ""; width: 7px; height: 7px;
  border-right: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.4s var(--kx-ease);
}
.kx-more[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.kx-more > summary:hover { gap: 0.8em; }
.kx-more > summary:focus-visible { outline: 2px solid var(--kx-gold); outline-offset: 3px; }
.kx-more-body { padding-top: 0.2em; }
@media (prefers-reduced-motion: no-preference) {
  .kx-more[open] .kx-more-body { animation: kxUnfold 0.6s var(--kx-slow) both; }
}
@keyframes kxUnfold {
  from { opacity: 0; transform: translate3d(0, -8px, 0); }
  to   { opacity: 1; transform: none; }
}
.kx-more > summary .kx-count {
  font-size: 0.72rem; opacity: 0.55; letter-spacing: 0.06em; text-transform: none;
}

/* ============================================================
   8 · KARTAT QË NDJEKIN GISHTIN
   Një shkëlqim i lehtë që ndjek kursorin. Vetëm në pajisje me mi.
   ============================================================ */
@media (hover: hover) and (pointer: fine) {
  .kx-gloss { position: relative; overflow: hidden; }
  .kx-gloss::before {
    content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
    opacity: 0; transition: opacity 0.4s;
    background: radial-gradient(180px circle at var(--gx, 50%) var(--gy, 50%), rgba(201,169,110,0.16), transparent 62%);
  }
  .kx-gloss:hover::before { opacity: 1; }
}

/* ============================================================
   9 · KALIMI MIDIS FAQEVE
   Faqja nuk kërcen; ajo zbehet dhe kthehet. Vetëm 220 ms.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .js body { opacity: 1; transition: opacity 0.22s ease; }
  .js body.kx-leaving { opacity: 0; }
}
@view-transition { navigation: auto; }

/* ============================================================
   10 · SHIRITI RRJEDHËS REAGON NDAJ RRËSHQITJES
   ============================================================ */
.mk-ticker-row { animation-duration: var(--kx-tick, 42s); }

/* ============================================================
   11 · BUTONAT
   ============================================================ */
.cta-outline, .kx-btn {
  position: relative;
  overflow: hidden;
}
.cta-outline::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(201,169,110,0.18), rgba(201,169,110,0.04));
  transform: translateX(-101%);
  transition: transform 0.7s var(--kx-slow);
}
.cta-outline:hover::after { transform: translateX(0); }

/* ============================================================
   12 · RESPEKT PËR KËDO QË NUK DO LËVIZJE
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise, .js .rise.in > * {
    opacity: 1 !important; transform: none !important; filter: none !important;
    animation: none !important; transition: none !important;
  }
  .page-hero-photo img, .kx-band-frame img, .kx-card img,
  .page-hero-text, .page-hero .hero-seal, .mk-ticker-row {
    animation: none !important; transform: none !important;
  }
  .kx-band-frame img { transform: scale(1.02) !important; }
  .kx-dot::before { animation: none !important; }
  .js body, .js body.kx-leaving { opacity: 1 !important; transition: none !important; }
  @view-transition { navigation: none; }
}

/* Tekst vetëm për lexuesit e ekranit. */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* Lista e zonave: e njëjta hartë, por për tastierën dhe telefonin. */
.kx-map-side { display: grid; gap: clamp(14px, 2vw, 26px); }
.kx-map-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.kx-zone {
  font-family: Jost, system-ui, sans-serif;
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.62em 1.1em;
  border: 1px solid rgba(10,26,19,0.16);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, color 0.3s, transform 0.3s var(--kx-ease);
}
.kx-zone:hover { border-color: var(--kx-gold); transform: translateY(-1px); }
.kx-zone[aria-expanded="true"] {
  background: var(--kx-jade); color: #f2f0ea; border-color: var(--kx-jade);
}
.kx-zone:focus-visible { outline: 2px solid var(--kx-gold); outline-offset: 3px; }

/* Palosja e seksioneve të tëra merr pak më shumë ajër. */
.kx-more--bllok { margin-top: 1.4em; border-top: 1px solid rgba(10,26,19,0.1); }
.kx-more--bllok > summary { padding-top: 1em; font-size: 0.82rem; }
.kx-more--bllok .kx-more-body { padding-top: 0.8em; }
