:root {
  --bg: #f7f7f7;
  --ink: #1c1710;
  --card-dark: #000000;
  --card-light: #bcdce9;
  --text-on-dark: #f6f3ec;
  --text-on-light: #fcfaf8;
  --muted-on-dark: #fcfcfb;
  --muted-on-light: #111111;
  --slide-gap: 16px;
  --radius: 32px;
  --autoplay: 5000ms;           
}

* { box-sizing: border-box; margin: 0; }


/* ---------- Section ---------- */
.features {
  --pad: clamp(20px, 6vw, 80px);
  padding: clamp(40px, 7vw, 90px) 0;
  overflow: hidden;
  background: #eaf4f9;
}

.features__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 0 var(--pad);
  margin-bottom: clamp(32px, 5vw, 64px);
}

/* ---------- Featured Section Label ---------- */
.features__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 20px;
  border: 1px solid #27b9d5;
  border-radius: 999px;
  background: rgba(255, 255, 255, .35);
  color: #111111;
  font-family: "Geist", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  margin: 0 0 24px;
}

/* ---------- Featured Section Title ---------- */
.features__title {
  font-family: "Geist", sans-serif;
  font-weight: 400;
  font-size:40px;
  line-height: 1.2;
  max-width: 860px;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  padding: 0;
  color: #000000;
}

/* ---------- Featured Section Description ---------- */
.features__desc {
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  max-width: 840px;
  margin: 0;
  padding: 0;
  color: #101d40;
}

.features__nav {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  margin-top: 44px;
  justify-content: center;
  right: var(--pad);
  top: 0;
}

.features__head {
  position: relative;
}

.arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #a2c2c2;
  background: transparent;
  color: #27b9d5;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color .2s, transform .2s;
}
.arrow:hover { background: #d3e2e4; }
.arrow:active { transform: scale(.94); }
.arrow:focus-visible,
.slide:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.arrow svg { width: 20px; height: 20px; }

/* ---------- Track ---------- */
.viewport { touch-action: pan-y; cursor: grab; }
.viewport.is-dragging { cursor: grabbing; }

.track {
  display: flex;
  gap: var(--slide-gap);
  padding-left: var(--pad);      /* the active slide lines up with the heading */
  transition: transform .7s cubic-bezier(.65, 0, .2, 1);
  will-change: transform;
}
.viewport.is-dragging .track { transition: none; }

/* ---------- Slide = text card + image card ---------- */
.slide {
  flex: 0 0 min(82vw, 980px);
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: var(--slide-gap);
  height: clamp(240px, 30vw, 360px);
  user-select: none;
}

.card-text {
  border-radius: var(--radius);
  padding: clamp(22px, 3.2vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card-light);
  color: var(--muted-on-light);
  transition: background-color .6s, color .6s;
}

.card-text h3 {
  font-family: "Geist", sans-serif;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
}

.card-text p {
  font-family: "Inter", sans-serif;
  font-size: clamp(.85rem, 1.15vw, 1rem);
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 30px;
}

.card-image {
  border-radius: var(--radius);
  overflow: hidden;
  background: #cfe6f0;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.slide:not(.is-active) { opacity: .4; transition: opacity .6s; }

/* ---------- Active slide ---------- */
.slide.is-active .card-text { background: var(--card-dark); color: var(--muted-on-dark); }
.slide.is-active .card-text h3 { color: var(--text-on-dark); }
.slide.is-active .card-image { opacity: 1; }

/* ---------- Progress bar ---------- */
.progress {
  height: 3px;
  border-radius: 3px;
  background: rgba(143, 138, 128, .35);
  overflow: hidden;
}
.progress__fill {
  display: block;
  height: 100%;
  width: 0;
  background: currentColor;
}
.slide.is-active .progress { background: rgba(246, 243, 236, .22); }
.slide.is-active .progress__fill {
  color: var(--text-on-dark);
  animation: fill var(--autoplay) linear forwards;
}
.features.is-paused .slide.is-active .progress__fill { animation-play-state: paused; }

@keyframes fill { from { width: 0; } to { width: 100%; } }

@media (max-width: 640px) {
  .features__head { flex-direction: column; align-items: flex-start; }
  .features__nav { margin-top: 8px; }
}
@media (max-width: 640px) {
  .slide {
    flex-basis: 84vw;
    grid-template-columns: 1fr;
    grid-template-rows: auto 190px;
    height: auto;
  }
  .card-text { min-height: 230px; gap: 28px; }
}


.card-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 15px;
  padding-top: 18px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #feffff;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}
.card-btn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.card-btn span {
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.card-btn:hover {
  color: #27b9d5;
}
.card-btn:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.card-btn:hover span {
  transform: translate(4px, -4px);
}

.features .arrow {
  border: 1px solid #cfc9bc;
  background: transparent;
  color: #1c1710;
}

.features .arrow:hover {
  background: #27b9d5;
  color: #ffffff;
}
@media (prefers-reduced-motion: reduce) {
  .track { transition: none; }
  .slide.is-active .progress__fill { animation: none; width: 100%; }
}
