/* ─────────────────────────────────────────────────────────────
   typie-site.css — PUBLIC MARKETING SITE ONLY.

   Loaded by layouts/public.ejs. NOT loaded by layouts/app.ejs or
   layouts/admin.ejs, which keep typie-public.css and the light
   WhatsApp-inspired system unchanged. Nothing in this file may be
   imported into an authenticated surface.

   Standalone on purpose: the public layout no longer loads
   typie-public.css at all, so every .tp-* class the marketing pages
   use is redefined here. The token NAMES match typie-public.css so
   pages that only reference variables (privacy, terms) inherit the
   dark theme without markup changes.

   Design language from the Claude Design project "Typie Site":
   near-black canvas, lime accent, deep-green bands, bone light
   sections. Archivo (display) / Instrument Sans (body) /
   JetBrains Mono (labels).
   ───────────────────────────────────────────────────────────── */

:root {
  /* ── New site palette ── */
  --near-black:  #05100D;   /* canvas */
  --panel:       #071A15;   /* raised surface on the canvas */
  --forest:      #0A5344;   /* deep green band + chat header */
  --lime:        #2BE07A;   /* the single accent */
  --bone:        #F3F1EC;   /* light band background + primary text */

  /* ── Shared token names (same as typie-public.css, dark values) ──
     Keeps variable-only pages working with no markup change. */
  --bg:           var(--near-black);
  --surface:      rgba(243, 241, 236, .06);
  --line:         rgba(243, 241, 236, .12);
  --ink:          var(--bone);
  --ink-muted:    rgba(243, 241, 236, .68);
  --brand-deep:   var(--forest);
  --brand-bright: var(--lime);
  --action:       var(--lime);
  --action-hover: var(--bone);

  /* Chat surfaces — the demo shell */
  --chat-bg:    linear-gradient(180deg, #071A15, #05100D);
  --bubble-in:  rgba(243, 241, 236, .07);
  --bubble-out: var(--lime);
  --tick:       rgba(5, 16, 13, .55);

  --shadow-panel: 0 40px 90px rgba(0, 0, 0, .55);

  --font-display: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

/* ── Canvas ─────────────────────────────────────────────────── */

html, body { margin: 0; padding: 0; }

body.tp-public,
body.tp-app {
  background: var(--near-black);
  color: var(--bone);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Signed-in surfaces (layouts/app.ejs, layouts/admin.ejs). The chat
   training uses layouts/chat.ejs, which loads none of this. */
body.tp-app h1, body.tp-app h2, body.tp-app h3 { font-family: var(--font-display); letter-spacing: -.025em; }
body.tp-app a { color: var(--lime); }
body.tp-app a:hover { color: var(--bone); }
/* Native controls render light-on-light otherwise. */
body.tp-app input, body.tp-app select, body.tp-app textarea { color-scheme: dark; }
body.tp-app select option { background: #0F2A22; color: var(--bone); }

*, *::before, *::after { box-sizing: border-box; }

.font-display { font-family: var(--font-display); }

::selection { background: var(--lime); color: var(--near-black); }

/* ── Section rhythm ─────────────────────────────────────────── */

.tps-wrap    { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.tps-section { padding: 96px 0; }

/* Light + forest bands break up the dark canvas. Both re-point the
   shared ink tokens locally so nested components invert cleanly. */
.tps-band-light {
  background: var(--bone);
  --ink: var(--near-black);
  --ink-muted: rgba(5, 16, 13, .66);
  --line: rgba(5, 16, 13, .14);
  color: var(--near-black);
}
.tps-band-forest {
  background: var(--forest);
  --ink: var(--bone);
  --ink-muted: rgba(243, 241, 236, .74);
  --line: rgba(243, 241, 236, .2);
  color: var(--bone);
}

/* ── Type ───────────────────────────────────────────────────── */

.tps-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 0 0 26px;
}
.tps-band-light .tps-eyebrow { color: var(--forest); }
.tps-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.tps-eyebrow.tps-no-dot::before { display: none; }

.tps-h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 6.4vw, 104px);
  line-height: .9;
  letter-spacing: -.045em;
  margin: 0 0 26px;
  color: var(--ink);
  text-wrap: balance;
}
.tps-h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(32px, 4.6vw, 72px);
  line-height: .94;
  letter-spacing: -.04em;
  margin: 0 0 20px;
  color: var(--ink);
  text-wrap: balance;
}
.tps-h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 2vw, 25px);
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--ink);
}
.tps-lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.5;
  color: var(--ink-muted);
  margin: 0 0 34px;
  max-width: 34em;
  text-wrap: pretty;
}
.tps-mono-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  /* .44 blended to 4.00:1 on this canvas — below WCAG AA. Uppercase mono
     at 11.5px with wide tracking is already hard work; it needs the
     contrast. .58 lands at 5.9:1. */
  color: rgba(243, 241, 236, .58);
  margin: 0;
}
.tps-band-light .tps-mono-note { color: rgba(5, 16, 13, .6); }

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

.tp-btn-primary,
.tp-btn-primary-sm,
.tp-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--lime);
  color: var(--near-black);
  font-family: var(--font-display);
  font-weight: 800;
  border: none;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s, transform .18s;
}
.tp-btn-primary    { font-size: 17px; padding: 18px 32px; min-height: 52px; }
.tp-btn-primary-sm { font-size: 14px; padding: 11px 20px; min-height: 40px; }
.tp-nav-cta        { font-size: 14px; padding: 11px 20px; font-weight: 700; }

.tp-btn-primary:hover,
.tp-btn-primary-sm:hover,
.tp-nav-cta:hover { background: var(--bone); }
.tp-btn-primary:active { transform: translateY(1px); }

.tp-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(243, 241, 236, .28);
  background: transparent;
  color: var(--bone);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  padding: 17px 28px;
  min-height: 52px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .18s, background .18s;
}
.tp-btn-ghost:hover { border-color: var(--bone); background: rgba(243, 241, 236, .05); }

.tps-band-light .tp-btn-ghost { border-color: rgba(5, 16, 13, .25); color: var(--near-black); }
.tps-band-light .tp-btn-ghost:hover { border-color: var(--near-black); background: rgba(5, 16, 13, .04); }

.tp-btn-primary:focus-visible,
.tp-btn-primary-sm:focus-visible,
.tp-btn-ghost:focus-visible,
.tp-nav-cta:focus-visible,
.tp-chip:focus-visible {
  outline: 3px solid rgba(43, 224, 122, .55);
  outline-offset: 3px;
}

/* ── Marquee ────────────────────────────────────────────────── */

.tps-marquee {
  background: var(--lime);
  color: var(--near-black);
  padding: 18px 0;
  overflow: hidden;
  border-top: 1px solid rgba(5, 16, 13, .1);
  border-bottom: 1px solid rgba(5, 16, 13, .1);
}
.tps-marquee-track {
  display: flex;
  width: max-content;
  animation: tps-marquee 34s linear infinite;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(17px, 2vw, 24px);
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.tps-marquee-track > span {
  display: flex;
  gap: 34px;
  padding-right: 34px;
  white-space: nowrap;
}
@keyframes tps-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Numbered cards (pain / scenario) ───────────────────────── */

.tps-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(243, 241, 236, .25) transparent;
}
.tps-rail::-webkit-scrollbar { height: 8px; }
.tps-rail::-webkit-scrollbar-thumb { background: rgba(243, 241, 236, .22); border-radius: 999px; }

.tps-card {
  flex: 0 0 330px;
  border: 1px solid rgba(243, 241, 236, .13);
  border-radius: 20px;
  padding: 26px;
  background: linear-gradient(180deg, rgba(10, 83, 68, .35), rgba(5, 16, 13, 0));
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 290px;
  transition: border-color .18s;
}
.tps-card:hover { border-color: var(--lime); }
.tps-card-no {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--lime);
}
.tps-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--bone);
}
.tps-card-body { font-size: 15.5px; line-height: 1.5; color: rgba(243, 241, 236, .66); flex: 1; }
.tps-card-cost {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(243, 241, 236, .58); /* .44 was 4.00:1 — below AA */
  border-top: 1px solid rgba(243, 241, 236, .12);
  padding-top: 13px;
}

/* ── Numbered steps (how it works) ──────────────────────────── */

.tps-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--line); }
.tps-step  { background: var(--bone); padding: 34px 30px 40px; }
.tp-step-num,
.tps-step-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(44px, 4vw, 62px);
  letter-spacing: -.05em;
  color: var(--forest);
  line-height: 1;
  margin-bottom: 18px;
}

/* ── Lettered list (every session teaches one move) ─────────── */

.tp-move-list { list-style: none; padding: 0; margin: 0; }
.tp-move-list li {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 20px;
  align-items: baseline;
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.45;
  color: var(--ink);
  counter-increment: tps-move;
}
.tp-move-list li:last-child { border-bottom: 1px solid var(--line); }
.tp-move-list li::before {
  content: counter(tps-move, upper-alpha) '.';
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--lime);
  flex: 0 0 34px;
}
.tp-move-list { counter-reset: tps-move; }

/* ── Vertical pillars (what you'll practise) ────────────────── */

.tp-vcard {
  border: 1px solid rgba(243, 241, 236, .13);
  border-radius: 20px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(10, 83, 68, .3), transparent);
  display: flex;
  flex-direction: column;
  transition: border-color .18s;
}
.tp-vcard:hover { border-color: var(--lime); }
.tp-vcard-icon { font-size: 22px; margin-bottom: 10px; }
.tp-vcard h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--bone);
  margin: 0 0 10px;
}
.tp-vcard p { font-size: 15.5px; color: rgba(243, 241, 236, .66); line-height: 1.5; margin: 0 0 14px; }
.tp-vcard-list { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-direction: column; gap: 9px; }
.tp-vcard-list li {
  font-size: 14.5px;
  color: rgba(243, 241, 236, .74);
  line-height: 1.45;
  display: flex;
  gap: 10px;
}
.tp-vcard-list li::before { content: '/'; color: var(--lime); flex: none; }

/* ── Testimonials + founder ─────────────────────────────────── */

.tps-quote {
  border: 1px solid rgba(243, 241, 236, .13);
  border-radius: 22px;
  padding: 34px;
  background: linear-gradient(180deg, rgba(10, 83, 68, .3), transparent);
}
.tps-quote-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.25;
  letter-spacing: -.025em;
  margin: 0 0 16px;
  color: var(--bone);
}
.tps-quote-sub { font-size: 16px; line-height: 1.55; color: rgba(243, 241, 236, .62); margin: 0 0 22px; }
.tps-quote-by {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(243, 241, 236, .72);
}

.tp-circle-avatar {
  width: 44px; height: 44px;
  min-width: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(243, 241, 236, .2);
}

/* ── Trust band ─────────────────────────────────────────────── */

.tp-trust-band {
  border-top: 1px solid rgba(243, 241, 236, .1);
  background: var(--near-black);
  color: rgba(243, 241, 236, .6);
}

/* ── Forms (signup / login / pricing cards) ─────────────────── */

.tp-form-card {
  background: rgba(243, 241, 236, .04);
  border: 1px solid rgba(243, 241, 236, .14);
  border-radius: 22px;
  padding: 28px;
}
.tps-band-light .tp-form-card { background: #FFFFFF; border-color: rgba(5, 16, 13, .12); }

.tp-input-field {
  width: 100%;
  border: 1px solid rgba(5, 16, 13, .2);
  background: #FFFFFF;
  border-radius: 12px;
  padding: 15px 16px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--near-black);
}
.tp-input-field::placeholder { color: rgba(5, 16, 13, .38); }
.tp-input-field:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(10, 83, 68, .18);
}
.tps-field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(5, 16, 13, .55);
  margin-bottom: 8px;
}

.tp-price-featured { border-color: var(--lime); }

/* ── Phone / demo shell ─────────────────────────────────────────
   The demo markup and script in home.ejs are unchanged — only these
   styles moved. Every class the script touches is defined here. */

.tp-phone {
  width: 100%;
  max-width: 420px;
  height: 560px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(243, 241, 236, .14);
  border-radius: 26px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}

.tp-phone-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  background: var(--forest);
  color: var(--bone);
  flex: none;
}
.tp-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--near-black);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.tp-who  { font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.2; }
.tp-stat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(243, 241, 236, .6);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.tp-stat::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lime);
  flex: none;
}
.tp-demo-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  border: 1px solid rgba(243, 241, 236, .3);
  padding: 5px 10px;
  border-radius: 999px;
  color: rgba(243, 241, 236, .72);
  flex: none;
}

.tp-chat {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--chat-bg);
}

.tp-msg {
  max-width: 82%;
  border-radius: 16px;
  padding: 12px 15px;
  font-size: 15px;
  line-height: 1.45;
  border: 1px solid transparent;
}
.tp-msg.tp-in {
  align-self: flex-start;
  background: var(--bubble-in);
  border-color: rgba(243, 241, 236, .12);
  color: var(--bone);
}
.tp-msg.tp-out {
  align-self: flex-end;
  background: var(--bubble-out);
  border-color: var(--lime);
  color: var(--near-black);
}
.tp-meta { display: block; text-align: right; font-size: 10.5px; color: rgba(5, 16, 13, .5); margin-top: 3px; }
.tp-tick { color: var(--tick); font-weight: 700; letter-spacing: -2px; }
.tp-coach-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 6px;
}

.tp-typing {
  align-self: flex-start;
  display: flex;
  gap: 5px;
  padding: 14px 16px;
  background: rgba(243, 241, 236, .07);
  border-radius: 16px;
}
.tp-typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--lime);
  animation: tp-dot-pulse 1s infinite;
}
.tp-typing span:nth-child(2) { animation-delay: .15s; }
.tp-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes tp-dot-pulse {
  0%, 100% { opacity: .25; transform: translateY(0); }
  50%      { opacity: 1;   transform: translateY(-3px); }
}

.tp-wall {
  align-self: stretch;
  border: 1px solid rgba(243, 241, 236, .16);
  border-radius: 16px;
  padding: 18px;
  background: rgba(10, 83, 68, .4);
  text-align: center;
}
.tp-wall p { font-size: 14.5px; color: rgba(243, 241, 236, .78); line-height: 1.55; margin: 0 0 14px; }
.tp-wall b { color: var(--bone); }

.tp-chips { padding: 0 16px 8px; display: flex; flex-direction: column; gap: 7px; flex: none; background: var(--near-black); }
.tp-chip-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(243, 241, 236, .58); /* .45 was 4.12:1 — below AA */
  padding: 6px 2px 2px;
}
.tp-chip {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(43, 224, 122, .4);
  background: rgba(43, 224, 122, .08);
  color: var(--bone);
  border-radius: 999px;
  padding: 11px 16px;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.35;
  cursor: pointer;
  transition: background .16s, border-color .16s;
}
.tp-chip:hover, .tp-chip:focus { background: rgba(43, 224, 122, .18); border-color: var(--lime); }

.tp-composer {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px 18px 18px;
  border-top: 1px solid rgba(243, 241, 236, .1);
  background: var(--near-black);
  flex: none;
}
.tp-input-wrap { flex: 1; position: relative; cursor: pointer; }
.tp-input {
  width: 100%;
  border: 1px solid rgba(243, 241, 236, .14);
  background: rgba(243, 241, 236, .05);
  border-radius: 999px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(243, 241, 236, .5);
  pointer-events: none;
}
.tp-input::placeholder { color: rgba(243, 241, 236, .4); }
.tp-send {
  width: 42px; height: 42px;
  flex: none;
  border: none;
  border-radius: 50%;
  background: var(--lime);
  color: var(--near-black);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s;
}
.tp-send:hover { background: var(--bone); }

.tp-lock-toast {
  display: none;
  position: absolute;
  left: 18px; right: 18px; bottom: calc(100% + 10px);
  align-items: center;
  gap: 10px;
  background: var(--bone);
  color: var(--near-black);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  z-index: 5;
}
.tp-lock-toast.tp-visible { display: flex; }
.tp-lock-toast .tp-lock-msg { flex: 1; }
.tp-lock-toast a { color: var(--forest); font-weight: 700; text-decoration: none; white-space: nowrap; }
.tp-lock-toast a:hover { text-decoration: underline; }
.tp-lock-dismiss {
  border: none;
  background: none;
  color: rgba(5, 16, 13, .5);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  flex: none;
}

/* ── Reveal-on-load ─────────────────────────────────────────── */

.tp-reveal { animation: tps-rise .6s cubic-bezier(.2, .7, .3, 1) both; }
.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 tps-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 980px) {
  .tps-steps { grid-template-columns: 1fr; }
  .tps-section { padding: 68px 0; }
}
@media (max-width: 720px) {
  .tps-wrap { padding-left: 18px; padding-right: 18px; }
  .tps-card { flex-basis: 82vw; }
  .tp-phone { height: 520px; }
  .tp-btn-primary, .tp-btn-ghost { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .tp-reveal { animation: none; }
  .tps-marquee-track { animation: none; }
  .tp-typing span { animation: none; opacity: .7; }
  * { scroll-behavior: auto !important; }
}
