/* Who we help (plan.md): the breadth. The header a true split (the words on graphite, three clips of three kinds of
   business taking turns out to the page's right edge, each with its booked ticket), the ticket wall on the drafting
   grid, the six kinds as photo cards that open the chat, the three buyers on the grid, Live Oak Landscaping's estimate
   over its owner, the chat in a glass phone over Paws on Wheels' van, the close offset left. Tokens only. */

/* ---------- hero: the words on graphite, the clips to the right edge ---------- */
.wwh { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: clamp(560px, calc(100svh - 72px), 720px); overflow: hidden; background: var(--c-night); color: #FFFFFF; }
.wwh__band { position: relative; z-index: 3; display: flex; align-items: center; padding: clamp(56px, 6vw, 96px) clamp(28px, 4vw, 64px) clamp(56px, 6vw, 96px) max(var(--gutter), calc((200% - var(--max-w)) / 2 + var(--gutter))); background-color: var(--c-night); background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px); background-size: 56px 56px; background-position: right -1px top -1px; }
.wwh__words { position: relative; max-width: 540px; }
.wwh__eyebrow { color: var(--c-ink-on-night-soft); }
.wwh__title { font-size: clamp(2.1rem, 1.3rem + 2.2vw, 3.15rem); color: #FFFFFF; }
.wwh__line { max-width: 30em; margin: 18px 0 30px; font-size: 1.125rem; line-height: 1.55; color: var(--c-ink-on-night-soft); }
.wwh__cta { display: grid; justify-items: start; }
.wwh__ease { justify-content: flex-start; }

.wwh__stage { position: relative; z-index: 1; min-height: 100%; overflow: hidden; background: var(--c-night-2); }
.wwh__stop { position: absolute; top: 16px; right: 16px; z-index: 7; }
.wwh__slide { background-image: none !important; } /* the clip holds the picture (its poster under it) */
.wwh__clip { position: absolute; inset: 0; overflow: hidden; background: var(--c-night-2); }
.wwh__clip video, .wwh__clip img { object-position: var(--pos, 50% 50%); }
/* each clip's ticket lands with its slide, on the side clear of the faces */
.wwh__ticket { position: absolute; z-index: 4; bottom: clamp(24px, 3vw, 44px); margin: 0; visibility: inherit; opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 14px)); }
.wwh__ticket--left { left: clamp(20px, 3vw, 44px); }
.wwh__ticket--right { right: clamp(20px, 3vw, 44px); }

/* the kit's header rotation, as kit.md gives it */
[data-kit-scene="rotate"] [data-kit-slide] { position: absolute; inset: 0; margin: 0; visibility: hidden; overflow: hidden; }
[data-kit-scene="rotate"] [data-kit-slide][data-kit-on] { visibility: visible; z-index: 2; opacity: var(--kit-move, 1); transform: translateX(var(--kit-glide, calc((1 - var(--kit-move, 1)) * 4%))); } /* the kit gives the glide in whole device pixels */
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-prev])) [data-kit-slide][data-kit-on] { transform: none; opacity: 1; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { visibility: visible; z-index: 1; }
[data-kit-scene="rotate"] [data-kit-slide] video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-kit-on])) [data-kit-slide]:not([data-kit-slide] ~ [data-kit-slide]) { visibility: visible; }
[data-kit-scene="rotate"] [data-kit-slide] video { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; clip-path: inset(2px); }
[data-kit-scene="rotate"] [data-kit-slide] video[data-kit-shown] { clip-path: none; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { opacity: clamp(0, (1 - var(--kit-move, 0)) * 1000, 1); }
[data-kit-scene="rotate"] [data-kit-slide] img.kit-first { inset: -1px !important; width: calc(100% + 2px) !important; height: calc(100% + 2px) !important; max-width: none; }

/* ---------- kinds: the ticket wall, full width on the drafting grid ---------- */
.wwk { padding-bottom: clamp(3rem, 2rem + 3vw, 5rem); background-color: var(--c-paper); background-image: linear-gradient(var(--grid-line-fine) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line-fine) 1px, transparent 1px); background-size: 56px 56px; background-position: center top; border-bottom: 1px solid var(--c-line); }
.wwk .section__head { margin-bottom: clamp(1.25rem, 1rem + 1vw, 2rem); }
.wwk__wall { position: relative; }
.scene.wwk__scene { display: block; width: 100%; height: 440px; }
.wwk__stop { position: absolute; top: 4px; right: max(var(--gutter), calc((100% - var(--max-w)) / 2 + var(--gutter))); }

/* ---------- six: six kinds, each a photo card that opens the chat ---------- */
.wws { background: var(--c-paper); }
.wws__head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: end; gap: 12px clamp(24px, 4vw, 64px); margin-bottom: clamp(1.75rem, 1.3rem + 1.6vw, 3rem); }
.wws__head h2 { font-size: var(--fs-h2); }
.wws__head p { max-width: 30em; margin: 0; font-size: 1.0625rem; line-height: 1.55; color: var(--c-ink-soft); }
.wws__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 1.6vw, 24px); margin: 0; padding: 0; list-style: none; }
.wws__card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--c-line); border-radius: var(--radius-l); background: var(--c-paper); box-shadow: var(--shadow-s); transition: border-color var(--dur-fast), box-shadow var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out); }
.wws__card:hover { border-color: #C9CED6; box-shadow: var(--shadow-m); transform: translateY(-2px); }
.wws__card:has(.wws__link:focus-visible) { outline: 2px solid var(--c-brand-text); outline-offset: 3px; }
.wws__photo { position: relative; flex: none; aspect-ratio: 16 / 10; overflow: hidden; background: var(--c-paper-alt); }
.wws__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.wws__body { display: grid; flex: 1; align-content: start; gap: 6px; padding: 18px 20px 20px; }
.wws__body h3 { font-size: 1.1875rem; }
.wws__link { color: var(--c-ink); text-decoration: none; }
.wws__link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.wws__link:focus-visible { outline: none; text-decoration: underline; text-decoration-color: var(--c-brand); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.wws__fields { margin: 0; font: 400 0.875rem/1.45 var(--font-ui); color: var(--c-ink-soft); }
.wws__one { margin: 6px 0 0; font: 500 1rem/1.45 var(--font-ui); color: var(--c-ink); }
.wws__go { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font: 500 0.9375rem/1.2 var(--font-ui); color: var(--c-brand-text); }
.wws__go .button__arrow { width: 15px; height: 15px; }
.wws__card:hover .wws__go .button__arrow { transform: translateX(3px); }
/* and many more: the ticket's dashed tear around one line */
.wws__more { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; margin: clamp(20px, 2vw, 28px) 0 0; padding: 18px 22px; border: 1px dashed #C3C9D2; border-radius: var(--radius-l); background: var(--c-paper-alt); font-size: 1.0625rem; color: var(--c-ink-soft); text-align: center; }
.wws__more b { font-weight: 600; color: var(--c-ink); }
.wws__more-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--c-brand-text); text-decoration: none; }
.wws__more-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.wws__more-link .button__arrow { width: 15px; height: 15px; }
.wws__more-link:focus-visible { outline: 2px solid var(--c-brand-text); outline-offset: 3px; border-radius: 4px; }

/* ---------- buyers: the three buyers on the grid ---------- */
.wwb { background-color: var(--c-paper-alt); background-image: linear-gradient(var(--grid-line-fine) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line-fine) 1px, transparent 1px); background-size: 48px 48px; background-position: center top; border-block: 1px solid var(--c-line); }
.wwb__stage { position: relative; text-align: start; }
.scene.wwb__scene { display: block; width: 100%; max-width: 1100px; min-height: 460px; margin: 0 auto; }
.wwb__stop { position: absolute; top: -6px; right: 0; }

/* ---------- plan: the estimate over Live Oak Landscaping's owner ---------- */
.wwp { background: var(--c-paper); }
.wwp__head { max-width: 640px; margin-bottom: clamp(1.5rem, 1.2rem + 1.2vw, 2.5rem); }
.wwp__head h2 { font-size: var(--fs-h2); }
.wwp__head p { margin: 14px 0 0; font-size: 1.0625rem; line-height: 1.55; color: var(--c-ink-soft); }
.wwp__frame { position: relative; height: clamp(540px, 44vw, 600px); margin: 0 0 0 clamp(0px, 6vw, 96px); overflow: hidden; border: 1px solid var(--c-line); border-radius: var(--radius-l); background: var(--c-paper-alt); box-shadow: var(--shadow-l); }
.wwp__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 35%; }
.scene.wwp__scene { position: absolute; z-index: 2; left: clamp(20px, 3vw, 44px); top: clamp(28px, 3.4vw, 48px); width: min(520px, 48%); text-align: start; }
.wwp__stop { position: absolute; top: 14px; right: 14px; z-index: 5; }

/* ---------- anyway: the chat in a glass phone over the groomer's van ---------- */
.wwa { background: var(--c-paper-alt); border-top: 1px solid var(--c-line); }
.wwa__frame { position: relative; height: clamp(660px, 50vw, 680px); margin: 0; overflow: hidden; border: 1px solid var(--c-line); border-radius: var(--radius-l); background: var(--c-paper-alt); box-shadow: var(--shadow-l); }
.wwa__frame > img, .wwa__frame > picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 45%; }
.wwa__phone { position: absolute; z-index: 2; top: 50%; right: clamp(28px, 8vw, 120px); width: 320px; padding: 8px; border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 40px; background: rgba(255, 255, 255, 0.24); box-shadow: 0 30px 60px -30px rgba(14, 17, 23, 0.55); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); text-align: start; transform: translateY(-50%); }
.wwa__top { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--c-line); border-radius: 32px 32px 0 0; background: var(--c-paper); color: var(--c-ink); }
.wwa__top img { width: 34px; height: 34px; padding: 3px; border: 1px solid var(--c-line); border-radius: 9px; background: var(--c-paper-alt); }
.wwa__top b { display: block; font: 600 0.9375rem/1.2 var(--font-ui); }
.wwa__top small { display: block; font-size: 0.8125rem; color: var(--c-ink-soft); }
/* the whole story fits the window, filled from the top: no message is ever cut at its edge (the plan card's last line
   included: the phone 320 px wide, the card's headline on one line, its bars 32 px) */
.wwa__chat { display: flex; flex-direction: column; justify-content: flex-start; gap: 6px; height: 540px; overflow: hidden; padding: 14px; border-radius: 0 0 32px 32px; background: var(--c-paper-alt); color: var(--c-ink); opacity: calc(1 - var(--kit-out, 0)); }
.wwa-msg { flex: none; max-width: 86%; margin: 0; padding: 9px 13px; border-radius: 14px; font: 400 0.9063rem/1.4 var(--font-ui); opacity: var(--kit-in, 0); transform: translateY(calc((1 - var(--kit-in, 0)) * 10px)); }
.wwa-msg--bot { align-self: flex-start; border: 1px solid var(--c-line); border-bottom-left-radius: 5px; background: var(--c-paper); color: var(--c-ink); }
.wwa-msg--me { align-self: flex-end; border-bottom-right-radius: 5px; background: var(--c-button); color: var(--c-on-button); font-weight: 500; }
.wwa-msg--chips { display: flex; gap: 6px; padding: 0; background: none; }
.wwa-msg--chips span { padding: 7px 13px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-paper); font: 500 0.9063rem/1 var(--font-display); }
.wwa-msg--chips span[data-kit-on] { border-color: var(--c-ink); background: var(--c-ink); color: #FFFFFF; }
.wwa-msg--typing { display: flex; gap: 5px; padding: 13px 14px; }
.wwa-msg--typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-ink-soft); animation: wwa-dots 1s infinite ease-in-out; }
.wwa-msg--typing i:nth-child(2) { animation-delay: 0.15s; }
.wwa-msg--typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes wwa-dots { 0%, 80%, 100% { transform: translateY(0); opacity: 0.45; } 40% { transform: translateY(-4px); opacity: 1; } }
.wwa-msg--check { display: grid; gap: 8px; min-width: 70%; font-weight: 500; }
.wwa-msg__bar { display: block; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--c-brand) calc(var(--kit-fill, 0) * 100%), var(--c-line) 0); }
.wwa-msg--result { display: grid; align-self: stretch; gap: 6px; max-width: none; padding: 14px 16px; background: var(--c-night); color: #FFFFFF; }
.wwa-msg--result small { font-size: 0.8125rem; color: var(--c-ink-on-night-soft); }
.wwa-msg--result b { font: 500 1.1875rem/1.1 var(--font-display); letter-spacing: -0.02em; }
.wwa-msg__bars { display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; gap: 4px; height: 32px; margin: 4px 0 2px; }
.wwa-msg__bars i { display: block; height: calc(4px + var(--v) * 28px); border-radius: 2px 2px 1px 1px; background: var(--c-brand); }
.wwa-msg__bars i:first-child { height: 4px; background: rgba(255, 255, 255, 0.18); }
.wwa__stop { position: absolute; top: 14px; right: 14px; z-index: 5; }
.wwa .cta-row { margin-top: clamp(1.5rem, 1.2rem + 1vw, 2.25rem); }

/* ---------- close: the words offset left, her face in the right third ---------- */
.wwx { display: grid; align-items: center; min-height: clamp(520px, 44vw, 640px); text-align: start; }
.wwx .close__video { object-position: 70% 40%; }
.wwx .close__media::after { background: linear-gradient(90deg, rgba(11, 13, 18, 0.9) 0%, rgba(11, 13, 18, 0.74) 40%, rgba(11, 13, 18, 0.22) 70%, rgba(11, 13, 18, 0.06) 100%); }
.wwx .close__in { width: 100%; justify-items: start; } /* a grid item with auto margins shrinks to its words: keep the container's width */
.wwx .close__in h2 { max-width: 600px; }
.wwx .close__line { max-width: 500px; }
.wwx .ease { justify-content: flex-start; }

/* ---------- tablet ---------- */
@media (max-width: 1099px) {
  .wws__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* three columns under 1020 px cut the comparison's names: the buyers stand in one column (the scene's own layout
     under 760 px), centered */
  .scene.wwb__scene { max-width: 720px; min-height: 800px; }
  .wwp__frame { margin-left: 0; }
  .scene.wwp__scene { width: min(480px, 54%); }
  .wwp__frame img { object-position: 76% 35%; }
}
@media (max-width: 900px) {
  .wwa__frame > img, .wwa__frame > picture img { object-position: 34% 45%; }
  .wwa__phone { right: 24px; }
}

/* ---------- phone: the clip on top, the words under it ---------- */
@media (max-width: 760px) {
  .wwh { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .wwh__stage { order: -1; height: clamp(380px, 104vw, 460px); min-height: 0; }
  .wwh__band { padding: 32px var(--gutter) 40px; }
  .wwh__line { margin: 14px 0 24px; font-size: 1.0625rem; }
  /* every ticket in one place, so the next covers the last as it comes in */
  .wwh__ticket, .wwh__ticket--left, .wwh__ticket--right { right: auto; bottom: 16px; left: 16px; min-width: 0; max-width: calc(100% - 32px); }

  .wws__head { grid-template-columns: minmax(0, 1fr); }
  .wws__grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .wws__card { flex-direction: row; }
  .wws__photo { width: 38%; aspect-ratio: auto; }
  .wws__body { gap: 4px; padding: 14px 16px 16px; }
  .wws__body h3 { font-size: 1.0625rem; }
  .wws__one { margin-top: 4px; font-size: 0.9375rem; }
  .wws__go { margin-top: 6px; font-size: 0.875rem; }

  .scene.wwb__scene { min-height: 800px; }

  .wwp__frame { height: 720px; }
  .wwp__frame img { object-position: 82% 0%; }
  .scene.wwp__scene { top: auto; bottom: 12px; left: 12px; width: calc(100% - 24px); }

  .wwa__frame { display: grid; height: auto; overflow: visible; border: 0; background: none; box-shadow: none; }
  .wwa__frame > img, .wwa__frame > picture img { position: relative; inset: auto; height: 760px; border: 1px solid var(--c-line); border-radius: var(--radius-l); object-position: 28% 30%; }
  /* the phone over the photo's lower half, under the groomer's face; its chat window more than half on the photo */
  .wwa__phone { position: relative; top: auto; right: auto; margin: -360px auto 0; transform: none; }

  .wwx { align-items: end; min-height: 660px; }
  .wwx .close__video { object-position: 70% 30%; }
  .wwx .close__media::after { background: linear-gradient(180deg, rgba(11, 13, 18, 0.12) 0%, rgba(11, 13, 18, 0.5) 40%, rgba(11, 13, 18, 0.92) 72%); }
}

@media (prefers-reduced-motion: reduce) {
  .wws__card, .wws__go .button__arrow { transition: none; }
  .wwa-msg--typing i { animation: none; }
}
