:root {
  --bg: #F2F1ED;            /* Acura ivory */
  --surface: #ffffff;
  --sand: #E6E3DA;          /* Acura sand */
  --ink: #242424;           /* Acura charcoal */
  --ink-2: #4f4d49;
  --ink-3: #8F8D86;         /* Acura taupe */
  --line: rgba(0,0,0,.08);
  --line-2: rgba(0,0,0,.14);
  --accent: #8F8D86;
  --accent-deep: #5f5d57;
  --accent-soft: #E6E3DA;
  --stone: #343434;
  --ok: #4f7a63;
  --warn: #b0623f;
  --radius: 14px;
  --serif: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--ink-3); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark img { display:block; height: 30px; width:auto; }
.wordmark { display: flex; align-items: flex-end; gap: 10px; text-decoration: none; color: var(--stone); }
.wm-main { font: 500 26px/1 var(--serif); letter-spacing: .04em; text-transform: lowercase; }
.wm-sub { font: 400 11px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.demo-badge { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-deep); }
.lang-switch { display: flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; }
.lang-switch button { border: 0; background: none; padding: 4px 11px; border-radius: 999px; font-size: 12px; letter-spacing: .08em; color: var(--ink-2); }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.eyebrow { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 22px; }
h1 { font: 500 clamp(42px, 6.2vw, 86px)/1.02 var(--serif); letter-spacing: -.035em; }
h1 em { font-style: normal; font-weight: 300; color: var(--ink-3); }
.lede { margin-top: 28px; max-width: 560px; font-size: clamp(16px, 1.3vw, 18px); color: var(--ink-2); }
.cta { margin-top: 36px; display: inline-flex; align-items: center; gap: 12px; padding: 15px 26px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff; letter-spacing: .02em; transition: background .3s, color .3s; }
.cta:hover { background: transparent; color: var(--ink); }
.hero-facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.hero-facts div { padding: 22px 0; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: baseline; }
.hero-facts dt { font: 300 28px/1 var(--serif); letter-spacing: -.02em; color: var(--ink); }
.hero-facts dd { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------- sections ---------- */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2, .how h2 { font: 500 clamp(32px, 3.8vw, 50px)/1.05 var(--serif); letter-spacing: -.03em; }
.section-head p { color: var(--ink-2); max-width: 440px; }
.demo { padding: clamp(48px, 7vw, 96px) 0; background: var(--surface); border-block: 1px solid var(--line); }

.demo-grid { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 24px; align-items: start; }
.col-call { position: sticky; top: 88px; display: grid; gap: 16px; }
.col-clinic { display: grid; gap: 16px; min-width: 0; }

.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }
.count { font: 300 22px/1 var(--serif); color: var(--accent-deep); }

/* ---------- phone ---------- */
.phone { --level: 0; border-radius: 22px; padding: 28px 24px 24px; text-align: center; background: linear-gradient(180deg, #ffffff, var(--sand)); border: 1px solid var(--line-2); }
.phone-label { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); }
.orb-wrap { position: relative; width: 190px; height: 190px; margin: 22px auto 18px; display: grid; place-items: center; }
.orb { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffffff 0%, #ECE9E1 34%, #BDB9AF 70%, #6f6c66 100%); box-shadow: 0 18px 40px -18px rgba(36,36,36,.45), inset 0 -8px 20px rgba(36,36,36,.18); transform: scale(calc(1 + var(--level) * .22)); transition: transform .08s linear; }
.orb-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-2); opacity: .0; }
.phone[data-state="idle"] .orb, .phone[data-state="ended"] .orb { animation: breathe 5s ease-in-out infinite; }
.phone[data-state="connecting"] .orb-ring { animation: ring 1.6s ease-out infinite; }
.phone[data-state="connecting"] .r2 { animation-delay: .8s; }
.phone[data-state="speaking"] .orb-ring, .phone[data-state="listening"] .orb-ring { opacity: 1; transform: scale(calc(.72 + var(--level) * .35)); transition: transform .1s linear; border-color: var(--accent); }
.phone[data-state="speaking"] .r2, .phone[data-state="listening"] .r2 { transform: scale(calc(.86 + var(--level) * .2)); opacity: .5; }
.phone[data-state="listening"] .orb { filter: saturate(.75); }
@keyframes breathe { 0%,100% { transform: scale(.97); } 50% { transform: scale(1.03); } }
@keyframes ring { from { transform: scale(.65); opacity: .9; } to { transform: scale(1.05); opacity: 0; } }
.call-status { font: 400 21px/1.2 var(--serif); letter-spacing: -.01em; min-height: 30px; }
.call-btn { margin-top: 18px; display: inline-flex; align-items: center; gap: 10px; padding: 15px 30px; border-radius: 999px; border: 0; background: var(--ok); color: #fff; font-weight: 500; letter-spacing: .02em; transition: transform .2s, background .3s; }
.call-btn:hover { transform: translateY(-1px); }
.call-btn.is-live { background: var(--warn); }
.call-btn.is-live .i-phone { transform: rotate(135deg); }
.call-btn .i-phone { transition: transform .3s; }
.call-btn:disabled { opacity: .6; cursor: wait; }
.call-hint { margin-top: 14px; font-size: 13px; color: var(--ink-3); max-width: 300px; margin-inline: auto; }

/* ---------- transcript ---------- */
.transcript { max-height: 300px; overflow-y: auto; display: grid; gap: 10px; padding-right: 4px; }
.msg { max-width: 92%; }
.msg p { padding: 9px 13px; border-radius: 12px; font-size: 14.5px; line-height: 1.5; }
.msg-who { display: block; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin: 0 4px 3px; }
.msg-agent p { background: var(--surface); border: 1px solid var(--line); }
.msg-user { justify-self: end; text-align: right; }
.msg-user p { background: var(--accent-soft); text-align: left; }

/* ---------- clinic side ---------- */
.clinic-bar { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .08em; color: var(--ink-2); }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.ghost { margin-left: auto; border: 1px solid var(--line-2); background: none; border-radius: 999px; padding: 6px 14px; font-size: 12px; color: var(--ink-2); }
.ghost:hover { border-color: var(--ink); color: var(--ink); }

.context { min-height: 56px; }
.ctx-name { font: 500 26px/1.1 var(--serif); letter-spacing: -.02em; }
.ctx-treat { color: var(--ink-2); margin-top: 2px; }
.ctx-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pill { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface); }
.pill-accent { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill-doc { background: #fff; border-color: var(--ink); }

.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; border: 1px solid var(--line-2); }
.lg.free { background: var(--surface); }
.lg.offered { background: var(--accent-soft); border-color: var(--accent); }
.lg.booked { background: var(--ok); border-color: var(--ok); }

.calendar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.day { display: grid; gap: 4px; align-content: start; min-width: 0; }
.day-head { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); padding: 0 2px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot { display: flex; justify-content: space-between; gap: 4px; font-size: 12px; padding: 4px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); min-width: 0; transition: background .4s, border-color .4s; }
.slot-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot.busy { background: repeating-linear-gradient(135deg, #ECEAE4 0 4px, #F4F3EF 4px 8px); color: var(--ink-3); border-color: transparent; }
.slot.offered { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }
.slot.booked-new { background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 500; }
.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
#calendar-later { display: grid; gap: 6px; margin-top: 10px; }
.later { font-size: 13px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); }

.inbox { display: grid; gap: 10px; }
.ticket { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--stone); border-radius: 10px; padding: 12px 14px; animation: slideIn .6s cubic-bezier(.2,.7,.2,1); }
.ticket-appointment { border-left-color: var(--ok); }
.ticket-callback { border-left-color: var(--accent); }
.ticket-question { border-left-color: var(--stone); }
.ticket-urgent { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 7%, var(--surface)); }
.ticket-top { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.ticket-urgent .ticket-type { color: var(--warn); font-weight: 600; }
.ticket-name { font-weight: 500; margin-top: 4px; }
.ticket-body { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.ticket-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 220px; overflow-y: auto; }
.log li { display: grid; grid-template-columns: 70px auto 1fr; gap: 10px; font-size: 13px; align-items: baseline; animation: slideIn .5s ease-out; }
.log-time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.log-kind { font-weight: 500; }
.log-detail { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.pulse { animation: pulse 1.2s ease-out; }
.pulse-strong { animation: pulseStrong 1.6s ease-out; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
@keyframes pulseStrong { 0%,40% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warn) 55%, transparent); } 100% { box-shadow: 0 0 0 18px transparent; } }

/* ---------- scenarios ---------- */
.scenarios { padding: clamp(56px, 8vw, 110px) 0; }
.scenario-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.scenario-list li { padding: 26px 22px 26px 0; border-right: 1px solid var(--line); display: grid; align-content: start; gap: 12px; }
.scenario-list li + li { padding-left: 22px; }
.scenario-list li:last-child { border-right: 0; }
.sc-num { font: 500 13px/1 var(--sans); letter-spacing: .12em; color: var(--ink-3); }
.scenario-list h3 { font: 500 20px/1.2 var(--serif); letter-spacing: -.01em; }
.sc-say { font: 300 17px/1.45 var(--serif); color: var(--ink); }
.sc-see { font-size: 13.5px; color: var(--ink-3); }

/* ---------- how ---------- */
.how { padding: clamp(56px, 8vw, 110px) 0; background: var(--surface); border-top: 1px solid var(--line); }
.how-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); }
.how-list { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 40px; }
.how-list h3 { font: 500 20px/1.25 var(--serif); margin-bottom: 8px; }
.how-list p { color: var(--ink-2); font-size: 15px; }

/* ---------- footer ---------- */
.footer { padding: 32px 0 44px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 13px; }
.powered { color: var(--ink-3); letter-spacing: .06em; }
.oficio { font: 700 15px/1 var(--sans); letter-spacing: .02em; color: var(--ink); letter-spacing: .04em; margin-left: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .scenario-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scenario-list li, .scenario-list li + li { padding: 22px 18px 22px 0; border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 960px) {
  .hero-grid, .demo-grid, .how-grid { grid-template-columns: 1fr; }
  .col-call { position: static; }
}
@media (max-width: 640px) {
  .wm-sub, .demo-badge { display: none; }
  .hero-facts div { grid-template-columns: 1fr; gap: 6px; }
  .how-list { grid-template-columns: 1fr; }
  .scenario-list { grid-template-columns: 1fr; }
  .calendar { grid-template-columns: repeat(5, minmax(56px, 1fr)); overflow-x: auto; }
  .card-wrap-cal { overflow-x: auto; }
  .slot { flex-direction: column; gap: 0; }
  .log li { grid-template-columns: 62px 1fr; }
  .log-detail { grid-column: 2; }
}

/* start language */
.start-lang { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 4px 0 16px; font-size: 12.5px; color: var(--ink-3); }
.start-lang > span { width: 100%; margin-bottom: 2px; }
.start-lang button { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.start-lang button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.start-lang button:disabled { opacity: .5; cursor: default; }
.how { background: var(--sand); }
.demo { background: var(--surface); }
.card { background: #FAF9F6; }

.week-switch { display: flex; gap: 4px; margin-right: auto; margin-left: 12px; }
.week-switch button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--ink-2); }
.week-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.slot.past { opacity: .45; }
@media (max-width: 640px) { .week-switch { margin-left: 0; order: 3; width: 100%; } }

/* Oficio mark (top right) */
.oficio-mark { display: flex; align-items: baseline; gap: 8px; text-decoration: none; padding-left: 16px; border-left: 1px solid var(--line-2); }
.om-by { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.om-logo, .oficio-mark-foot { font-family: "Newsreader", Georgia, serif; font-weight: 500; font-size: 24px; line-height: 1; letter-spacing: -.01em; color: #10221e; text-decoration: none; }
.om-logo span, .oficio-mark-foot span { color: #8a6a2f; }
.oficio-mark-foot { font-size: 18px; margin-left: 4px; }
@media (max-width: 640px) { .om-by { display: none; } .oficio-mark { padding-left: 12px; } .om-logo { font-size: 21px; } }
