:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-warm: #fffaf1;
  --ink: #111111;
  --muted: #66635e;
  --line: #ded8cd;
  --accent: #ff5600;
  --accent-dark: #d74600;
  --blue: #121640;
  --blue-soft: #eef3ff;
  --green: #108c3d;
  --shadow: 0 24px 70px rgba(17, 17, 17, 0.12);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, .button { cursor: pointer; }
img { max-width: 100%; display: block; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  padding: 18px clamp(18px, 5vw, 72px);
  background: rgba(247, 244, 238, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(222, 216, 205, 0.72);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 850; letter-spacing: -0.04em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); color: #fff; }
.site-nav { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 14px; }
.site-nav a:hover, .ghost-link:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.ghost-link { color: var(--muted); font-weight: 700; font-size: 14px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 6px; padding: 11px 16px;
  min-height: 42px; font-weight: 800; transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 18px 34px rgba(255, 86, 0, 0.22); }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { background: #fff; color: var(--ink); }
.button.big { padding: 14px 20px; min-height: 50px; }

main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.eyebrow { margin: 0 0 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 900; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(44px, 7vw, 86px); line-height: .94; letter-spacing: -.075em; margin-bottom: 22px; }
h2 { font-size: clamp(30px, 4.6vw, 56px); line-height: 1; letter-spacing: -.055em; margin-bottom: 18px; }
h3 { margin-bottom: 8px; letter-spacing: -.03em; }
p { color: var(--muted); line-height: 1.65; }

.sales-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); gap: 42px; align-items: center; min-height: 82vh; padding: 54px 0 34px; }
.sales-copy { max-width: 720px; }
.hero-subtitle { font-size: clamp(18px, 2vw, 22px); max-width: 680px; }
.hero-actions, .inline-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.proof-row, .trust-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.proof-row span, .trust-row span, .badge, .tenant-pill, .mini-status { border: 1px solid var(--line); background: rgba(255,255,255,.74); border-radius: 999px; padding: 8px 12px; color: #3c3935; font-size: 13px; font-weight: 700; }
.hero-visual { position: relative; min-height: 520px; }
.hero-visual > img { width: 100%; height: 520px; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow); border: 1px solid #fff; }
.floating-chat-card { position: absolute; left: -24px; bottom: 28px; display: grid; grid-template-columns: 46px 1fr; gap: 14px; width: min(390px, calc(100% - 18px)); padding: 18px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.floating-chat-card p { margin: 4px 0 0; font-size: 14px; }
.chat-agent-avatar { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 900; }

.section { padding: 72px 0; }
.two-column { display: grid; grid-template-columns: .78fr 1.22fr; gap: 40px; align-items: start; }
.feature-grid, .process-grid, .testimonial-grid, .pricing-grid { display: grid; gap: 16px; }
.feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-card, .process-grid article, .price-card, .admin-panel, .metric-grid article, .account-form, .dashboard-shell, .preview-card, .panel {
  background: rgba(255,255,255,.86); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 16px 50px rgba(17,17,17,.06);
}
.feature-card { padding: 24px; }
.feature-card span { color: var(--accent); font-weight: 900; font-size: 12px; }
.process-section { text-align: center; }
.process-section h2 { max-width: 720px; margin-inline: auto; }
.process-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 26px; text-align: left; }
.process-grid article { padding: 22px; }
.process-grid strong { display: grid; place-items: center; width: 34px; height: 34px; background: var(--ink); color: #fff; border-radius: 10px; margin-bottom: 18px; }
.image-band { display: grid; grid-template-columns: .9fr 1.1fr; gap: 36px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 28px; box-shadow: var(--shadow); }
.image-band img { height: 420px; width: 100%; object-fit: cover; border-radius: 20px; }
.check-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; color: #302d29; }
.check-list li::before { content: "✓"; color: var(--green); font-weight: 900; margin-right: 10px; }
.testimonials { text-align: center; }
.testimonial-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 28px; text-align: left; }
.testimonial-grid figure { margin: 0; padding: 24px; background: var(--blue); color: #fff; border-radius: 18px; }
.testimonial-grid blockquote { margin: 0 0 18px; font-size: 18px; line-height: 1.45; }
.testimonial-grid figcaption { color: rgba(255,255,255,.7); }
.pricing-section { text-align: center; }
.pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 28px; text-align: left; }
.price-card { position: relative; padding: 26px; display: grid; gap: 14px; }
.price-card.featured { border-color: var(--accent); transform: translateY(-10px); box-shadow: 0 26px 70px rgba(255,86,0,.16); }
.price-card strong { display: block; font-size: 42px; letter-spacing: -.06em; }
.price-card strong span { font-size: 16px; color: var(--muted); letter-spacing: 0; }
.price-card ul { display: grid; gap: 8px; padding-left: 18px; color: #3b3834; }
.final-cta { text-align: center; background: var(--ink); color: #fff; border-radius: 28px; padding: 64px 22px; margin-bottom: 48px; }
.final-cta p { color: rgba(255,255,255,.72); max-width: 680px; margin-inline: auto; }
.site-footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 54px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); }
.site-footer span { color: var(--ink); font-weight: 900; }

.app-page, .admin-page { background: #f4f1ea; }
.app-main, .admin-main { padding: 34px 0 64px; }
.account-gate { display: grid; grid-template-columns: 1fr minmax(320px, 440px); gap: 28px; align-items: center; min-height: 70vh; }
.gate-copy h1, .admin-hero h1 { font-size: clamp(42px, 6vw, 72px); }
.account-form { padding: 24px; display: grid; gap: 16px; }
label { display: grid; gap: 7px; color: #302d29; font-size: 13px; font-weight: 800; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); padding: 12px 13px; outline: none; resize: vertical; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, #777 50%), linear-gradient(135deg, #777 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,86,0,.12); }
input[type="color"] { height: 46px; padding: 4px; }
.form-note, .tiny { font-size: 12px; }
.is-hidden { display: none !important; }
.dashboard-shell { padding: clamp(18px, 3vw, 30px); scroll-margin-top: 104px; }
.dashboard-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 20px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 18px; }
.tab { border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 999px; padding: 10px 14px; font-weight: 800; }
.tab.active { border-color: rgba(255,86,0,.35); background: rgba(255,86,0,.1); color: var(--ink); }
.step-helper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: -4px 0 18px; }
.step-helper span { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-warm); color: #3c3935; padding: 10px 12px; font-size: 13px; font-weight: 800; }
.step-helper strong { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 18px; align-items: start; }
.panel { display: none; padding: 20px; }
.panel.active { display: grid; gap: 14px; }
.upload-box { display: grid; gap: 12px; }
.doc-list { display: grid; gap: 10px; margin-top: 12px; }
.doc-card, .empty { display: flex; justify-content: space-between; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; }
.doc-card span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.doc-card button { border: 0; background: #fee2e2; color: #991b1b; padding: 8px 10px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.file-drop { border: 1px dashed rgba(255,86,0,.45); border-radius: 16px; background: #fffaf6; padding: 18px; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.file-drop:hover { border-color: var(--accent); background: #fff4ea; }
.file-drop span { font-size: 15px; }
.file-drop small { color: var(--muted); font-weight: 700; }
.snippet { border: 1px solid var(--line); border-radius: 14px; background: #111; color: #fff; padding: 16px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.5; }
.integration-note { display: grid; gap: 4px; border: 1px solid #bae6fd; border-radius: 14px; background: #eff6ff; color: #0f172a; padding: 12px; font-size: 13px; }
.integration-note span { color: #475569; line-height: 1.45; }
.preview-card { padding: 18px; position: sticky; top: 88px; }
.preview-header { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 14px; }
.chat-preview { height: 360px; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: #f6f3ee; border: 1px solid var(--line); }
.bubble { max-width: 88%; padding: 11px 13px; border-radius: 16px; line-height: 1.45; font-size: 14px; }
.bubble.bot { background: #fff; color: #222; border-bottom-left-radius: 5px; border: 1px solid var(--line); }
.bubble.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; font-weight: 700; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.chat-form button { border: 0; border-radius: 12px; padding: 0 14px; background: var(--ink); color: #fff; font-weight: 850; }

.admin-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 34px 0; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-grid article { padding: 18px; }
.metric-grid span { color: var(--muted); font-size: 13px; font-weight: 800; }
.metric-grid strong { display: block; margin-top: 8px; font-size: 32px; letter-spacing: -.05em; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-panel { padding: 20px; min-height: 360px; }
.panel-title { display: flex; justify-content: space-between; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 14px; }
.panel-title h2 { font-size: 28px; margin: 0; }
.panel-title span { color: var(--muted); font-size: 12px; font-weight: 800; }
.tenant-list, .conversation-list { display: grid; gap: 10px; }
.admin-row { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); background: #fff; border-radius: 14px; }
.admin-row strong { letter-spacing: -.02em; }
.admin-row span { color: var(--muted); font-size: 13px; }

@media (max-width: 920px) {
  .site-header { position: static; flex-wrap: wrap; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .sales-hero, .two-column, .image-band, .account-gate, .dashboard-grid, .admin-grid { grid-template-columns: 1fr; }
  .process-grid, .testimonial-grid, .pricing-grid, .feature-grid, .metric-grid, .step-helper { grid-template-columns: 1fr; }
  .hero-visual { min-height: auto; }
  .hero-visual > img, .image-band img { height: 340px; }
  .floating-chat-card { left: 12px; right: 12px; bottom: 12px; }
  .preview-card { position: static; }
  .price-card.featured { transform: none; }
  .admin-hero, .dashboard-head, .site-footer { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 44px; }
}

@media (max-width: 560px) {
  main, .site-footer { width: min(100% - 24px, 1180px); }
  .header-actions, .hero-actions, .inline-actions { width: 100%; }
  .button, .header-actions .button, .hero-actions .button, .inline-actions .button { width: 100%; }
  .sales-hero { padding-top: 34px; }
  h1 { font-size: 38px; line-height: 1; }
  h2 { font-size: 32px; }
  .tabs { display: grid; grid-template-columns: 1fr; }
  .tab { text-align: left; border-color: var(--line); background: rgba(255,255,255,.58); }
  .chat-form { grid-template-columns: 1fr; }
  .chat-form button { min-height: 44px; }
}
