/* assistenger — look-and-feel prototype styles.
   Mobile-first, modern, friendly. No build tooling, plain CSS.
   Design tokens up top so the look is easy to tweak. */

:root {
  --brand: #4f46e5;          /* indigo — friendly, trustworthy */
  --brand-dark: #4338ca;
  --brand-soft: #eef2ff;
  --accent: #10b981;         /* green for "send"/success */
  --ink: #1f2937;            /* main text */
  --ink-soft: #6b7280;       /* secondary text */
  --bg: #ffffff;
  --bg-soft: #f7f8fc;
  --line: #e5e7eb;
  --danger: #dc2626;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 30px rgba(31, 41, 55, 0.10);
  --shadow-sm: 0 2px 10px rgba(31, 41, 55, 0.07);
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg-soft);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 56px 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* ---------- Wordmark / logo ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.wordmark:hover { text-decoration: none; }
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #7c6cf0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex: 0 0 auto;
}
.logo-mark svg { width: 20px; height: 20px; display: block; }
.wordmark .brand-name { color: var(--brand); }

.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  transition: transform .05s ease, background .15s ease, box-shadow .15s ease;
  min-height: 50px;       /* big tap target */
  text-decoration: none;
  line-height: 1;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-lg { font-size: 17px; padding: 16px 24px; min-height: 56px; }
.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-dark); }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: #0e9f6e; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 400px at 80% -10%, var(--brand-soft), transparent),
    var(--bg-soft);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
  padding: 48px 0 16px;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(30px, 6vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.hero h1 .hl { color: var(--brand); }
.hero p.lede {
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--ink-soft);
  margin: 0 0 24px;
  max-width: 46ch;
}
.hero-points { list-style: none; padding: 0; margin: 24px 0 0; }
.hero-points li {
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 12px; color: var(--ink); font-size: 16px;
}
.hero-points .tick {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; font-size: 13px; margin-top: 1px;
}

/* ---------- Card (auth + chat share this) ---------- */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

/* ---------- Auth card ---------- */
.auth-card { padding: 8px 8px 20px; }
.tabs {
  display: flex;
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 5px;
  margin: 8px;
}
.tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  border-radius: 999px;
  cursor: pointer;
  min-height: 44px;
}
.tab.active {
  background: var(--bg);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.auth-body { padding: 8px 16px 0; }
.auth-body h2 { margin: 6px 0 4px; font-size: 22px; letter-spacing: -0.01em; }
.auth-body .sub { color: var(--ink-soft); margin: 0 0 18px; font-size: 15px; }

.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 14px; font-weight: 600;
  margin-bottom: 6px; color: var(--ink);
}
.input {
  width: 100%;
  font-size: 17px;
  padding: 15px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  min-height: 54px;
}
.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.trial-banner {
  display: flex; gap: 10px; align-items: center;
  background: var(--brand-soft);
  border: 1px solid #dfe3ff;
  color: var(--brand-dark);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin: 4px 0 16px;
}
.trial-banner .gift { font-size: 18px; }

.fineprint {
  font-size: 12.5px; color: var(--ink-soft); margin-top: 14px; text-align: center;
}
.fineprint a { color: var(--ink-soft); text-decoration: underline; }

/* Dev-mode OTP code banner (shown only when Twilio isn't configured) */
.dev-code-banner {
  background: #fff4e0; border: 1px solid #f3d08a; color: #7a5200;
  font-size: 14px; padding: 10px 12px; border-radius: var(--radius-sm);
  margin: 4px 0 14px; line-height: 1.4;
}
.dev-code-banner .dev-code {
  font-weight: 800; letter-spacing: 2px; font-size: 18px; color: #7a5200;
}
.dev-code-banner.hidden { display: none; }

/* Inline form errors (real OTP / login rejection) */
.form-error {
  color: var(--danger); font-size: 14px; margin: 12px 0 0; text-align: center;
}
.form-error.hidden { display: none; }

/* OTP step */
.otp-inputs {
  display: flex; gap: 8px; justify-content: space-between; margin: 4px 0 8px;
}
.otp-inputs input {
  width: 100%;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  padding: 14px 0;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  min-height: 60px;
}
.otp-inputs input:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft);
}
.otp-hint { font-size: 14px; color: var(--ink-soft); margin: 0 0 16px; }
.otp-hint b { color: var(--ink); }
.link-btn {
  background: none; border: none; color: var(--brand); font-weight: 600;
  cursor: pointer; font-size: 14px; padding: 4px; font-family: inherit;
}
.link-btn:hover { text-decoration: underline; }

.success-box {
  text-align: center; padding: 18px 8px;
}
.success-box .big-check {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 12px;
}

/* ---------- Chat demo ---------- */
.chat-section { background: var(--bg); border-top: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 28px; }
.section-head h2 { font-size: clamp(24px, 4vw, 32px); margin: 0 0 10px; letter-spacing: -0.02em; }
.section-head p { color: var(--ink-soft); font-size: 17px; margin: 0; }

.demo-tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: #92750a; background: #fff7d6;
  border: 1px solid #f3e3a0; padding: 3px 8px; border-radius: 999px; margin-left: 8px;
  vertical-align: middle;
}

.chat-window {
  max-width: 560px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  height: 520px;
  max-height: 75vh;
}
.chat-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg);
}
.chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #7c6cf0);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex: 0 0 auto;
}
.chat-topbar .who { line-height: 1.1; }
.chat-topbar .who .name { font-weight: 700; font-size: 15px; }
.chat-topbar .who .status { font-size: 12px; color: var(--accent); font-weight: 600; }

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bubble {
  max-width: 80%;
  padding: 11px 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.bubble.bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
  color: var(--ink);
}
.bubble.user {
  align-self: flex-end;
  background: var(--brand);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft);
  opacity: .4; animation: blink 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100%{opacity:.3; transform: translateY(0);} 40%{opacity:1; transform: translateY(-3px);} }

.chat-input-row {
  display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line);
  background: var(--bg);
}
.chat-input-row input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 13px 16px; font-size: 15px; min-height: 48px;
}
.chat-input-row input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.chat-send {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center;
}
.chat-send:hover { background: #0e9f6e; }
.chat-send svg { width: 20px; height: 20px; }

/* ---------- Feature strip ---------- */
.features { background: var(--bg-soft); }
.feature-grid {
  display: grid; grid-template-columns: 1fr; gap: 18px;
}
.feature {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.feature .ico {
  width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft);
  color: var(--brand); display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 12px;
}
.feature h3 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer {
  background: #111827; color: #cbd5e1; padding: 36px 0; font-size: 14px;
}
.site-footer .container {
  display: flex; flex-direction: column; gap: 16px;
}
.site-footer .foot-top {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center;
}
.site-footer .wordmark { color: #fff; }
.site-footer .wordmark .brand-name { color: #c7d2fe; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a, .footer-admin { color: #94a3b8; }
.foot-links a:hover { color: #fff; }
.footer-admin {
  background: none; border: none; cursor: pointer; font: inherit; padding: 0;
}
.footer-admin:hover { color: #fff; text-decoration: underline; }
.foot-legal { color: #64748b; font-size: 12.5px; border-top: 1px solid #1f2937; padding-top: 14px; }

/* ---------- Modal (admin login) ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(17, 24, 39, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  z-index: 100;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  width: 100%; max-width: 400px; padding: 26px;
}
.modal h2 { margin: 0 0 4px; font-size: 22px; }
.modal .sub { color: var(--ink-soft); margin: 0 0 18px; font-size: 14px; }
.modal-close {
  float: right; background: none; border: none; font-size: 22px; line-height: 1;
  color: var(--ink-soft); cursor: pointer; padding: 0; margin: -6px -6px 0 0;
}
.demo-cred {
  background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 13px; color: var(--ink-soft); margin-bottom: 16px;
}
.demo-cred code { color: var(--ink); font-weight: 600; }

/* ---------- Legal pages (privacy / terms) ---------- */
.draft-banner {
  background: #fff4e0;
  border-bottom: 1px solid #f3d08a;
  color: #7a5200;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 10px 16px;
}
.legal {
  background: var(--bg);
  padding: 40px 0 64px;
}
.legal .container { max-width: 760px; }
.legal h1 {
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: -0.02em;
  margin: 8px 0 6px;
}
.legal .updated { color: var(--ink-soft); font-size: 14px; margin: 0 0 28px; }
.legal h2 {
  font-size: 21px;
  letter-spacing: -0.01em;
  margin: 32px 0 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.legal h2:first-of-type { border-top: none; padding-top: 0; }
.legal h3 { font-size: 17px; margin: 20px 0 6px; }
.legal p, .legal li { color: var(--ink); font-size: 16px; line-height: 1.6; }
.legal ul { padding-left: 22px; margin: 8px 0 14px; }
.legal li { margin-bottom: 7px; }
.legal .callout {
  background: var(--brand-soft);
  border: 1px solid #dfe3ff;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 15px;
}
.legal .callout strong { color: var(--brand-dark); }
.legal .sms-keyword {
  display: inline-block;
  font-weight: 700;
  color: var(--brand-dark);
  background: #fff;
  border: 1px solid #dfe3ff;
  border-radius: 6px;
  padding: 1px 7px;
}
.legal a { text-decoration: underline; }

/* utility */
.hidden { display: none !important; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; }

/* ---------- Responsive: two-column hero on wider screens ---------- */
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; padding: 64px 0 32px; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
  .nav-links .nav-secondary { display: none; }  /* keep header tidy on small phones */
}
