/* Frank design system: the canonical token + component layer.
   From the brand board. No raw hex outside :root. Two font families only. */

:root {
  /* Colour */
  --teal: #1F6D6C;   /* primary: brand, buttons, Frank's bubble, app icon */
  --teal-hover: #185856;
  --slate: #2D3E50;  /* text, headings */
  --sage: #A9C9B5;   /* supporting / calm surface */
  --sand: #DCCEB8;   /* warm surface / cards */
  --sky: #D8EEF4;    /* soft panel / patient bubble */
  --coral: #E67E6B;  /* single accent, used sparingly, never for anything alarming */

  --bg: #F7F5F0;         /* app canvas, warm off-white */
  --surface: #FFFFFF;    /* sheets/cards */
  --surface-2: #F1EEE7;  /* inset tiles */
  --border: #E4E0D6;
  --text: var(--slate);
  --text-2: #5D6B78;     /* muted */

  /* Type: two families only */
  --font-display: "Avenir Next", "Avenir", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(45, 62, 80, 0.08), 0 6px 20px rgba(45, 62, 80, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand {
  font-family: var(--font-display);
  color: var(--slate);
  font-weight: 700;
  line-height: 1.2;
}

/* Brand mark */
.brand { font-size: 1.6rem; letter-spacing: -0.02em; }
.brand__tagline { font-family: var(--font-body); color: var(--text-2); font-weight: 400; font-size: 0.95rem; }

/* Card / sheet */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.tile { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 16px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;      /* so an <a class="btn"> is a button, not an underlined link */
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-hover); color: #fff; }
.btn--secondary { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn--ghost { background: var(--surface); color: var(--slate); border-color: var(--border); }
.btn--full { display: flex; width: 100%; }        /* works for <a> and <button> alike */

/* Chat bubbles */
.bubble { max-width: 82%; padding: 12px 16px; border-radius: 18px; margin: 6px 0; }
.bubble--frank { background: var(--sky); color: var(--slate); border-bottom-left-radius: 6px; }
.bubble--patient { background: var(--teal); color: #fff; margin-left: auto; border-bottom-right-radius: 6px; }

/* "Frank is typing" indicator */
.typing { display: inline-flex; gap: 5px; align-items: center; }
.typing span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--slate); opacity: 0.35;
  animation: frank-typing 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.18s; }
.typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes frank-typing {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 0.85; transform: translateY(-4px); }
}

/* Placeholder-guidance label (must be visible in every PoC consultation) */
.placeholder-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--slate);
  background: var(--sand);
  border-radius: 999px;
  padding: 4px 12px;
}

/* Values row */
.value { display: flex; align-items: center; gap: 10px; color: var(--slate); }

/* Escalation / safety-net callout */
.callout--escalate {
  border-left: 4px solid var(--coral);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

/* --- Marketing / landing components (brand board) --- */
.lede { font-size: 1.12rem; color: var(--text-2); }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem;
  font-weight: 700; color: var(--teal); font-family: var(--font-body);
}
.hero { text-align: center; background: linear-gradient(180deg, var(--sky), var(--surface)); padding: 36px 20px; }
/* One centred column, so heading, lede, chatbox and CTA share the same axis */
.hero__inner { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hero__inner > * { margin: 0; }
.hero h1 { font-size: 2rem; }
.hero .lede { max-width: 540px; }

/* Chatbox: a mini messaging window (echoes the app), so the preview reads as a chat,
   not loose bubbles that compete with the button. */
.chatbox {
  width: 100%; max-width: 360px; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.chatbox__head {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display); font-weight: 700; color: var(--slate);
}
.chatbox__body { padding: 12px 14px; background: var(--bg); }
.chatbox__body .bubble { margin: 8px 0; }
.chatbox__input {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-top: 1px solid var(--border);
  color: var(--text-2); font-size: 0.9rem;
}
.chatbox__input .send {
  width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 auto;
}

/* Soft round badge holding one line icon */
.icon-badge {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--sky); color: var(--teal);
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.icon-badge svg { width: 22px; height: 22px; }
.icon-badge--sage { background: var(--sage); }
.icon-badge--sand { background: var(--sand); }

/* Feature grid (what a doctor can do) */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 520px) { .feature-grid { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.feature h3 { margin: 10px 0 4px; font-size: 1rem; }
.feature p { margin: 0; color: var(--text-2); font-size: 0.9rem; }

/* How it works (numbered steps) */
.step { display: flex; gap: 14px; align-items: flex-start; }
.step + .step { margin-top: 16px; }
.step h3 { margin: 0 0 2px; font-size: 1.02rem; }
.step p { margin: 0; color: var(--text-2); }

/* Reassurance banner */
.reassure { text-align: center; background: var(--sage); border-color: transparent; }
.reassure .big { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--slate); }

/* Value row with an icon badge */
.value--iconed { gap: 12px; }
.value--iconed .icon-badge { width: 34px; height: 34px; }
.value--iconed .icon-badge svg { width: 18px; height: 18px; }
