/* ThinkChat v2 — feature page. Tokens and FAQ come from v2.css; product mocks from v2-mock.css. */

.page { position: relative; isolation: isolate; overflow: clip; }
.page > .orb-peach { width: 460px; height: 460px; left: -170px; top: 120px; }
.page > .orb-lavender { width: 520px; height: 520px; right: -200px; top: -60px; }

/* ---------- Hero ---------- */

.f-hero { padding: clamp(60px, 9vw, 110px) 0 clamp(28px, 4vw, 44px); max-width: 780px; }
.f-hero h1 { margin: 16px 0 18px; font-size: clamp(40px, 7vw, 84px); line-height: 1; letter-spacing: -.055em; }
.f-hero h1 .hl { color: var(--coral); }

/* ---------- Sticky feature nav (bounded by .f-zone) ---------- */

.f-zone { position: relative; }

.f-nav {
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
  background: rgba(255, 249, 242, .9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-block: 1px solid var(--line);
}
.f-nav .wrap { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.f-nav .wrap::-webkit-scrollbar { display: none; }
/* Centred when the items fit; auto margins (not justify-content) keep the first item reachable when the row scrolls on small screens. */
.f-nav .wrap > a:first-child { margin-left: auto; }
.f-nav .wrap > a:last-child { margin-right: auto; }
.f-nav a {
  flex: none;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.f-nav a:hover { color: var(--aubergine); }
.f-nav a.is-here { background: var(--aubergine); color: #fff; }

/* ---------- Feature sections ---------- */

.f-sec { padding: clamp(64px, 8vw, 110px) 0; scroll-margin-top: calc(var(--nav-h) + 56px); }
.f-sec + .f-sec { border-top: 1px solid var(--line); }

.f-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.f-sec.flip .f-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.f-sec.flip .f-copy { order: 2; }

.f-plan {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--lavender);
  color: var(--violet);
  font-size: 12px;
  font-weight: 700;
}

.f-copy .h2 { font-size: clamp(28px, 3.6vw, 46px); }
.f-copy ul { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.f-copy li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: 15px; font-weight: 600; line-height: 1.5; }
.f-copy .mk { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--green-ink); }
.f-copy .mk svg { width: 12px; height: 12px; }
.f-link { display: inline-block; margin-top: 24px; font-size: 14px; font-weight: 700; color: var(--violet); }
.f-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.f-sec.try { padding-bottom: clamp(56px, 7vw, 90px); }
.f-sec.try .lead { margin-inline: auto; }
.f-sec.try .live { margin-top: 36px; }

.f-faq { padding: clamp(64px, 8vw, 110px) 0; border-top: 1px solid var(--line); }

/* ---------- Live demo (original homepage demo card) ---------- */

.live {
  width: min(700px, calc(100% - 40px));
  margin: 0 auto clamp(64px, 9vw, 110px);
  scroll-margin-top: calc(var(--nav-h) + 24px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}

.live-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.live-head .dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #54b27f; flex: none; }
.live-head .dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid #54b27f; animation: ripple 1.9s ease-out infinite; }
@keyframes ripple { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }
.live-head b { font-size: 14px; letter-spacing: -.02em; }
.live-head .tag { margin-left: auto; padding: 4px 10px; border-radius: var(--r-pill); background: var(--green); color: var(--green-ink); font-size: 11px; font-weight: 700; }

.live-log { min-height: 200px; max-height: 380px; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }

.lm { max-width: 84%; padding: 11px 15px; font-size: 14.5px; line-height: 1.55; animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.lm.tc { align-self: flex-start; background: var(--peach); border-radius: 6px 18px 18px 18px; }
.lm.you { align-self: flex-end; background: var(--lavender); border-radius: 18px 18px 6px 18px; }
.lm.err { align-self: center; max-width: 92%; background: var(--ivory); border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--muted); font-size: 13px; text-align: center; }
.lm.wait { display: inline-flex; gap: 4px; }
.lm.wait i { width: 6px; height: 6px; border-radius: 50%; background: var(--coral-dark); animation: dot 1.2s infinite; }
.lm.wait i:nth-child(2) { animation-delay: .15s; }
.lm.wait i:nth-child(3) { animation-delay: .3s; }

.live-form { display: flex; gap: 10px; padding: 14px 20px 20px; }
.live-form input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--aubergine);
  font: inherit;
  font-size: 14.5px;
}
.live-form input:focus { outline: none; border-color: var(--lavender-deep); }
.live-form button {
  width: 50px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--coral);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.live-form button:hover { background: var(--coral-dark); transform: translateY(-2px); }
.live-form button:disabled { opacity: .5; transform: none; cursor: not-allowed; }
.live-form button svg { width: 18px; height: 18px; }

/* ---------- Close ---------- */

.close {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(72px, 9vw, 110px) 0;
  background: var(--lavender);
  text-align: center;
}
.close::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 520px;
  height: 520px;
  left: -240px;
  top: -220px;
  border-radius: 50%;
  background: var(--peach);
}
.close .lead { margin-inline: auto; color: #645d72; }
.close-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .f-grid, .f-sec.flip .f-grid { grid-template-columns: 1fr; }
  .f-sec.flip .f-copy { order: 0; }
}

@media (max-width: 640px) {
  .close-actions .btn { width: 100%; }
}

@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
