/* How Calmtopia works — proof page (scoped under .page-how) */

.page-how {
  background: #f4f6ff;
  color: var(--ink);
}

.page-how main > section {
  position: relative;
}

/* ——— Hero ——— */
.hiw-hero {
  min-height: min(92vh, 820px);
  display: flex;
  align-items: center;
  padding: clamp(72px, 12vw, 120px) 20px 56px;
  overflow: hidden;
}
.hiw-hero__sky {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(165deg, #e8ecff 0%, #f5f0ff 38%, #fff5eb 72%, #eef6ff 100%);
  background-size: 200% 200%;
  animation: hiwSkyDrift 28s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .hiw-hero__sky {
    animation: none;
    background-size: auto;
  }
}
@keyframes hiwSkyDrift {
  0%,
  100% {
    background-position: 0% 40%;
  }
  50% {
    background-position: 100% 60%;
  }
}
.hiw-hero__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 12% 22%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 78% 18%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(2px 2px at 44% 68%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 88% 72%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(2px 2px at 30% 88%, rgba(255, 255, 255, 0.5), transparent);
  opacity: 0.55;
  animation: hiwSparkle 14s ease-in-out infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
  .hiw-hero__particles {
    animation: none;
  }
}
@keyframes hiwSparkle {
  from {
    opacity: 0.35;
    transform: translateY(0);
  }
  to {
    opacity: 0.65;
    transform: translateY(-8px);
  }
}
.hiw-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 900px) {
  .hiw-hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
}
.hiw-hero__copy .caption {
  margin-bottom: 10px;
}
.hiw-hero__h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 14px;
  color: var(--ink);
}
.hiw-hero__sub {
  margin: 0 0 24px;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  font-weight: 600;
  color: rgba(12, 16, 40, 0.68);
  max-width: 36ch;
  line-height: 1.45;
}
.hiw-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hiw-hero__stage {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 900px;
}
.hiw-hero__glow {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(320px, 70vw);
  height: min(320px, 70vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 140, 255, 0.45) 0%, transparent 68%);
  filter: blur(28px);
  animation: hiwGlowPulse 4.5s ease-in-out infinite;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
@media (prefers-reduced-motion: reduce) {
  .hiw-hero__glow {
    animation: none;
    opacity: 0.7;
  }
}
@keyframes hiwGlowPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.75;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.06);
    opacity: 1;
  }
}
.hiw-hero__phone-wrap {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out;
}
.hiw-hero__phone-wrap .phone {
  width: min(280px, 72vw);
  margin: 0 auto;
  box-shadow: 0 40px 80px rgba(31, 35, 82, 0.22);
}

/* ——— Moment demo ——— */
.hiw-moment {
  padding: 56px 20px 64px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}
.hiw-moment__inner {
  max-width: 1080px;
  margin: 0 auto;
}
.hiw-moment__grid {
  display: grid;
  gap: 28px;
  align-items: start;
}
@media (min-width: 880px) {
  .hiw-moment__grid {
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
    gap: 40px;
  }
}
.hiw-moment__label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dawn-deep);
  margin: 0 0 10px;
}
.hiw-moment__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin: 0 0 18px;
  color: var(--ink);
}
.hiw-moment__choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hiw-moment__choice {
  font: inherit;
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid rgba(99, 102, 241, 0.2);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s var(--ease-settle);
}
.hiw-moment__choice:hover {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.12);
  transform: translateY(-2px);
}
.hiw-moment__choice.is-active {
  border-color: transparent;
  background: linear-gradient(120deg, #6366f1, #7c3aed);
  color: #fff;
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.35);
}
.hiw-moment__device {
  position: relative;
  border-radius: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(12, 16, 40, 0.08);
  box-shadow: 0 28px 70px rgba(31, 35, 82, 0.12);
}
.hiw-moment__glow-ring {
  position: absolute;
  inset: -6%;
  border-radius: 32px;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(99, 102, 241, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.hiw-moment__device.is-pulse .hiw-moment__glow-ring {
  opacity: 1;
}
.hiw-moment__panels {
  position: relative;
  min-height: 420px;
}
@media (min-width: 520px) {
  .hiw-moment__panels {
    min-height: 460px;
  }
}
.hiw-moment__panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s var(--ease-out-soft), transform 0.45s var(--ease-out-soft);
  transform: translateY(8px);
}
.hiw-moment__panel.is-active {
  opacity: 1;
  visibility: visible;
  position: relative;
  pointer-events: auto;
  transform: translateY(0);
}
.hiw-moment__quote {
  margin: 18px 0 0;
  text-align: center;
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  font-weight: 700;
  color: var(--dawn-deep);
  font-style: italic;
}

/* ——— 4-step flow ——— */
.hiw-flow {
  padding: 56px 20px 64px;
  background: #f8fafc;
}
.hiw-flow__inner {
  max-width: 1080px;
  margin: 0 auto;
}
.hiw-flow__head {
  text-align: center;
  max-width: 46ch;
  margin: 0 auto 32px;
}
.hiw-flow__track {
  position: relative;
}
.hiw-flow__cards {
  display: grid;
  gap: 16px;
  position: relative;
  z-index: 1;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .hiw-flow__cards {
    grid-template-columns: repeat(4, 1fr);
    align-items: stretch;
  }
}
.hiw-flow__connector {
  display: none;
}
@media (min-width: 800px) {
  .hiw-flow__connector {
    display: block;
    position: absolute;
    left: 8%;
    right: 8%;
    top: 48px;
    height: 3px;
    border-radius: 3px;
    background: rgba(99, 102, 241, 0.12);
    z-index: 0;
    pointer-events: none;
  }
  .hiw-flow__connector span {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: 3px;
    background: linear-gradient(90deg, #a78bfa, #6ee7b7, #fcd34d);
    transition: width 1.1s var(--ease-out-soft);
  }
  .hiw-flow__track.is-visible .hiw-flow__connector span {
    width: 100%;
  }
}
.hiw-step-card {
  position: relative;
  z-index: 1;
  padding: 22px 18px;
  margin: 10px 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(12, 16, 40, 0.08);
  box-shadow: 0 18px 48px rgba(31, 35, 82, 0.08);
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s var(--ease-out-soft),
    transform 0.6s var(--ease-out-soft),
    box-shadow 0.35s ease;
}
.hiw-flow__track.is-visible .hiw-flow__cards .hiw-step-card {
  opacity: 1;
  transform: translateY(0);
}
.hiw-flow__track.is-visible .hiw-flow__cards .hiw-step-card:nth-child(1) {
  transition-delay: 0.06s;
}
.hiw-flow__track.is-visible .hiw-flow__cards .hiw-step-card:nth-child(2) {
  transition-delay: 0.12s;
}
.hiw-flow__track.is-visible .hiw-flow__cards .hiw-step-card:nth-child(3) {
  transition-delay: 0.18s;
}
.hiw-flow__track.is-visible .hiw-flow__cards .hiw-step-card:nth-child(4) {
  transition-delay: 0.24s;
}
.hiw-step-card:hover {
  box-shadow: 0 24px 56px rgba(99, 102, 241, 0.14);
}
@media (prefers-reduced-motion: reduce) {
  .hiw-step-card {
    opacity: 1;
    transform: none;
  }
  .hiw-flow__connector span {
    width: 100% !important;
    transition: none;
  }
}
.hiw-step-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  margin-bottom: 12px;
}
.hiw-step-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}
.hiw-step-card p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(12, 16, 40, 0.62);
  line-height: 1.45;
}

/* ——— No talking ——— */
.hiw-quiet {
  padding: 56px 20px;
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
}
.hiw-quiet__inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  gap: 28px;
  align-items: center;
}
@media (min-width: 820px) {
  .hiw-quiet__inner {
    grid-template-columns: minmax(0, 0.4fr) minmax(0, 1fr);
  }
}
.hiw-quiet__art {
  display: flex;
  justify-content: center;
}
.hiw-quiet__art img {
  width: min(200px, 55vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(99, 102, 241, 0.25));
  animation: hiwBreathe 4.2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .hiw-quiet__art img {
    animation: none;
  }
}
@keyframes hiwBreathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.03);
  }
}
.hiw-quiet__copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 800;
  margin: 0 0 14px;
}
.hiw-quiet__copy p {
  margin: 0 0 16px;
  font-weight: 600;
  color: rgba(12, 16, 40, 0.72);
  line-height: 1.55;
  max-width: 48ch;
}
.hiw-quiet__micro {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--dawn-deep);
}

/* ——— Sleep trio ——— */
.hiw-sleep {
  position: relative;
  padding: 56px 20px 64px;
  background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 45%, #0f172a 100%);
  color: #e2e8f0;
  overflow: hidden;
}
.hiw-sleep__inner {
  max-width: 1040px;
  margin: 0 auto;
  text-align: center;
}
.hiw-sleep__inner .caption {
  color: rgba(226, 232, 240, 0.65);
}
.hiw-sleep__inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.1rem);
  font-weight: 800;
  margin: 8px auto 12px;
  color: #fff;
}
.hiw-sleep__inner > p.lead {
  margin: 0 auto 32px;
  max-width: 46ch;
  color: rgba(226, 232, 240, 0.82);
  font-weight: 600;
}
.hiw-sleep__stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 70% 20%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 50% 70%, #fff, transparent);
  animation: hiwStars 22s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .hiw-sleep__stars {
    animation: none;
  }
}
@keyframes hiwStars {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(24px);
  }
}
.hiw-sleep__phones {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  justify-items: center;
}
@media (min-width: 780px) {
  .hiw-sleep__phones {
    grid-template-columns: repeat(3, 1fr);
  }
}
.hiw-sleep__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hiw-sleep__item figcaption {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: rgba(226, 232, 240, 0.88);
}
.hiw-sleep__phones .phone {
  width: min(220px, 80vw);
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.65s var(--ease-out-soft),
    transform 0.65s var(--ease-out-soft);
}
.hiw-sleep.is-visible .hiw-sleep__phones .hiw-sleep__item:nth-child(1) .phone {
  opacity: 1;
  transform: translateY(0);
}
.hiw-sleep.is-visible .hiw-sleep__phones .hiw-sleep__item:nth-child(2) .phone {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.12s;
}
.hiw-sleep.is-visible .hiw-sleep__phones .hiw-sleep__item:nth-child(3) .phone {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.24s;
}
@media (prefers-reduced-motion: reduce) {
  .hiw-sleep__phones .hiw-sleep__item .phone {
    opacity: 1;
    transform: none;
  }
}

/* ——— Learning grid (ESA-safe) ——— */
.hiw-learn {
  padding: 56px 20px;
  background: #fff;
}
.hiw-learn__inner {
  max-width: 1040px;
  margin: 0 auto;
}
.hiw-learn__head {
  text-align: center;
  max-width: 48ch;
  margin: 0 auto 28px;
}
.hiw-learn__grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .hiw-learn__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 980px) {
  .hiw-learn__grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
.hiw-learn-card {
  padding: 18px 16px;
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(99, 102, 241, 0.06), rgba(52, 211, 153, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.14);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hiw-learn-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(31, 35, 82, 0.1);
}
.hiw-learn-card h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--dawn-deep);
}
.hiw-learn-card p {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(12, 16, 40, 0.62);
  line-height: 1.4;
}

/* ——— Parent insight ——— */
.hiw-parent {
  padding: 56px 20px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}
.hiw-parent__inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.hiw-parent__inner > p.lead {
  margin: 0 0 22px;
  font-weight: 600;
  color: rgba(12, 16, 40, 0.72);
}

.hiw-parent__phone-row {
  margin: 4px auto 18px;
  width: min(240px, 78vw);
}
.hiw-parent__phone-row .phone {
  margin: 0 auto;
}

.hiw-parent__dash {
  margin-top: 8px;
  text-align: left;
  border-radius: 20px;
  padding: 20px 18px;
  background: #fff;
  border: 1px solid rgba(12, 16, 40, 0.08);
  box-shadow: 0 22px 56px rgba(31, 35, 82, 0.09);
}
.hiw-parent__dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.hiw-parent__dash-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}
.hiw-parent__dash-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dawn-deep);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
}
.hiw-parent__log {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(12, 16, 40, 0.55);
  line-height: 1.5;
}
.hiw-parent__log li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(12, 16, 40, 0.06);
}
.hiw-parent__log li:last-child {
  border-bottom: none;
}
.hiw-parent__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.hiw-parent__tag {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(52, 211, 153, 0.12);
  color: rgba(12, 16, 40, 0.75);
}
.hiw-parent__tag--soft {
  background: rgba(99, 102, 241, 0.1);
}
.hiw-parent__bar-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(12, 16, 40, 0.45);
  margin-bottom: 6px;
}
.hiw-parent__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(12, 16, 40, 0.06);
  overflow: hidden;
}
.hiw-parent__bar-fill {
  height: 100%;
  width: 68%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #34d399);
}

/* ——— Differentiation ——— */
.hiw-why {
  padding: 52px 20px;
  background: #fff;
}
.hiw-why__inner {
  max-width: 1000px;
  margin: 0 auto;
}
.hiw-why__grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 780px) {
  .hiw-why__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.hiw-why-card {
  padding: 22px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(12, 16, 40, 0.08);
  box-shadow: 0 16px 44px rgba(31, 35, 82, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hiw-why-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(99, 102, 241, 0.12);
}
.hiw-why-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 800;
}
.hiw-why-card p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(12, 16, 40, 0.65);
  line-height: 1.45;
}

/* ——— FAQ ——— */
.hiw-faq {
  padding: 48px 20px 56px;
  background: #f8fafc;
}
.hiw-faq__inner {
  max-width: 720px;
  margin: 0 auto;
}
.hiw-faq details {
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(12, 16, 40, 0.08);
  margin-bottom: 10px;
  padding: 4px 14px;
  box-shadow: 0 8px 24px rgba(31, 35, 82, 0.05);
}
.hiw-faq summary {
  font-weight: 800;
  cursor: pointer;
  padding: 12px 4px;
  list-style: none;
  color: var(--ink);
}
.hiw-faq summary::-webkit-details-marker {
  display: none;
}
.hiw-faq details[open] summary {
  color: var(--dawn-deep);
}
.hiw-faq__a {
  padding: 0 4px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(12, 16, 40, 0.68);
  line-height: 1.55;
}

/* ——— Final CTA ——— */
.hiw-cta {
  padding: 72px 20px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #0a0e24 0%, #1e1b4b 50%, #0f172a 100%);
  color: #e2e8f0;
}
.hiw-cta__glow {
  position: absolute;
  width: 120%;
  height: 60%;
  left: -10%;
  bottom: -20%;
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.35), transparent 65%);
  pointer-events: none;
}
.hiw-cta__inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
}
.hiw-cta__char {
  width: min(140px, 40vw);
  margin: 0 auto 20px;
  filter: drop-shadow(0 16px 40px rgba(167, 139, 250, 0.45));
  animation: hiwBreathe 5s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .hiw-cta__char {
    animation: none;
  }
}
.hiw-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 12px;
  color: #fff;
}
.hiw-cta p {
  margin: 0 0 24px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.85);
  line-height: 1.5;
}
.hiw-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.hiw-cta .btn--primary {
  background: #fff;
  color: var(--dawn-deep);
}
.hiw-cta .btn--primary:hover {
  filter: brightness(0.97);
}
