/* Smile4U v8 · treatment template (V8-BLOCKS-R1 §2.1, §2.4; markup _tools/pages/zahnimplantat.py, motion
   js/pages/p-zahnimplantat.js). Every treatment page uses this file: selectors name section kinds (.tr-*), not pages.
   Tokens only; the shared sections (css/pages.css) are placed here, never restyled.
   Live layout = html.motion:not(.rm) at ≥ 810; no JS, reduced motion and phones get the static layout (R1 §0.1.4). */

/* ---- object: 3D scene on night. Text cols 1–4 scrolls 1 : 1; the stage cols 5–12 bleeds to the viewport's right
   edge and holds (sticky) beside it, ≤ 1.6 screens; it trails the scroll (JS), so it is never glued ---- */
.page-zahnimplantat .tr-obj {
  position: relative; overflow-x: clip; color: var(--on-band); background: var(--band);   /* without the night layer the section carries its own night */
  padding-block: 96px var(--sec-pad-dark);
}
html.motion:not(.rm) .page-zahnimplantat .tr-obj { background: transparent; }        /* the fixed night layer shows through (R5) */
.page-zahnimplantat .tr-obj-grid { align-items: start; }
.page-zahnimplantat .tr-obj-text { grid-column: 1 / 5; min-width: 0; position: relative; }
.page-zahnimplantat .tr-obj-h {
  position: relative; font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--ls-h2);
  font-weight: var(--fw-display); color: var(--on-band);
}
.page-zahnimplantat .tr-obj-part { display: block; white-space: nowrap; }
/* the legend lights the part being placed (as home block 5): resting parts ink 60 % (3.14, AA large), active full ink */
html.motion:not(.rm) .page-zahnimplantat .tr-obj-h.is-legend .tr-obj-part { color: var(--on-band-dim); transition: color .35s var(--ease-ui); }
html.motion:not(.rm) .page-zahnimplantat .tr-obj-h.is-legend .tr-obj-part.is-on { color: var(--on-band); }
.page-zahnimplantat .tr-obj-rule {             /* the active part of the H2 (block 5's device): a 2 px lime mark, not text */
  position: absolute; left: -20px; top: .12em; width: 2px; height: .96em; border-radius: 1px; background: var(--on-band);   /* ink on the logo blue (lime there is 1.49) */
}
.page-zahnimplantat .tr-obj-p { margin-top: 32px; max-width: 24em; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--on-band-2); }
.page-zahnimplantat .tr-obj-p .link { color: var(--on-band); text-decoration-color: var(--on-band-line); }
.page-zahnimplantat .tr-obj-stage {
  grid-column: 5 / 13; position: relative; height: min(80svh, 760px); min-height: 480px; overflow: clip;
  margin-right: calc(-1 * max(var(--side), (100vw - var(--container)) / 2));
}
.page-zahnimplantat .t3d-host { position: absolute; inset: 0; overflow: clip; }
.page-zahnimplantat .t3d-host .t3d-post, .page-zahnimplantat .t3d-host .t3d-post picture { position: absolute; inset: 0; }
.page-zahnimplantat .t3d-host .t3d-post img { width: 100%; height: 100%; object-fit: cover; max-width: none; }   /* posters are opaque on night */
.page-zahnimplantat .t3d-host .t3d-post { transition: opacity .4s var(--ease-ui); }
.page-zahnimplantat .t3d-host[data-live] .t3d-post { opacity: 0; }
.page-zahnimplantat .t3d-post:not(.is-stepped) picture:not(:last-child) { display: none; }   /* no JS, reduced motion: the end pose */
.page-zahnimplantat .t3d-post.is-stepped picture:not(.is-on) { display: none; }             /* JS steps the posters with the scroll */
html[data-t3d="live"] .page-zahnimplantat .t3d-host:not([data-slow]) .t3d-post.is-wait picture { display: none; }   /* live: no poster download */
/* the studio light behind the frames (as home block 5), raised with the assembly (--im-lit); only with the frames */
.page-zahnimplantat .tr-obj-stage:has(.fr-host)::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;   /* fades to 0 at the stage's edges: never cut by its clip */
  background: radial-gradient(closest-side, var(--band-light) 0%, var(--band-light) 18%, var(--band-light-0) 100%);
  opacity: calc(.45 + .55 * var(--im-lit, 1)); transform: scale(calc(.86 + .14 * var(--im-lit, 1)));
}
.page-zahnimplantat .tr-obj-stage .fr-host { position: absolute; left: 50%; top: 50%; height: 100%; max-width: 100%; transform: translate(-50%, -50%); }   /* the 4:5 frames, never stretched */

@media (min-width: 810px) {
  html.motion:not(.rm) .page-zahnimplantat .tr-obj-late { margin-top: 60svh; }          /* the second paragraph arrives as the parts settle */
  /* the stage is shorter than the window, so the text column outruns it and the hold lasts (≈ .4 screens + the
     60 svh gap); it holds centred in the window under the header */
  html.motion:not(.rm) .page-zahnimplantat .tr-obj { --tr-stage-h: min(76svh, 720px); }
  html.motion:not(.rm) .page-zahnimplantat .tr-obj-stage {
    position: sticky; top: calc(var(--nav-bottom) + (100svh - var(--nav-bottom) - var(--tr-stage-h)) / 2);
    height: var(--tr-stage-h); min-height: 0; will-change: transform;
  }
  html.motion:not(.rm) .page-zahnimplantat .tr-obj-rule { will-change: transform; }
}
@media (max-width: 1199.98px) {
  .page-zahnimplantat .tr-obj-text { grid-column: 1 / 6; }
  .page-zahnimplantat .tr-obj-stage { grid-column: 6 / 13; }
}
@media (max-width: 809.98px) {
  .page-zahnimplantat .tr-obj { background: var(--band); padding-block: var(--sec-pad); }   /* phones: the band carries its own night (as blocks 5–6) */
  .page-zahnimplantat .tr-obj-text, .page-zahnimplantat .tr-obj-stage { grid-column: 1 / -1; }
  .page-zahnimplantat .tr-obj-rule { left: -12px; }
  .page-zahnimplantat .tr-obj-stage { margin: 36px 0 0; height: auto; min-height: 0; aspect-ratio: 4 / 5; border-radius: var(--r-md); }
  .page-zahnimplantat .tr-obj-stage .fr-host { inset: 0; left: 0; top: 0; transform: none; }   /* the stage is the frames' own 4:5 */
}

/* ---- page head on phones: the frame's <picture> fills the 4:5 frame (css/pages.css leaves it inline, so the photo
   stopped short of the frame's foot; reported to the foundation) ---- */
.page-zahnimplantat .pgh-frame picture { display: block; width: 100%; height: 100%; }

/* ---- paper sections: an opaque ground, so the night layer fading out behind the Stimme block never shows through
   them (block 7's rule on the homepage) ---- */
.page-zahnimplantat .tr-ledger, .page-zahnimplantat .tr-rows, .page-zahnimplantat .tr-statement, .page-zahnimplantat .tr-related { position: relative; background: var(--paper); }

/* ---- rows: the photo crop in cols 9–12, top-aligned with the list, normal flow ---- */
.page-zahnimplantat .tr-rows .sk-aside { align-self: start; }
.page-zahnimplantat .tr-crop { position: relative; margin: 0; aspect-ratio: var(--crop-ar); overflow: hidden; border-radius: var(--r-lg); background: var(--mist); }
.page-zahnimplantat .tr-crop img {
  position: absolute; max-width: none; width: calc(100% / var(--cw)); height: calc(100% / var(--ch));
  left: calc(-100% * var(--cx) / var(--cw)); top: calc(-100% * var(--cy) / var(--ch));
}
@media (min-width: 810px) {
  .page-zahnimplantat .tr-rows .sk-h2 { grid-column: 1 / 8; }
  .page-zahnimplantat .tr-rows .sk-aside { grid-row: 2; margin-top: 32px; }
}

/* ---- readout: paragraphs start at the card's top (the grid would spread them over the card's height) ---- */
.page-zahnimplantat .tr-readout .sk-body { align-content: start; }

/* ---- readout: an inline link inside a value or paragraph ---- */
.page-zahnimplantat .tr-inlink { color: var(--blue-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.page-zahnimplantat .tr-inlink:hover { color: var(--ink); }

/* ---- statement: the link sits with the offset paragraphs ---- */
.page-zahnimplantat .tr-statement .sk-first { max-width: 20em; }

/* ---- spread: the photo full bleed, the text set into the sky band at its top (H2 cols 1–5, text cols 7–12);
   the photo never moves or scales. Phones: the 4:5 file, the text under it on paper ---- */
.page-zahnimplantat .tr-spread-photo picture { display: block; height: 100%; }
.page-zahnimplantat .tr-spread .sk-spread-img { object-position: 50% 100%; }
.page-zahnimplantat .tr-spread-text { row-gap: 16px; }
.page-zahnimplantat .tr-spread-h { grid-column: 1 / -1; min-width: 0; }
.page-zahnimplantat .tr-spread-body { grid-column: 1 / -1; min-width: 0; display: grid; gap: 8px; }
.page-zahnimplantat .tr-spread-body p { max-width: 34em; }
@media (min-width: 810px) {
  .page-zahnimplantat .tr-spread-text { position: absolute; inset: calc(var(--nav-bottom) + 24px) 0 auto; padding-block: 0; color: var(--ink); align-items: start; }
  .page-zahnimplantat .tr-spread .tr-spread-text .tr-spread-h { grid-column: 1 / 6; margin: 0; color: var(--ink); }
  .page-zahnimplantat .tr-spread-body { grid-column: 7 / 13; margin: 0; padding-top: .55em; }
}
@media (max-width: 809.98px) {
  .page-zahnimplantat .tr-spread-photo { height: auto; aspect-ratio: 4 / 3; }   /* y .40–1 of the 4:5 file: the buildings, not the empty sky (V8-PHONE-CROPS #4) */
  .page-zahnimplantat .tr-spread-text { padding-block: 48px 0; }
}

/* ---- Termin band with the page CTA: the H3's longest word („Beratungstermin", 7.08 em) fits the band down to 320 px;
   the build stops on a CTA word longer than 7.2 em (zahnimplantat.py) ---- */
.page-zahnimplantat .tm-h { font-size: min(var(--fs-band), calc((100vw - 2 * var(--band-inset) - 2 * var(--side)) / 7.2)); }

/* ---- related: the run under the FAQ, set tight to the band that follows ---- */
.page-zahnimplantat .tr-related { padding-block: 0 120px; }
@media (max-width: 809.98px) { .page-zahnimplantat .tr-related { padding-bottom: 64px; } }
