/* ==========================================================================
   Why clients stay for years — shared by the homepage and the About page
   (includes/why-2026.php). Moved out of home-2026.css on 27 Nov 2026 so the
   section is one component with one stylesheet.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Why Teams Choose Autuskey
   -------------------------------------------------------------------------- */

/* Click-to-expand accordion rail.
   Figma's dev-mode spec gives fixed pixel widths (973px active / 370px
   collapsed), but checking the actual reference site directly (its real
   CSS, not just a screenshot) showed those fixed widths aren't what makes
   it feel smooth — Orizon sizes the cards with flex-grow (one shared
   transition driving card width, title and number together, 950ms,
   cubic-bezier(.46,0,.16,1)) rather than animating two hardcoded widths.
   Ported that mechanism, keeping Figma's 729.75:277.5 (≈2.63:1) proportions
   as the flex-grow ratio instead of literal widths. */
.ak2026-why__cards {
  display: flex;
  gap: 21.75px;
  height: 395.25px;
  margin-bottom: 40px;
}

.ak2026-why-card {
  position: relative;
  flex: 1 1 0%;
  min-width: 0;
  border-radius: 22.5px;
  overflow: hidden;
  color: #fff;
  background-size: cover;
  background-position: center bottom;
  background-color: #0a0a0a;
  border: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: flex-grow 0.95s cubic-bezier(0.46, 0, 0.16, 1);
}

.ak2026-why-card.is-active {
  flex-grow: 2.63;
}

/* Two scrims, not one: the bottom one was already here for the collapsed
   card's title (which sits near the bottom). Now that the number/title
   live at the top, bright photos (card 1's sky, card 3's handshake) left
   white text with too little contrast up there — Orizon's own cards carry
   the same two-scrim pattern (a strong bottom gradient plus a subtler top
   one) for exactly this reason. Added the top layer. */
.ak2026-why-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 30%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 55%);
}

/* Decorative vignette on the artwork itself — re-checked directly against
   the accordion component (10480:21274): it's a blurred rgba(0,0,0,0.24)
   shape sitting near the BOTTOM of each card's photo, unrelated to the
   text block (which lives at the top-left, see .ak2026-why-card__text
   below). An earlier pass assumed this sat behind the text and grew with
   it — it doesn't; it's static regardless of accordion state. */
.ak2026-why-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 92px;
  border-radius: 22.5px;
  background: rgba(0, 0, 0, 0.24);
  filter: blur(15.75px);
}

/* --------------------------------------------------------------------------
   Text block — top-left of the card (10480:21279/10480:21303), not the
   bottom. The number+title share a flex column whose `gap` does the actual
   "title slides up to sit right after the number" motion: huge when
   collapsed (pushing the title down near the card's bottom edge, matching
   the collapsed screenshot), ~15px when active (pulling it up to dock
   under the number). The description sits outside that gapped group, so
   its own collapsed (invisible) state doesn't add a second gap after the
   title — it only ever has margin-top to the title above it.
   -------------------------------------------------------------------------- */
/* Figma gives this column a fixed width per state rather than anchoring it
   to the card's right edge: 314px collapsed and 435px open (235.5 / 326.25
   scaled). That width is what keeps the copy clear of the artwork — the
   open card's remaining ~380px is where the iPad sits, and a right-anchored
   column ran the description straight across it. Transitions on the same
   950ms as the card so the text reflows in step with the card growing. */
.ak2026-why-card__text {
  position: absolute;
  left: 24.75px;
  top: 48px;
  width: 235.5px;
  z-index: 1;
  transition: width 0.95s cubic-bezier(0.46, 0, 0.16, 1);
}

.ak2026-why-card.is-active .ak2026-why-card__text {
  width: 326.25px;
}

.ak2026-why-card__head {
  display: flex;
  flex-direction: column;
  /* Figma: 279.75px, which leaves one title line in a collapsed card. The
     26 Nov titles run two lines, so the gap gives up 28px for the second. */
  gap: 251.75px;
  transition: gap 0.95s cubic-bezier(0.46, 0, 0.16, 1);
}

.ak2026-why-card.is-active .ak2026-why-card__head {
  gap: 15px;
}

.ak2026-why-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.ak2026-why-card__num {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.ak2026-why-card__plus {
  width: 21px;
  height: 21px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.ak2026-why-card__plus img {
  width: 13.5px;
  height: 13.5px;
}

.ak2026-why-card.is-active .ak2026-why-card__plus {
  opacity: 0;
  transform: rotate(45deg);
  pointer-events: none;
}

.ak2026-why-card__title {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.315px;
  text-transform: capitalize;
  /* Same 950ms/easing as the card's own flex-grow and the gap above —
     growing in lockstep with the card instead of on its own separate
     timing is what reads as "smooth" rather than unrelated transitions
     firing at once. */
  transition: font-size 0.95s cubic-bezier(0.46, 0, 0.16, 1), letter-spacing 0.95s cubic-bezier(0.46, 0, 0.16, 1);
}

.ak2026-why-card.is-active .ak2026-why-card__title {
  font-size: 30px;
  letter-spacing: -0.45px;
}

/* The number and title are already visible before a card opens (they're
   just moving/resizing) — fading them from 0 would flash them invisible
   first, so instead of a reveal they get a blur-to-sharp "refocus" pulse
   timed with the gap/font-size move. The description genuinely goes from
   hidden to shown, so it keeps the full fade+rise+blur reveal (ported
   directly from the reference site's own @keyframes why-orizon-reveal),
   550ms, cubic-bezier(.30,0,.18,1), delayed 500ms so it starts once the
   card is mostly done growing rather than racing it. All pure CSS, so
   clicking a card only needs to toggle .is-active. */
.ak2026-why-card.is-active .ak2026-why-card__row,
.ak2026-why-card.is-active .ak2026-why-card__title {
  animation: ak2026-why-text-focus 650ms cubic-bezier(0.3, 0, 0.18, 1);
}

@keyframes ak2026-why-text-focus {
  0% { filter: blur(6px); }
  100% { filter: blur(0); }
}

.ak2026-why-card__desc {
  margin: 15px 0 0;
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.66px;
  color: rgb(255, 255, 255);
  overflow: hidden;
  opacity: 0;
  max-width: 28rem;
    width: 100%;
}

.ak2026-why-card.is-active .ak2026-why-card__desc {
  animation: ak2026-why-desc-reveal 550ms cubic-bezier(0.3, 0, 0.18, 1) 500ms both;
}

@keyframes ak2026-why-desc-reveal {
  0% {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ak2026-why-card,
  .ak2026-why-card__head,
  .ak2026-why-card__text,
  .ak2026-why-card__title {
    transition: none;
  }
  .ak2026-why-card.is-active .ak2026-why-card__row,
  .ak2026-why-card.is-active .ak2026-why-card__title {
    animation: none;
  }
  .ak2026-why-card.is-active .ak2026-why-card__desc {
    animation: none;
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   Stat counters — re-verified against node 10431:8784: Figma's "Value
   Counter" is a sliding strip of every milestone value (0+, 20+, 45+ … 200+)
   behind a small fixed-height window, not a numeric value that gets
   rewritten every frame. An earlier pass tweened a number and wrote it into
   textContent each frame, which is a different (and less authentic-looking)
   effect. assets/js/home-2026-why.js now animates this strip's own
   translateY instead.
   -------------------------------------------------------------------------- */

.ak2026-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.ak2026-stat {
  padding-inline: 24px;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.ak2026-stat:first-child {
  padding-left: 0;
  border-left: none;
}

.ak2026-stat__window {
  height: 51px;
  overflow: hidden;
}

.ak2026-stat__strip {
  /* Rest on the last milestone (the real figure). The counter script moves
     the strip to the first value and slides it back here on scroll. */
  transform: translateY(calc(51px - 100%));
  will-change: transform;
}

.ak2026-stat__strip span {
  display: block;
  height: 51px;
  font-size: 34px;
  font-weight: 700;
  line-height: 51px;
  color: var(--ak26-ink);
  white-space: nowrap;
}

.ak2026-stat__label {
  font-size: 13px;
  color: var(--ak26-ink-muted);
}


/* Responsive and page-specific rules that lived in home-2026.css */
@media (max-width: 1023px) {
  .ak2026-why__cards { flex-direction: column; height: auto; }
  .ak2026-why-card,
  .ak2026-why-card.is-active { width: 100%; min-height: 220px; cursor: default; }
  .ak2026-why-card__head,
  .ak2026-why-card.is-active .ak2026-why-card__head { gap: 10px; }
  .ak2026-why-card__text,
  .ak2026-why-card.is-active .ak2026-why-card__text { width: auto; right: 18.75px; }
  .ak2026-why-card__title,
  .ak2026-why-card.is-active .ak2026-why-card__title { font-size: 22px; }
  .ak2026-why-card__desc,
  .ak2026-why-card.is-active .ak2026-why-card__desc { opacity: 1; animation: none; }
  .ak2026-why-card__plus { display: none; }
  .ak2026-stats { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
  .ak2026-stat:nth-child(odd) { border-left: none; padding-left: 0; }
}

.ak2026-why-card__desc strong { font-weight: 700; }
