/* ==========================================================================
   Move My Way — AI feature components
   Everything specific to Compass and the barrier-photo check: the reliability
   ladder, the screening pipeline, the voice visuals and the model spec tables.
   Shares the soft-UI tokens defined in style.css.
   ========================================================================== */

/* --- Assistant orb ------------------------------------------------------- */
.orb-stage { position: relative; display: grid; place-items: center; padding: 30px 0; }
.orb {
  position: relative;
  width: clamp(160px, 21vw, 232px); aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--surface-raised), var(--surface-sunken));
  box-shadow: var(--nm-lifted);
  display: grid; place-items: center;
}
.orb__core {
  width: 58%; aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(150deg, var(--coral-light), var(--coral) 55%, var(--coral-dark));
  box-shadow: 0 12px 30px rgba(224, 74, 46, .42), inset -6px -6px 16px rgba(255, 255, 255, .35);
  display: grid; place-items: center;
  color: #fff;
  animation: orb-breathe 4.5s var(--ease-soft) infinite;
}
.orb__core svg { width: 42%; height: 42%; }
/* The mascot sits slightly proud of the core and casts its own shadow, so it
   reads as a character standing in the orb rather than a flat sticker. */
.orb__core img {
  width: 74%; height: auto; object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(120, 40, 20, .35));
  transform: translateY(-2%);
}
/* Concentric rings that ripple outward, like the listening state in the app. */
.orb__ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(255, 103, 75, .34);
  animation: orb-ripple 3.6s var(--ease-soft) infinite;
}
.orb__ring:nth-of-type(2) { animation-delay: 1.2s; }
.orb__ring:nth-of-type(3) { animation-delay: 2.4s; }

@keyframes orb-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
@keyframes orb-ripple {
  0%   { transform: scale(.62); opacity: .85; }
  100% { transform: scale(1.28); opacity: 0; }
}

/* Language pills floating around the orb.
   The wrapper is `display: contents` on desktop, so each pill positions against
   .orb-stage rather than against the circle; on small screens the wrapper turns
   into an ordinary wrapped row underneath. */
.orb-langs { display: contents; }
.orb__lang {
  position: absolute; z-index: 2;
  padding: 9px 16px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--nm-raised);
  font-size: .8rem; font-weight: 700; white-space: nowrap;
  animation: float-y 6s var(--ease-soft) infinite;
}
.orb__lang b { color: var(--coral-deep); margin-right: 3px; }
/* Explicit modifiers, not :nth-of-type — the rings and the core are <span>s too,
   so a type-based selector would count them and stack every pill in the middle. */
.orb__lang--a { top: 4%;     left: 0;    animation-delay: -.4s; }
.orb__lang--b { top: 33%;    right: 0;   animation-delay: -1.8s; }
.orb__lang--c { bottom: 26%; left: 0;    animation-delay: -3.1s; }
.orb__lang--d { bottom: 2%;  right: 4%;  animation-delay: -4.6s; }

@media (max-width: 1024px) {
  .orb__lang { font-size: .74rem; padding: 8px 13px; }
}

@media (max-width: 900px) {
  .orb-langs {
    display: flex; flex-wrap: wrap; gap: 10px;
    justify-content: center; margin-top: 26px;
  }
  .orb__lang { position: static; animation: none; }
}

/* --- Voice waveform ------------------------------------------------------ */
.wave {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  height: 46px; padding: 0 22px;
  border-radius: 999px; background: var(--surface-sunken);
  box-shadow: var(--nm-inset-sm);
}
.wave i {
  display: block; width: 4px; border-radius: 999px;
  background: linear-gradient(180deg, var(--coral-light), var(--coral-dark));
  height: 30%;
  animation: wave-bounce 1.15s var(--ease-soft) infinite;
}
.wave i:nth-child(1) { animation-delay: -.9s; }
.wave i:nth-child(2) { animation-delay: -.75s; }
.wave i:nth-child(3) { animation-delay: -.6s; }
.wave i:nth-child(4) { animation-delay: -.45s; }
.wave i:nth-child(5) { animation-delay: -.3s; }
.wave i:nth-child(6) { animation-delay: -.15s; }
.wave i:nth-child(7) { animation-delay: -.55s; }
.wave i:nth-child(8) { animation-delay: -.25s; }
.wave i:nth-child(9) { animation-delay: -.7s; }
@keyframes wave-bounce {
  0%, 100% { height: 22%; }
  50%      { height: 92%; }
}

/* --- Reliability ladder -------------------------------------------------- */
.ladder { display: grid; gap: 0; counter-reset: tier; }
.ladder__tier {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px; align-items: center;
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--nm-raised);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.ladder__tier:hover { transform: translateX(6px); box-shadow: var(--nm-lifted); }
.ladder__tier + .ladder__tier { margin-top: 42px; }

/* The connector between tiers, drawn as a downward arrow that fills on reveal. */
.ladder__tier + .ladder__tier::before {
  content: '';
  position: absolute; left: 46px; top: -42px; width: 3px; height: 42px;
  background: linear-gradient(180deg, var(--coral), var(--coral-light));
  border-radius: 3px;
  transform: scaleY(0); transform-origin: top;
  transition: transform .7s var(--ease);
}
.is-visible .ladder__tier + .ladder__tier::before { transform: scaleY(1); }
.ladder__tier:nth-child(3)::before { transition-delay: .25s; }

.ladder__num {
  counter-increment: tier;
  width: 46px; height: 46px; border-radius: 16px; flex: none;
  display: grid; place-items: center;
  background: var(--surface); color: var(--coral-deep);
  box-shadow: var(--nm-inset-sm);
  font-size: .9rem; font-weight: 800;
}
.ladder__num::before { content: counter(tier); }
.ladder__body h3 { font-size: 1.06rem; font-weight: 800; letter-spacing: -.015em; }
.ladder__body p { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.ladder__tag {
  flex: none; padding: 8px 15px; border-radius: 999px;
  background: var(--surface-sunken); box-shadow: var(--nm-inset-sm);
  font-size: .74rem; font-weight: 800; letter-spacing: .04em;
  font-family: ui-monospace, 'Cascadia Code', Menlo, monospace;
  color: var(--ink-soft); white-space: nowrap;
}
.ladder__tag--offline { color: var(--green); }

@media (max-width: 700px) {
  .ladder__tier { grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
  .ladder__tag { grid-column: 2; justify-self: start; }
  .ladder__tier + .ladder__tier::before { left: 33px; }
}

/* --- Screening pipeline -------------------------------------------------- */
.pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; position: relative; }
.pipe {
  position: relative;
  padding: 26px 22px 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--nm-raised);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.pipe:hover { transform: translateY(-6px); box-shadow: var(--nm-lifted); }
.pipe__step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 10px;
  background: var(--surface-sunken); box-shadow: var(--nm-inset-sm);
  font-size: .74rem; font-weight: 800; color: var(--coral-deep);
  margin-bottom: 14px;
}
.pipe__icon { width: 26px; height: 26px; color: var(--coral-dark); margin-bottom: 12px; }
.pipe h3 { font-size: 1rem; font-weight: 800; letter-spacing: -.015em; }
.pipe p { color: var(--muted); font-size: .88rem; margin-top: 8px; }
.pipe__cost {
  display: inline-block; margin-top: 14px;
  padding: 5px 12px; border-radius: 999px;
  font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  background: var(--surface-sunken); box-shadow: var(--nm-inset-sm);
  color: var(--green);
}
.pipe__cost--net { color: var(--blue-deep); }

/* Arrow between stages. */
.pipe::after {
  content: ''; position: absolute; top: 50%; right: -13px;
  width: 9px; height: 9px; z-index: 2;
  border-top: 2.5px solid var(--coral); border-right: 2.5px solid var(--coral);
  transform: translateY(-50%) rotate(45deg);
  opacity: 0; transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.is-visible .pipe::after { opacity: .85; }
.pipe:last-child::after { display: none; }
.is-visible .pipe:nth-child(2)::after { transition-delay: .15s; }
.is-visible .pipe:nth-child(3)::after { transition-delay: .3s; }

@media (max-width: 980px) { .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pipe::after { display: none; } }
@media (max-width: 560px) { .pipeline { grid-template-columns: 1fr; } }

/* --- Verdict cards ------------------------------------------------------- */
.verdicts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.verdict {
  padding: 26px 24px; border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--nm-raised);
  border-top: 5px solid var(--green);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.verdict:hover { transform: translateY(-6px); box-shadow: var(--nm-lifted); }
.verdict--reject { border-top-color: var(--red); }
.verdict--unsure { border-top-color: var(--amber); }
.verdict__head { display: flex; align-items: center; gap: 12px; }
.verdict__dot {
  width: 38px; height: 38px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  background: var(--surface); box-shadow: var(--nm-inset-sm);
  color: var(--green);
}
.verdict__dot svg { width: 19px; height: 19px; }
.verdict--reject .verdict__dot { color: var(--red); }
.verdict--unsure .verdict__dot { color: #9a7208; }
.verdict__name { font-family: ui-monospace, 'Cascadia Code', Menlo, monospace; font-size: .82rem; font-weight: 700; color: var(--muted); }
.verdict h3 { font-size: 1.02rem; font-weight: 800; margin-top: 2px; }
.verdict p { color: var(--muted); font-size: .89rem; margin-top: 12px; }
.verdict__note {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: .82rem; font-weight: 600; color: var(--ink-soft);
}

@media (max-width: 860px) { .verdicts { grid-template-columns: 1fr; } }

/* --- Spec table ---------------------------------------------------------- */
.spec {
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); box-shadow: var(--nm-raised);
}
.spec__row {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, 1.5fr);
  gap: 18px; align-items: center;
  padding: 18px 24px;
}
.spec__row + .spec__row { border-top: 1px solid var(--line); }
.spec__row--head {
  background: var(--surface-sunken);
  font-size: .72rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase;
  color: var(--muted);
}
.spec__what { font-weight: 700; font-size: .93rem; }
.spec__host { font-size: .85rem; color: var(--muted); font-weight: 600; }
.spec__model {
  font-family: ui-monospace, 'Cascadia Code', Menlo, monospace;
  font-size: .82rem; font-weight: 600;
  color: var(--coral-deep);
  background: var(--surface-sunken);
  padding: 7px 13px; border-radius: 9px;
  box-shadow: var(--nm-inset-sm);
  justify-self: start; overflow-wrap: anywhere;
}
.spec__model--muted { color: var(--muted); }

@media (max-width: 760px) {
  .spec__row { grid-template-columns: 1fr; gap: 7px; padding: 18px 20px; }
  .spec__row--head { display: none; }
  .spec__model { justify-self: stretch; }
}

/* --- Tool split (read vs write) ------------------------------------------ */
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.toolbox { padding: 28px 26px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--nm-raised); }
.toolbox__head { display: flex; align-items: center; gap: 13px; margin-bottom: 8px; }
.toolbox__pill {
  padding: 6px 14px; border-radius: 999px;
  font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: var(--surface-sunken); box-shadow: var(--nm-inset-sm);
  color: var(--green);
}
.toolbox__pill--write { color: var(--coral-deep); }
.toolbox p { color: var(--muted); font-size: .92rem; }
.toolnames { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.toolnames code {
  font-family: ui-monospace, 'Cascadia Code', Menlo, monospace;
  font-size: .78rem; font-weight: 600;
  padding: 7px 13px; border-radius: 10px;
  background: var(--surface-sunken); box-shadow: var(--nm-inset-sm);
  color: var(--ink-soft);
  transition: transform .3s var(--ease), color .25s;
}
.toolnames code:hover { transform: translateY(-2px); color: var(--coral-deep); }

@media (max-width: 860px) { .tools { grid-template-columns: 1fr; } }

/* --- Honesty callout ----------------------------------------------------- */
.honesty {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start;
  padding: clamp(26px, 3vw, 36px);
  border-radius: var(--radius-xl);
  background: var(--surface-sunken);
  box-shadow: var(--nm-inset);
}
.honesty__mark {
  width: 52px; height: 52px; border-radius: 18px; flex: none;
  display: grid; place-items: center;
  background: var(--surface); box-shadow: var(--nm-flat);
  color: var(--coral-dark);
}
.honesty__mark svg { width: 25px; height: 25px; }
.honesty h3 { font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; }
.honesty p { color: var(--muted); font-size: .95rem; margin-top: 10px; }
.honesty p + p { margin-top: 12px; }

@media (max-width: 620px) { .honesty { grid-template-columns: 1fr; gap: 16px; } }

/* --- Wake-word demo ------------------------------------------------------ */
.wake {
  display: grid; gap: 20px;
  padding: clamp(26px, 3vw, 38px);
  border-radius: var(--radius-xl);
  background: var(--surface); box-shadow: var(--nm-raised);
}
.wake__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.wake__heard {
  font-family: ui-monospace, 'Cascadia Code', Menlo, monospace;
  font-size: .86rem; font-weight: 600;
  padding: 10px 16px; border-radius: 12px;
  background: var(--surface-sunken); box-shadow: var(--nm-inset-sm);
  color: var(--ink-soft);
}
.wake__verdict {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  font-size: .78rem; font-weight: 800;
  background: var(--surface); box-shadow: var(--nm-flat);
  color: var(--green);
}
.wake__verdict svg { width: 14px; height: 14px; }
.wake__verdict--no { color: var(--red); }
.wake__arrow { color: var(--hint); font-weight: 800; }

/* --- Section rhythm helpers --------------------------------------------- */
.stack-lg > * + * { margin-top: clamp(30px, 4vw, 48px); }
.rule { height: 1px; background: var(--line); border: 0; margin: clamp(34px, 5vw, 56px) 0; }
