/* =========================================================
   ZENITH THEME - EXTRAS
   Small additions for things WordPress needs that the static design didn't
   (no-photo placeholders, pagination, logo cards, news article body, form error state).
   ========================================================= */

/* Smooth-scroll library helper (Lenis) */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-smooth iframe {
  pointer-events: none;
}

/* Cards without a photo: dark tile with the sector icon */
.no-image {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ink-900), var(--ink-700));
  color: var(--accent);
  font-size: 2.6rem;
}
.news-card .thumb {
  position: relative;
}
.service-media {
  position: relative;
}
.service-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hidden cards while filtering */
.project-card[hidden] {
  display: none !important;
}

/* Intro with no photo: single centred-width column */
.intro.intro-single {
  grid-template-columns: 1fr;
  max-width: 820px;
}

/* Leadership photos + client logos */
.leader-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.client-card .mark.has-logo {
  background: #fff;
}
.client-card .mark.has-logo img {
  max-width: 78%;
  max-height: 78%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Contact form: error message state */
.form-status.error {
  display: block;
  color: var(--danger);
  background: var(--danger-bg);
  border-color: var(--danger);
}

/* Pagination (News page) */
.zd-pagination {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}
.zd-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  margin: 0 4px;
  border: 1px solid rgba(13, 24, 30, 0.18);
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.zd-pagination .page-numbers.current,
.zd-pagination .page-numbers:hover {
  background: var(--ink-900);
  color: #fff;
  border-color: var(--ink-900);
}

/* News article body (text written in the WordPress editor) */
.article-content h3,
.article-content h4 {
  margin: 1.6em 0 0.6em;
}
.article-content ul,
.article-content ol {
  margin: 0 0 1.2em 1.3em;
}
.article-content li {
  margin-bottom: 0.4em;
}
.article-content a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.article-content img,
.article-content figure {
  max-width: 100%;
  height: auto;
}
.article-content figure {
  margin: 1.6em 0;
}
.article-content figcaption {
  font-size: 0.875rem;
  opacity: 0.7;
  margin-top: 8px;
}
.article-content .alignwide,
.article-content .alignfull {
  max-width: 100%;
}

/* WordPress admin bar should not cover the sticky header */
body.admin-bar .site-header {
  top: 32px;
}
@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}
@media (max-width: 560px) {
  body.admin-bar .site-header {
    top: 0;
  }
}
/* =========================================================
   HOME - SERVICES SECTION
   Header (title + description + button) on top, big photo cards below.
   ========================================================= */
/* ---- header row ---- */
.svc-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.svc-head-text {
  flex: 0 1 auto;
}
.svc-head-desc {
  flex: 1 1 320px;
  max-width: 520px;
  margin: 0;
  color: var(--steel-500);
}
.svc-head .btn {
  flex: none;
}

/* ---- big cards grid (shows every service) ---- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.svc-card {
  position: relative;
  display: block;
  aspect-ratio: 5 / 4;
  min-height: 300px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--ink-800);
  isolation: isolate;
}

/* photo background */
.svc-bg {
  position: absolute;
  inset: 0;
  background-color: var(--ink-800);
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.svc-card.no-photo .svc-bg {
  background-image: linear-gradient(135deg, var(--ink-900), var(--ink-700));
  color: var(--accent);
  font-size: 3rem;
}
.svc-card:hover .svc-bg {
  transform: scale(1.06);
}

/* dark fade so the name is readable */
.svc-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13, 24, 30, 0.88) 0%,
    rgba(13, 24, 30, 0.15) 55%,
    transparent 100%
  );
}
/* ---- image overlay ---- */
/* 1) always on: even dark tint + stronger fade behind the name */
.svc-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      to top,
      rgba(13, 24, 30, 0.65) 0%,
      rgba(13, 24, 30, 0.3) 45%,
      rgba(13, 24, 30, 0.08) 100%
    ),
    rgba(13, 24, 30, 0.15);
}

/* 2) on hover: soft amber tint fades in */
.svc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(214, 154, 45, 0.35),
    rgba(214, 154, 45, 0) 40%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}
.svc-card:hover::before,
.svc-card:focus-visible::before {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .svc-bg,
  .svc-go,
  .svc-go .fa-solid,
  .svc-card::before {
    transition: none;
  }
  .svc-card:hover .svc-bg {
    transform: none;
  }
}
/* service name */
.svc-name {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
  color: var(--white);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
}

/* arrow circle (Font Awesome icon) - tilts on hover */
.svc-go {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  font-size: 1rem;
  transition:
    transform 0.3s ease,
    background 0.25s,
    border-color 0.25s,
    color 0.25s;
}
.svc-go .fa-solid {
  transform: rotate(-45deg); /* points up-right */
  transition: transform 0.3s ease;
}
.svc-card:hover .svc-go,
.svc-card:focus-visible .svc-go {
  transform: rotate(14deg) scale(1.08); /* little tilt */
  background: var(--accent);
  border-color: var(--accent);
}
.svc-card:hover .svc-go .fa-solid,
.svc-card:focus-visible .svc-go .fa-solid {
  transform: rotate(-45deg);
}

.svc-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---- responsive ---- */
@media (max-width: 1024px) {
  .svc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .svc-showcase {
    padding: 24px 18px;
    border-radius: 20px;
  }
  .svc-head {
    align-items: flex-start;
  }
}
@media (max-width: 560px) {
  .svc-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .svc-card {
    min-height: 260px;
  }
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .svc-bg,
  .svc-go,
  .svc-go .fa-solid {
    transition: none;
  }
  .svc-card:hover .svc-bg {
    transform: none;
  }
}

/* =========================================================
   HOME - IMPACT SECTION
   Call-to-action (centred) + big numbers, with dashed rings behind.
   ========================================================= */
.impact {
  position: relative;
  overflow: hidden;
  background: var(--white);
  padding: clamp(72px, 9vw, 128px) 0;
}
.impact .container {
  position: relative;
  z-index: 1;
}

.impact-ring {
  position: absolute;
  left: 50%;
  border: 1.5px dashed rgba(214, 154, 45, 0.4);
  border-radius: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
  aspect-ratio: 1 / 1;
  max-width: calc(100vw - 32px);
}
.impact-ring--1 {
  top: 45px;
  width: min(520px, 90vw);
  height: auto;
}

.impact-ring--2 {
  top: 115px;
  width: min(370px, 70vw);
  height: auto;
  border-color: rgba(214, 154, 45, 0.32);
}

.impact-ring--3 {
  top: 185px;
  width: min(240px, 48vw);
  height: auto;
  border-color: rgba(214, 154, 45, 0.25);
}

/* ---- call-to-action ---- */
.impact-cta {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.impact-cta h2 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
  color: var(--ink-900);
  margin-bottom: 20px;
}
.impact .hl {
  color: var(--accent-ink);
}
.impact-cta p {
  color: var(--steel-500);
  max-width: 640px;
  margin: 0 auto 32px;
}
.impact-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.impact-buttons .btn {
  border-radius: 999px;
}

/* ---- numbers ---- */
.impact-numbers {
  margin-top: clamp(56px, 7vw, 96px);
}
.impact-sub {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 32px;
}
.impact-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 40px 48px;
  justify-items: center;
}
/* keep the original class (the counter animation uses it) but reset the dark-band styling */
.impact .impact-stats .stat-item {
  padding: 0;
  border: 0;
  text-align: left;
}
.impact .impact-stats .stat-item .num {
  font-size: clamp(3.5rem, 8vw, 6.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--ink-900) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.impact .impact-stats .stat-item .label {
  margin-top: 14px;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-900);
}

@media (max-width: 560px) {
  .impact-stats {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }
}

/* =========================================================
   BOTTOM CTA BAND - photo background + dark overlay + clear outlined buttons
   ========================================================= */
.cta-band {
  background-color: var(--ink-900);
  background-image: linear-gradient(
    135deg,
    var(--ink-900),
    var(--ink-700)
  ); /* used when no photo is set */
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: clamp(72px, 9vw, 120px) 0;
}

/* image overlay (replaces the old striped pattern) */
.cta-band::before {
  background-image: linear-gradient(
    90deg,
    rgba(13, 24, 30, 0.82) 0%,
    rgba(13, 24, 30, 0.58) 55%,
    rgba(13, 24, 30, 0.38) 100%
  );
}
.cta-inner {
  z-index: 1;
}
.cta-inner h2 {
  color: var(--white);
}
.cta-inner p {
  color: var(--steel-300);
}

/* buttons: white border, white bold text, solid dark tint so they never look faded */
.cta-band .btn,
.cta-band .btn-dark,
.cta-band .btn-outline {
  background: rgba(13, 24, 30, 0.55);
  border: 2px solid var(--white);
  color: var(--white);
  font-weight: 600;
  min-width: 150px;
  backdrop-filter: blur(2px);
}
.cta-band .btn:hover,
.cta-band .btn-dark:hover,
.cta-band .btn-outline:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--ink-900);
}
.cta-band .btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* =========================================================
   CLIENTS & PARTNERS - logo cards
   ========================================================= */
.partners {
  background: var(--paper);
}

.section-head.partners-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto clamp(40px, 5vw, 64px);
}
.partners-head h2 {
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  line-height: 1.3;
}
.partners-head p {
  margin-left: auto;
  margin-right: auto;
}

/* grid: 6 per row, incomplete rows stay centred */
.partner-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1120px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}
.partner-card {
  flex: 0 0 calc((100% - 150px) / 6);
  aspect-ratio: 158 / 98;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  background: var(--white);
  border-radius: 12px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.partner-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(13, 24, 30, 0.1);
}
.partner-card img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* entries without a logo: icon + name */
.partner-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-900);
}
.partner-fallback .fa-solid {
  font-size: 1.4rem;
  color: var(--accent-ink);
}

@media (max-width: 1100px) {
  .partner-grid {
    gap: 30px;
  }
  .partner-card {
    flex-basis: calc((100% - 90px) / 4);
  }
}
@media (max-width: 768px) {
  .partner-grid {
    gap: 16px;
  }
  .partner-card {
    flex-basis: calc((100% - 32px) / 3);
  }
}
@media (max-width: 480px) {
  .partner-card {
    flex-basis: calc((100% - 16px) / 2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .partner-card {
    transition: none;
  }
  .partner-card:hover {
    transform: none;
  }
}

/* =========================================================
   HOME - PROJECTS ACROSS NEPAL (district map)
   ========================================================= */
.np-map--districts {
  padding: clamp(16px, 2.5vw, 32px);
}
.np-map--districts .np-svg {
  display: block;
  width: 100%;
  height: auto;
}

/* districts */
.np-svg .np-d {
  cursor: default;
}
.np-svg path {
  fill: white;
  stroke: var(--ink-600);
  stroke-width: 0.8;
  stroke-linejoin: round;
  transition: fill 0.2s ease;
}
.np-svg .np-d:not(.np-d--has):hover {
  fill: var(--ink-700);
}
.np-svg path:focus,
.np-svg path:focus-visible,
.np-svg .np-d:focus,
.np-svg .np-d:focus-visible {
  outline: none;
  stroke: none;
}
/* districts with projects: 3 shades by number of projects */
.np-svg a.np-d {
  cursor: pointer;
  outline: none;
}
.np-svg a.np-d path {
  stroke: var(--ink-900);
  stroke-width: 0.9;
}
.np-svg a.np-lvl-1 path {
  fill: #8c6420;
}
.np-svg a.np-lvl-2 path {
  fill: #c28820;
}
.np-svg a.np-lvl-3 path {
  fill: #f0b445;
}
.np-svg a.np-d:hover path,
.np-svg a.np-d:focus-visible path {
  fill: var(--white);
  stroke: var(--accent);
  stroke-width: 1.4;
}

/* tooltip */
.np-tip {
  position: absolute;
  z-index: 5;
  max-width: 240px;
  padding: 12px 14px;
  background: var(--white);
  color: var(--ink-900);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  font-size: 0.85rem;
  line-height: 1.35;
  transform: translate(-50%, -100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.np-tip.show {
  opacity: 1;
}
.np-tip span {
  display: block;
}
.np-tip-name {
  display: block;
  font-size: 1rem;
}
.np-tip-prov {
  color: var(--steel-500);
  font-size: 0.78rem;
  margin-bottom: 6px;
}
.np-tip-count {
  font-weight: 700;
  color: var(--accent-ink);
}
.np-tip-list {
  margin: 6px 0 0;
  padding-left: 16px;
  list-style: disc;
}
.np-tip-list li {
  margin: 2px 0;
}
.np-tip-more {
  list-style: none;
  margin-left: -16px;
  color: var(--steel-500);
}
.np-tip-cta {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--steel-500);
}
.np-tip-none {
  color: var(--steel-500);
}

/* legend */
.np-legend {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: var(--steel-300);
  font-size: 0.8rem;
}
.np-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.np-legend .sw {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid var(--ink-600);
}
.np-legend .sw--0 {
  background: white;
}
.np-legend .sw--1 {
  background: #8c6420;
  border-color: #8c6420;
}
.np-legend .sw--2 {
  background: #c28820;
  border-color: #c28820;
}
.np-legend .sw--3 {
  background: #f0b445;
  border-color: #f0b445;
}

/* list on the left: district links */
.np-list .prov {
  max-width: 62%;
  line-height: 1.6;
}
.np-list .prov a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.np-list .prov a:hover {
  color: var(--accent-ink);
}

/* Projects page: "Showing projects in ..." note */
.filter-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 28px;
  padding: 12px 18px;
  background: var(--paper);
  border-left: 4px solid var(--accent);
  font-weight: 600;
}
.filter-note[hidden] {
  display: none;
}
.filter-note-clear {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 500;
  color: var(--accent-ink);
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .np-list .prov {
    max-width: 70%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .np-svg path,
  .np-tip {
    transition: none;
  }
}

/* =========================================================
   COMPANY TIMELINE - year slider + story card
   (loaded automatically on the Home and About pages)
   ========================================================= */
.section-head.journey-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(40px, 5vw, 64px);
}
.journey-head p {
  margin-left: auto;
  margin-right: auto;
}

.tl {
  max-width: 1100px;
  margin: 0 auto;
}

/* ---------------- year row ---------------- */
.tl-bar {
  --dot-y: 60px; /* distance from the top of the row to the dot / line */
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: -24px;
}
.tl-arrow {
  flex: none;
  width: 40px;
  height: 40px;
  margin-top: calc(var(--dot-y) - 20px);
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink-900);
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(13, 24, 30, 0.08);
  transition:
    background 0.25s,
    color 0.25s,
    border-color 0.25s,
    opacity 0.25s,
    transform 0.25s;
}
.tl-arrow:hover:not(:disabled) {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--white);
  transform: scale(1.06);
}
.tl-arrow:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}
.tl-arrow:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.tl-track {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 5%,
    #000 95%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 5%,
    #000 95%,
    transparent 100%
  );
}
.tl-track::-webkit-scrollbar {
  display: none;
}

.tl-tab {
  position: relative;
  flex: 0 0 max(120px, calc(100% / 6));
  height: 104px;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
  cursor: pointer;
  scroll-snap-align: center;
}

/* the year: becomes an amber pill when selected */
.tl-year {
  display: inline-block;
  height: 30px;
  padding: 0 14px;
  line-height: 30px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-900);
  transition:
    background 0.25s,
    color 0.25s,
    box-shadow 0.25s,
    transform 0.25s;
  transform: translateY(-24px);
}
.tl-tab:hover .tl-year {
  background: var(--paper);
}

/* line through the dots: grey ahead, dark where already travelled, gradient into the active year */
.tl-tab::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--dot-y) - 1.5px);
  height: 3px;
  background: var(--line);
  transition: background 0.4s;
}
.tl-tab.is-passed::before {
  background: var(--ink-900);
}
.tl-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  width: 50%;
  top: calc(var(--dot-y) - 1.5px);
  height: 3px;
  background: linear-gradient(90deg, var(--ink-900), var(--accent));
}

.tl-dot {
  position: absolute;
  left: 50%;
  top: calc(var(--dot-y) - 8px);
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--ink-900);
  z-index: 2;
  transition:
    transform 0.25s,
    background 0.25s,
    border-color 0.25s;
}
.tl-tab:hover .tl-dot {
  background: var(--accent);
  transform: scale(1.2);
}
.tl-tab.is-passed .tl-dot {
  background: var(--ink-900);
}
.tl-tab.is-active .tl-dot {
  background: var(--accent);
  border-color: var(--ink-900);
  transform: scale(1.35);
  animation: tlPulse 2.2s ease-out infinite;
}
@keyframes tlPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(214, 154, 45, 0.55);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(214, 154, 45, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(214, 154, 45, 0);
  }
}
.tl-tab:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* small label under the dot on hover / keyboard focus */
.tl-tip {
  position: absolute;
  left: 50%;
  top: calc(var(--dot-y) + 16px);
  transform: translate(-50%, 4px);
  max-width: 150px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--ink-900);
  color: var(--white);
  font-size: 0.72rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 4;
}
.tl-tab:hover .tl-tip,
.tl-tab:focus-visible .tl-tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------- story card ---------------- */
.tl-panels {
  margin-top: 36px;
}
.tl-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding: clamp(26px, 4vw, 52px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(13, 24, 30, 0.09);
  overflow: hidden;
}
.tl-panel[hidden] {
  display: none;
}
.tl-panel.has-photo {
  grid-template-columns: minmax(220px, 320px) 1fr;
}
/* amber -> ink edge on the left */
.tl-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(to bottom, var(--accent), var(--ink-900));
}

/* slides in from the direction you are travelling */
.tl-panel[data-dir="next"] {
  animation: tlInNext 0.5s cubic-bezier(0.22, 0.8, 0.3, 1);
}
.tl-panel[data-dir="prev"] {
  animation: tlInPrev 0.5s cubic-bezier(0.22, 0.8, 0.3, 1);
}
@keyframes tlInNext {
  from {
    opacity: 0;
    transform: translateX(36px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes tlInPrev {
  from {
    opacity: 0;
    transform: translateX(-36px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* big outlined year behind the text */
.tl-ghost {
  position: absolute;
  right: clamp(12px, 3vw, 40px);
  bottom: -0.16em;
  font-size: clamp(6rem, 18vw, 12rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(214, 154, 45, 0.3);
  pointer-events: none;
  user-select: none;
}
.tl-photo,
.tl-body {
  position: relative;
  z-index: 1;
}

/* photo with a year badge */
.tl-photo {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(13, 24, 30, 0.22);
}
.tl-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.tl-photo-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--ink-900);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* text */
.tl-step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.tl-step::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--accent);
}
.tl-step b {
  color: var(--ink-900);
}

.tl-panel-year {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}
.tl-body h4 {
  margin: 0 0 10px;
  font-size: 1.3rem;
  color: var(--ink-900);
}
.tl-body p {
  margin: 0 0 14px;
  color: var(--steel-500);
  max-width: 60ch;
}
.tl-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 60ch;
}
.tl-list li {
  position: relative;
  padding: 0 0 0 24px;
  margin-bottom: 10px;
  color: var(--ink-900);
}
.tl-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.6em;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  transform: rotate(45deg);
}

/* ---------------- footer: previous / progress / next ---------------- */
.tl-foot {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
}
.tl-nav {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-900);
  font: inherit;
  cursor: pointer;
  transition:
    background 0.25s,
    border-color 0.25s,
    color 0.25s,
    transform 0.25s;
}
.tl-nav-text {
  display: block;
  line-height: 1.15;
}
.tl-nav small {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-500);
  transition: color 0.25s;
}
.tl-nav strong {
  display: block;
  font-size: 1rem;
}
.tl-nav--prev .tl-nav-text {
  text-align: left;
}
.tl-nav--next .tl-nav-text {
  text-align: right;
}
.tl-nav:hover:not(:disabled) {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--white);
  transform: translateY(-2px);
}
.tl-nav:hover:not(:disabled) small {
  color: var(--steel-300);
}
.tl-nav:disabled {
  visibility: hidden;
}
.tl-nav:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.tl-progress {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.tl-progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--ink-900), var(--accent));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.5s ease;
}

.tl.is-single .tl-arrow,
.tl.is-single .tl-foot {
  display: none;
}

/* ---------------- small screens ---------------- */
@media (max-width: 720px) {
  .tl-bar {
    gap: 8px;
  }
  .tl-arrow {
    width: 34px;
    height: 34px;
    margin-top: calc(var(--dot-y) - 17px);
  }
  .tl-tab {
    flex-basis: max(100px, calc(100% / 3));
  }
  .tl-panel.has-photo {
    grid-template-columns: 1fr;
  }
  .tl-photo {
    max-width: 380px;
  }
  .tl-foot {
    flex-wrap: wrap;
    gap: 16px;
  }
  .tl-progress {
    order: 3;
    flex-basis: 100%;
  }
  .tl-nav {
    padding: 9px 16px;
  }
  .tl-nav small {
    display: none;
  }
  .tl-nav--next {
    margin-left: auto;
  }
}

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  .tl-panel[data-dir] {
    animation: none;
  }
  .tl-tab.is-active .tl-dot {
    animation: none;
  }
  .tl-year,
  .tl-dot,
  .tl-arrow,
  .tl-nav,
  .tl-progress-bar,
  .tl-tip {
    transition: none;
  }
}

.featured-projects {
  position: relative;
  padding-bottom: 200px;
}

.featured-projects .container{
    position: relative;
    z-index: 4;
}
.featured-background-images {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  display: flex;
  align-items: end;
  opacity: 0.1;
}

.featured-background-images img {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 100%;
  max-width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center bottom;
  transform: translateX(-50%);
}
