/* LocalTalk demo — professional, mobile-first, cash-honest */

:root {
  --bg: #f7f8fa;
  --bg-alt: #eef2f6;
  --surface: #ffffff;
  --text: #1a2332;
  --muted: #5a6577;
  --border: #d8dee8;
  --primary: #0d6e6e;
  --primary-dark: #0a5555;
  --primary-soft: #e6f3f3;
  --accent: #c45c26;
  --danger: #9b2c2c;
  --demo: #7a3e00;
  --demo-bg: #fff4e5;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(26, 35, 50, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 960px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
}

img { max-width: 100%; height: auto; }

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

code {
  font-size: 0.9em;
  background: var(--bg-alt);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.narrow { max-width: 640px; margin-inline: auto; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.muted { color: var(--muted); }
.tiny { font-size: 0.85rem; }
.req { color: var(--accent); }

/* Demo banner */
.demo-banner {
  background: var(--demo-bg);
  color: var(--demo);
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid #f0d4a8;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-left: auto;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a:hover { color: var(--primary); }

.nav-cta { margin-left: 0; }

@media (max-width: 720px) {
  .nav { display: none; }
  .header-inner { justify-content: space-between; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.9rem; }

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}

.btn-ghost:hover { color: var(--text); }

/* Hero */
.hero {
  padding: 2.5rem 0 3rem;
  background:
    radial-gradient(ellipse at top right, var(--primary-soft), transparent 55%),
    var(--bg);
}

.hero-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.9fr;
    align-items: start;
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.one-liner {
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0 0 1rem;
  max-width: 36rem;
}

.hero-sub {
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.badge {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--demo-bg);
  color: var(--demo);
  border-radius: 999px;
}

.hero-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
}

.hero-facts {
  margin: 1rem 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.hero-facts li { margin-bottom: 0.35rem; }

.wa-link {
  display: inline-block;
  font-weight: 600;
  margin-top: 0.25rem;
}

/* Sections */
.section { padding: 2.75rem 0; }
.section-alt { background: var(--bg-alt); }

.section h2 {
  margin: 0 0 0.5rem;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
}

.section-lead {
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 40rem;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--demo-bg);
  color: var(--demo);
  letter-spacing: 0.03em;
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tip-card {
  background: var(--primary-soft);
  border-color: #c5e0e0;
}

/* Hours */
.hours-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  max-width: 420px;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table th,
.hours-table td {
  text-align: left;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.hours-table th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.hours-table tr:last-child td { border-bottom: none; }

.note {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .contact-grid { grid-template-columns: 1.2fr 1fr; }
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.contact-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

/* Lead form */
.lead-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .lead-grid { grid-template-columns: 1fr 1fr; }
}

.lead-form {
  display: grid;
  gap: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.lead-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.lead-form input,
.lead-form textarea,
.chat-form input {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  width: 100%;
}

.lead-form input:focus,
.lead-form textarea:focus,
.chat-form input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.form-status {
  margin: 0;
  font-size: 0.95rem;
  min-height: 1.4em;
}

.form-status.ok { color: var(--primary); }
.form-status.err { color: var(--danger); }

.h3-quiet {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.leads-list {
  display: grid;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
  max-height: 320px;
  overflow: auto;
}

.lead-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem;
  font-size: 0.9rem;
}

.lead-item strong { display: block; margin-bottom: 0.2rem; }

.lead-empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.5rem 0;
}

/* Limits */
.limits-list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  max-width: 44rem;
}

.limits-list li { margin-bottom: 0.65rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2.5rem;
  background: var(--surface);
}

.footer-inner {
  text-align: center;
}

.footer-inner p { margin: 0.25rem 0; }

/* Chat widget */
.chat-root {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.chat-fab {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.chat-fab:hover { background: var(--primary-dark); }

.chat-panel {
  width: min(100vw - 2rem, 360px);
  height: min(70vh, 520px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-panel[hidden] { display: none !important; }

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: var(--primary);
  color: #fff;
}

.chat-header h2 {
  margin: 0;
  font-size: 1rem;
}

.chat-header .tiny { opacity: 0.9; margin: 0.15rem 0 0; }

.chat-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: #f4f6f8;
}

.msg {
  max-width: 90%;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  font-size: 0.92rem;
  white-space: pre-wrap;
}

.msg-bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--border);
}

.msg-user {
  align-self: flex-end;
  background: var(--primary-soft);
  border: 1px solid #c5e0e0;
}

.msg-meta {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.chat-tools {
  padding: 0.35rem 0.75rem 0;
  border-top: 1px solid var(--border);
  background: #fff;
}

.chat-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem 0.85rem;
  background: #fff;
  border-top: 1px solid transparent;
}

.chat-form input { flex: 1; }

@media (max-width: 400px) {
  .chat-root { right: 0.5rem; bottom: 0.5rem; }
}
