/* Summit Dental Studio — AI Receptionist concierge demo (prospect pitch artifact) */
/* Brand tokens: clean clinical teal + warm off-white */
:root{
  --teal:#0E8A8F;
  --teal-dark:#0A6A6E;
  --teal-soft:#5FB8BC;
  --teal-glow:rgba(14,138,143,.16);
  --mint:#EAF6F5;
  --mint-2:#DCEFEE;
  --cream:#F4F8F8;
  --cream-2:#E9F1F1;
  --charcoal:#1D2B31;
  --charcoal-2:#33474E;
  --ink:#132025;
  --line:#DBE7E7;
  --muted:#6B7C81;
  --white:#FFFFFF;
  --bot-bubble:#FFFFFF;
  --bot-bubble-2:#F1F7F6;
  --amber:#B26B14;
  --amber-bg:#FBF1E2;
  --amber-line:#E6CE9F;
  --success:#2F8F57;
  --alert:#C8452F;
  --alert-bg:#FCEDEA;
  --alert-line:#F0C3B8;
  --shadow:0 18px 48px rgba(19,32,37,.12);
  --shadow-sm:0 6px 20px rgba(19,32,37,.09);
  --serif:"Playfair Display",Georgia,"Times New Roman",serif;
  --sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;font-family:var(--sans);color:var(--ink);
  background:var(--cream);
  font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased;
  min-height:100vh;
}
img{max-width:100%;display:block}
button{font-family:inherit}

/* ---------- page backdrop ---------- */
.stage{
  min-height:100vh;
  display:flex;flex-direction:column;align-items:center;
  padding:44px 20px 60px;
  position:relative;overflow:hidden;
  background:
    radial-gradient(1100px 620px at 50% -6%, var(--teal-glow) 0%, rgba(14,138,143,0) 60%),
    radial-gradient(820px 520px at 50% 118%, rgba(14,138,143,.10) 0%, rgba(14,138,143,0) 62%),
    var(--cream);
}

/* ---------- page header ---------- */
.page-head{
  text-align:center;max-width:640px;margin:0 auto 30px;
  position:relative;z-index:2;
}
.page-head .eyebrow{
  font-size:11.5px;letter-spacing:.24em;text-transform:uppercase;
  color:var(--teal-dark);font-weight:600;margin-bottom:12px;
}
.page-head h1{
  font-family:var(--serif);font-weight:600;
  font-size:clamp(27px,4.4vw,40px);line-height:1.12;
  margin:0 0 14px;color:var(--ink);letter-spacing:-.01em;
}
.page-head p{
  color:var(--muted);font-size:15.5px;margin:0 auto;max-width:520px;
}

/* ---------- phone frame ---------- */
.phone{
  position:relative;z-index:2;
  width:390px;max-width:100%;
  height:774px;max-height:calc(100vh - 60px);
  background:#0c1416;
  border-radius:44px;
  padding:11px;
  box-shadow:
    0 2px 0 rgba(255,255,255,.06) inset,
    0 40px 90px -30px rgba(19,32,37,.55),
    0 12px 30px -12px rgba(19,32,37,.35);
}
.phone::before{ /* speaker/notch */
  content:"";position:absolute;top:20px;left:50%;transform:translateX(-50%);
  width:120px;height:26px;background:#0c1416;border-radius:0 0 16px 16px;z-index:6;
}
.screen{
  position:relative;width:100%;height:100%;
  background:var(--cream);
  border-radius:34px;overflow:hidden;
  display:flex;flex-direction:column;
}

/* ---------- chat header ---------- */
.chat-head{
  flex:0 0 auto;
  display:flex;align-items:center;gap:11px;
  padding:16px 16px 13px;
  padding-top:34px;
  background:linear-gradient(180deg,var(--white),var(--cream));
  border-bottom:1px solid var(--line);
  position:relative;z-index:5;
}
.chat-head .avatar{
  width:42px;height:42px;border-radius:13px;
  background:var(--mint);border:1px solid var(--line);
  display:flex;align-items:center;justify-content:center;flex:0 0 auto;
  overflow:hidden;
}
.chat-head .avatar img{width:38px;height:38px;object-fit:contain}
.chat-head .who{flex:1;min-width:0}
.chat-head .who b{
  font-family:var(--serif);font-size:16.5px;font-weight:600;color:var(--ink);
  display:block;line-height:1.2;
}
.chat-head .who .status{
  display:flex;align-items:center;gap:6px;flex-wrap:wrap;
  font-size:12px;color:var(--muted);margin-top:2px;
}
.chat-head .who .dot{
  width:7px;height:7px;border-radius:50%;background:var(--success);
  box-shadow:0 0 0 3px rgba(47,143,87,.16);
}
.chat-head .who .surfaces{
  display:block;font-size:11px;color:var(--muted);margin-top:2px;
  letter-spacing:.01em;
}
.restart{
  flex:0 0 auto;border:1px solid var(--line);background:var(--white);
  color:var(--teal-dark);
  width:34px;height:34px;border-radius:10px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  font-size:16px;transition:background .2s,transform .2s,border-color .2s;
}
.restart:hover{background:var(--mint);border-color:var(--teal-soft)}
.restart:active{transform:scale(.92)}
.restart:focus-visible{outline:2px solid var(--teal);outline-offset:2px}

/* ---------- message area ---------- */
.messages{
  flex:1 1 auto;overflow-y:auto;
  padding:18px 14px 8px;
  display:flex;flex-direction:column;gap:11px;
  scroll-behavior:smooth;
}
.messages::-webkit-scrollbar{width:0}

/* message rows */
.row{display:flex;width:100%}
.row.bot{justify-content:flex-start}
.row.user{justify-content:flex-end}

.bubble{
  max-width:82%;
  padding:11px 14px;
  font-size:14.5px;line-height:1.5;
  border-radius:18px;
  position:relative;
  word-wrap:break-word;
}
.row.bot .bubble{
  background:var(--bot-bubble);
  color:var(--ink);
  border:1px solid var(--line);
  border-bottom-left-radius:6px;
  box-shadow:0 2px 8px rgba(19,32,37,.05);
}
.row.user .bubble{
  background:var(--teal);
  color:#fff;
  border-bottom-right-radius:6px;
  box-shadow:0 4px 12px rgba(14,138,143,.28);
}
.bubble .accent{color:var(--teal-dark);font-weight:600}
.row.user .bubble .accent{color:#fff}
.bubble a{color:var(--teal-dark);font-weight:600;text-decoration:underline}

/* entrance animation */
.anim-in{
  opacity:0;transform:translateY(10px);
  animation:pop .25s cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes pop{to{opacity:1;transform:translateY(0)}}

/* ---------- typing indicator ---------- */
.typing{
  display:inline-flex;align-items:center;gap:4px;
  padding:13px 15px;background:var(--bot-bubble);
  border:1px solid var(--line);border-bottom-left-radius:6px;
  border-radius:18px;box-shadow:0 2px 8px rgba(19,32,37,.05);
}
.typing i{
  width:7px;height:7px;border-radius:50%;background:var(--teal-soft);
  animation:blink 1.3s infinite ease-in-out;
}
.typing i:nth-child(2){animation-delay:.18s}
.typing i:nth-child(3){animation-delay:.36s}
@keyframes blink{
  0%,60%,100%{opacity:.3;transform:translateY(0)}
  30%{opacity:1;transform:translateY(-3px)}
}

/* ---------- confirmation / summary card ---------- */
.confirm-card{
  width:100%;max-width:100%;
  background:var(--white);border:1px solid var(--line);
  border-radius:18px;overflow:hidden;
  box-shadow:var(--shadow-sm);
}
.confirm-head{
  position:relative;padding:15px 16px 13px;
  background:linear-gradient(135deg,var(--teal) 0%,var(--teal-dark) 100%);
  color:#fff;
}
.confirm-head.urgent{
  background:linear-gradient(135deg,#D0503A 0%,#A8341F 100%);
}
.confirm-head .k{
  font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;
  color:rgba(255,255,255,.8);font-weight:600;
}
.confirm-head h3{
  font-family:var(--serif);font-weight:600;font-size:19px;
  margin:3px 0 0;line-height:1.15;
}
.confirm-head .badge{
  position:absolute;top:14px;right:14px;
  width:30px;height:30px;border-radius:50%;
  background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.35);
  display:flex;align-items:center;justify-content:center;font-size:15px;
}
.confirm-body{padding:6px 16px 15px}
.summary-line{
  display:flex;align-items:flex-start;gap:12px;
  padding:11px 0;border-top:1px solid var(--cream-2);
}
.summary-line:first-child{border-top:none}
.summary-line .ic{
  flex:0 0 30px;width:30px;height:30px;border-radius:9px;
  background:var(--mint);color:var(--teal-dark);
  display:flex;align-items:center;justify-content:center;font-size:15px;
  border:1px solid var(--line);
}
.summary-line .txt{flex:1;min-width:0}
.summary-line .lab{
  font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;
  color:var(--muted);font-weight:600;
}
.summary-line .val{font-size:14px;color:var(--charcoal);font-weight:500;margin-top:1px}
.confirm-foot{
  margin:4px 16px 16px;padding:11px 13px;
  background:var(--cream);border:1px solid var(--line);border-radius:12px;
  font-size:12.5px;color:var(--charcoal-2);line-height:1.5;
}
.confirm-foot .code{
  display:inline-block;margin-top:6px;
  font-weight:700;color:var(--teal-dark);letter-spacing:.03em;
  font-variant-numeric:tabular-nums;
}
.confirm-foot.urgent{background:var(--alert-bg);border-color:var(--alert-line)}
.confirm-foot.urgent .code{color:var(--alert)}

/* ---------- membership / upsell card ---------- */
.plan-card{
  width:100%;background:var(--white);border:1px solid var(--line);
  border-radius:18px;padding:16px;box-shadow:var(--shadow-sm);
}
.plan-card .pc-eyebrow{
  font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--teal-dark);font-weight:600;
}
.plan-card .pc-title{
  font-family:var(--serif);font-size:18px;font-weight:600;color:var(--ink);
  margin:4px 0 2px;display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;
}
.plan-card .pc-price{
  font-family:var(--sans);font-size:13px;font-weight:700;color:var(--teal-dark);
}
.plan-card .pc-price .demo-tag{color:var(--muted);font-weight:500;font-size:11px}
.plan-card ul{list-style:none;margin:12px 0 0;padding:0}
.plan-card li{
  display:flex;gap:9px;align-items:flex-start;
  font-size:13px;color:var(--charcoal-2);line-height:1.45;padding:5px 0;
}
.plan-card li::before{
  content:"✓";color:var(--success);font-weight:700;flex:0 0 auto;
}

/* ---------- lead form ---------- */
.lead-form{
  width:100%;background:var(--white);border:1px solid var(--line);
  border-radius:18px;padding:16px;box-shadow:var(--shadow-sm);
}
.lead-form .lf-head{
  font-family:var(--serif);font-size:15px;font-weight:600;color:var(--ink);
  margin:0 0 3px;
}
.lead-form .lf-sub{font-size:12.5px;color:var(--muted);margin:0 0 13px}
.lead-form label{
  display:block;font-size:11px;font-weight:600;letter-spacing:.04em;
  text-transform:uppercase;color:var(--muted);margin-bottom:5px;
}
.lead-form .field{margin-bottom:12px}
.lead-form input{
  width:100%;padding:11px 13px;font-size:14px;font-family:inherit;color:var(--ink);
  background:var(--cream);border:1px solid var(--line);border-radius:11px;
  transition:border-color .2s,box-shadow .2s;
}
.lead-form input:focus{
  outline:none;border-color:var(--teal-soft);
  box-shadow:0 0 0 3px rgba(14,138,143,.14);background:var(--white);
}
.lead-form input.invalid{border-color:var(--alert);box-shadow:0 0 0 3px rgba(200,69,47,.12)}
.lead-form .err{
  font-size:11.5px;color:var(--alert);margin-top:5px;display:none;
}
.lead-form .err.show{display:block}
.lead-form .consent{
  font-size:11px;color:var(--muted);line-height:1.45;margin:2px 0 12px;
}
.lead-form .submit{
  width:100%;margin-top:2px;padding:12px;
  background:var(--teal);color:#fff;font-size:14.5px;font-weight:600;
  border:none;border-radius:12px;cursor:pointer;
  transition:background .2s,transform .15s;
}
.lead-form .submit:hover{background:var(--teal-dark)}
.lead-form .submit:active{transform:scale(.98)}
.lead-form .submit:focus-visible{outline:2px solid var(--teal-dark);outline-offset:2px}
.lead-form.urgent .submit{background:var(--alert)}
.lead-form.urgent .submit:hover{background:#A8341F}

/* ---------- chip row ---------- */
.chips{
  flex:0 0 auto;
  display:flex;flex-wrap:wrap;gap:8px;
  padding:10px 14px 4px;
}
.chip{
  border:1px solid var(--teal-soft);
  background:var(--white);color:var(--teal-dark);
  font-size:13px;font-weight:600;font-family:inherit;
  padding:9px 14px;border-radius:999px;cursor:pointer;
  transition:background .18s,transform .15s,box-shadow .18s,color .18s;
  box-shadow:0 1px 4px rgba(14,138,143,.08);
  text-decoration:none;display:inline-flex;align-items:center;gap:5px;
}
.chip:hover{background:var(--teal);color:#fff;box-shadow:0 4px 12px rgba(14,138,143,.24)}
.chip:active{transform:scale(.96)}
.chip:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
.chip.primary{
  background:var(--teal);color:#fff;border-color:var(--teal);
  box-shadow:0 4px 12px rgba(14,138,143,.24);
}
.chip.primary:hover{background:var(--teal-dark)}
.chip.alert{
  background:var(--alert);color:#fff;border-color:var(--alert);
  box-shadow:0 4px 12px rgba(200,69,47,.24);
}
.chip.alert:hover{background:#A8341F}
.chip.ghost{border-color:var(--line);color:var(--muted)}
.chip.ghost:hover{background:var(--cream-2);color:var(--charcoal);border-color:var(--teal-soft)}
.chip.anim-in{animation:chipPop .22s cubic-bezier(.22,.61,.36,1) forwards}
@keyframes chipPop{from{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}

/* ---------- input bar (decorative) ---------- */
.input-bar{
  flex:0 0 auto;
  display:flex;align-items:center;gap:9px;
  padding:11px 14px 15px;
  border-top:1px solid var(--line);
  background:var(--white);
}
.input-bar .fake-input{
  flex:1;padding:11px 15px;border-radius:999px;
  background:var(--cream);border:1px solid var(--line);
  color:var(--muted);font-size:13.5px;
}
.input-bar .send{
  flex:0 0 auto;width:40px;height:40px;border-radius:50%;
  background:var(--teal);color:#fff;border:none;
  display:flex;align-items:center;justify-content:center;
  font-size:16px;
}

/* ---------- footer note ---------- */
.demo-note{
  margin-top:24px;text-align:center;font-size:12px;color:var(--muted);
  position:relative;z-index:2;letter-spacing:.02em;
}

/* ---------- responsive: full-bleed phone at real mobile (≤430px) ---------- */
@media (max-width:430px){
  .stage{padding:0;display:block;min-height:100dvh}
  .page-head{display:none}
  .phone{
    width:100%;height:100vh;height:100dvh;max-height:none;
    border-radius:0;padding:0;box-shadow:none;background:var(--cream);
  }
  .phone::before{display:none}            /* no notch on real device */
  .screen{border-radius:0}
  /* safe-area insets — respect notch + home indicator */
  .chat-head{padding-top:max(16px, env(safe-area-inset-top))}
  .input-bar{padding-bottom:max(15px, env(safe-area-inset-bottom))}
  /* touch targets ≥44px */
  .restart{width:44px;height:44px;font-size:18px}
  .chip{padding:12px 16px;font-size:14px}
  .input-bar .send{width:44px;height:44px}
  /* 16px inputs so iOS Safari does not auto-zoom on focus */
  .lead-form input{font-size:16px;padding:13px 14px}
  .demo-note{
    position:fixed;left:0;right:0;margin:0;
    bottom:env(safe-area-inset-bottom);
    padding:4px;background:rgba(244,248,248,.9);
    font-size:10px;z-index:20;pointer-events:none;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
    scroll-behavior:auto!important;
  }
  .anim-in,.chip.anim-in{opacity:1;transform:none}
}
