/* Only the image aperture moves. The full-size box remains in normal flow. */
@media screen and (prefers-reduced-motion: no-preference) {
  main [data-scroll-frame] {
    --kadraj-buyume: .105;
    --kadraj-kose: clamp(22px, 2.8vw, 40px);
    --kadraj-yaricap: calc(2px + var(--kadraj-acilma, 1) * var(--kadraj-kose));
  }
  main [data-scroll-frame],
  main .elementor [data-scroll-frame] {
    border-radius: var(--kadraj-yaricap);
  }
  main :is([data-scroll-frame="photo"], [data-scroll-frame="thumbnail"]) {
    scale: calc(1 - (1 - var(--kadraj-acilma, 1)) * var(--kadraj-buyume));
  }
  main [data-scroll-frame="thumbnail"] {
    --kadraj-buyume: .07;
    --kadraj-kose: clamp(8px, 1.25vw, 20px);
  }
  main .folio-opening .story-film video[data-scroll-frame] {
    border-radius: var(--kadraj-yaricap);
  }
  main video[data-scroll-frame]:fullscreen {
    border-radius: 0 !important;
  }
  main .detail-photo[data-scroll-frame] > img { border-radius: inherit; }
  main.folio-legal [data-scroll-frame] {
    --kadraj-buyume: .045;
    --kadraj-kose: 12px;
  }
}

/* A broad, defocused reflection between sections. Its colour field contains no image detail. */
.shop-reveal {
  --shop-opening: 1;
  --shop-drift: 0%;
  --shop-above: var(--paper);
  --shop-below: var(--paper);
  --shop-base: #465054;
  --shop-light: #9ba5a6;
  --shop-shade: #303c43;
  --shop-curve: clamp(16px, 2.4vw, 36px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  height: clamp(70px, 11svh, 128px);
  background: var(--shop-base);
  pointer-events: none;
}
.shop-reveal-layer {
  position: absolute;
  inset: -68% -10%;
  background:
    radial-gradient(ellipse 56% 78% at 68% 66%, var(--shop-light) 0%, transparent 86%),
    linear-gradient(115deg, var(--shop-shade), var(--shop-base) 49%, var(--shop-shade));
  filter: blur(clamp(32px, 5vw, 80px));
  transform: translateY(var(--shop-drift));
}
.shop-reveal::before,
.shop-reveal::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset-inline: -1px;
  height: 35%;
}
.shop-reveal::before {
  top: -1px;
  background: var(--shop-above);
  border-radius: 0 0 var(--shop-curve) var(--shop-curve);
  transform: translateY(calc(-68% * var(--shop-opening)));
}
.shop-reveal::after {
  bottom: -1px;
  background: var(--shop-below);
  border-radius: var(--shop-curve) var(--shop-curve) 0 0;
  transform: translateY(calc(68% * var(--shop-opening)));
}
.shop-reveal--home {
  --shop-above: var(--paper);
  --shop-below: #10191e;
  --shop-base: #152127;
  --shop-light: #4c5c63;
  --shop-shade: #10191e;
  height: clamp(100px, 17svh, 180px);
  scroll-margin-top: var(--mast-height, 0px);
}
.product-study.film + .shop-reveal--home { --shop-above: #10191e; }
@media screen and (prefers-reduced-motion: no-preference) {
  /* Direct links land just before the transition begins. */
  .shop-reveal--home:target { scroll-margin-top: 83svh; }
}
.shop-reveal--home::before, .shop-reveal--home::after { height: 49%; }
.shop-reveal--home::before { transform: translateY(calc(-99% * var(--shop-opening))); }
.shop-reveal--home::after { transform: translateY(calc(99% * var(--shop-opening))); }
.shop-reveal--home .shop-reveal-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--shop-shade);
  opacity: calc(.85 - .8 * var(--shop-opening));
}
.shop-reveal--brief { --shop-below: #e8e2d6; }
:is(.folio-directory, .folio-service) .shop-reveal--entry { --shop-above: #20292d; }
.folio-contact .shop-reveal--entry { --shop-above: #263237; }
.folio-legal .shop-reveal--entry { height: clamp(48px, 7svh, 76px); }
.shop-reveal--article {
  --shop-base: #657072;
  --shop-light: #b3b9b6;
  --shop-shade: #556165;
  width: auto;
  margin-inline: calc(-1 * var(--gutter));
  height: clamp(60px, 9svh, 94px);
}
@media (max-width: 760px) {
  .shop-reveal { --shop-curve: 16px; height: clamp(62px, 9svh, 90px); }
  .shop-reveal--home { height: clamp(84px, 15svh, 128px); }
  .shop-reveal--article { height: clamp(56px, 8svh, 76px); }
}
@media print {
  .shop-reveal { display: none; }
}

/* A sheared plate edge travels with the section boundary, clear of the content. */
@media screen and (prefers-reduced-motion: no-preference) {
  .has-section-seam { position: relative; }
  .home #imalat-secimi:target { scroll-margin-top: 78svh; }
  .section-seam {
    --seam-progress: 0;
    --seam-joint: calc(16% + 68% * var(--seam-progress));
    --seam-profile: polygon(0 0, 100% 0, 100% 22%, calc(var(--seam-joint) + clamp(18px, 3vw, 52px)) 22%, var(--seam-joint) 88%, 0 88%);
    position: absolute;
    inset: 0 0 auto;
    height: clamp(32px, 3.6vw, 58px);
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    transform-origin: center top;
    transform: scale(var(--seam-direction, 1), calc(1 - .85 * var(--seam-progress)));
  }
  .section-seam::before, .section-seam::after {
    position: absolute;
    content: "";
    inset: 0;
    clip-path: var(--seam-profile);
  }
  .section-seam::before {
    background: linear-gradient(90deg, #79654a, #ae9468 calc(var(--seam-joint) - 9%), #f7dc9f var(--seam-joint), #b49462 calc(var(--seam-joint) + 9%), #76664e);
  }
  .section-seam::after {
    background: var(--seam-metal, var(--paper));
    transform: translateY(-3px);
  }
  .home-families { --seam-metal: #10191e; }
  .home-selection, .home-facility { --seam-metal: #0d1c2e; }
  .home-process { --seam-metal: #f1efe8; --seam-direction: -1; }
  .home-quote-guide { --seam-metal: #fff; }
  .project-references, .process-follow, .reading-spread--reverse { --seam-direction: -1; }
  .reading-spread > .section-seam { height: clamp(12px, 1.3vw, 20px); }
  .reading-spread > .section-seam::after { transform: translateY(-2px); }
}
@media print {
  .section-seam { display: none; }
}
