/* GoBolt site v2. The three platform pages (shopify.html, woocommerce.html, ecwid.html), on top of site.css.
   BRIEF-V2 §7: no card around a product picture. The admin window, the product page, the Ecwid storefront and
   the film each stand on their own over the paper, with one soft shadow. The phone is the kit's standard frame
   (data-fit="thread"), tied to the scroll by kitScrub. */

/* ── a captured window on its own: rounded, a hairline edge, one soft long shadow ── */
.shot {
  display: block; width: 100%; height: auto;
  border-radius: clamp(10px, 0.9vw, 14px);
  box-shadow: 0 0 0 1px rgba(30, 29, 26, 0.07), 0 2px 6px rgba(30, 29, 26, 0.05), 0 28px 72px rgba(30, 29, 26, 0.14);
}

/* the hero: Bolt's Home header and the Operating brief in the real admin (tools/capture-admin-hero.mjs), sized so
   the whole window sits in the first screen under the lines at 1440 × 900; the same card alone on phones. */
.hero--shot > [data-reveal] > .wrap:first-child { padding-bottom: clamp(36px, 4.5vw, 60px); }
/* MKT-030: room between the hero's words and the admin picture */
.hero [data-reveal] > .wrap + .wrap--wide { margin-top: clamp(48px, 6vw, 88px); }
.shot-frame { width: 100%; max-width: min(1040px, calc((100svh - 400px) * 2.2)); min-width: min(100%, 720px); margin-inline: auto; }
.shot-frame > picture { display: block; }
.hero--shot .shot { box-shadow: 0 0 0 1px rgba(30, 29, 26, 0.07), 0 4px 12px rgba(30, 29, 26, 0.05), 0 40px 110px rgba(30, 29, 26, 0.18); }
@media (max-width: 899px) { .shot-frame { max-width: 400px; min-width: 0; } }   /* the phone crop, up to tablets (its type stays 11 px or more) */

/* the product page stands alone; its own browser frame carries the shadow */
.split > .picture > [data-ui="product"] { width: 100%; max-width: 640px; }
/* the page's real player (platform.js) sits where the drawn one was; not shown until it is placed */
.picture > .player[data-highlight] { display: none; }
.k-pp-info > .player { max-width: none; margin-top: 7px; padding: 10px 14px 10px 10px; gap: 12px; font-size: 12.5px; box-shadow: none; border-color: var(--k-line-soft); background: var(--k-paper); }
.k-pp-info > .player .player-btn { width: 40px; height: 40px; }
.woo .k-pp-info > .player { order: 3; }

/* ── Ecwid: the chat in its own window, over a dimmed storefront (platform.js draws the store page) ── */
.over-store { position: relative; width: 100%; max-width: 760px; margin-inline: auto; padding: 72px 28px 28px; }
.over-store-page { position: absolute; inset: 0; }
.over-store-page > .k-browser { position: relative; width: 100%; height: 100%; }
.over-store-shop { height: calc(100% - 40px); }
.over-store-lead { padding: 28px 24px 18px; }
.over-store-lead h3 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.over-store-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0 24px; }
.over-store-tile img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #f2f0ec; }
.over-store-tile strong { display: block; margin-top: 10px; font-size: 13.5px; font-weight: 600; }
.over-store-tile small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--k-ink-2); }
.over-store-band { display: block; width: calc(100% - 48px); height: auto; aspect-ratio: 16 / 7; object-fit: cover; margin: 22px 24px 0; border-radius: 10px; background: #f2f0ec; }
.over-store-dim { position: absolute; inset: 40px 0 0; background: rgba(30, 29, 26, 0.34); }
.over-store > [data-ui="chat"] { position: relative; }
.over-store .k-chat { margin-inline: auto 0; box-shadow: 0 2px 8px rgba(30, 29, 26, 0.12), 0 30px 80px rgba(30, 29, 26, 0.28); }
@media (max-width: 559px) {
  .over-store { padding: 60px 14px 14px; }
  .over-store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 16px; }
  .over-store-lead { padding: 20px 16px 14px; }
  .over-store-band { width: calc(100% - 32px); margin: 16px 16px 0; }
  .over-store .k-chat { margin-inline: auto; }
}

/* ── threads as tall as the conversation so far (platform.js, section 4) ──
   A storefront chat opens mid-conversation (no greeting, no quick replies) and reads from the top, as the real
   widget's scroll box does. Storefront chats hold their thread to the rows that have arrived, so the frame grows a
   message at a time; the box keeps the finished height (--thread-h) and the frame grows from its middle (from its
   top on phones), so the words beside it and the page below never move. */
.k-ui[data-grow] .k-chat { height: auto; }
.k-ui[data-grow] .k-chat-body { flex: none; }
.k-ui[data-grow] .k-chat-msgs { flex: none; position: relative; max-height: none; transition: height 560ms var(--k-ease); }
.k-ui[data-grow] .k-chat-msgs > :first-child { margin-top: 0; }
.k-ui[data-grow] .k-chat-row--ai[data-at="0"], .k-ui[data-grow] .k-chat-chips { display: none !important; }
/* measuring the finished height: every row that will arrive takes its place, unseen */
.k-ui[data-grow][data-measure] .k-chat-msgs > .k-chat-row[data-at]:not([data-until]):not([data-at="0"]),
.k-ui[data-grow][data-measure] .k-chat-msgs > .k-chat-note[data-at]:not([data-until]):not([data-at="0"]) { display: flex !important; visibility: hidden; }   /* the one-time code line too */
.k-ui[data-grow][data-instant] .k-chat-msgs { transition: none; }
@media (prefers-reduced-motion: reduce) { .k-ui[data-grow] .k-chat-msgs { transition: none; } }
.picture[data-thread-box] { min-height: var(--thread-h, 0px); align-items: center; }
.over-store[data-thread-box] { display: flex; flex-direction: column; justify-content: center; min-height: calc(var(--thread-h, 0px) + 100px); }
.over-store[data-thread-box] > [data-ui] { width: 100%; }
/* the Ecwid chat over the store holds its finished height (--thread-h) from the start, so the messages fill a still
   window instead of the window growing and re-centring as they arrive; the one-time code sheet slides up opaque
   over the dimming chat, so nothing shows through it */
.over-store .k-ui[data-grow]:not([data-measure]) .k-chat { height: var(--thread-h, auto); }
.over-store .k-ui[data-grow]:not([data-measure]) .k-chat-body { flex: 1 1 auto; min-height: 0; }
.over-store .k-ui[data-grow]:not([data-measure]) .k-chat-msgs { flex: 1 1 auto; height: auto !important; }
.over-store .k-chat-sheetwrap { animation-name: pf-dim !important; }
.over-store .k-chat-sheet { animation-name: pf-sheet-up; }
@keyframes pf-dim { from { background-color: rgba(35, 38, 43, 0); } }
@keyframes pf-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
/* on phones the thread box is taller than the screen's calm middle: the frame keeps its top edge and grows
   downward only, so nothing that is already on screen moves as a message arrives */
@media (max-width: 719px) {
  .picture[data-thread-box] { align-items: flex-start; }
  .over-store[data-thread-box] { justify-content: flex-start; }
}

/* the phone and the chat sit level with the words */
@media (min-width: 900px) {
  .platform .split:not(.split--wide):has(> .picture [data-grow]) { align-items: center; }
  .platform .split:not(.split--wide):has(> .picture [data-grow]) > .two { padding-bottom: 0; }
}
/* the pinned phone stage is as tall as its picture, held at the screen's middle (platform.js sets --stage-top),
   so the gap to the next section is the scene's own spacing */
.scene--phone[data-scrub].is-scrubbing > .scrub-stage { height: auto; top: var(--stage-top, 0px); display: block; }

/* ── how you start: the three steps, then the install film under them at the page column's full width, so the
   admin in its frames reads as a picture, not a thumbnail. On wide screens the headline and the steps share one
   row. The film's frames already show the browser window floating on paper, with its own shadow, so the video
   adds no frame of its own. ── */
.start-stack { display: grid; gap: clamp(36px, 5vw, 64px); }
.start-stack > .picture { display: block; min-width: 0; }
/* the frames' paper is the page's paper (#f6f5f1), so on wide screens the film reaches 5.56% past the column on
   each side and the window inside it lines up with the column's edges (from 1280 px the gutter is 64 px, wider
   than that reach, so the page never scrolls sideways) */
@media (min-width: 1280px) { .start-stack > .picture > .film-frame { width: calc(100% / 0.9); margin-inline: calc(-100% / 18); } }
@media (min-width: 900px) {
  .start-stack > .two { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); column-gap: clamp(40px, 7vw, 96px); align-items: start; max-width: none; }
  .start-stack > .two > * + * { margin-top: 0; }
}
.film-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: transparent; }

/* the film's Play, over the poster until the first press (platform.js), with its words, so the still reads as a
   film at a glance: an ink pill in the middle of the poster where the poster is small */
.film-frame { position: relative; width: 100%; }
.film-play { display: none; }
.film-frame.is-ready:not(.is-playing) > .film-play {
  display: inline-flex; align-items: center; gap: 10px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  min-height: 52px; padding: 0 24px 0 20px; border: 0; border-radius: var(--k-r-pill); cursor: pointer; white-space: nowrap;
  background: var(--k-ink); color: var(--k-paper); box-shadow: var(--k-shadow-button);
  font: 500 0.9375rem/1 var(--k-font); transition: transform 200ms ease;
}
.film-frame.is-ready:not(.is-playing) > .film-play:hover { transform: translate(-50%, -50%) scale(1.03); }
.film-play:focus-visible { outline: 2px solid var(--k-ink); outline-offset: 4px; }
.film-play svg { flex: none; width: 20px; height: 20px; fill: currentColor; }
/* from 900 px the poster is large enough to read, so Play leaves the install screen: a round ink Play and its words
   on the paper under the window, level with the window's left edge (the frames put the window 5% in from the left
   and end it 13.3% above the bottom; the button is centred in that strip of paper). */
@media (min-width: 900px) {
  .film-frame.is-ready:not(.is-playing) > .film-play {
    left: 5%; top: calc(93.33% - 22px); transform: none; min-height: 44px; padding: 0 6px 0 0; gap: 14px;
    background: none; box-shadow: none; color: var(--k-ink); font-size: 1rem;
  }
  .film-frame.is-ready:not(.is-playing) > .film-play:hover { transform: none; }
  .film-play svg { width: 44px; height: 44px; padding: 12px 11px 12px 13px; border-radius: 50%; background: var(--k-ink); color: var(--k-paper); box-shadow: var(--k-shadow-button); transition: transform 200ms ease; }
  .film-play:hover svg { transform: scale(1.06); }
}
