/* Smile4U v8 · Technik page (V8-BLOCKS-R1 §2.2, task B8). Markup _tools/pages/technik.py, motion js/pages/p-technik.js.
   Adjacency: head + index / DVT object on paper / R2 tile on paper / framed photo on mist / milling object in the night
   band / full-bleed spread / type statement / FAQ panel / related run / Termin band. The two 3D sections never touch and
   never share a ground. Shared sections (pages.css) and blocks are placed here, never restyled.
   Block 4's stylesheet supplies the tile 02 composite (.tk-vis--r2: haze, monitor ghost, X-ray card): one source for
   its crops. */
@import url("../blocks/04-vom-bild-zur-krone.css");

.page-technik { --tc-hold-top: calc(var(--nav-bottom) + 24px); --tc-gap: 24px; }

/* ---- object sections (DVT on paper, milling in the band): text column + the scene's frame ---- */
.page-technik .tc-grid { align-items: start; row-gap: 40px; }
.page-technik .tc-text { grid-column: 1 / -1; min-width: 0; display: grid; align-content: start; }
.page-technik .tc-text > * + * { margin-top: var(--tc-gap); }
.page-technik .tc-text > .tc-p + .tc-p { margin-top: 16px; }
.page-technik .tc-p { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink-75); max-width: 34em; }
.page-technik .tc-text--light .tc-h2 { color: var(--on-band); }
.page-technik .tc-text--light .tc-p { color: var(--on-band-2); }
.page-technik .tc-side { grid-column: 1 / -1; min-width: 0; position: relative; }
.page-technik .tc-hold { position: relative; }

/* the scene's frame (README §8.1): the canvas and the posters are clipped to it */
.page-technik .t3d-host { position: relative; overflow: clip; aspect-ratio: 4 / 5; }
.page-technik .t3d-host .t3d-post, .page-technik .t3d-host .t3d-post picture { position: absolute; inset: 0; }
.page-technik .t3d-host .t3d-post img { width: 100%; height: 100%; object-fit: contain; max-width: none; }
.page-technik .t3d-host .t3d-post { transition: opacity .4s var(--ease-ui); }
.page-technik .t3d-host[data-live] .t3d-post { opacity: 0; }
.page-technik .t3d-post:not(.is-stepped) picture:not(:last-child) { display: none; }   /* no JS, reduced motion: the end pose */
.page-technik .t3d-post.is-stepped picture:not(.is-on) { display: none; }             /* JS steps the posters with the scroll */
html[data-t3d="live"] .page-technik .t3d-host:not([data-slow]) .t3d-post.is-wait picture { display: none; }   /* live: no poster download */

/* DVT: paper */
.page-technik .tc-dvt { background: var(--paper); }

/* milling: the inset night band (block 13's shape: 16 px from the viewport, radius 36) */
.page-technik .tc-keramik { background: var(--paper); padding: var(--band-inset); scroll-margin-top: calc(var(--nav-bottom) + 16px); }
.page-technik .tc-band { padding-block: var(--sec-pad-dark); border-radius: var(--r-band); background: var(--band); color: var(--on-band); }
.page-technik .tc-band .sk-ro { color: var(--ink); }
@media (max-width: 809.98px) { .page-technik .tc-keramik .tc-text { order: -1; } }   /* P: the text, then its picture (R1 §0.1.4) */   /* the readout card keeps its own ink on the night ground */

@media (min-width: 810px) {
  .page-technik .tc-dvt .tc-text { grid-column: 1 / 6; }
  .page-technik .tc-dvt .tc-side { grid-column: 6 / 13; }
  .page-technik .tc-keramik .tc-side { grid-column: 1 / 8; grid-row: 1; }
  .page-technik .tc-keramik .tc-text { grid-column: 8 / 13; grid-row: 1; }
  .page-technik .t3d-host { aspect-ratio: auto; height: min(704px, 78svh); }
  /* live (motion): the frame holds beside the moving column; the column's items spread so the hold reads the scene
     (≈ .9 screens of hold at 1440 × 900, ≤ 1.6 everywhere: R1 §0.1) */
  html.motion:not(.rm) .page-technik .tc-grid { align-items: stretch; }
  html.motion:not(.rm) .page-technik .tc-hold { position: sticky; top: var(--tc-hold-top); will-change: transform; }
  html.motion:not(.rm) .page-technik .t3d-host { height: min(704px, calc(100svh - var(--tc-hold-top) - 24px)); }
  html.motion:not(.rm) .page-technik .tc-text { --tc-gap: max(40px, 24svh); }
  html.motion:not(.rm) .page-technik .tc-text > .tc-p + .tc-p { margin-top: var(--tc-gap); }
}

/* ---- Planung: one R2 tile, paper panel left on the tile's own haze (rim 8), the composite right ---- */
.page-technik .tc-tile {
  position: relative; isolation: isolate; overflow: clip; border-radius: var(--r-lg); background: var(--mist);
  display: grid; grid-template-columns: minmax(0, 1fr); padding: var(--tile-rim); gap: var(--tile-rim);
}
.page-technik .tc-haze { position: absolute; inset: 0; z-index: -1; }
.page-technik .tc-haze img { width: 100%; height: 100%; object-fit: cover; max-width: none; }
.page-technik .tc-panel {
  position: relative; min-width: 0; border-radius: var(--r-md); background: var(--paper);
  padding: 32px 24px 40px; display: grid; align-content: start; gap: 24px;
}
.page-technik .tc-tile-h { font-size: var(--fs-band); line-height: 1.12; letter-spacing: var(--ls-band); font-weight: var(--fw-display); }
.page-technik .tc-line { color: var(--ink-75); max-width: 16em; }
.page-technik .tc-vis { position: relative; min-width: 0; aspect-ratio: 4 / 5; border-radius: var(--r-md); overflow: clip; transform-origin: 50% 100%; }
.page-technik .tc-tile .tk-vis { position: absolute; inset: 0; background: none; }   /* the tile's haze shows through, not the home placeholder (V8-PHONE-CROPS #2) */
.page-technik .tc-tile .tk-vis > .tk-haze { display: none; }   /* the tile's one haze sits behind panel and visual */
.page-technik .tc-veil { position: absolute; inset: 0; z-index: 3; background: var(--veil); opacity: 0; pointer-events: none; }
.page-technik .tc-haze img { animation: tc-drift 22s ease-in-out infinite alternate; }   /* passive life: the haze drifts behind the card (as tile 02) */
@keyframes tc-drift { from { transform: scale(1.1) translate3d(-2%, -1.5%, 0); } to { transform: scale(1.1) translate3d(2%, 1.5%, 0); } }
@media (min-width: 810px) {
  .page-technik .tc-tile { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); height: min(var(--tile-h), max(520px, calc(100svh - var(--nav-bottom) - 48px))); }
  .page-technik .tc-panel { padding: 44px 40px 40px 40px; align-content: space-between; }
  .page-technik .tc-vis { aspect-ratio: auto; }
}

/* ---- Scan: the frame on mist (R6, --rim-glass), photo cols 1–7, text cols 9–12 at the frame's foot ---- */
.page-technik .tc-scan { background: var(--mist); }
.page-technik .tc-scan .g12 { row-gap: 40px; }
.page-technik .tc-frame {
  grid-column: 1 / -1; position: relative; overflow: hidden; aspect-ratio: 700 / 667;
  border-radius: var(--r-lg); box-shadow: var(--rim-glass); background: var(--paper);
}
/* scan-card-700 (cut file of scan-2000 x .35–.70, y .50–1): the scanner in his hand and the scan unit's keyboard, no face */
.page-technik .tc-frame picture { position: absolute; inset: 0; }
.page-technik .tc-scan-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.page-technik .tc-scan-text { grid-column: 1 / -1; min-width: 0; display: grid; gap: 24px; align-content: end; }
.page-technik .tc-scan-text .tc-p { color: var(--ink-75); }
@media (min-width: 810px) {
  .page-technik .tc-frame { grid-column: 1 / 8; }
  .page-technik .tc-scan-text { grid-column: 9 / 13; align-self: end; padding-bottom: 8px; }
}

/* ---- Mikroskop: the spread. Windows of aspect ≥ 3 : 2 (the photo fits by width, so its x fractions are the
   window's): H2 and both paragraphs set into the window panes and wall at the right, over the bright trees; measured
   by _shots/b8/_qa/contrast-b8.mjs at 1280 × 720 … 2560 × 1440. The microscope arm and lamp (top) and the dark door
   edge (x > .92) stay outside the text box. Narrower windows and phones: the whole photo, the text under it
   (R1 §2.2 fallback), cols 8–12 from 810. ---- */
.page-technik .tc-spread { background: var(--paper); }
.page-technik .tc-spread .sk-spread-photo { height: auto; aspect-ratio: 4 / 5; }
.page-technik .tc-spread-body { display: grid; gap: 16px; color: var(--ink-75); }
.page-technik .tc-spread-text { padding-block: 40px var(--sec-pad); }
@media (min-width: 810px) {
  .page-technik .tc-spread .sk-spread-photo { aspect-ratio: 4920 / 3376; }
  .page-technik .tc-spread .sk-spread-text.tc-spread-text { position: static; display: grid; gap: 20px; padding-block: 48px var(--sec-pad); }
  .page-technik .tc-spread .tc-spread-text > * { margin-left: calc((100% + var(--gap-grid)) * 7 / 12); }
}
@media (min-width: 810px) and (min-aspect-ratio: 3 / 2) {
  .page-technik .tc-spread .sk-spread-photo { aspect-ratio: auto; height: 100svh; }
  .page-technik .tc-spread-img { object-position: 50% 0%; }   /* the photo's top edge stays: the text box's ground is fixed */
  .page-technik .tc-spread .sk-spread-text.tc-spread-text {
    position: absolute; inset: 25svh 9vw auto auto; width: min(420px, 25vw);
    max-width: none; margin: 0; padding: 0;
  }
  .page-technik .tc-spread .tc-spread-text > * { margin-left: 0; }
  .page-technik .tc-spread-body { color: var(--ink); }
}

/* ---- Kosten und Kasse statement, related run: shared; spacing only ---- */
.page-technik .tc-related { padding-top: 0; }
