/* Homepage polish. Loaded last so it wins over earlier homepage sheets.
   Manrope and coral stay. Motion is CSS plus one IntersectionObserver. */

body.home {
  --tint: #fdf3f0;
  --shadow-card: 0 1px 2px #0000000a, 0 10px 30px -12px #0000001f;
  --shadow-shot: 0 2px 4px #0000000a, 0 40px 100px -30px #00000040;
  background: #fff;
  font-size: 16px;
}

body.home .button {
  border-radius: 12px;
  font-weight: 700;
}

body.home .section {
  padding-block: clamp(96px, 9vw, 128px);
}

body.home .hero,
body.home .capabilities,
body.home .how-section,
body.home .signup-section {
  background: #fff;
  border: 0;
}

body.home .practice-proof,
body.home .channels,
body.home .ai-story,
body.home .faq-section {
  background: var(--tint);
  border: 0;
}

body.home .practice-proof {
  padding: 96px 0 28px;
}

body.home .channels {
  padding: 8px 0 96px;
}

body.home :is(.section-heading h2, .ai-story h2, .how-heading h2, .signup-copy h2, .faq-grid h2) {
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  font-size: clamp(2.15rem, 4.2vw, 3.35rem);
}

body.home .section-heading > p,
body.home .hero-description,
body.home .ai-story-intro,
body.home .signup-copy > p {
  color: #5e5854;
  font-size: 1.05rem;
  line-height: 1.65;
}

/* Hero */
body.home .hero {
  padding: 36px 0 28px;
  overflow: visible;
}

body.home .hero-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

body.home .hero-copy {
  max-width: 980px;
  padding: 0;
}

body.home .hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: #fde8e2;
  color: #b94b30;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

body.home .hero-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e96846;
}

body.home .hero h1 {
  margin: 0 0 22px;
  font-weight: 700;
  font-size: clamp(2.05rem, 6.5vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

body.home .hero-description {
  max-width: 38rem;
  margin: 0 0 28px;
}

body.home .hero-buttons {
  gap: 12px;
}

body.home .hero-buttons .button {
  min-height: 52px;
  padding-inline: 22px;
  border-radius: 12px;
}

body.home .trial-link {
  margin-top: 16px;
  min-height: 44px;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
}

body.home .hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: #6d6560;
  font-size: 13px;
  font-weight: 650;
}

body.home .hero-proof li {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.home .hero-proof li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e96846;
  flex-shrink: 0;
}

/* Homepage cookie notice: a fixed card, not a bar in the page flow.
   Desktop sits bottom-left. Mobile is a bottom sheet. Other pages keep
   the full-width banner from consent.js. */
body.home #db-consent-banner {
  position: fixed !important;
  top: auto !important;
  right: auto !important;
  bottom: max(16px, env(safe-area-inset-bottom)) !important;
  left: 16px !important;
  z-index: 2147483647 !important;
  width: min(400px, calc(100% - 32px)) !important;
  max-width: calc(100% - 32px) !important;
  margin: 0 !important;
  border-radius: 16px !important;
  transform: none !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  box-shadow: 0 10px 30px -12px #00000059 !important;
}

body.home #db-consent-banner p {
  min-width: 0 !important;
  flex: none !important;
}

body.home #db-consent-actions {
  justify-content: flex-end;
}

@media (max-width: 760px) {
  body.home #db-consent-banner {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 18px 18px 0 0 !important;
    padding-bottom: max(14px, env(safe-area-inset-bottom)) !important;
  }
}

/* Product shot */
body.home .product-stage {
  position: relative;
  width: min(1120px, 100%);
  margin: 56px auto 18px;
}

body.home .product-glow {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 12%;
  bottom: -8%;
  background: radial-gradient(closest-side, rgba(233, 104, 70, 0.42), rgba(233, 104, 70, 0) 72%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

body.home .product-tilt {
  position: relative;
  z-index: 1;
  transform-origin: center top;
}

body.home .browser {
  overflow: hidden;
  border-radius: 22px;
  background: #f5f7f9;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-shot);
}

body.home .browser-top {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid #e7e1de;
}

body.home .browser-dots {
  display: flex;
  gap: 6px;
}

body.home .browser-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e4d4ce;
}

body.home .browser-dots i:first-child {
  background: #e96846;
}

body.home .browser-url {
  flex: 1;
  min-width: 0;
  height: 26px;
  border-radius: 999px;
  background: #f6f1ef;
  color: #7a716c;
  font-size: 12px;
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

body.home .browser img {
  display: block;
  width: 100%;
  height: auto;
}

body.home .shot-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #8a817c;
  font-size: 12px;
  font-weight: 650;
}

/* Feature cards */
body.home .capabilities .section-heading {
  max-width: 40rem;
}

body.home .capabilities .section-heading p {
  margin-top: 16px;
}

body.home .shot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 24px;
  margin-top: 48px;
}

body.home .shot-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #f0e6e2;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  padding: 28px 28px 0;
  overflow: hidden;
}

body.home .shot-kicker {
  margin: 0 0 8px;
  color: #e96846;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

body.home .shot-card h3 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

body.home .shot-card > p {
  margin: 0;
  color: #5e5854;
  font-size: 15px;
  line-height: 1.55;
}

body.home .shot-card img {
  display: block;
  width: calc(100% + 56px);
  max-width: none;
  height: auto;
  margin: 22px -28px 0;
}

body.home .shot-note {
  max-width: 44rem;
  margin: 28px 0 0;
  color: #6d6560;
  font-size: 15px;
  line-height: 1.6;
}

/* Conversation story on the tint */
body.home .ai-story {
  padding-block: clamp(96px, 9vw, 128px);
}

body.home .ai-story-step {
  border-radius: 16px;
}

body.home .ai-story-step[aria-pressed="true"] {
  border-color: #f3c2b4;
  box-shadow: var(--shadow-card);
}

body.home .ai-whatsapp-highlight {
  border-radius: 16px;
}

/* Dark band */
body.home .practice-section {
  background: #1a1c1e;
  color: #f6f3f1;
  padding: clamp(96px, 10vw, 144px) 0;
}

body.home .practice-section::after {
  display: none;
}

body.home .practice-grid {
  align-items: start;
  gap: 72px;
}

body.home .ink-line {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: #fff;
}

body.home .ink-line span {
  display: inline;
}

body.home .ink-line span:last-child {
  color: #e96846;
}

body.home .practice-copy > p {
  max-width: 36rem;
  margin: 22px 0 28px;
  color: #c9c1bc;
  font-size: 1.05rem;
  line-height: 1.65;
}

body.home .band-points {
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
  display: grid;
  gap: 22px;
}

body.home .band-points li {
  padding-left: 16px;
  border-left: 2px solid #e96846;
}

body.home .band-points h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

body.home .band-points p {
  margin: 0;
  color: #c9c1bc;
  font-size: 15px;
  line-height: 1.55;
}

/* Steps, FAQ, signup */
body.home .steps article {
  background: #fff;
  border: 1px solid #f0e6e2;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: 24px;
}

body.home .faq-list details,
body.home .faq-list details:first-child {
  background: #fff;
  border: 1px solid #f0e6e2;
  border-radius: 16px;
  padding: 0 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
}

body.home .signup-card {
  border-radius: 24px;
  box-shadow: var(--shadow-shot);
}

body.home .how-heading > p:not(.eyebrow) {
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 36rem;
  color: #5e5854;
}

body.home .channels p,
body.home .channel-logos {
  font-size: 15px;
  line-height: 1.5;
  color: #5e5854;
}

body.home .faq-list summary {
  font-size: 16px;
}

body.home .faq-list details > div {
  font-size: 15px;
  line-height: 1.65;
}

body.home .signup-card-heading p,
body.home .form-note,
body.home .demo-note {
  font-size: 14px;
  line-height: 1.5;
}

body.home .practice-proof h2 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #6d6560;
}

/* Scroll tilt and word ink. Static when the browser has no view timeline. */
@keyframes product-tilt {
  from {
    transform: perspective(1800px) rotateX(14deg) scale(0.94);
  }
  to {
    transform: perspective(1800px) rotateX(0deg) scale(1);
  }
}

@keyframes ink-word {
  from {
    opacity: 0.18;
  }
  to {
    opacity: 1;
  }
}

@keyframes coral-drift {
  0%,
  100% {
    transform: translate3d(-6%, -2%, 0) scale(1);
  }
  50% {
    transform: translate3d(8%, 5%, 0) scale(1.08);
  }
}

@media (prefers-reduced-motion: no-preference) {
  body.home .product-glow {
    animation: coral-drift 16s ease-in-out infinite;
  }

  /* Hidden only after JS marks the page, and never for anything already in view. */
  html.js body.home [data-reveal]:not(.is-in) {
    opacity: 0;
    transform: translateY(18px);
  }

  html.js body.home [data-reveal].is-in {
    opacity: 1;
    transform: none;
    transition:
      opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
      transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    body.home .product-tilt {
      animation: product-tilt linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 40%;
    }

    /* Fill mode stays none, so words stay readable before and after the scroll range. */
    body.home .ink-line span {
      animation: ink-word linear;
      animation-timeline: view();
      animation-fill-mode: none;
    }

    body.home .ink-line span:nth-child(1) { animation-range: entry 0% cover 28%; }
    body.home .ink-line span:nth-child(2) { animation-range: entry 8% cover 36%; }
    body.home .ink-line span:nth-child(3) { animation-range: entry 16% cover 44%; }
    body.home .ink-line span:nth-child(4) { animation-range: entry 24% cover 52%; }
    body.home .ink-line span:nth-child(5) { animation-range: entry 32% cover 62%; }
  }
}

@media (max-width: 900px) {
  body.home .shot-grid,
  body.home .practice-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  body.home .ink-line {
    max-width: none;
  }
}

@media (max-width: 760px) {
  body.home .hero {
    padding-top: 20px;
  }

  body.home .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  body.home .hero-buttons .button {
    width: 100%;
  }

  body.home .product-stage {
    margin-top: 36px;
  }

  body.home .browser,
  body.home .shot-card {
    border-radius: 16px;
  }

  body.home .shot-card {
    padding: 22px 20px 0;
  }

  body.home .shot-card img {
    width: calc(100% + 40px);
    margin: 18px -20px 0;
  }

  body.home .browser-url {
    justify-content: flex-start;
  }

  body.home .shot-caption {
    flex-direction: column;
    gap: 4px;
  }
}

/* Live product chats. Visible in full without JS. Motion starts in view. */
body.home .demo-app,
body.home .demo-card {
  background: #f5f7f9;
  color: #15191d;
  text-align: left;
}

body.home .demo-app {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 460px;
}

body.home .demo-list {
  background: #f2f4f8;
  border-right: 1px solid #e2e7ed;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.home .demo-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px 10px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
}

body.home .demo-row.is-live {
  background: #fff;
  box-shadow: inset 3px 0 0 #e96846;
}

body.home .demo-row.is-quiet {
  opacity: 0.72;
}

body.home .demo-face {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e96846;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
}

body.home .demo-face-muted {
  background: #c5ced6;
}

body.home .demo-who {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

body.home .demo-who strong {
  font-size: 14px;
  font-weight: 700;
}

body.home .demo-who em {
  font-style: normal;
  color: #6b7380;
  font-size: 12px;
}

body.home .demo-pill {
  grid-column: 2;
  justify-self: start;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}

body.home .demo-status {
  grid-column: 2;
  display: inline-grid;
  justify-self: start;
}

body.home .demo-status .demo-pill {
  grid-area: 1 / 1;
  grid-column: auto;
}

body.home .demo-pill-wait {
  visibility: hidden;
  background: #eef1f4;
  color: #5c6670;
}

body.home .demo-pill-booked,
body.home .demo-booked {
  background: #fde8e2;
  color: #9a3412;
  white-space: nowrap;
}

body.home .demo-thread,
body.home .demo-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #f6f7f6;
}

body.home .demo-thread-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid #ece7e1;
}

body.home .demo-thread-head .demo-pill {
  grid-column: auto;
  margin-left: auto;
}

body.home .demo-msgs {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

body.home .demo-msg {
  max-width: 86%;
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
}

body.home .demo-msg p {
  margin: 0;
}

body.home .demo-msg p + p {
  margin-top: 6px;
}

body.home .demo-msg.is-patient {
  align-self: flex-start;
  background: #fff;
  border-top-left-radius: 4px;
}

body.home .demo-msg.is-denbot {
  align-self: flex-end;
  background: #dcf8c6;
  border-top-right-radius: 4px;
}

body.home .demo-chip,
body.home .demo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
}

body.home .demo-chip svg,
body.home .demo-wait svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.home .demo-link {
  color: #e96846;
  box-shadow: inset 0 0 0 1px #f3c2b4;
}

body.home .demo-wait,
body.home .demo-booked {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  color: #6b7380;
  font-size: 12px;
  font-weight: 700;
}

body.home .demo-booked {
  color: #9a3412;
  background: #fde8e2;
}

body.home .demo-typing {
  position: absolute;
  right: 16px;
  z-index: 1;
  display: inline-flex;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #dcf8c6;
  pointer-events: none;
}

body.home .demo-typing[hidden] {
  display: none;
}

body.home .demo-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6b8f71;
  animation: demo-dot 1s infinite ease-in-out;
}

body.home .demo-typing i:nth-child(2) { animation-delay: 0.15s; }
body.home .demo-typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes demo-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

@keyframes demo-arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* Unplayed steps stay in the layout so a loop cannot change the page height. */
html.js body.home .demo-app.is-armed [data-step]:not(.is-on),
html.js body.home .demo-card.is-armed [data-step]:not(.is-on) {
  visibility: hidden;
  opacity: 0;
}

html.js body.home .demo-app.is-armed:not(.is-booked) .demo-pill-wait {
  visibility: visible;
}

html.js body.home .demo-app.is-armed:not(.is-booked) .demo-pill-booked,
html.js body.home .demo-app.is-armed.is-booked .demo-pill-wait {
  visibility: hidden;
}

body.home .demo-sentinel {
  display: none !important;
}

html.js body.home .demo-app.is-armed [data-step].is-on,
html.js body.home .demo-card.is-armed [data-step].is-on {
  animation: demo-arrive 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 760px) {
  body.home .demo-app {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  body.home .demo-list {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home .product-glow,
  body.home .product-tilt,
  body.home .ink-line span,
  body.home [data-reveal],
  body.home [data-step] {
    animation: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
  }

  body.home .demo-pill-wait {
    visibility: hidden !important;
  }

  body.home .demo-pill-booked,
  body.home .demo-booked {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #fde8e2 !important;
    color: #9a3412 !important;
  }

  body.home .demo-typing {
    visibility: hidden !important;
  }
}

@media print {
  body.home [data-reveal],
  body.home .ink-line span {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
