/* ═══════════════════════════════════════════════════════════
   Slide 2 — Philosophy
   Quick solve first, then next question or a deeper explanation.
   ═══════════════════════════════════════════════════════════ */

.slide-philosophy {
  --route-line: color-mix(in srgb, var(--text-muted) 30%, transparent);
  --route-line-active: var(--accent);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 84px 48px 40px;
}

.philo-route-layout {
  position: relative;
  z-index: 1;
  width: min(100%, 1120px);
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(48px, 7vw, 104px);
}

.philo-route-copy {
  min-width: 0;
  max-width: 580px;
}

.philo-route-kicker,
.philo-route-card__kicker {
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.philo-route-headline {
  max-width: 580px;
  margin-top: 14px;
  color: var(--text-primary);
  font-size: clamp(1.9rem, 2.3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.75;
  text-wrap: balance;
}

.philo-route-headline em {
  color: var(--accent);
  font-style: normal;
}

.philo-route-body {
  max-width: 500px;
  margin-top: 18px;
  color: var(--text-secondary);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 2;
}

.philo-route-body p + p {
  margin-top: 10px;
}

.philo-route-promise {
  max-width: 43ch;
  margin-top: 18px;
  padding-inline-start: 18px;
  border-inline-start: 3px solid var(--accent);
  color: var(--text-primary);
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.65;
}

.philo-route-actions {
  margin-top: 16px;
}

.philo-route-cta {
  min-width: 0;
  padding: 17px 42px;
  font-size: 1.2rem;
}

html.slides-observed .slide-philosophy:not(.is-active-slide) .philo-route-cta::before {
  animation-play-state: paused;
}

html[lang="ckb"] .philo-route-kicker,
html[lang="ckb"] .philo-route-card__kicker {
  letter-spacing: 0;
  text-transform: none;
}

html[lang="ckb"] .philo-route-headline {
  max-width: 580px;
  letter-spacing: 0;
  line-height: 1.75;
}

html[lang="ckb"] .philo-route-body {
  line-height: 2;
}

.philo-route-card {
  position: relative;
  min-width: 0;
  min-height: 510px;
  padding: 24px clamp(22px, 3vw, 34px) 18px;
  border: 1px solid color-mix(in srgb, var(--surface-2) 76%, white 24%);
  border-radius: clamp(28px, 4vw, 40px);
  background:
    radial-gradient(circle at 50% 34%, color-mix(in srgb, var(--accent-glow) 13%, transparent), transparent 35%),
    color-mix(in srgb, var(--surface-glass) 91%, white 9%);
  box-shadow: var(--shadow-raised), inset 0 1px 0 rgba(255,255,255,.32);
  isolation: isolate;
}

.philo-route-card::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 17%;
  right: 17%;
  bottom: 15%;
  height: 23%;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--accent-glow), transparent 68%);
  filter: blur(28px);
  opacity: .13;
  pointer-events: none;
}

[data-theme="dark"] .philo-route-card {
  border-color: color-mix(in srgb, var(--surface-2) 84%, white 16%);
  background:
    radial-gradient(circle at 50% 34%, color-mix(in srgb, var(--accent-glow) 14%, transparent), transparent 36%),
    color-mix(in srgb, var(--surface-glass) 94%, black 6%);
  box-shadow: var(--shadow-raised), inset 0 1px 0 rgba(255,255,255,.055);
}

.philo-route-card__kicker {
  display: block;
  text-align: center;
}

.philo-route-map {
  width: min(100%, 430px);
  min-width: 0;
  margin: 20px auto 0;
  direction: ltr;
}

.philo-route-node {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  border: 0;
  color: var(--text-primary);
  text-align: center;
}

html[dir="rtl"] .philo-route-node {
  direction: rtl;
}

.philo-route-node--question {
  width: max-content;
  min-width: 108px;
  margin-inline: auto;
  padding: 9px 18px;
  border: 1px solid color-mix(in srgb, var(--text-muted) 18%, transparent);
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-raised-sm);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

html[lang="ckb"] .philo-route-node--question {
  letter-spacing: 0;
  text-transform: none;
}

.philo-route-stem {
  position: relative;
  width: 2px;
  height: 34px;
  margin-inline: auto;
  overflow: hidden;
  background: var(--route-line);
}

.philo-route-stem::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--route-line-active);
  transform-origin: top;
  animation: philo-draw-route .7s .16s var(--ease-out) both;
}

.philo-route-node--quick {
  position: relative;
  min-height: 96px;
  padding: 17px 22px;
  gap: 15px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 25px;
  background: var(--surface);
  box-shadow: var(--shadow-inset);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s var(--ease-out), border-color .2s var(--ease-out);
}

.philo-route-node--quick:hover,
.philo-route-node--quick:focus-visible {
  border-color: var(--accent);
  outline: none;
  transform: translateY(-2px);
}

.philo-route-node__step {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 10%, transparent);
  font-family: 'IBM Plex Mono', monospace;
  font-size: .73rem;
  font-weight: 700;
}

.philo-route-node__copy {
  min-width: 0;
  display: grid;
  gap: 5px;
  text-align: start;
}

.philo-route-node__title {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.25;
}

.philo-route-node__meta {
  color: var(--text-muted);
  font-size: .69rem;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.philo-route-fork {
  position: relative;
  height: 58px;
  --fork-left: 25%;
  --fork-right: 75%;
}

.philo-route-fork span {
  position: absolute;
  display: block;
  background: var(--route-line);
  transition: background .3s var(--ease-out), box-shadow .3s var(--ease-out);
}

.philo-route-fork__stem {
  top: 0;
  left: calc(50% - 1px);
  width: 2px;
  height: 27px;
}

.philo-route-fork__next,
.philo-route-fork__deep {
  top: 25px;
  height: 2px;
}

.philo-route-fork__next {
  left: var(--fork-left);
  right: 50%;
}

.philo-route-fork__deep {
  left: 50%;
  right: calc(100% - var(--fork-right));
}

.philo-route-fork__drop-next,
.philo-route-fork__drop-deep {
  top: 25px;
  width: 2px;
  height: 33px;
}

.philo-route-fork__drop-next {
  left: calc(var(--fork-left) - 1px);
}

.philo-route-fork__drop-deep {
  left: calc(var(--fork-right) - 1px);
}

.philo-route-card[data-route="next"] .philo-route-fork__stem,
.philo-route-card[data-route="next"] .philo-route-fork__next,
.philo-route-card[data-route="next"] .philo-route-fork__drop-next,
.philo-route-card[data-route="deep"] .philo-route-fork__stem,
.philo-route-card[data-route="deep"] .philo-route-fork__deep,
.philo-route-card[data-route="deep"] .philo-route-fork__drop-deep {
  background: var(--route-line-active);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 45%, transparent);
}

.philo-route-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  gap: 15px;
}

.philo-route-node--choice {
  min-height: 96px;
  padding: 15px 12px;
  border: 1px solid transparent;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-raised-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform .2s var(--ease-out),
    border-color .25s var(--ease-out),
    box-shadow .25s var(--ease-out);
}

.philo-route-node--choice:hover,
.philo-route-node--choice:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 52%, transparent);
  outline: none;
  transform: translateY(-3px);
}

.philo-route-node--choice .philo-route-node__copy {
  justify-items: center;
  text-align: center;
}

.philo-route-node--choice .philo-route-node__title {
  font-size: .92rem;
}

.philo-route-node--choice .philo-route-node__meta {
  max-width: 19ch;
}

.philo-route-card[data-route="next"] .philo-route-node--next,
.philo-route-card[data-route="deep"] .philo-route-node--deep {
  border-color: var(--accent);
  box-shadow:
    var(--shadow-raised-sm),
    0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
  transform: translateY(-3px);
}

.philo-route-card__status {
  min-height: 2.8em;
  max-width: 42ch;
  margin: 16px auto 0;
  color: var(--text-secondary);
  font-size: .72rem;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
}

.philo-route-card__status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-inline-end: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
  vertical-align: .08em;
}

@keyframes philo-draw-route {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@media (min-width: 1024px) and (max-height: 800px) {
  .slide-philosophy {
    padding-block: 72px 28px;
  }

  .philo-route-layout {
    gap: clamp(38px, 5vw, 76px);
  }

  .philo-route-headline {
    font-size: 1.9rem;
  }

  .philo-route-body {
    margin-top: 20px;
    font-size: .86rem;
  }

  .philo-route-promise {
    margin-top: 18px;
    font-size: .8rem;
  }

  .philo-route-actions {
    margin-top: 16px;
  }

  .philo-route-cta {
    padding: 12px 32px;
    font-size: .95rem;
  }

  .philo-route-card {
    min-height: 460px;
    padding-block: 20px 15px;
  }

  .philo-route-map {
    margin-top: 20px;
  }

  .philo-route-node--quick,
  .philo-route-node--choice {
    min-height: 84px;
  }

  .philo-route-fork {
    height: 50px;
  }

  .philo-route-fork__stem {
    height: 23px;
  }

  .philo-route-fork__next,
  .philo-route-fork__deep,
  .philo-route-fork__drop-next,
  .philo-route-fork__drop-deep {
    top: 21px;
  }

  .philo-route-fork__drop-next,
  .philo-route-fork__drop-deep {
    height: 29px;
  }

  .philo-route-card__status {
    margin-top: 16px;
  }
}

@media (max-width: 1023px) {
  .slide-philosophy {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: auto;
    padding: 92px 32px 56px;
  }

  .slide-philosophy .next-cue--pinned {
    position: absolute;
    bottom: 12px;
  }

  .philo-route-layout {
    width: min(100%, 680px);
    margin-inline: auto;
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .philo-route-copy {
    width: 100%;
    max-width: 620px;
    margin-inline: auto;
    text-align: center;
  }

  .philo-route-headline,
  html[lang="ckb"] .philo-route-headline {
    max-width: 580px;
    margin-inline: auto;
    margin-top: 16px;
    font-size: clamp(1.55rem, 3.4vw, 1.92rem);
    line-height: 1.8;
  }

  .philo-route-body,
  .philo-route-promise {
    margin-inline: auto;
  }

  .philo-route-promise {
    width: auto;
    max-width: 500px;
    padding-inline: 0;
    padding-top: 15px;
    border-inline-start: 0;
    border-top: 3px solid var(--accent);
  }

  .philo-route-actions {
    display: flex;
    justify-content: center;
  }

  .philo-route-card {
    min-height: auto;
  }
}

@media (max-width: 639px) {
  .slide-philosophy {
    height: 100dvh;
    min-height: 100dvh;
    justify-content: center;
    overflow: hidden;
    padding: 76px 22px 54px;
  }

  .philo-route-layout {
    display: block;
    width: min(100%, 360px);
  }

  .philo-route-copy {
    width: 100%;
    max-width: 360px;
    margin-inline: auto;
    text-align: center;
  }

  .philo-route-kicker {
    font-size: .58rem;
    letter-spacing: .15em;
  }

  .philo-route-headline {
    max-width: 22ch;
    margin-top: 6px;
    font-size: 1.2rem;
    line-height: 1.75;
  }

  html[lang="ckb"] .philo-route-headline {
    max-width: 22ch;
    line-height: 1.75;
  }

  .philo-route-body {
    max-width: 360px;
    margin-top: 20px;
    font-size: .78rem;
    line-height: 1.95;
  }

  html[lang="ckb"] .philo-route-body {
    line-height: 1.95;
  }

  .philo-route-body p + p {
    margin-top: 12px;
  }

  .philo-route-promise {
    position: relative;
    max-width: 32ch;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 0;
    font-size: .72rem;
    line-height: 1.6;
  }

  .philo-route-promise::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 44px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
    transform: translateX(-50%);
  }

  .philo-route-actions {
    margin-top: 20px;
  }

  .philo-route-cta {
    min-width: 112px;
    padding: 11px 28px;
    font-size: .9rem;
  }

  .philo-route-card {
    display: none;
  }

  .slide-philosophy .next-cue--pinned {
    bottom: 6px;
    font-size: .56rem;
  }
}

@media (max-width: 360px) {
  .slide-philosophy {
    padding-inline: 18px;
    padding-bottom: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .philo-route-stem::after {
    animation: none;
  }
}
