/* The stage the page's 3D pictures after the hero stand on (site/calls3d.js, built from site-src/calls3d by
   tool/build-calls3d.mjs; stage.js there says how one is made), and the first of them, the calls section's. The
   computer section's is in pair3d.css, which is read after this and uses the stage's rules below.

   The calls section's picture: a microphone
   and a laptop in 3D, a cable between them, the app on the laptop's screen, and the sound crossing from the one to
   the other as a wave (Matt, 2026-11-28: "redo the graphics with some better iconography and graphics of audio
   beaming between devices", "3d visuals with animations on the components we use so it should just be an overlay
   with 3d models", and "use the microphone instead of the phone").

   It is made as the hero's phone is (site/mock/hero3d.css): the two and the cable are WebGL, what is on the laptop's
   screen is the app in HTML drawn by the kit (mock.css), laid over it with the same camera.

   .c3 is all of the section's card and lies behind its words, so nothing of the two is cut where the words' column
   ends (Matt: "make it so the 3d goes behind the text on the left instead of getting clipped"); .c3-stage, in the
   words' second column, is only where in it they stand.

     .c3-screen[data-screen]   the laptop's screen: a page 960 across
     .c3-pane                  what is on it
     .c3-lift[data-z]          a piece of it that lifts off the glass when the page is taken apart, as the
                               hero's layers do (data-z: how far, in steps of the gap)
     .c3-tag[data-tag]         a label on the page itself, placed by the script
     .c3-lines                 the sound: lines drawn over everything, through the same camera */

.c3-col { position: relative; min-width: 0; }
.c3-stage { position: relative; height: 36rem; }
@media (max-width: 900px) { .c3-stage { height: 30rem; } }
/* On a phone the stage is under the section's list, and its labels stand over the arch: room for them. */
@media (max-width: 520px) { .c3-stage { height: 27rem; } }

/* The box the two are drawn in: all of the card, under its words (the words' wrap is above it: site/index.html
   `.calls > .u-wrap`); the card's own edge is the only thing that cuts it. A click falls through it to the page. */
/* The sound's two colours are named here, on the box the lines and the labels are in. (They were named on the
   stage while the box was inside it; out of it, the lines had no colour and were not drawn at all.) */
.c3 { position: absolute; inset: 0; z-index: 0; pointer-events: none; --c3-gold: #ffcf6b; --c3-hot: #fff3d6; }
.c3-gl, .c3-space, .c3-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.c3-gl { display: block; opacity: 0; transition: opacity .5s ease; filter: drop-shadow(0 0 .7px rgba(255, 255, 255, .8)); }
.c3-live .c3-gl { opacity: 1; }
.c3-cam { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.c3-live .c3-cam { transform-style: preserve-3d; }
.c3-live .c3-screen { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }

/* --- a screen ------------------------------------------------------------------------------------------------ */
.c3-screen { visibility: hidden; color: var(--ink); font-family: var(--font); text-align: left; }
.c3-live .c3-screen { visibility: visible; }
.c3-paper { position: absolute; inset: 0; background: var(--paper); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.c3-screen[data-screen='laptop'] .c3-paper, .c3-screen[data-screen='laptop'] .c3-pane { border-radius: 9px; }
.c3-pane { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; }
.c3-pane .gm-head { background: transparent; }

/* --- the laptop: the space, as the app has it on a wide window (test/shots/22-hangout-wide-*.png) ------------------
   The list at the left, the space in its call beside it. Every piece is the hero's own (site/mock/h3-space.css,
   which has each from the Dart that draws it); the hero stands each as a layer of its phone, and here they are laid
   out as that screen lays them out. The tokens are the kit's computer ones, as on the hero's inner screen. */
.gm.c3-screen[data-screen='laptop'] { --gm-vw: 750; }
.c3-real {
  flex-direction: row;
  /* What h3-space.css names for its own view (it gives them to that view alone). */
  --h3s-s8: calc(clamp(32px, 29.8944px + 0.6579 * var(--v), 40px) * 1.1);
  --h3s-ring: calc(clamp(40px, 37.368px + 0.8224 * var(--v), 50px) * 1.1 * 0.88);
  --h3s-lh-xs: 14px; --h3s-lh-sm: 16px; --h3s-lh-md: 20px; --h3s-lh-lg: 25px;
  --h3s-flame: #c9ffe6; --h3s-admin: #e74c3c;
}
.c3-list { flex: none; width: 372px; position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 10px 0; border-right: 1px solid var(--rule); overflow: hidden; }
.c3-list__row { flex: none; display: flex; align-items: center; gap: 10px; }
.c3-list__row > .gm-search, .c3-list__row > .gm-seg { flex: 1; min-width: 0; }
.c3-list__row > .gm-search { height: 44px; }
.c3-list__souls { flex: none; width: 61px; }
.c3-list > .gm-row { flex: none; }
.c3-list__dock { position: absolute; left: 19px; right: 19px; bottom: 12px; }
.c3-list__dock .h3s-dock__btn { position: relative; }
.c3-list__count { position: absolute; right: -7px; top: -7px; }
.c3-call { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; padding: 20px 14px 12px; }
.c3-call__more { position: absolute; right: 14px; top: 20px; }
.c3-call__people { align-self: center; width: min(100%, 430px); margin-top: 14px; }
.c3-invite { padding-top: 11px; padding-bottom: 11px; }
.c3-invite .h3s-person__face { display: grid; place-items: center; height: 26px; }
.c3-invite .gm-i { width: 20px; height: 20px; }
.c3-call .h3s-person { padding-top: 11px; padding-bottom: 11px; }
.c3-call .h3s-person__mic { display: grid; place-items: center; }
.c3-call .h3s-mic { transition: color .2s ease, transform .2s ease; }
.c3-call .h3s-mic--talking { width: 22px; height: 22px; transform: scale(1.14); }
.c3-call__ctls { display: flex; align-items: flex-start; justify-content: center; gap: 24px; margin-top: 18px; }
.c3-call__ctls .h3s-ctl { width: auto; min-width: 50px; }
.c3-call__ctls .h3s-ctl:not(.h3s-ctl--mic) { margin-top: 5px; }
.c3-call__split { align-self: stretch; position: relative; margin: 12px -14px 0; }
.c3-call__split .h3s-grip { position: absolute; left: 50%; top: -3px; margin-left: -18px; }
.c3-call__chat { align-self: stretch; display: flex; align-items: flex-end; gap: 9px; margin-top: 10px; }
.c3-call__chat > span:last-child { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.c3-call__chat .h3s-who { margin-left: 14px; }
.gm-composer.c3-call__composer { align-self: stretch; margin-top: auto; }

/* --- the page taken apart: each piece a layer, lifted along the screen's own normal (the hero's exploded view) ----
   In 3D nothing between the screen and a piece may clip, fade or filter, or the pieces would be pressed flat again:
   so the pane and the boxes its pieces are laid out in keep their children in space and clip nothing. */
.c3-live .c3-pane, .c3-live .c3-list, .c3-live .c3-call, .c3-live .c3-call__ctls { transform-style: preserve-3d; overflow: visible; }
.c3-live .c3-lift { will-change: transform; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: filter .5s ease; }
/* Lifted (the script marks it .is-up while it is off the glass), a piece has an edge of light and a shadow under it. */
.c3-live .c3-lift.is-up { filter: drop-shadow(0 0 .7px color-mix(in srgb, var(--ink) 50%, transparent)) drop-shadow(0 18px 22px rgba(0, 0, 0, .45)); }
/* And leaves its outline on the glass. */
.c3-ghost { position: absolute; box-sizing: border-box; border: 1px dashed color-mix(in srgb, var(--ink) 26%, transparent); background: color-mix(in srgb, var(--ink) 3.5%, transparent); opacity: 0; transition: opacity .5s ease; pointer-events: none; }
.c3-ghost.is-on { opacity: 1; }

/* --- the sound, drawn over everything --------------------------------------------------------------------------- */
.c3-lines { overflow: visible; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .5s ease; }
.c3-live .c3-lines { opacity: 1; }
/* Lines that are behind a stage's last deck (pair3d.css has them behind its phone) are painted where they stand in
   the page's order, under that deck's canvas. */
.c3-lines.c3-lines--under { z-index: auto; }
.c3-lines path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.c3-lines .c3-halo { stroke: var(--c3-gold); stroke-width: 9; opacity: .1; filter: blur(5px); }
.c3-lines .c3-way { stroke: color-mix(in srgb, var(--c3-gold) 55%, transparent); stroke-width: 1; stroke-dasharray: 2 7; }
.c3-lines .c3-wave { stroke: var(--c3-hot); stroke-width: 1.5; filter: drop-shadow(0 0 4px var(--c3-gold)) drop-shadow(0 0 10px color-mix(in srgb, var(--c3-gold) 60%, transparent)); }
.c3-lines .c3-wave--r { stroke: var(--c3-gold); }

/* A label on the page: its place is the script's. */
.c3-tags { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.c3-tag { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity; white-space: nowrap; }
.c3-tag .u-tag { background: rgba(13, 13, 18, .86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--u-ink); font-weight: 700; white-space: nowrap; }
.c3-tag .u-i { width: .95rem; height: .95rem; }
.c3-tag.is-gold .u-tag { border-color: color-mix(in srgb, var(--c3-gold) 70%, transparent); }
@media (max-width: 520px) { .c3-tag .u-tag { font-size: .74rem; } }

/* --- before the two are drawn, and with no script: the laptop's page lying flat, in a plain edge, at the side of
   the card the stage is at (under the words where the page is narrow and the stage is under them) ------------------ */
.c3:not(.c3-live) .c3-cam { display: flex; align-items: center; justify-content: flex-end; padding: 0 4vw; box-sizing: border-box; }
@media (max-width: 900px) { .c3:not(.c3-live) .c3-cam { align-items: flex-end; justify-content: center; padding: 0 0 4rem; } }
.c3:not(.c3-live) .c3-screen[data-screen='laptop'] { flex: none; display: block; visibility: visible; position: relative; width: 960px; height: 632px; margin: 0 -230px; transform: scale(.52); border-radius: 9px; box-shadow: 0 0 0 12px #060607, 0 0 0 13.5px rgba(255, 255, 255, .5), 0 40px 80px -20px rgba(0, 0, 0, .7); }
@media (max-width: 520px) { .c3:not(.c3-live) .c3-screen[data-screen='laptop'] { margin: -200px -320px; transform: scale(.32); } }
/* With no WebGL there is no laptop under the screen: it has an edge of its own. */
.c3-flat .c3-paper { box-shadow: 0 0 0 10px #060607, 0 0 0 11.5px rgba(255, 255, 255, .45); }

/* The section's chips wear the app's own icons (the kit's sprite), at the size of a word. */
.u-chip .c3-ci { width: 1.05rem; height: 1.05rem; }
