/* Typie public-page design tokens — single source of truth (§1 of conversion brief).
   Loaded once in layouts/public.ejs; every public page inherits these.
   DO NOT copy-paste tokens into individual templates — import this file. */

:root {
  /* 60 % — canvas & surfaces */
  --bg:           #FFFFFF;
  --surface:      #F0F2F5;
  --line:         #E9EDEF;
  /* 30 % — ink & brand */
  --ink:          #111B21;
  --ink-muted:    #3B4A54;
  --brand-deep:   #075E54;
  /* 10 % — action. Primary button = #008069 + white text (WCAG AA 4.72:1 contrast). */
  --action:       #008069;
  --action-hover: #00674F;
  /* Bright WhatsApp green — logo dot, sent bubbles, online dot, link accents ONLY. Not large fills. */
  --brand-bright: #25D366;
  /* Chat demo skin */
  --chat-bg:      #ECE5DD;
  --bubble-in:    #FFFFFF;
  --bubble-out:   #DCF8C6;
  --tick:         #34B7F1;
  /* Shadows */
  --shadow-soft:  0 1px 2px rgba(17,27,33,.04), 0 12px 40px rgba(17,27,33,.10);
  --shadow-panel: 0 2px 6px rgba(17,27,33,.06), 0 30px 70px rgba(7,94,84,.14);
}

/* ── Body base ────────────────────────────────────────── */
body.tp-public {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* Faint atmosphere — two restrained radial gradients */
body.tp-public::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 85%  8%,  rgba(37,211,102,.10), transparent 70%),
    radial-gradient(50% 45% at  0% 100%, rgba(7,94,84,.06),   transparent 70%);
}

/* ── Reveal animation ─────────────────────────────────── */
.tp-reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: tp-rise .6s cubic-bezier(.2,.7,.3,1) forwards;
}
.tp-d1 { animation-delay: .05s; }
.tp-d2 { animation-delay: .13s; }
.tp-d3 { animation-delay: .21s; }
.tp-d4 { animation-delay: .29s; }
.tp-d5 { animation-delay: .37s; }
@keyframes tp-rise { to { opacity: 1; transform: none; } }

/* ── Buttons ──────────────────────────────────────────── */

/* Primary — #008069 fill, white text (AA-verified) */
.tp-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--action);
  color: #fff;
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 26px;
  border-radius: 13px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,128,105,.22);
  transition: background .18s, transform .18s;
  min-height: 44px;
  white-space: nowrap;
}
.tp-btn-primary:hover  { background: var(--action-hover); transform: translateY(-1px); }
.tp-btn-primary:active { transform: none; }
.tp-btn-primary:focus-visible {
  outline: 3px solid rgba(0,128,105,.45);
  outline-offset: 3px;
}

/* Ghost / secondary */
.tp-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line);
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 600;
  font-size: 16px;
  padding: 13px 24px;
  border-radius: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .18s, background .18s;
  min-height: 44px;
  white-space: nowrap;
}
.tp-btn-ghost:hover { border-color: #cfd6da; background: var(--surface); }
.tp-btn-ghost:focus-visible { outline: 3px solid rgba(17,27,33,.2); outline-offset: 3px; }

/* Small primary (soft wall CTA, etc.) */
.tp-btn-primary-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--action);
  color: #fff;
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  padding: 11px 20px;
  border-radius: 11px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s;
  min-height: 44px;
  width: 100%;
}
.tp-btn-primary-sm:hover { background: var(--action-hover); }

/* Nav signup button */
.tp-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--action);
  color: #fff;
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 10px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s;
  min-height: 36px;
}
.tp-nav-cta:hover { background: var(--action-hover); }

/* ── Demo phone panel ─────────────────────────────────── */
.tp-phone {
  width: 100%;
  max-width: 380px;
  background: var(--chat-bg);
  border-radius: 26px;
  box-shadow: var(--shadow-panel);
  overflow: hidden;
  border: 1px solid rgba(17,27,33,.06);
  display: flex;
  flex-direction: column;
  height: 560px;
}
@media (max-width: 400px) {
  .tp-phone { height: 510px; border-radius: 20px; }
}

/* Header bar */
.tp-phone-head {
  background: var(--brand-deep);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.tp-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #075E54);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  flex: none;
}
.tp-who { font-weight: 600; font-size: 15.5px; line-height: 1.2; }
.tp-stat { font-size: 12px; opacity: .85; display: flex; align-items: center; gap: 5px; }
.tp-stat::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-bright);
  flex: none;
}
.tp-demo-badge {
  margin-left: auto;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.30);
  color: rgba(255,255,255,.92);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Chat scroll area */
.tp-chat {
  flex: 1;
  padding: 16px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background-image: radial-gradient(rgba(7,94,84,.05) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* Message bubbles */
.tp-msg {
  max-width: 80%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.42;
  box-shadow: 0 1px 1px rgba(17,27,33,.06);
  opacity: 0;
  transform: translateY(8px) scale(.98);
  animation: tp-pop .32s ease forwards;
}
@keyframes tp-pop { to { opacity: 1; transform: none; } }
.tp-msg.tp-in  { align-self: flex-start; background: var(--bubble-in);  border-top-left-radius: 5px; }
.tp-msg.tp-out { align-self: flex-end;   background: var(--bubble-out); border-top-right-radius: 5px; }
.tp-meta       { display: block; text-align: right; font-size: 10.5px; color: #5a8a6b; margin-top: 2px; }
.tp-tick       { color: var(--tick); font-weight: 700; letter-spacing: -2px; }
.tp-coach-tag  { font-size: 11px; font-weight: 700; color: var(--brand-deep); margin-bottom: 2px; display: block; letter-spacing: .02em; }

/* Typing indicator */
.tp-typing {
  align-self: flex-start;
  background: var(--bubble-in);
  padding: 12px 14px;
  border-radius: 14px;
  border-top-left-radius: 5px;
  display: flex;
  gap: 4px;
}
.tp-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #9fb0a6;
  animation: tp-blink 1.2s infinite;
}
.tp-typing span:nth-child(2) { animation-delay: .2s; }
.tp-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes tp-blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

/* Soft wall */
.tp-wall {
  align-self: center;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 15px;
  margin-top: 6px;
  max-width: 92%;
  box-shadow: var(--shadow-soft);
}
.tp-wall p { font-size: 14px; color: var(--ink-muted); margin-bottom: 11px; }
.tp-wall b { color: var(--ink); }

/* Chips */
.tp-chips    { padding: 0 14px 6px; display: flex; flex-direction: column; gap: 7px; flex: none; }
.tp-chip-hint { font-size: 11.5px; color: var(--ink-muted); padding: 2px 4px; }
.tp-chip {
  background: #fff;
  border: 1.5px solid rgba(7,94,84,.20);
  color: var(--brand-deep);
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 500;
  font-size: 13.5px;
  text-align: left;
  padding: 10px 13px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .16s, border-color .16s;
  min-height: 44px;
}
.tp-chip:hover, .tp-chip:focus {
  background: rgba(37,211,102,.08);
  border-color: var(--brand-bright);
  outline: none;
}

/* Composer row — locked */
.tp-composer {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #f6f6f2;
  border-top: 1px solid rgba(17,27,33,.06);
  align-items: center;
  flex: none;
  position: relative;
}
.tp-input-wrap { flex: 1; position: relative; }
.tp-input {
  width: 100%;
  border: none;
  background: #fff;
  border-radius: 20px;
  padding: 11px 15px;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 14.5px;
  outline: none;
  cursor: not-allowed;
  color: #9fb0a6;
  pointer-events: none;  /* clicks fall through to wrapper */
}
.tp-input-wrap { cursor: pointer; }
.tp-send {
  width: 42px; height: 42px;
  flex: none;
  border: none;
  border-radius: 50%;
  background: var(--brand-bright);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .16s;
}
.tp-send:hover { background: #1fbf5b; }

/* Lock toast — appears above composer when tapping the input */
.tp-lock-toast {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 12px; right: 12px;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: var(--shadow-soft);
  z-index: 20;
  align-items: center;
  gap: 10px;
}
.tp-lock-toast.tp-visible { display: flex; }
.tp-lock-toast .tp-lock-msg { flex: 1; }
.tp-lock-toast a {
  color: var(--brand-bright);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.tp-lock-toast a:hover { text-decoration: underline; }
.tp-lock-dismiss {
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  flex: none;
}

/* ── Value block cards ────────────────────────────────── */
.tp-vcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}
.tp-vcard-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(37,211,102,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  margin-bottom: 12px;
}
.tp-vcard h3 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}
.tp-vcard p { font-size: 13.5px; color: var(--ink-muted); line-height: 1.5; }

/* ── Situation list (inside practise cards) ──────────── */
.tp-vcard-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.tp-vcard-list li {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.45;
  padding-left: 1em;
  position: relative;
}
.tp-vcard-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--brand-deep);
}

/* ── Teaching-move list (Every conversation section) ─── */
.tp-move-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 54em;
}
.tp-move-list li {
  font-size: clamp(15px, 1.3vw, 17px);
  color: var(--ink-muted);
  line-height: 1.6;
  padding-left: 1.2em;
  position: relative;
}
.tp-move-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--brand-deep);
  font-weight: 600;
}

/* ── Circular avatar (testimonials + founder) ─────────── */
.tp-circle-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex: none;
}

/* ── How-it-works ─────────────────────────────────────── */
.tp-step-num {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--line);
  line-height: 1;
  margin-top: 2px;
  min-width: 2.2rem;
}

/* ── Trust band ───────────────────────────────────────── */
.tp-trust-band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ── Form inputs (login / signup) ─────────────────────── */
.tp-input-field {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.tp-input-field::placeholder { color: #9fb0a6; }
.tp-input-field:focus {
  border-color: var(--action);
  box-shadow: 0 0 0 3px rgba(0,128,105,.15);
}

/* Form card */
.tp-form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: var(--shadow-soft);
}

/* Pricing card highlighted */
.tp-price-featured {
  border: 2px solid var(--action);
  box-shadow: 0 8px 30px rgba(0,128,105,.14);
}

/* ── Nav logo-dot heartbeat ───────────────────────────────
   The dot in the built nav is a bare <span> (no class), targeted
   via the structural selector below. The animation replaces the
   inline box-shadow, so both the static 4px halo and the outward
   pulse ring are declared together in the keyframes.
   Animates box-shadow spread only — dot size and position are fixed. */
header a[href="/"] span:first-child {
  animation: tp-dot-pulse 2.2s ease-out infinite;
}
@keyframes tp-dot-pulse {
  0%   { box-shadow: 0 0 0 4px rgba(37,211,102,.18), 0 0 0 0px rgba(37,211,102,.45); }
  70%  { box-shadow: 0 0 0 4px rgba(37,211,102,.18), 0 0 0 7px rgba(37,211,102,.00); }
  100% { box-shadow: 0 0 0 4px rgba(37,211,102,.18), 0 0 0 0px rgba(37,211,102,.00); }
}
@media (prefers-reduced-motion: reduce) {
  header a[href="/"] span:first-child { animation: none; }
}
