/* ==========================================================================
   Mayhem Lab — "El camino" (path section)
   Every selector is scoped to .ml-path. Weight 400 only; hierarchy via size/colour.
   ========================================================================== */

.ml-path {
  --ml-ink: #1B1F23;
  --ml-graphite: #2B3640;
  --ml-signal: #FF5A36;
  --ml-paper: #F6F3EE;
  --ml-warm: #E8E3DA;
  --ml-grey: #F4F4F4;
  --ml-muted: #5E666D;
  --ml-track: #E2E4E6;
  --ml-gutter: var(--gutter--1, clamp(20px, calc(12.142857px + 1.785714vw), 40px));
  --ml-sans: "Helvetica Now Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ml-mono: "DM Mono", Menlo, Consolas, Monaco, "Liberation Mono", monospace;
  --ml-ease: cubic-bezier(.22, .61, .36, 1);

  background-color: #ffffff;
  color: var(--ml-ink);
  font-family: var(--ml-sans);
  font-weight: 400;
  padding-block: clamp(72px, calc(54.17px + 4.571vw), 120px);
  position: relative;
}

.ml-path *,
.ml-path *::before,
.ml-path *::after { box-sizing: border-box; }

.ml-path :where(h2, h3, p, ol, ul, li) { margin: 0; padding: 0; font-weight: 400; }
.ml-path :where(ol, ul) { list-style: none; }

.ml-path .ml-path__inner { position: relative; }

/* ---------- Heading block ---------- */
.ml-path .ml-path__head {
  align-items: center;
  display: flex;
  flex-direction: column;
  margin: 0 auto clamp(40px, calc(28.57px + 2.857vw), 70px);
  max-width: 960px;
  text-align: center;
}

.ml-path .ml-path__label {
  align-items: center;
  color: var(--ml-ink);
  display: inline-flex;
  font-family: var(--ml-mono);
  font-size: clamp(14px, calc(13.214286px + .178571vw), 16px);
  gap: clamp(14px, calc(12.5px + .3vw), 18px);
  letter-spacing: -.01em;
  line-height: 1em;
  margin-bottom: clamp(22px, calc(16px + 1.4vw), 34px);
  text-transform: uppercase;
}
.ml-path .ml-path__label::before {
  background-color: var(--ml-ink);
  border-radius: 50%;
  content: "";
  flex-shrink: 0;
  height: 10px;
  width: 10px;
}

.ml-path .ml-path__title {
  color: var(--ml-ink);
  font-size: clamp(36px, calc(22.63px + 3.429vw), 72px);
  letter-spacing: -.035em;
  line-height: 1em;
  text-wrap: balance;
}

.ml-path .ml-path__sub {
  color: var(--ml-muted);
  font-size: clamp(16px, calc(14.51px + .381vw), 20px);
  letter-spacing: -.01em;
  line-height: 1.4;
  margin-top: clamp(16px, calc(12px + .95vw), 24px);
  max-width: 34em;
  text-wrap: balance;
}

/* ---------- Card list ---------- */
.ml-path .ml-path__list {
  display: grid;
  gap: 56px 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1200px) {
  .ml-path .ml-path__list {
    gap: 20px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ml-path .ml-path__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ---------- Media (image + overlay) ---------- */
.ml-path .ml-path__media {
  aspect-ratio: 1 / 1;
  background-color: var(--ml-graphite);
  background-image:
    radial-gradient(90% 70% at 24% 18%, rgba(118, 140, 156, .38) 0%, rgba(118, 140, 156, 0) 62%),
    radial-gradient(80% 80% at 88% 92%, rgba(10, 14, 18, .75) 0%, rgba(10, 14, 18, 0) 70%),
    linear-gradient(160deg, #34424e 0%, #2B3640 46%, #1c242b 100%);
  border-radius: 12px;
  container-type: inline-size;
  isolation: isolate;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.ml-path .ml-path__img {
  display: block;
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  transform: scale(1.001);
  transition: transform 1.1s var(--ml-ease);
  width: 100%;
  z-index: 0;
}

.ml-path .ml-path__media::after {
  background:
    linear-gradient(to top, rgba(12, 16, 20, .55) 0%, rgba(12, 16, 20, 0) 46%),
    linear-gradient(to bottom, rgba(12, 16, 20, .28) 0%, rgba(12, 16, 20, 0) 24%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

@media (hover: hover) {
  .ml-path .ml-path__card:hover .ml-path__img { transform: scale(1.04); }
}

.ml-path .ml-path__overlay {
  --ml-pad: clamp(12px, 4.4cqi, 20px);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  font-size: clamp(9.5px, 3.45cqi, 13.5px);
  gap: clamp(10px, 3.6cqi, 16px);
  inset: 0;
  padding: var(--ml-pad);
  position: absolute;
  z-index: 2;
}

.ml-path .ml-path__num {
  align-items: center;
  align-self: flex-start;
  background-color: var(--ml-paper);
  border-radius: 7px;
  color: var(--ml-ink);
  display: inline-flex;
  flex-shrink: 0;
  font-family: var(--ml-mono);
  font-size: 13px;
  height: 28px;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  width: 28px;
}

.ml-path .ml-path__stage {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  min-height: 0;
}

/* glass building blocks */
.ml-path .ml-path__mock {
  display: flex;
  flex-direction: column;
  gap: .6em;
  width: min(82%, 23em);
}

.ml-path .ml-path__panel,
.ml-path .ml-path__mock--chat,
.ml-path .ml-path__cmd,
.ml-path .ml-path__live,
.ml-path .ml-path__tool {
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  background-color: rgba(17, 22, 27, .58);
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.ml-path .ml-path__panel {
  border-radius: .95em;
  padding: .85em .95em;
}

.ml-path .ml-path__panel-head {
  align-items: center;
  display: flex;
  gap: .5em;
  letter-spacing: -.005em;
  line-height: 1.2;
  margin-bottom: .75em;
  white-space: nowrap;
}
.ml-path .ml-path__panel-head svg {
  flex-shrink: 0;
  height: 1.15em;
  opacity: .75;
  width: 1.15em;
}
.ml-path .ml-path__dim { color: rgba(255, 255, 255, .55); }

.ml-path .ml-path__ph {
  background-color: rgba(255, 255, 255, .22);
  border-radius: 99px;
  display: block;
  height: .5em;
  width: var(--w, 100%);
}

/* card 1 — chat */
.ml-path .ml-path__mock--chat {
  border-radius: 1em;
  gap: .7em;
  padding: .85em;
}
.ml-path .ml-path__bubble {
  border-radius: .9em;
  line-height: 1.25;
}
.ml-path .ml-path__bubble--user {
  align-self: flex-end;
  background-color: rgba(255, 255, 255, .92);
  border-bottom-right-radius: .3em;
  color: var(--ml-ink);
  max-width: 88%;
  padding: .55em .8em;
}
.ml-path .ml-path__bubble--ai {
  align-items: flex-start;
  display: grid;
  gap: .55em .6em;
  grid-template-columns: auto 1fr;
  padding: .1em 0 0;
}
.ml-path .ml-path__avatar {
  align-items: center;
  background-color: rgba(255, 255, 255, .12);
  border-radius: 50%;
  display: inline-flex;
  height: 1.7em;
  justify-content: center;
  width: 1.7em;
}
.ml-path .ml-path__avatar svg { height: .85em; width: .85em; }
.ml-path .ml-path__lines {
  display: flex;
  flex-direction: column;
  gap: .45em;
  padding-top: .45em;
}
.ml-path .ml-path__copy {
  align-items: center;
  background-color: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 99px;
  display: inline-flex;
  font-size: .9em;
  gap: .4em;
  grid-column: 2;
  justify-self: start;
  line-height: 1;
  padding: .4em .7em .4em .6em;
}
.ml-path .ml-path__copy svg { height: 1.05em; width: 1.05em; }

/* card 2 — memory file + command */
.ml-path .ml-path__line {
  align-items: center;
  border-radius: .35em;
  display: grid;
  gap: .7em;
  grid-template-columns: 2em 1fr;
  min-height: 1.75em;
  padding: 0 .4em;
}
.ml-path .ml-path__ln {
  color: rgba(255, 255, 255, .38);
  font-family: var(--ml-mono);
  font-size: .82em;
  text-align: right;
}
.ml-path .ml-path__line.is-hl {
  background-color: rgba(255, 90, 54, .2);
  box-shadow: inset 2px 0 0 var(--ml-signal);
}
.ml-path .ml-path__line.is-hl .ml-path__ln { color: #FFB29F; }
.ml-path .ml-path__hl {
  color: #ffffff;
  font-family: var(--ml-mono);
  font-size: .9em;
  letter-spacing: -.01em;
}
.ml-path .ml-path__cmd {
  align-items: center;
  align-self: flex-start;
  border-radius: 99px;
  display: inline-flex;
  font-family: var(--ml-mono);
  gap: .15em;
  letter-spacing: -.01em;
  line-height: 1;
  padding: .7em 1em;
}
.ml-path .ml-path__caret {
  animation: ml-path-caret 1.1s steps(1) infinite;
  background-color: rgba(255, 255, 255, .85);
  display: inline-block;
  height: 1.05em;
  width: .5em;
}

/* card 3 — meeting notes + tool row */
.ml-path .ml-path__check {
  align-items: center;
  display: grid;
  gap: .55em;
  grid-template-columns: auto 1fr;
  min-height: 1.6em;
}
.ml-path .ml-path__check svg {
  color: rgba(255, 255, 255, .7);
  height: 1.05em;
  width: 1.05em;
}
.ml-path .ml-path__order {
  display: flex;
  flex-direction: column;
  gap: .6em;
}
.ml-path .ml-path__order-name { line-height: 1.2; }
.ml-path .ml-path__order-meta {
  align-items: center;
  display: flex;
  gap: .5em;
  justify-content: space-between;
}
.ml-path .ml-path__score {
  color: rgba(255, 255, 255, .62);
  font-family: var(--ml-mono);
  font-size: .9em;
}
.ml-path .ml-path__ok {
  background-color: rgba(255, 255, 255, .92);
  border-radius: 99px;
  color: var(--ml-ink);
  font-size: .9em;
  line-height: 1;
  padding: .42em .7em;
}

/* card 4 — always-on feed */
.ml-path .ml-path__mock--feed { gap: .45em; }
.ml-path .ml-path__live {
  align-items: center;
  align-self: flex-start;
  border-radius: 99px;
  display: inline-flex;
  font-family: var(--ml-mono);
  font-size: .85em;
  gap: .6em;
  letter-spacing: .02em;
  line-height: 1;
  margin-bottom: .2em;
  padding: .6em .9em .6em .75em;
  text-transform: uppercase;
}
.ml-path .ml-path__pulse {
  background-color: var(--ml-signal);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  height: .6em;
  position: relative;
  width: .6em;
}
.ml-path .ml-path__pulse::after {
  animation: ml-path-pulse 1.8s var(--ml-ease) infinite;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255, 90, 54, .65);
  content: "";
  inset: 0;
  position: absolute;
}
.ml-path .ml-path__notif {
  align-items: center;
  border-radius: .8em;
  display: grid;
  gap: .6em;
  grid-template-columns: auto 1fr auto;
  line-height: 1.2;
  padding: .6em .75em .6em .6em;
}
.ml-path .ml-path__notif-ico {
  align-items: center;
  background-color: rgba(255, 255, 255, .1);
  border-radius: .45em;
  display: inline-flex;
  height: 1.8em;
  justify-content: center;
  width: 1.8em;
}
.ml-path .ml-path__notif-ico svg { height: 1.1em; width: 1.1em; }
.ml-path .ml-path__notif-text { min-width: 0; }
.ml-path .ml-path__time {
  align-self: start;
  color: rgba(255, 255, 255, .5);
  font-family: var(--ml-mono);
  font-size: .82em;
  padding-top: .1em;
}

/* tool chips */
.ml-path .ml-path__tools {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: .4em;
}
.ml-path .ml-path__tool {
  align-items: center;
  border-radius: 99px;
  color: rgba(255, 255, 255, .9);
  display: inline-flex;
  font-size: .92em;
  gap: .42em;
  letter-spacing: -.005em;
  line-height: 1;
  padding: .45em .7em .45em .55em;
  white-space: nowrap;
}
.ml-path .ml-path__logo {
  display: block;
  flex-shrink: 0;
  height: 1.1em;
  width: 1.1em;
}
.ml-path .ml-path__logo--img {
  border-radius: 3px;
  filter: grayscale(1) contrast(1.05);
}

/* ---------- Card body ---------- */
.ml-path .ml-path__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding-top: clamp(18px, calc(15px + .5vw), 24px);
}

.ml-path .ml-path__card-title {
  color: var(--ml-ink);
  font-size: clamp(20px, calc(18.5px + .25vw), 23px);
  letter-spacing: -.02em;
  line-height: 1.1;
}

.ml-path .ml-path__text {
  color: var(--ml-muted);
  font-size: 15.5px;
  letter-spacing: -.005em;
  line-height: 1.45;
  margin-top: 10px;
  max-width: 34em;
  text-wrap: pretty;
}

/* who-does-the-work meter */
.ml-path .ml-path__meter {
  border-top: 1px solid #ECEDEE;
  margin-top: auto;
  padding-top: 16px;
}
.ml-path .ml-path__body > .ml-path__text { margin-bottom: 22px; }

.ml-path .ml-path__meter-label,
.ml-path .ml-path__meter-ends {
  color: var(--ml-muted);
  font-family: var(--ml-mono);
  font-size: 11px;
  letter-spacing: .01em;
  line-height: 1;
  text-transform: uppercase;
}
.ml-path .ml-path__meter-who {
  color: var(--ml-ink);
  font-size: 15px;
  letter-spacing: -.01em;
  line-height: 1.25;
  margin: 9px 0 12px;
}
.ml-path .ml-path__meter-track {
  background-color: var(--ml-track);
  border-radius: 99px;
  height: 4px;
  overflow: hidden;
  position: relative;
}
.ml-path .ml-path__meter-fill {
  background-color: var(--ml-signal);
  border-radius: 99px;
  display: block;
  height: 100%;
  transform-origin: 0 50%;
  width: var(--ml-fill, 0%);
}
.ml-path .ml-path__meter-ends {
  display: flex;
  font-size: 10px;
  justify-content: space-between;
  margin-top: 8px;
  opacity: .8;
}

/* ---------- CTA row ---------- */
.ml-path .ml-path__cta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: center;
  margin-top: clamp(48px, calc(36.57px + 2.857vw), 76px);
}
.ml-path .ml-path__note {
  color: var(--ml-muted);
  font-size: 15.5px;
  letter-spacing: -.005em;
  line-height: 1.3;
}

/* carousel dots (phone only, shown once mayhem-path.js wires them up) */
.ml-path .ml-path__dots { display: none; }

/* ---------- Phone: scroll-snap carousel ---------- */
@media (max-width: 768px) {
  .ml-path .ml-path__list {
    display: flex;
    gap: 14px;
    margin-inline: calc(-1 * var(--ml-gutter));
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-inline: var(--ml-gutter);
    scroll-padding-inline: var(--ml-gutter);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .ml-path .ml-path__list::-webkit-scrollbar { display: none; }
  .ml-path .ml-path__card {
    flex: 0 0 min(82vw, 380px);
    scroll-snap-align: start;
  }
  .ml-path .ml-path__text { font-size: 15px; }
  .ml-path.ml-path--dots .ml-path__dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 28px;
  }
  .ml-path .ml-path__dots span {
    background-color: #D3D7DA;
    border-radius: 99px;
    height: 6px;
    transition: width .35s var(--ml-ease), background-color .35s ease;
    width: 6px;
  }
  .ml-path .ml-path__dots span.is-active {
    background-color: var(--ml-ink);
    width: 20px;
  }
  .ml-path .ml-path__cta {
    flex-direction: column;
    gap: 14px;
  }
  .ml-path .ml-path__note { font-size: 14.5px; }
}

/* ---------- Keyframes ---------- */
@keyframes ml-path-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 90, 54, .6); }
  70% { box-shadow: 0 0 0 .75em rgba(255, 90, 54, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 90, 54, 0); }
}
@keyframes ml-path-caret {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

/* ---------- Optional reveal (only when mayhem-path.js adds .ml-path--js) ---------- */
.ml-path.ml-path--js .ml-path__head,
.ml-path.ml-path--js .ml-path__card,
.ml-path.ml-path--js .ml-path__cta {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity .9s var(--ml-ease), transform .9s var(--ml-ease);
}
.ml-path.ml-path--js .ml-path__card { transition-delay: calc(var(--ml-i, 0) * 110ms); }
.ml-path.ml-path--js .ml-path__meter-fill {
  transform: scaleX(0);
  transition: transform 1.2s var(--ml-ease) calc(var(--ml-i, 0) * 110ms + 350ms);
}
.ml-path.ml-path--js .is-in,
.ml-path.ml-path--js .ml-path__card.is-in {
  opacity: 1;
  transform: none;
}
.ml-path.ml-path--js .ml-path__card.is-in .ml-path__meter-fill { transform: scaleX(1); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ml-path .ml-path__pulse::after,
  .ml-path .ml-path__caret { animation: none; }
  .ml-path .ml-path__img,
  .ml-path .ml-path__dots span { transition: none; }
  .ml-path .ml-path__card:hover .ml-path__img { transform: none; }
  .ml-path.ml-path--js .ml-path__head,
  .ml-path.ml-path--js .ml-path__card,
  .ml-path.ml-path--js .ml-path__cta,
  .ml-path.ml-path--js .ml-path__meter-fill {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
