/* demos: sample call + job ticket, example website on desktop and phone, job board, feature tiles */
.demo-grid { display: grid; gap: 3rem; align-items: start; }
@media (min-width: 1000px) { .demo-grid { grid-template-columns: 4fr 8fr; gap: 4rem; } .demo-grid.flip { grid-template-columns: 8fr 4fr; } .demo-grid.flip .demo-copy { order: 2; } }
.demo-copy { display: grid; gap: 1.25rem; justify-items: start; }
.demo-copy p { color: var(--muted-ink); max-width: 38ch; }
.paper .demo-copy p { color: var(--muted-paper); }

/* ---- call ---- */
.demo-ui { display: grid; gap: 1.25rem; min-width: 0; }
@media (min-width: 680px) { .demo-ui { grid-template-columns: 1.35fr 1fr; align-items: start; } }
.phone { background: var(--ink); border: 1px solid var(--line-ink); border-radius: 20px; padding: 1.1rem 1.25rem 1.4rem; min-width: 0; }
.callbar { display: flex; align-items: center; gap: .7rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line-ink); font-size: .9rem; color: var(--muted-ink); }
.callbar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted-ink); flex: none; }
.callbar[data-state="ring"] .dot { background: var(--amber); animation: pingA 1s ease-out infinite; }
.callbar[data-state="live"] .dot { background: var(--teal); animation: pingT 1.8s ease-out infinite; }
.callbar #callState { color: var(--on-ink); font-weight: 600; }
.callbar #timer { margin-left: auto; font-variant-numeric: tabular-nums; }
@keyframes pingT { 0% { box-shadow: 0 0 0 0 rgba(43, 181, 201, .6); } 100% { box-shadow: 0 0 0 12px rgba(43, 181, 201, 0); } }
@keyframes pingA { 0% { box-shadow: 0 0 0 0 rgba(240, 176, 74, .7); } 100% { box-shadow: 0 0 0 14px rgba(240, 176, 74, 0); } }
.callwhen { padding-top: .75rem; font-size: .85rem; color: var(--muted-ink); }
.transcript { list-style: none; margin: .5rem 0 0; padding: 0; }
.line { display: grid; grid-template-columns: 4.6rem 1fr; gap: .75rem; padding: .6rem 0; font-size: 1rem; line-height: 1.5; color: var(--on-ink); }
.line b { font: 600 .82rem var(--f-display); color: var(--muted-ink); padding-top: .2rem; }
.line.a b { color: var(--teal); }
.line span u { text-decoration: none; visibility: hidden; }
.line.pending { visibility: hidden; }
.ticket { background: var(--paper); color: var(--on-paper); border-radius: 14px; padding: 1.25rem; min-width: 0; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.ticket-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line-paper); }
.ticket-head h3 { font-size: 1.05rem; }
.chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 .7rem; border-radius: 999px; font: 600 .78rem var(--f-body); background: var(--paper-2); color: var(--on-paper); white-space: nowrap; transition: background .3s, color .3s; }
.chip.go { background: var(--teal-deep); color: #fff; }
.chip.hot { background: var(--amber); color: var(--ink); }
.ticket dl { margin: 1rem 0 0; display: grid; gap: .85rem; }
.ticket dl div { display: grid; gap: .15rem; }
.ticket dt { font-size: .8rem; color: var(--muted-paper); }
.ticket dd { margin: 0; font-weight: 600; min-height: 1.5rem; border-radius: 4px; transition: background .35s ease, color .35s ease; }
.ticket .pending dd { background: var(--paper-2); color: transparent; }
.ticket .pending dd .chip { visibility: hidden; }

/* ---- example website, desktop and phone ---- */
.sd { display: grid; gap: 1.5rem; min-width: 0; }
.sd-stage { position: relative; display: grid; gap: 1.5rem; align-items: end; min-width: 0; }
@media (min-width: 760px) { .sd-stage { grid-template-columns: 1fr 190px; } }
.browser { position: relative; background: #fff; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; color: var(--ink); box-shadow: 0 30px 60px -34px rgba(21, 24, 29, .5); min-width: 0; }
.b-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--paper-2); border-bottom: 2px solid var(--ink); }
.b-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--teal-deep); }
.b-url { margin-left: 10px; flex: 1; padding: 3px 12px; border-radius: 999px; background: #fff; font-size: .75rem; color: var(--muted-paper); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-page { padding: 14px 16px 18px; display: grid; gap: 14px; font-size: .8rem; line-height: 1.4; background: #fff; }
.b-nav { display: flex; align-items: center; gap: 12px; }
.b-logo { font: 700 .85rem var(--f-display); margin-right: auto; }
.b-links { display: none; gap: 14px; color: var(--muted-paper); font-style: normal; }
.b-links em { font-style: normal; }
@media (min-width: 520px) { .b-links { display: flex; } }
.b-call, .b-btn { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; background: var(--teal); color: var(--ink); font-weight: 700; font-size: .75rem; transition: transform .25s ease, box-shadow .25s ease, background .3s ease; }
.b-btn.ghost { background: transparent; border: 1.5px solid var(--ink); }
.b-hero { display: grid; gap: 10px; padding: 16px; border-radius: 10px; background: linear-gradient(135deg, var(--paper), var(--paper-2)); }
.b-hero h4 { font-size: clamp(1.05rem, .8rem + 1.2vw, 1.5rem); line-height: 1.12; letter-spacing: -.02em; }
.b-hero p { color: var(--muted-paper); max-width: 34ch; }
.b-hero .row { display: flex; gap: 8px; flex-wrap: wrap; }
.b-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.b-tiles .mk { display: grid; gap: 6px; padding: 10px; border: 1.5px solid var(--line-paper); border-radius: 8px; font-weight: 700; }
.b-tiles u { display: block; height: 5px; width: 70%; border-radius: 3px; background: var(--teal); }
.b-trust { display: flex; flex-wrap: wrap; gap: 6px 14px; font-weight: 600; color: var(--teal-text); }
.b-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; padding: 10px; border: 1.5px solid var(--line-paper); border-radius: 8px; }
.b-form span.f { padding: 6px 10px; border-radius: 6px; background: var(--paper); color: var(--muted-paper); }
@media (max-width: 519px) { .b-form { grid-template-columns: 1fr; } }
.b-form .b-btn { justify-content: center; }
.b-btn.press, .b-call.press { transform: scale(.92); background: var(--teal-deep); color: #fff; }
.b-call.pulse { animation: pulse-btn 1.6s ease-in-out infinite; }
@keyframes pulse-btn { 0%, 100% { box-shadow: 0 0 0 0 rgba(43, 181, 201, .7); } 60% { box-shadow: 0 0 0 10px rgba(43, 181, 201, 0); } }
.cur { position: absolute; left: 0; top: 0; width: 22px; height: 22px; z-index: 4; pointer-events: none; transition: transform 1s cubic-bezier(.5, 0, .2, 1), opacity .3s; opacity: 0; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.cur.show { opacity: 1; }
.pmock { justify-self: center; width: 190px; border: 2px solid var(--ink); border-radius: 28px; padding: 10px; background: #fff; color: var(--ink); box-shadow: 0 30px 60px -34px rgba(21, 24, 29, .5); display: none; }
@media (min-width: 760px) { .pmock { display: grid; gap: 10px; } }
.pmock .p-top { display: flex; justify-content: space-between; align-items: center; font: 700 .7rem var(--f-display); }
.pmock .p-hero { padding: 10px; border-radius: 10px; background: linear-gradient(135deg, var(--paper), var(--paper-2)); display: grid; gap: 6px; font-size: .68rem; line-height: 1.3; }
.pmock .p-hero b { font: 700 .88rem/1.1 var(--f-display); }
.pmock .p-tile { padding: 7px 9px; border: 1.5px solid var(--line-paper); border-radius: 8px; font-weight: 700; font-size: .68rem; }
.pmock .p-tap { text-align: center; padding: 9px; border-radius: 999px; background: var(--teal); color: var(--ink); font-weight: 700; font-size: .72rem; transition: transform .25s ease, background .3s ease; }
.mk { transition: background .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease, transform .4s ease; }
.mk.pending, .mk.pending * { color: transparent !important; background: var(--sk) !important; border-color: transparent !important; box-shadow: none !important; text-shadow: none !important; border-radius: 6px; }
.mk.pending u { opacity: 0; }
.sd-stats { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: center; }
.sd-stats div { display: grid; gap: 0; }
.sd-stats b { font: 600 clamp(1.8rem, 1.2rem + 2vw, 2.6rem)/1.05 var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--teal-text); }
.sd-stats span { font-size: .9rem; color: var(--muted-paper); }
.ink .sd-stats b, .sd.on-ink .sd-stats b { color: var(--teal); }
.sd.on-ink .sd-stats span { color: var(--muted-ink); }
.sd-toast { display: inline-flex; align-items: center; gap: .6rem; padding: .6rem 1rem; border-radius: 12px; background: var(--ink); color: var(--on-ink); font-size: .92rem; font-weight: 600; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .6); opacity: 0; transform: translateY(10px); transition: opacity .4s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
.sd-toast.show { opacity: 1; transform: none; }
.sd-toast::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); flex: none; }

/* ---- job board ---- */
.board { display: grid; gap: 1rem; }
@media (min-width: 760px) { .board { grid-template-columns: repeat(3, 1fr); } }
.bcol { background: var(--ink-2); border: 1px solid var(--line-ink); border-radius: 16px; padding: 1rem; min-height: 280px; transition: border-color .25s, background .25s; }
.bcol.over { border-color: var(--teal); background: rgba(43, 181, 201, .08); }
.bcol h4 { display: flex; align-items: center; justify-content: space-between; font-size: 1rem; margin-bottom: .9rem; }
.bcol h4 .n { font: 600 .8rem var(--f-body); color: var(--muted-ink); padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-ink); font-variant-numeric: tabular-nums; }
.cards { display: grid; gap: .7rem; align-content: start; min-height: 200px; }
.job { display: grid; gap: .25rem; padding: .85rem 1rem; border-radius: 12px; background: var(--paper); color: var(--on-paper); cursor: grab; touch-action: pan-y; user-select: none; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .7); }
.job b { font: 600 .98rem var(--f-display); }
.job span { font-size: .85rem; color: var(--muted-paper); }
.job .chip { justify-self: start; margin-top: .25rem; }
.job.drag { cursor: grabbing; z-index: 50; box-shadow: 0 24px 50px -14px rgba(0, 0, 0, .8); transition: none; position: relative; }
.job:focus-visible { outline-offset: 2px; }

/* ---- feature tiles ---- */
.tiles { display: grid; gap: 1rem; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tiles.three { grid-template-columns: repeat(3, 1fr); } .tiles.four { grid-template-columns: repeat(4, 1fr); } }
.tile { display: grid; gap: .8rem; align-content: start; padding: 1.5rem; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line-ink); min-width: 0; transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .25s; }
.tile:hover { transform: translateY(-5px); border-color: rgba(43, 181, 201, .6); }
.tile h3 { font-size: 1.2rem; line-height: 1.2; }
.tile p { color: var(--muted-ink); font-size: 1rem; }
.paper .tile { background: #fff; border-color: var(--line-paper); }
.paper .tile p { color: var(--muted-paper); }
.paper .tile:hover { border-color: var(--teal-deep); }
.tile .tv { min-height: 132px; display: grid; align-items: center; margin-bottom: .4rem; }

/* simultaneous calls */
.calls { display: grid; gap: 8px; }
.callchip { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line-ink); font-size: .8rem; color: var(--muted-ink); }
.callchip .dt { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: ringdot 3.6s infinite; animation-delay: var(--d, 0s); flex: none; }
.callchip .st { margin-left: auto; display: inline-grid; font-weight: 600; }
.callchip .st s { grid-area: 1 / 1; text-decoration: none; justify-self: end; animation: sA 3.6s infinite; animation-delay: var(--d, 0s); color: var(--amber); }
.callchip .st s + s { color: var(--teal); animation-name: sB; }
@keyframes ringdot { 0%, 30% { background: var(--amber); transform: scale(1); } 34% { background: var(--teal); transform: scale(1.5); } 40%, 92% { background: var(--teal); transform: scale(1); } 100% { background: var(--amber); } }
@keyframes sA { 0%, 30% { opacity: 1; } 34%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes sB { 0%, 30% { opacity: 0; } 34%, 92% { opacity: 1; } 96%, 100% { opacity: 0; } }

/* urgent detection */
.urg { display: grid; gap: 10px; font-size: .88rem; }
.urg q { display: block; quotes: none; padding: 8px 10px; background: var(--ink); border-radius: 10px; border: 1px solid var(--line-ink); color: var(--on-ink); }
.urg q mark { color: inherit; background-color: transparent; background-image: linear-gradient(var(--amber), var(--amber)); background-repeat: no-repeat; background-size: 0 100%; background-position: 0 100%; animation: hl 4s infinite; padding: 0 2px; }
@keyframes hl { 0%, 15% { background-size: 0 100%; color: var(--on-ink); } 30%, 88% { background-size: 100% 100%; color: var(--ink); } 100% { background-size: 0 100%; color: var(--on-ink); } }
.urg .chip { justify-self: start; display: inline-grid; animation: flipchip 4s infinite; }
.urg .chip span { grid-area: 1 / 1; }
.urg .chip .t1 { animation: sA2 4s infinite; }
.urg .chip .t2 { animation: sB2 4s infinite; }
@keyframes flipchip { 0%, 30% { background: var(--paper-2); color: var(--on-paper); transform: none; } 34%, 88% { background: var(--amber); color: var(--ink); transform: scale(1.06); } 100% { background: var(--paper-2); color: var(--on-paper); transform: none; } }
@keyframes sA2 { 0%, 30% { opacity: 1; } 34%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes sB2 { 0%, 30% { opacity: 0; } 34%, 88% { opacity: 1; } 92%, 100% { opacity: 0; } }

/* text summary */
.sms { display: grid; gap: 6px; justify-items: start; }
.sms div { max-width: 92%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--teal-deep); color: #fff; font-size: .85rem; line-height: 1.35; opacity: 0; transform: translateY(8px) scale(.96); animation: smsin 6s infinite; }
.sms div:nth-child(2) { animation-delay: 1s; background: var(--ink); border: 1px solid var(--line-ink); color: var(--on-ink); border-radius: 14px 14px 4px 14px; justify-self: end; }
@keyframes smsin { 0% { opacity: 0; transform: translateY(8px) scale(.96); } 8%, 82% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .callchip .dt, .callchip .st s, .urg q mark, .urg .chip, .urg .chip span, .sms div, .b-call.pulse { animation: none; }
  .callchip .st s:first-child, .urg .chip .t1 { opacity: 0; }
  .callchip .st s + s, .urg .chip .t2 { opacity: 1; }
  .sms div { opacity: 1; transform: none; }
  .urg q mark { background-size: 100% 100%; color: var(--ink); }
}
