/* When it faces your customers.
   Hero: the same sample customer moment on two phones, clumsy then calm. Brand: one sample quote that wears three different brands.
   Voice: three small sample screens. Band: four sample messages sorted, the tricky ones coming to a person.
   Motion is armed by page-customer-facing.js only (.cf-armed on a .cf-run block, .is-run when it is on screen); with no script or
   reduced motion every block shows finished. */

.cf-dim { color: #86868b; }

/* ---------------------------------------------------------------- hero */
.cf-hero { padding-top: 72px; padding-bottom: 40px; }
.cf-brand { padding-top: 72px; }
.cf-hero .kit-lead { margin-top: 26px; }
.cf-hstage { container-type: inline-size; }
.cf-hero .kit-hero-wash { height: 100%; background: radial-gradient(50% 62% at 72% 50%, color-mix(in srgb, var(--kit-accent) 14%, transparent), transparent 72%); }
.cf-stage { display: grid; grid-template-columns: minmax(0, 1fr) 11% minmax(0, 1fr); align-items: center; }
.cf-side { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.cf-side--bad { transform: translateY(8px); }
.cf-arrow { width: 100%; height: auto; overflow: visible; margin-bottom: 40px; }
.cf-word { margin: 22px 0 0; font: 400 28px/1 var(--font-display); color: var(--ink); text-align: center; }
.cf-side--bad .cf-word { color: var(--ink-2); }

.cf-ph { --pw: min(264px, 43cqw); width: var(--pw); aspect-ratio: 9 / 16.6; font-size: calc(var(--pw) * .05);
  border-radius: calc(var(--pw) * .15); padding: calc(var(--pw) * .03); text-align: left; flex: none; }
.cf-ph .kit-phone-screen { border-radius: calc(var(--pw) * .12); display: flex; flex-direction: column; background: #fff; color: #1d1d1f; font-family: var(--font-text); }
.cf-ph--bad { transform: rotate(-2.2deg); }
.cf-ph--bad .kit-phone-screen { background: #f1f2f4; }
.cf-ph-bar { position: relative; display: flex; align-items: center; gap: .6em; padding: 1.5em .9em .8em; border-bottom: 1px solid rgb(0 0 0 / 8%); background: rgb(255 255 255 / 90%); flex: none; }
.cf-ph--bad .cf-ph-bar { background: #dfe2e6; }
.cf-ph-bar b { font-weight: 500; font-size: 1em; white-space: nowrap; }
.cf-ph-bar .kit-sample { margin-left: auto; font-size: 11px; padding: 4px 8px; }
.cf-av { flex: none; width: 2.2em; height: 2.2em; border-radius: 50%; display: grid; place-items: center; font: 500 .8em/1 var(--font-text); color: #fff; background: var(--kit-accent); }
.cf-ph--bad .cf-av { background: #8b909a; border-radius: .3em; }
.cf-badge { position: absolute; right: .7em; top: .5em; min-width: 1.7em; height: 1.7em; padding: 0 .4em; border-radius: 99px; background: #e5484d; color: #fff; font: 500 .8em/1.7em var(--font-text); text-align: center; }
.cf-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .55em; padding: .9em .8em; overflow: hidden; }
.cf-b { margin: 0; padding: .6em .8em; max-width: 86%; font-size: 1em; line-height: 1.35; border-radius: 1.1em; }
.cf-me { align-self: flex-end; background: color-mix(in srgb, var(--kit-accent) 18%, #fff); color: #1d1d1f; border-bottom-right-radius: .3em; }
.cf-biz { align-self: flex-start; background: #f0f2f1; border-bottom-left-radius: .3em; }
.cf-bot { align-self: flex-start; border-radius: .25em; background: #e3e5e9; color: #3c4048; font-size: .86em; font-weight: 500; letter-spacing: .015em; }
.cf-nag { background: #fde7e4; color: #b42318; }
.cf-pop { position: absolute; left: 1em; right: 1em; bottom: 1.1em; transform: rotate(-3deg); padding: .8em .9em; border-radius: .5em; background: #ffe066; color: #1d1d1f;
  box-shadow: 0 .6em 1.4em -.4em rgb(0 0 0 / 35%); display: grid; gap: .15em; }
.cf-pop b { font: 600 1.25em/1.1 var(--font-text); }
.cf-pop small { font-size: .85em; }
.cf-stars { color: #d9480f; letter-spacing: .1em; font-size: 1em; }
.cf-input { flex: none; margin: 0 .8em .9em; padding: .7em 1em; border-radius: 99px; background: #f0f2f1; color: #8a8f98; }
.cf-typing { display: none; align-self: flex-start; gap: .3em; margin: 0; padding: .7em .9em; border-radius: 1.1em; background: #f0f2f1; }
.cf-typing i { width: .5em; height: .5em; border-radius: 50%; background: #9aa0a8; }

@media (max-width: 1023px) { .cf-hero { padding-top: 56px; } .cf-hero .kit-lead { max-width: 30em; } }
@media (max-width: 767px) {
  .cf-hero { padding-top: 48px; padding-bottom: 56px; }
  .cf-stage { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .cf-arrow { display: none; }
  .cf-ph { --pw: min(290px, 78cqw); }
  .cf-side--bad { transform: none; }
  .cf-word { font-size: 26px; }
}

/* ---------------------------------------------------------------- brand */
.cf-brand-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.cf-brand-text .kit-p { font-size: 19px; line-height: 28px; max-width: 24em; }
.cf-notes { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 14px; }
.cf-notes li { display: flex; align-items: center; gap: 12px; font: 400 19px/1.3 var(--font-text); color: var(--ink); }
.cf-dot { flex: none; width: 26px; height: 26px; overflow: visible; }
.cf-brands { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.cf-bchip { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 8px; border-radius: 99px; border: 0; cursor: pointer;
  font: 500 14px/1 var(--font-text); color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--kit-line);
  transition: box-shadow .25s ease, background .25s ease, transform .25s var(--kit-ease); }
.cf-bchip i { width: 24px; height: 24px; display: grid; place-items: center; font: 400 14px/1 var(--font-display); font-style: normal; color: #fff; background: var(--cb); border-radius: 50%; }
.cf-bchip[data-brand="sage"] { --cb: #2f7a55; } .cf-bchip[data-brand="north"] { --cb: #24408e; } .cf-bchip[data-brand="ember"] { --cb: #c2410c; }
.cf-bchip[data-brand="north"] i { border-radius: 5px; } .cf-bchip[data-brand="ember"] i { border-radius: 9px; font-style: italic; }
.cf-bchip.is-on { box-shadow: inset 0 0 0 2px var(--cb); }
@media (hover: hover) { .cf-bchip:hover { transform: translateY(-1px); } }
.cf-bchip:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.cf-brand-stage { --b: #2f7a55; --bt: #e7f2ec; position: relative; display: grid; place-items: center; padding: 56px 40px; border-radius: 28px; min-width: 0;
  background: radial-gradient(70% 70% at 50% 50%, color-mix(in srgb, var(--b) 14%, #fff), color-mix(in srgb, var(--b) 4%, #f7f7f8) 80%);
  transition: background .5s ease; }
.cf-brand-stage[data-brand="north"] { --b: #24408e; --bt: #e8edf8; }
.cf-brand-stage[data-brand="ember"] { --b: #c2410c; --bt: #fcebe2; }
.cf-doc { --ink: #1d1d1f; --ink-2: #6e6e73; color: var(--ink); width: min(100%, 460px); font-family: var(--font-text); }
.cf-sheet { display: grid; gap: 14px; padding: 20px 22px 24px; }
.cf-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cf-logo { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px 12px 16px; }
.cf-mono { width: 36px; height: 36px; display: grid; place-items: center; font: 400 21px/1 var(--font-display); color: #fff; background: var(--b); border-radius: 50%; transition: background .4s ease, border-radius .4s ease; }
.cf-bname { font: 400 20px/1 var(--font-display); color: var(--b); transition: color .4s ease, opacity .16s ease; }
.cf-qno { font: 400 24px/1 var(--font-display); color: var(--ink-2); }
.cf-hello { position: relative; margin: 0; padding: 12px 20px; min-height: calc(2.8em + 24px); display: flex; align-items: center; font: 400 16px/1.4 var(--font-text); color: var(--ink); }
.cf-hello-t { transition: opacity .16s ease; }
.cf-swap .cf-hello-t, .cf-swap .cf-bname { opacity: 0; }
.cf-brand-stage[data-brand="north"] .cf-mono { border-radius: 5px; }
.cf-brand-stage[data-brand="north"] .cf-bname { font: 500 14px/1 var(--font-text); letter-spacing: .14em; text-transform: uppercase; }
.cf-brand-stage[data-brand="ember"] .cf-mono { border-radius: 10px; font-style: italic; }
.cf-brand-stage[data-brand="ember"] .cf-bname { font-style: italic; }
.cf-brand-stage[data-brand="north"] .cf-hello { font-family: var(--font-display); font-size: 17px; }
.cf-rows { display: grid; }
.cf-rows .num { font-size: 14px; }
.cf-rows p { display: grid; grid-template-columns: minmax(0, 1fr) 40px 92px; gap: 8px; margin: 0; padding: 11px 0; font: 400 14px/1.2 var(--font-text); color: var(--ink-2); border-bottom: 1px solid rgb(0 0 0 / 7%); }
.cf-rows p > :nth-child(2) { text-align: center; }
.cf-rows b { font-weight: 500; color: var(--ink); text-align: right; }
.cf-rows .cf-total { border-bottom: 0; border-top: 1.5px solid var(--b); transition: border-color .4s ease; }
.cf-rows .cf-total span { color: var(--ink); }
.cf-rows .cf-total b { color: var(--b); font-size: 16px; transition: color .4s ease; }
.cf-bank { position: relative; display: grid; gap: 8px; padding: 24px 22px 20px; }
.cf-bank small { font: 500 12px/1 var(--font-text); color: var(--ink-2); }
.cf-bank i { display: block; height: 8px; border-radius: 99px; background: #e4e6ea; }
.cf-ring { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.cf-ring path { stroke-width: 1.8; }
@media (max-width: 1023px) { .cf-brand-in { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 767px) {
  .cf-brand-stage { padding: 32px 14px; border-radius: 22px; }
  .cf-sheet { padding: 20px 18px 22px; }
  .cf-rows p { grid-template-columns: minmax(0, 1fr) 32px 78px; }
  .cf-hello { min-height: calc(4.2em + 24px); }
  .cf-word { order: -1; margin: 0 0 18px; }
}

/* ---------------------------------------------------------------- the dark band: sorting */
.cf-band { position: relative; isolation: isolate; background: #000; color: #f5f5f7; overflow: clip; --ink: #f5f5f7; --ink-2: #a1a1a6; padding-bottom: 80px; }
.cf-band-glow { position: absolute; inset: 14% -14% -34%; z-index: -1; pointer-events: none;
  background: radial-gradient(46% 46% at 50% 58%, color-mix(in srgb, var(--mk-mkt) 70%, transparent), color-mix(in srgb, var(--mk-mkt) 22%, transparent) 56%, transparent 76%); }
.cf-band-head { position: relative; padding-top: 112px; padding-bottom: 56px; }
.cf-band .kit-draw path { stroke: var(--mk-mkt-dark); }
.cf-band .kit-sample { background: rgb(255 255 255 / 10%); color: #d1d1d6; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 20%); }

.cf-board { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(56px, 20%) minmax(0, 1fr); padding: 52px 44px 44px; border-radius: 28px;
  background: rgb(255 255 255 / 6%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.cf-in, .cf-out { display: grid; grid-template-rows: repeat(4, 68px); gap: 28px; position: relative; }
.cf-wires { width: 100%; height: 356px; display: block; overflow: visible; }
.cf-wires path { fill: none; stroke-width: 1.6; stroke-linecap: round; }
.cf-wires .w-r { stroke: rgb(255 255 255 / 38%); }
.cf-wires .w-t { stroke: var(--mk-mkt-dark); }
.cf-msg, .cf-rep { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; border-radius: 18px; font: 400 17px/1.3 var(--font-text); color: #f5f5f7;
  background: rgb(255 255 255 / 9%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 11%); position: relative; z-index: 1; }
.cf-msg em { flex: none; font: 500 12px/1 var(--font-text); font-style: normal; color: var(--mk-mkt-dark); padding: 5px 9px; border-radius: 99px; background: rgb(111 208 74 / 14%); }
.cf-tr { box-shadow: inset 0 0 0 1px rgb(111 208 74 / 38%); }
.cf-rep { justify-content: flex-start; font-size: 16px; background: rgb(255 255 255 / 12%); }
.cf-r1 { grid-row: 1; } .cf-r2 { grid-row: 2; } .cf-w1 { grid-row: 3; } .cf-w2 { grid-row: 4; }
.cf-rep, .cf-lane { grid-column: 1; }
.cf-who { gap: 12px; background: rgb(111 208 74 / 14%); box-shadow: inset 0 0 0 1px rgb(111 208 74 / 30%); }
.cf-who i { flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 50% 36%, #0b1a06 0 21%, transparent 22%), radial-gradient(ellipse at 50% 98%, #0b1a06 0 40%, transparent 41%), var(--mk-mkt-dark); }
.cf-lane { position: absolute; left: -10px; right: -10px; height: 190px; border-radius: 22px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 15%); }
.cf-lane--a { top: -16px; }
.cf-lane--b { top: 182px; background: rgb(111 208 74 / 7%); box-shadow: inset 0 0 0 1px rgb(111 208 74 / 45%); }
.cf-leg { position: absolute; left: 18px; top: 0; transform: translateY(-50%); padding: 5px 11px; border-radius: 99px; font: 500 12px/1 var(--font-text); color: #d1d1d6; background: #0d0f0c; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 18%); white-space: nowrap; }
.cf-lane--b .cf-leg { color: var(--mk-mkt-dark); }
.cf-note { display: flex; align-items: center; gap: 10px; margin: 22px 0 0; font: 400 14px/1 var(--font-text); color: var(--ink-2); }
@media (max-width: 1023px) { .cf-board { padding: 52px 24px 40px; } }
@media (max-width: 767px) {
  .cf-band { padding-bottom: 56px; }
  .cf-band-head { padding-top: 72px; padding-bottom: 32px; }
  .cf-board { display: block; padding: 22px 16px 20px; border-radius: 22px; }
  .cf-wires { display: none; }
  .cf-in { grid-template-rows: none; gap: 10px; }
  .cf-msg { min-height: 56px; padding: 14px 16px; font-size: 16px; }
  .cf-out { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
  .cf-lane { position: static; height: auto; background: none; box-shadow: none; border-radius: 0; }
  .cf-lane--b { background: none; box-shadow: none; margin-top: 12px; }
  .cf-leg { position: static; transform: none; padding: 0 0 2px; background: none; box-shadow: none; font-size: 13px; }
    .cf-lane--a { order: 1; } .cf-r1 { order: 2; } .cf-r2 { order: 3; } .cf-lane--b { order: 4; } .cf-w1 { order: 5; } .cf-w2 { order: 6; }
  .cf-rep { min-height: 56px; padding: 14px 16px; }
}

/* ---------------------------------------------------------------- next and close */
.cf-next { padding-top: 88px; }
.cf-close-wrap { padding-top: 72px; }
.cf-close { align-items: flex-start; text-align: left; }
.cf-close .cluster { justify-content: flex-start; }
.cf-close .kit-lead { margin: 0; max-width: 34em; }
.cf-close > .small { max-width: 560px; }
@media (max-width: 767px) { .cf-next { padding-top: 56px; } .cf-close-wrap { padding-top: 48px; } }

/* the bar stays solid white above the black band on this light page */
.nav::before { background: #fff; }

/* ---------------------------------------------------------------- motion: armed by the script only */
@media (prefers-reduced-motion: no-preference) {
  .cf-armed .cf-m { opacity: 0; transform: translateY(12px) scale(.97); }
  .cf-armed.is-run .cf-m { opacity: 1; transform: none; transition: opacity .45s ease var(--t, 0s), transform .8s var(--kit-ease) var(--t, 0s); }

  /* clumsy: the pop-up lands crooked and the count of unread messages ticks up */
  .cf-armed .cf-pop { transform: translateY(40px) rotate(-8deg) scale(.9); }
  .cf-armed.is-run .cf-pop { transform: rotate(-3deg); transition: opacity .3s ease var(--t), transform .7s cubic-bezier(.3, 1.5, .5, 1) var(--t); }
  .cf-armed .cf-badge { transform: scale(.3); }
  .cf-armed.is-run .cf-badge { transform: none; transition: opacity .2s ease var(--t), transform .5s cubic-bezier(.3, 1.8, .5, 1) var(--t); }
  .cf-armed.is-run .cf-nag { animation: cf-nudge .5s ease 2.4s 2; }
  @keyframes cf-nudge { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

  /* calm: three dots, then one reply */
  .cf-armed .cf-typing { display: flex; opacity: 0; max-height: 0; padding-block: 0; margin-top: -.55em; overflow: hidden; }
  .cf-armed.is-run .cf-typing { animation: cf-typing .8s ease var(--t) both; }
  .cf-armed.is-run .cf-typing i { animation: cf-dot .7s ease-in-out var(--t) 1; }
  .cf-armed.is-run .cf-typing i:nth-child(2) { animation-delay: calc(var(--t) + .15s); }
  .cf-armed.is-run .cf-typing i:nth-child(3) { animation-delay: calc(var(--t) + .3s); }
  @keyframes cf-typing { 0% { opacity: 0; max-height: 0; padding-block: 0; margin-top: -.55em; } 10%, 88% { opacity: 1; max-height: 3em; padding-block: .7em; margin-top: 0; } 100% { opacity: 0; max-height: 0; padding-block: 0; margin-top: -.55em; } }
  @keyframes cf-dot { 0%, 100% { transform: none; } 40% { transform: translateY(-.3em); } }

  /* the sorter: messages arrive, the wires draw, replies slide in from the left */
  .cf-armed .cf-rep { transform: translateX(-70px); }
  .cf-armed .cf-wires path { stroke-dasharray: 1 1.02; stroke-dashoffset: 1.01; }
  .cf-armed.is-run .cf-wires path { stroke-dashoffset: 0; transition: stroke-dashoffset .8s cubic-bezier(.45, .05, .3, 1) var(--t); }
  .cf-armed.is-run .cf-rep { transform: none; }
  .cf-armed .cf-lane { opacity: 0; transition: opacity .6s ease; }
  .cf-armed.is-run .cf-lane { opacity: 1; transition-delay: 1s; }

  /* a brand change: the quote settles back */
  .cf-brand-stage .cf-doc { transition: transform .5s var(--kit-ease), box-shadow .5s var(--kit-ease); }
}
