/* LifeOS · first screen with the 3D phone, shared by the home pages (index, en, ua, ge) and /newpitch/ (circle.html).
   Load after krea.css. Tokens only; the one product token krea.css lacks is added here. */
:root { --status-attention: #d97706; }   /* product status/attention: the agent waits for you (D-563) */

/* menu button under the scrolled header: over the hero photo the glass band blurs to the same grey as surface-sunken and the
   circle vanished (measured 1 to 12 levels apart). One kit tone lighter than the band instead of darker: 16 to 29 levels over
   the photo, the same 8 levels as before over plain blocks. Fill only, no ring, no shadow (D-424) (Nick 2026-10-31 «Да, поправь»). */
body:has(.cr-card).scrolled:not(.hd-dark):not(.menu-open) .hd-menu { background: var(--surface-default); }
/* hover: the band runs 235 to 248 here, so any fixed grey merges somewhere (a darker one over the photo, a lighter one over
   plain blocks). An ink layer instead, the kit's own hover step (8% black, krea .hd-menu:hover) laid over the band: always
   19 to 20 levels under it, so hover never reads weaker than rest. Mouse only: a tap leaves :hover stuck on touch screens
   and would bring the grey back (D-508). */
@media (hover: hover) { body:has(.cr-card).scrolled:not(.hd-dark):not(.menu-open) .hd-menu:hover { background: #00000014; } }

/* ---------- 01 · hero: one inset card under the header, the same frame as the site hero (krea .hero-media): the sea
   photo under film grain, the centred head at the top, the 3D phone below it, running past the card's bottom edge.
   Layout = x.ai/grok first screen, a centred head over one wide stage
   (Nick 2026-10-30 «Layout должен быть как на сайте грока»). ---------- */
.cr-hero { padding-top: var(--hd-h); }
.cr-card { position: relative; isolation: isolate; display: flex; flex-direction: column; height: calc(100svh - var(--hd-h) - var(--pad)); min-height: 640px; max-height: 1040px;
  margin: 0 var(--pad); border-radius: var(--r-l); overflow: hidden; background: var(--bg-subtle); }
.cr-card-bg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 50%; transform: scale(1.04); animation: heroIn 1.6s var(--ease) both; }
/* film grain: a neutral grey noise tile in overlay blend adds texture to the photo and never a colour; it covers the
   photo only, the head and the phone sit above it */
.cr-grain { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: url(img/grain.png) 0 0 / 256px 256px; mix-blend-mode: overlay; opacity: .24; }
@media (min-resolution: 2dppx) { .cr-grain { background-size: 160px 160px; opacity: .3; } }
@media (min-resolution: 3dppx) { .cr-grain { background-size: 86px 86px; } }
/* the photo is brightest right behind the lead, so the top of the card is lifted a little toward the page surface: grey text
   stays above 4.5:1 on every part of the sky; the grain sits above this layer (same z-index, later in the tree) */
.cr-card::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--surface-default) 26%, transparent) 0%, color-mix(in srgb, var(--surface-default) 18%, transparent) 30%, transparent 56%); }
.cr-head { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(36px, 6.5svh, 72px) clamp(20px, 4vw, 48px) 0; }
.cr-h1 { font-size: clamp(44px, 5.2vw, 76px); line-height: .96; letter-spacing: -.045em; }
.cr-h1 .dim { white-space: nowrap; }
/* on the photo muted grey fails contrast, so the quiet parts of the head step up to secondary */
.cr-head .dim, .cr-lead { color: var(--text-secondary); }
.cr-lead { margin: var(--s2) auto 0; max-width: 31em; text-wrap: balance; }
.cr-hero .cr-lead { color: color-mix(in srgb, var(--text-secondary) 60%, var(--text-primary)); }
.cr-ctas { justify-content: center; margin-top: var(--s3); }
.cr-stage { position: relative; z-index: 2; flex: 1 1 auto; min-height: 0; margin-top: clamp(16px, 3svh, 40px); container-type: size; }
@media (max-width: 759px) {
  .cr-card { min-height: 600px; }
  .cr-head { padding-inline: 12px; }
  .cr-ctas { align-self: stretch; }
  .cr-h1 .dim { display: block; }
}

/* 3D phone (Nick 2026-10-30 «модель и блик ... должны быть абсолютно реальными»): a real-time three.js iPhone 17 Pro,
   assets/phone3d.js. It waits below the card's bottom edge, which clips it, until the canvas has drawn its first frame,
   then rises into place (Nick 2026-10-30 «пусть он прогружается за пределами кадра и выезжает снизу»). The plate is the
   same render at the idle pose, used only without WebGL (.is-flat), and rises the same way. The DOM phone stays as the
   text version of the screen and as the source the screen image is baked from.
   Phone height = 88% of the box (FRAC in phone3d.js) and the plate is baked with the same framing, so it fills the box.
   The box (.ph3) is 1.3 stage heights tall from the stage top (1.5 from 1100 px), so the phone runs past the card's bottom
   edge; 100cqh down puts the phone's top below it. The phone's soft shadow is drawn in the 3D canvas too (phone3d.js). */
.ph3 { position: absolute; inset: 0 0 auto; height: 130cqh; z-index: 3; pointer-events: none; }
@media (min-width: 1100px) { .ph3 { height: 150cqh; } }
.ph3-gl, .ph3-plate { position: absolute; top: 0; left: 50%; height: 100%; translate: -50% 100cqh; }
.ph3-gl { transition: translate 1.2s cubic-bezier(.22, .61, .36, 1); }   /* width and height: phone3d.js */
.ph3-plate { display: none; width: auto; max-width: none; aspect-ratio: 840 / 1500; }   /* loading=lazy: not fetched while hidden */
.ph3.is-live .ph3-gl { translate: -50% 0; }
.ph3.is-flat .ph3-gl { visibility: hidden; }
.ph3.is-flat .ph3-plate { display: block; animation: ph3-rise 1.2s cubic-bezier(.22, .61, .36, 1) forwards; }
@keyframes ph3-rise { to { translate: -50% 0; } }
.ph3 > .phone { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* split first screen (.cr-hero--split: /newpitch/ and the home pages, Nick 2026-10-30 «мокап также в контейнере но на пол екрана и больше размером
   соответственно, текст слева»): the photo container is the right half of the screen, the head sits on the left on the
   page surface, aligned to the page edge. The photo and grain are placed in the right grid column (an absolute child of a
   grid takes its grid area as the box), the stage is that whole column, so the phone is larger and still runs past the
   container's bottom. The photo only fades in here: the v1 zoom would push it past its column into the gap.
   Phones keep the centred v1 layout */
@media (min-width: 960px) {
  .cr-hero--split .cr-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(32px, 4vw, 64px); background: none; }
  /* the hero button sits on the container's left edge and follows the cursor by up to 10 px, so the side clip cut it:
     here the container clips only top and bottom, and the phone is still cut by its bottom edge (Nick 2026-10-30 «там
     контейнер кнопку режет если она двигается, убери оверфлоу скрытие»). The phone canvas stays inside the photo column
     (measured 960 to 1920), and the page itself clips sideways, so nothing scrolls */
  .cr-hero--split .cr-card { overflow-x: visible; overflow-y: clip; }
  .cr-hero--split .cr-card::before { content: none; }
  .cr-hero--split .cr-card-bg, .cr-hero--split .cr-grain { grid-column: 2; grid-row: 1; border-radius: var(--r-l); }
  .cr-hero--split .cr-card-bg { transform: none; animation-name: crSplitIn; }
  .cr-hero--split .cr-head { grid-column: 1; grid-row: 1; align-self: center; align-items: flex-start; text-align: left; padding: 0 0 clamp(24px, 4svh, 56px); }
  /* each sentence starts its own line; below 1100 the first one is wider than the column, and it balances into two
     even lines of its own instead of sharing a line with the second sentence (reviewer, round 3) */
  .cr-hero--split .cr-lead span:not(.nw) { display: block; }
  /* Nick 2026-10-30 round 3 («текст слева какой-то куцый ... чтобы как у эпл ощущалось, заголовок явно крупнее»): the
     head scales with its column. The heading's longest line is 5.1 em, so at 6.6vw it fills about three quarters of a
     column that is about 46vw wide; the lead steps up to a sub-heading size and the gaps grow with the type */
  .cr-hero--split .cr-h1 { font-size: clamp(56px, 6.6vw, 160px); line-height: .94; letter-spacing: -.05em; }
  .cr-hero--split .cr-lead { margin: clamp(20px, 1.9vw, 40px) 0 0; max-width: 28em; font-size: clamp(17px, 1.5vw, 30px); line-height: 1.38; letter-spacing: -.015em; text-wrap: balance; }
  .cr-hero--split .cr-h1 .dim { display: block; }
  .cr-hero--split .cr-ctas { justify-content: flex-start; margin-top: clamp(28px, 2.6vw, 56px); }
  .cr-hero--split .cr-stage { grid-column: 2; grid-row: 1; margin-top: clamp(40px, 7svh, 72px); }
  .cr-hero--split .ph3 { height: 135cqh; }
}
/* the home headings are longer than the /newpitch/ one: the first sentence balances into even lines instead of leaving a
   single word on its own line («AI assistant for / life»), at the same size */
.cr-hero--home .cr-h1 { text-wrap: balance; }
/* Georgian (/ge/, 2026-10-31, D-622): «და ბიზნესისთვის» is one unbreakable line of about 8.4 em against 5.1 em for the
   longest English line, so at the shared sizes it ran past the card on phones and into the photo on desktop. The Georgian
   head is sized from its own longest line: about 85% of the card on phones, of the text column from 960 */
:lang(ka) .cr-h1 { font-size: clamp(30px, 9.6vw, 48px); line-height: 1.14; }
@media (min-width: 960px) { :lang(ka) .cr-hero--split .cr-h1 { font-size: clamp(40px, 4.6vw, 112px); line-height: 1.12; } }
/* Georgian letters rise and drop well past the Latin band, so the Latin .94 to .96 leading made the lines touch (2026-10-31) */
/* home pages on phones: the home head (heading, lead, two buttons) is 80 to 140 px taller than the pitch head, and in a
   screen-high card that height came out of the stage, so the phone shrank to 150 to 355 px against 300 to 500 px on
   /newpitch/. The stage keeps the pitch's own height instead (card height minus the pitch head, about 330 px) and the card
   runs past the screen bottom by the difference (2026-10-31) */
@media (max-width: 759px) {
  .cr-hero--home .cr-card { height: auto; max-height: none; }
  .cr-hero--home .cr-stage { flex: none; height: calc(max(600px, 100svh - var(--hd-h) - var(--pad)) - 330px); }
}
@keyframes crSplitIn { from { opacity: .2; } to { opacity: 1; } }

/* chat list inside the hero phone (sizes in --u = phone width / 402) */
.chl :where(ul) { list-style: none; padding: 0; margin: 0; }
.chl { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--surface-default); color: var(--text-primary); font-family: var(--sans); }
.chl .ico { width: calc(var(--u) * 24); height: calc(var(--u) * 24); }
.chl-top { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--u) * 6) calc(var(--u) * 20); }
.chl-top b { font-size: calc(var(--u) * 20); font-weight: 600; letter-spacing: -.02em; }
.chl-chips { display: flex; gap: calc(var(--u) * 8); padding: calc(var(--u) * 16) calc(var(--u) * 16) calc(var(--u) * 10); overflow: hidden; }
.chl-chip { display: inline-flex; align-items: center; gap: calc(var(--u) * 6); flex: none; height: calc(var(--u) * 36); padding: 0 calc(var(--u) * 14); border-radius: 999px; background: var(--card); font-size: calc(var(--u) * 14); font-weight: 500; color: var(--text-muted); }
.chl-chip .ico { width: calc(var(--u) * 18); height: calc(var(--u) * 18); }
.chl-chip.is-on { position: relative; background: var(--accent-primary); color: var(--text-on-accent); }
.chl-chip.is-on em { background: var(--text-on-accent); color: var(--accent-primary); }
/* folder name 5 pt above the active chip's letters, folder dots 5 pt under it (v6/Caption, text/muted; 4 pt dots,
   3 pt apart, the current one accent/primary, the rest the same at 25%); both sit in the chips row's padding */
.chl-fold { position: absolute; left: 50%; bottom: calc(100% + var(--u) * 3.5); translate: -50% 0; font-size: calc(var(--u) * 12); font-weight: 400; line-height: 1; color: var(--text-muted); white-space: nowrap; }
.chl-dots { position: absolute; left: 50%; top: calc(100% + var(--u) * 5); translate: -50% 0; display: flex; gap: calc(var(--u) * 3); }
.chl-dots i { width: calc(var(--u) * 4); height: calc(var(--u) * 4); border-radius: 50%; background: var(--accent-primary); opacity: .25; }
.chl-dots i.is-on { opacity: 1; }
.chl-chip .chl-lg { width: calc(var(--u) * 20); height: calc(var(--u) * 20); fill: currentColor; stroke: none; }
.chl-chip em { font-style: normal; font-size: calc(var(--u) * 12); font-weight: 600; min-width: calc(var(--u) * 20); height: calc(var(--u) * 20); padding: 0 calc(var(--u) * 6); border-radius: 999px; background: var(--accent-primary); color: var(--text-on-accent); display: inline-grid; place-items: center; }
.chl-chip--add { width: calc(var(--u) * 36); padding: 0; justify-content: center; }
.chl-list { flex: 1 1 auto; overflow: hidden; }
.chl-row--top { border-bottom: calc(var(--u) * 1) solid var(--line); }
.chl-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: calc(var(--u) * 12); padding: calc(var(--u) * 10) calc(var(--u) * 20); }
.chl-av { position: relative; width: calc(var(--u) * 50); height: calc(var(--u) * 50); border-radius: 50%; overflow: hidden; display: grid; place-items: center; flex: none; background: var(--card); font-size: calc(var(--u) * 18); font-weight: 600; letter-spacing: -.02em; }
.chl-av img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.chl-av--tile { border-radius: 30%; overflow: visible; background: none; box-shadow: 0 calc(var(--u) * .68) calc(var(--u) * 1.35) var(--shadow-v6-key), 0 calc(var(--u) * 8.1) calc(var(--u) * 14.9) calc(var(--u) * -2) var(--shadow-v6-ambient); }
.chl-av.is-online { overflow: visible; }
.chl-av.is-online::after { content: ""; position: absolute; right: 0; bottom: calc(var(--u) * 1); width: calc(var(--u) * 13); height: calc(var(--u) * 13); border-radius: 50%; background: var(--status-success); box-shadow: 0 0 0 calc(var(--u) * 2.5) var(--surface-default); }
.chl-av--grp { background: none; overflow: visible; }
/* agent status badge: kit Primitives/Status Badge · v6 size 18 on the 48 list avatar, over the tile's bottom-right
   corner and 2 pt past its edges, white 12 pt glyph, radius 6 (D-555, D-563, D-583) */
.chl-st { position: absolute; right: calc(var(--u) * -2); bottom: calc(var(--u) * -2); width: calc(var(--u) * 18); height: calc(var(--u) * 18); border-radius: calc(var(--u) * 6); display: grid; place-items: center; background: var(--status-success); }
.chl-st--needs { background: var(--status-attention); }
.chl-av .chl-st img { position: static; width: calc(var(--u) * 12); height: calc(var(--u) * 12); border-radius: 0; }   /* static: krea.css .phone-scr img pins every screen image to the top-left corner, which pulled the glyph off the badge centre */
.chl-av--grp span { position: absolute; width: calc(var(--u) * 32); height: calc(var(--u) * 32); box-shadow: 0 0 0 calc(var(--u) * 2) var(--surface-default); border-radius: 50%; display: grid; place-items: center; font-size: calc(var(--u) * 13); font-weight: 600; }
.chl-av--grp span:first-child { left: 0; top: 0; }
.chl-av--grp span:has(img) { overflow: hidden; background: var(--card); }
.chl-av--grp span:last-child { right: 0; bottom: 0; }
.t-mint { background: var(--tone-mint-surface); color: var(--tone-mint-ink); }
.t-sky { background: var(--tone-sky-surface); color: var(--tone-sky-ink); }
.t-sand { background: var(--tone-sand-surface); color: var(--tone-sand-ink); }
.t-rose { background: var(--tone-rose-surface); color: var(--tone-rose-ink); }
.chl-tx { min-width: 0; display: grid; gap: calc(var(--u) * 3); }
.chl-tx b { font-size: calc(var(--u) * 16); font-weight: 600; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chl-tx span { font-size: calc(var(--u) * 14); line-height: 1.3; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chl-meta { display: grid; justify-items: end; gap: calc(var(--u) * 6); align-self: start; padding-top: calc(var(--u) * 6); font-size: calc(var(--u) * 12); color: var(--text-faint); font-feature-settings: "tnum"; }
.chl-meta em { font-style: normal; font-size: calc(var(--u) * 12); font-weight: 600; min-width: calc(var(--u) * 20); height: calc(var(--u) * 20); padding: 0 calc(var(--u) * 6); border-radius: 999px; background: var(--accent-primary); color: var(--text-on-accent); display: grid; place-items: center; }
.chl-meta .ico { width: calc(var(--u) * 16); height: calc(var(--u) * 16); color: var(--text-faint); }
.chl-fab { position: absolute; right: calc(var(--u) * 20); bottom: calc(var(--u) * 34); width: calc(var(--u) * 56); height: calc(var(--u) * 56); border-radius: 50%; background: var(--accent-primary); color: var(--text-on-accent); display: grid; place-items: center; box-shadow: var(--elev-2); }

/* ---------- live background (Nick 2026-11-10: one grainy orange gradient that drifts like a lava lamp, shared by the hero card
   and blocks 3 and 4 of the home pages; it replaces the sea, studio and cafe photos). assets/lava.js paints a canvas into
   .lava; the CSS below is the same picture at t = 0, so a page without scripts shows the gradient, not an empty box. The
   colours are sampled from Nick's reference image (warm white top left, grey-warm top right, peach, apricot, orange, red
   orange in the bottom right corner), not page tokens. The grain is the page's own .cr-grain, laid over the box. ---------- */
.lava { position: absolute; inset: 0; z-index: 0; overflow: hidden; isolation: isolate; border-radius: inherit;
  background:
    radial-gradient(52% 40% at 12% 2%, #f1ece7 0, #f1ece700 100%),
    radial-gradient(38% 22% at 52% 0%, #e1cbb8 0, #e1cbb800 100%),
    radial-gradient(50% 30% at 90% 6%, #d7cbc4 0, #d7cbc400 100%),
    radial-gradient(40% 26% at 90% 24%, #d8b6a2 0, #d8b6a200 100%),
    radial-gradient(60% 22% at 5% 92%, #e24800 0, #e2480000 100%),
    radial-gradient(50% 25% at 97% 98%, #e33900 0, #e3390000 100%),
    linear-gradient(#f1ece7 0, #ebdbcb 20%, #e7b377 40%, #e38a28 55%, #df6f12 70%, #df5806 85%, #e04400 100%); }
.lava-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .8s ease; }
.lava.is-live .lava-cv { opacity: 1; }
.lava > .cr-grain { z-index: 1; opacity: .09; }   /* the reference's noise is fine: about a third of the old photo grain (measured: std of a flat patch 1.1 to 1.6 vs 4 to 5.5) */
@media (min-resolution: 2dppx) { .lava > .cr-grain { opacity: .11; } }
/* hero: the gradient is the card's background now; the photo's lifting scrim has nothing to lift */
.cr-hero--home .cr-card::before { content: none; }
@media (min-width: 960px) { .cr-hero--split .lava { grid-column: 2; grid-row: 1; border-radius: var(--r-l); } }

/* blocks 3 and 4: a 3D phone in the same box as the flat DOM phone it replaces (.ph3--inset, assets/phone3d.js). The flat
   phone stays in the page as the text version of the screen, shows while the canvas is loading and when WebGL is missing
   (.is-flat), and fades out once the canvas has drawn (.is-live); the canvas fades in. The host sits inside its block with
   the same margins as the stage, so the 3D phone (88% of the host) has the flat phone's size */
.ph3--inset { inset: 8% 0 4%; height: auto; z-index: 3; }
.ph3--inset .ph3-gl { translate: -50% 0; opacity: 0; transition: opacity .7s ease; }
.ph3--inset.is-live .ph3-gl { opacity: 1; }
.ph3--inset > .phone { position: absolute; inset: auto; top: 50%; left: 50%; bottom: auto; width: var(--w); height: auto; overflow: visible; clip-path: none; white-space: normal; transform: translate(-50%, -50%); transition: opacity .5s ease; }
.ph3--inset.is-live > .phone { opacity: 0; pointer-events: none; }
.ph3--inset.is-flat > .phone { opacity: 1; }

/* block 4 (#channels) keeps its photo (Nick: only the phone becomes 3D there, the background change was for the hero and block 3).
   The host takes the flat phone's place in the .night grid; its height is the phone's, the 3D phone fills 88% of it */
.night .chan-ph { --cw: clamp(250px, 22vw, 320px); position: relative; inset: auto; width: 100%; height: calc(var(--cw) * 2.5); }
.night .chan-ph > .phone { --w: var(--cw); }
@media (max-width: 899px) { .night .chan-ph { --cw: min(70vw, 280px); } }
