/* UClean — the Distinct-like layer (the client's request, 13.11.2026): the pinned hero with a sheet sliding over it,
   the statement whose lines rise in, and the services rail of tall photo cards with a 3D tilt and a moving shine.
   Techniques only; nothing is copied from distinctgroup.com. Motion after the apple-design skill: springs, transform
   and opacity only, everything at rest under prefers-reduced-motion and on touch screens (no tilt). */

/* ---------- 1. the hero stays put; the page slides over it ---------- */
main > .hero--uc { position: sticky; top: 0; z-index: 0; }
main > section:not(.hero) { position: relative; z-index: 1; background: var(--bg); }
.sheet { border-radius: 36px 36px 0 0; box-shadow: 0 -30px 60px -36px rgb(0 0 0 / .45); }
@media (max-width: 639px) { .sheet { border-radius: 24px 24px 0 0; } }

/* ---------- 2. the statement on the sheet ---------- */
main > .section.sheet > .wrap { display: grid; justify-items: center; align-content: center; text-align: center; gap: var(--s-6); height: 100%; }
.sheet__label { color: var(--muted); }
.sheet__text { margin: 0; max-width: 22ch; font: var(--display-weight) clamp(34px, 2.9vw + 14px, 64px)/1.08 var(--font-display);
  letter-spacing: -0.03em; text-wrap: balance; }
.sheet__text em, .sheet__text .w--em { font-family: var(--font-promise); font-style: italic; letter-spacing: -0.01em; }
.sheet__link { font-size: var(--t-body); justify-self: center; }
/* lines rise from under a mask, once (distinct.js splits the heading into lines; without script it simply shows) */
.js-lines [data-lines] .ln { display: block; }
/* each line materializes: from a soft blur, a little lower and transparent; no mask, so no letter is ever cut */
.js-lines [data-lines] .ln__in { display: inline-block; opacity: 0; transform: translateY(.35em); filter: blur(10px); }
.js-lines [data-lines].is-in .ln__in { opacity: 1; transform: none; filter: none;
  transition: opacity .9s var(--lg-ease) calc(var(--i, 0) * 120ms + 120ms), transform 1.1s var(--lg-spring) calc(var(--i, 0) * 120ms + 120ms), filter .9s var(--lg-ease) calc(var(--i, 0) * 120ms + 120ms); }
.js-lines .sheet__label, .js-lines .sheet__link { opacity: 0; transform: translateY(8px); filter: blur(6px); }
.js-lines .sheet.is-in .sheet__label { opacity: 1; transform: none; filter: none; transition: opacity .6s var(--lg-ease), transform .6s var(--lg-ease), filter .6s var(--lg-ease); }
.js-lines .sheet.is-in .sheet__link { opacity: 1; transform: none; filter: none; transition: opacity .6s var(--lg-ease) .8s, transform .6s var(--lg-ease) .8s, filter .6s var(--lg-ease) .8s, background-size .15s var(--lg-ease), color .15s var(--lg-ease); }

/* ---------- 3. the services rail ---------- */
main > .section.rail-sec > .wrap { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: var(--s-6); height: 100%; }
.rail-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-5); }
.rail-head h2 { margin: 0; }
.rail-head h2 .promise { display: block; }
.rail-foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); } /* above the rail's shadow room */
.rail-foot p { margin: 0; max-width: 56ch; color: var(--muted); }
.rail-nav { display: flex; gap: var(--s-2); flex: none; }
.rail-btn.lg { width: 48px; height: 48px; border: 0; border-radius: 999px; display: grid; place-items: center; color: var(--p-ink); cursor: pointer;
  transition: scale .32s var(--lg-spring), background-color .2s var(--lg-ease), opacity .3s var(--lg-ease); }
.rail-btn.lg--fill:hover { background: rgb(118 118 128 / .2); }
.rail-btn svg { width: 18px; height: 18px; }
.rail-btn.lg:active { scale: .92; transition-duration: 90ms; }
.rail-btn:disabled { opacity: .35; cursor: default; }
.rail-btn:focus-visible { outline: 2px solid var(--p-ink); outline-offset: 3px; }

.rail { --col: min(var(--vw, 100vw) - 2 * var(--gut), var(--container)); --bleed: calc((var(--vw, 100vw) - var(--col)) / 2);
  /* the rail runs from edge to edge of the screen; the side padding starts its first card (and stops its last one) on
     the page column, and the cards scroll out under both edges. The bottom padding is room for the cards' shadow,
     which would otherwise be cut flat by the scroll box; the negative margin gives that room back to the page. */
  list-style: none; margin: 0 calc(-1 * var(--bleed)) -48px; padding: 4px var(--bleed) 72px; scroll-padding-inline: var(--bleed);
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((var(--col) - 32px) / 3.1); gap: 16px; height: 100%; min-height: 0;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; cursor: grab; -webkit-user-select: none; user-select: none; }
.rail::-webkit-scrollbar { display: none; }
.rail.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.rail.is-dragging .tcard { pointer-events: none; }
@media (min-width: 640px) and (max-width: 1023px) { .rail { grid-auto-columns: calc((var(--col) - 16px) / 2.15); } }
@media (max-width: 639px) { .rail { grid-auto-columns: calc(var(--col) * .86); gap: 12px; } .rail-sec .rail-nav { display: none; } .tcard { height: 480px; } }

.tilt { perspective: 1000px; scroll-snap-align: start; height: 100%; min-height: 0; }
.tcard { position: relative; display: block; height: 100%; min-height: 360px; border-radius: 30px; overflow: hidden; color: #fff;
  isolation: isolate; /* the tilt is written to transform by distinct.js */
  box-shadow: 0 24px 48px -28px rgb(0 0 0 / .55); transition: box-shadow .6s var(--lg-ease); }
.tcard:hover { box-shadow: 0 36px 70px -30px rgb(0 0 0 / .6); }
.tcard:focus-visible { outline: 2px solid var(--p-ink); outline-offset: 4px; }
.tcard__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; border-radius: inherit; background: var(--p-surface); }
.tcard__media img { width: 100%; height: 100%; object-fit: cover; display: block;
  scale: 1.08; /* translate is written by distinct.js while the card tilts */ }
/* legibility for the white title and the foot: soft shade at the top and the bottom only */
.tcard::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgb(0 0 0 / .55) 0%, rgb(0 0 0 / 0) 38%, rgb(0 0 0 / 0) 62%, rgb(0 0 0 / .45) 100%); }
.tcard__title { position: absolute; z-index: 2; top: 24px; left: 24px; right: 24px; font: 500 clamp(22px, .8vw + 16px, 30px)/1.1 var(--font-display);
  letter-spacing: -0.02em; text-wrap: balance; transform: translateZ(40px); }
.tcard__foot { position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  transform: translateZ(30px); }
.tcard__price { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; font-size: 15px; font-weight: 500; color: #fff; letter-spacing: .01em;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.tcard__go { width: 40px; height: 40px; flex: none; border-radius: 999px; display: grid; place-items: center; color: var(--p-ink);
  transition: transform .45s var(--lg-spring); }
.tcard__go svg { width: 16px; height: 16px; }
.tcard:hover .tcard__go { transform: translateX(3px); }
/* the shine that follows the pointer over the card */
/* the glare is a fixed gradient twice the card's size, moved with transform (no repaint of the gradient per frame) */
.tcard { --shine: 0; }
.tcard__shine { position: absolute; inset: -50%; z-index: 3; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side circle at 50% 50%, rgb(255 255 255 / .32), rgb(255 255 255 / 0) 70%);
  mix-blend-mode: soft-light; transition: opacity .45s var(--lg-ease); }
.tcard:hover .tcard__shine { opacity: 1; }

/* the photos settle into their frames as the rail enters (once): the frame opens from its foot, the photo eases from 1.25 */
.js-rail .rail .tilt { opacity: 0; transform: translateY(40px) scale(.97); filter: blur(4px); }
.js-rail .rail .tcard__media img { scale: 1.25; }
.js-rail .rail .tcard__title, .js-rail .rail .tcard__foot { opacity: 0; }
.js-rail .rail.is-in .tilt { opacity: 1; transform: none; filter: none;
  transition: opacity .8s var(--lg-ease) calc(var(--i) * 90ms), transform 1.1s var(--lg-spring) calc(var(--i) * 90ms), filter .8s var(--lg-ease) calc(var(--i) * 90ms); }
.js-rail .rail.is-in .tcard__media img { scale: 1.08; transition: scale 1.6s var(--lg-ease) calc(var(--i) * 90ms + 80ms); }
.js-rail .rail.is-in .tcard__title, .js-rail .rail.is-in .tcard__foot { opacity: 1; transition: opacity .6s var(--lg-ease) calc(var(--i) * 90ms + 450ms); }

@media (prefers-reduced-motion: reduce) {
  .js-lines [data-lines] .ln__in, .js-lines .sheet__label, .js-lines .sheet__link { transform: none !important; opacity: 1 !important; filter: none !important; transition: none !important; }
  .js-rail .rail .tilt, .js-rail .rail .tcard__title, .js-rail .rail .tcard__foot { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .js-rail .rail .tcard__media img { scale: 1.08 !important; transition: none !important; }
  .tcard { transform: none !important; }
}

@media (hover: none) { .tcard:hover { box-shadow: 0 24px 48px -28px rgb(0 0 0 / .55); } .tcard:hover .tcard__go { transform: none; } .rail-btn.lg--fill:hover { background: rgb(118 118 128 / .12); } }
