:root {
  --cream: #fafaf6;
  --cream-2: #f1efe6;
  --ink: #1c1d18;
  --ink-soft: #4b4c44;
  --line: #dedbd0;
  --terra: #b04f32;
  --terra-soft: #e07a55;
  --white: #fefefe;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --radius: 28px;
  --radius-sm: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }

h1, h2, h3 { margin: 0 0 .5em; font-weight: 500; line-height: 1.08; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 9.5vw, 5.4rem); }
h2 { font-size: clamp(2rem, 6vw, 3.6rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; line-height: 1.25; }
em { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -0.01em; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 999px; font-weight: 600; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 3px; border-radius: 6px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.2rem; text-decoration: none; letter-spacing: -0.02em; }
.brand-bell { color: var(--terra); }

.nav { display: none; flex-direction: column; gap: 4px; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); padding: 12px 20px 20px; border-bottom: 1px solid var(--line); }
.nav.open { display: flex; }
.nav a:not(.btn) { text-decoration: none; padding: 12px 0; font-weight: 500; border-bottom: 1px solid var(--line); }
.nav-cta { margin-top: 12px; text-align: center; }

.menu-btn { display: inline-flex; flex-direction: column; justify-content: center; gap: 6px; width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer; }
.menu-btn span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  background: var(--ink); color: var(--cream); border: 0; cursor: pointer;
  font: inherit; font-weight: 500; font-size: 1rem;
  padding: 14px 26px; border-radius: 999px; text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: #33342c; }
.btn:active { transform: translateY(1px); }
.btn-small { padding: 9px 20px; font-size: .95rem; }
.btn-dark { padding: 8px 8px 8px 28px; }
button.btn-dark { padding: 14px 30px; }
.btn-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--terra-soft); color: var(--ink); }
.panel-terra .btn-icon { background: #f3c3b0; }

/* Hero */
.hero { padding: 56px 0 32px; text-align: center; }
.hero h1 { max-width: 14em; margin-left: auto; margin-right: auto; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 36em; margin: 0 auto 32px; }

.hero-cards { display: grid; gap: 16px; margin-top: 56px; text-align: left; }
.mock { border-radius: var(--radius); padding: 24px; min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.mock p { margin: 0; }
.mock-dark { background: var(--ink); color: var(--cream); }
.mock-label { font-size: .85rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.mock-light .mock-label { color: var(--terra); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--terra-soft); display: inline-block; }
.wave { display: flex; align-items: center; gap: 5px; height: 56px; margin: 18px 0; }
.wave i { flex: 1; background: var(--terra-soft); border-radius: 4px; height: 20%; }
.wave i:nth-child(3n) { height: 70%; } .wave i:nth-child(3n+1) { height: 45%; } .wave i:nth-child(4n) { height: 95%; } .wave i:nth-child(5n) { height: 30%; }
.mock-quote { font-size: 1.35rem; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; }
.mock-foot { font-size: .9rem; color: #c8c9be; margin-top: 12px !important; }

.mock-chat { background: var(--terra); color: var(--white); gap: 10px; justify-content: center; }
.bubble { padding: 10px 16px; border-radius: 18px; max-width: 86%; font-size: .98rem; line-height: 1.4; }
.bubble-in { background: rgba(255, 255, 255, .18); border-bottom-left-radius: 6px; align-self: flex-start; }
.bubble-out { background: var(--white); color: var(--ink); border-bottom-right-radius: 6px; align-self: flex-end; }

.mock-light { background: var(--cream-2); border: 1px solid var(--line); justify-content: flex-start; gap: 6px; }
.mock-big { font-size: 2.2rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; margin-top: 8px !important; }
.mock-small { color: var(--ink-soft); margin-bottom: 14px !important; }
.chip { display: inline-block; align-self: flex-start; background: var(--white); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; font-size: .9rem; font-weight: 500; margin-bottom: 6px !important; }

.fine { font-size: .9rem; color: var(--ink-soft); }
.hero .fine { margin-top: 16px; }
.fine-light { color: #c8c9be; }

/* Big panels */
.panel-wrap { padding: 32px 0; }
.panel { border-radius: var(--radius); padding: 32px 24px; }
.panel-terra { background: var(--terra); color: var(--white); padding: 40px 24px; }
.panel-title { font-weight: 500; font-size: clamp(1.9rem, 5.5vw, 3.4rem); line-height: 1.12; letter-spacing: -0.02em; max-width: 20em; margin-bottom: .6em; }
.fade { color: rgba(255, 255, 255, .72); }
.panel-sub { font-size: 1.15rem; max-width: 34em; margin-bottom: 28px; color: var(--white); }
.panel-dark { background: var(--ink); color: var(--cream); }
.panel-dark h2 { color: var(--cream); }
.panel-dark em { color: var(--terra-soft); }
.panel-text { color: #d6d7cc; max-width: 30em; }

/* Sections */
.section { padding: 72px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 600; color: var(--terra); margin-bottom: 14px; }
.eyebrow-light { color: var(--terra-soft); }
.section h2 em { color: var(--terra); }
.section-lead { color: var(--ink-soft); max-width: 40em; margin: 0 auto 32px; font-size: 1.1rem; }
#missed p { color: var(--ink-soft); font-size: 1.1rem; }

/* Cards */
.cards { display: grid; gap: 16px; margin-top: 36px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card p { color: var(--ink-soft); }
.card h3 { margin-bottom: .5em; }
.card .icon { color: var(--terra); margin-bottom: 18px; }
.card-dark { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.card-dark p, .card-dark li { color: #d6d7cc; }
.card-cream { background: var(--cream-2); }

.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 16px; }
.steps .card { margin: 0; }
.step-num { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 50%; background: var(--terra); color: var(--white); font-weight: 600; }

.more { margin: 20px auto 0; max-width: 46em; text-align: center; background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; color: var(--ink-soft); }
.more strong { color: var(--ink); font-weight: 600; }

.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--ink-soft); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px; border-left: 3px solid var(--terra); border-bottom: 3px solid var(--terra); transform: rotate(-45deg); }
.card-dark .ticks li { color: #d6d7cc; }
.card-dark .ticks li::before { border-color: var(--terra-soft); }

.tier { text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; font-weight: 600; color: var(--terra); margin-bottom: 12px; }
.tier-light { color: var(--terra-soft); }
.card-dark strong { color: var(--cream); font-weight: 600; }
.ticks strong { color: var(--ink); font-weight: 600; }
.card-dark .ticks strong { color: var(--cream); }

/* Sample email */
.sample-grid { display: grid; gap: 32px; align-items: start; }
.email { background: var(--white); color: var(--ink); border-radius: var(--radius-sm); overflow: hidden; }
.email-head { padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--cream-2); }
.email-head p { margin: 0; }
.email-from span { color: var(--ink-soft); font-size: .9rem; margin-left: 6px; }
.email-subject { font-weight: 600; font-size: 1.1rem; margin-top: 6px !important; }
.email-time { font-size: .85rem; color: var(--ink-soft); margin-top: 2px !important; }
.email-body { padding: 8px 22px 22px; }
.lead-item { padding: 18px 0; border-bottom: 1px solid var(--line); }
.lead-item:last-child { border-bottom: 0; padding-bottom: 0; }
.lead-item p { color: var(--ink); margin-bottom: .5em; font-size: 1rem; }
.lead-item .lead-meta { color: var(--ink-soft); font-size: .9rem; }
.lead-item .lead-next { margin-bottom: 0; }
.lead-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.lead-top h3 { font-size: 1.05rem; margin: 0; }
.tag { font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #e3e8ee; color: #1f3347; }
.tag-hot { background: #f6d9cc; color: #7a2f17; }
.tag-quiet { background: var(--cream-2); color: var(--ink-soft); }

/* Demo call panel */
.panel-terra.center { text-align: center; }
.panel-terra .eyebrow { color: #f6d9cc; }
.panel-terra h2 { max-width: 14em; margin-left: auto; margin-right: auto; }
.panel-terra h2 em { color: #f6d9cc; }
.demo-sub { margin-left: auto; margin-right: auto; }
.fine-on-terra { color: #f6d9cc; margin: 20px 0 0; }

/* Call widget: only shown after the Talk to AfterBell button is pressed */
chat-messenger {
  z-index: 999;
  position: fixed;
  bottom: 16px;
  right: 16px;
}
chat-messenger[hidden] { display: none; }

/* In-call screen */
.call-screen { position: fixed; inset: 0; z-index: 2000; background: var(--ink); color: var(--cream); display: grid; place-items: center; padding: 24px; }
.call-screen[hidden] { display: none; }
.call-panel { width: min(100%, 420px); text-align: center; display: grid; justify-items: center; gap: 4px; }
.call-avatar { width: 112px; height: 112px; border-radius: 50%; background: var(--terra); color: var(--white); display: grid; place-items: center; margin-bottom: 18px; box-shadow: 0 0 0 10px rgba(176, 79, 50, .25); }
.call-panel h2 { font-size: clamp(2.2rem, 8vw, 3rem); margin: 0; color: var(--cream); }
.call-role { margin: 0; color: #c8c9be; }
.call-status { margin: 18px 0 0; font-size: 1.15rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.call-wave { display: flex; align-items: center; justify-content: center; gap: 6px; height: 56px; margin: 18px 0 8px; }
.call-wave i { width: 6px; height: 22%; background: var(--terra-soft); border-radius: 4px; }
.call-wave i:nth-child(2n) { height: 55%; } .call-wave i:nth-child(3n) { height: 85%; } .call-wave i:nth-child(5n) { height: 35%; }
.call-screen.connected .call-wave i { animation: callwave 1.2s ease-in-out infinite; }
.call-screen.connected .call-wave i:nth-child(2n) { animation-delay: .2s; }
.call-screen.connected .call-wave i:nth-child(3n) { animation-delay: .4s; }
@keyframes callwave { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.45); } }
.call-hint { margin: 6px 0 0; padding: 12px 16px; border-radius: 14px; background: #3a2a24; color: #ffd9cc; font-size: .95rem; max-width: 22em; }
.end-call { margin-top: 28px; display: inline-flex; align-items: center; gap: 12px; font: inherit; font-weight: 600; font-size: 1.05rem; background: #c5221f; color: #fff; border: 0; border-radius: 999px; padding: 16px 32px; cursor: pointer; }
.end-call:hover { background: #a61b19; }
.end-call svg { transform: rotate(135deg); transform-origin: center; }
.call-screen :focus-visible { outline-color: var(--terra-soft); }
/* the widget's own controls stay running but out of sight behind the call screen */
chat-messenger.in-call { opacity: 0; pointer-events: none; z-index: 1; }

/* Login */
.nav-login { font: inherit; font-weight: 500; font-size: .98rem; background: none; border: 0; cursor: pointer; color: var(--ink); padding: 12px 0; text-align: left; border-bottom: 1px solid var(--line); }
.nav-login:hover { color: var(--terra); }
.login-dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(92vw, 420px); background: var(--cream); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.login-dialog::backdrop { background: rgba(28, 29, 24, .55); }
.login-form { padding: 28px; display: grid; gap: 16px; }
.login-form h2 { font-size: 1.8rem; margin: 0; }
.login-form .field label { display: block; font-weight: 500; margin-bottom: 6px; }
.login-form input, .range input { width: 100%; font: inherit; color: var(--ink); background: var(--white); border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.login-form input:focus, .range input:focus { outline: 3px solid var(--terra); outline-offset: 1px; border-color: transparent; }
.login-error { margin: 0; color: #8a2a12; background: #f6d9cc; border-radius: 12px; padding: 10px 14px; font-size: .95rem; }
.login-actions { display: flex; align-items: center; gap: 16px; }
.login-cancel { font: inherit; background: none; border: 0; color: var(--ink-soft); text-decoration: underline; cursor: pointer; padding: 8px; }

/* Admin dashboard */
.admin-actions { display: flex; align-items: center; gap: 20px; }
.admin-link { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.admin-link:hover { color: var(--ink); }
.admin-main { padding-top: 40px; padding-bottom: 80px; min-height: 70vh; }
.admin h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.admin h1 em { color: var(--terra); }
.gate { text-align: center; padding: 80px 0; }
.gate p { color: var(--ink-soft); }
.range { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 24px 0; display: grid; gap: 16px; }
.range-fields { display: grid; gap: 14px; align-items: end; }
.range .field label { display: block; font-weight: 500; margin-bottom: 6px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { font: inherit; font-size: .92rem; font-weight: 500; background: var(--cream-2); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; cursor: pointer; color: var(--ink); }
.chip-btn:hover { border-color: var(--terra); color: var(--terra); }
.range .fine { margin: 0; }
.results-count { font-weight: 600; margin: 8px 0 16px; }
.error-box { background: #f6d9cc; color: #7a2f17; border-radius: 14px; padding: 14px 18px; }
.calls { display: grid; gap: 16px; }
.call-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.call-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.call-when { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.call-card h3 { margin: 0 0 4px; font-size: 1.25rem; }
.call-contact { margin: 0 0 14px; color: var(--ink-soft); }
.call-contact a { color: var(--terra); }
.call-field { margin-top: 12px; }
.call-field h4 { margin: 0 0 2px; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--terra); font-weight: 600; }
.call-field p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Footer */
.site-footer { background: var(--ink); color: var(--cream); padding: 44px 0; margin-top: 40px; }
.site-footer .brand-bell { color: var(--terra-soft); }
.footer-inner { display: grid; gap: 10px; }
.footer-inner p { margin: 0; color: #c8c9be; }

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .wave i { animation: pulse 1.6s ease-in-out infinite; }
  .wave i:nth-child(2n) { animation-delay: .25s; }
  .wave i:nth-child(3n) { animation-delay: .5s; }
  @keyframes pulse { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.55); } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .call-screen.connected .call-wave i { animation: none; } }

/* Larger screens */
@media (min-width: 900px) {
  .nav-login { padding: 0; border: 0; color: var(--ink-soft); }
  .nav-login:hover { color: var(--ink); }
  .range-fields { grid-template-columns: 1fr 1fr auto; }
  .menu-btn { display: none; }
  .nav { display: flex !important; position: static; flex-direction: row; align-items: center; gap: 28px; padding: 0; border: 0; background: none; }
  .nav a:not(.btn) { padding: 0; border: 0; color: var(--ink-soft); font-size: .98rem; }
  .nav a:not(.btn):hover { color: var(--ink); }
  .nav-cta { margin: 0; }
  .hero { padding: 96px 0 40px; }
  .hero-cards { grid-template-columns: 1fr 1fr 1fr; align-items: stretch; }
  .mock { min-height: 340px; padding: 28px; }
  .panel-terra { padding: 72px 64px; }
  .panel-dark { padding: 64px; }
  .section { padding: 112px 0; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .cards.two { grid-template-columns: repeat(2, 1fr); }
  .cards.three { grid-template-columns: repeat(3, 1fr); }
  .sample-grid { grid-template-columns: 1fr 1.1fr; gap: 56px; }
  .demo-grid { grid-template-columns: 1fr 1.1fr; gap: 64px; }
  .footer-inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; }
}
