/* home.css — parts of the home page that have a script of the theme behind them: the header slider (Owl Carousel
   in place of the old slider), and the enlarged view of photographs. Loaded with templates/tpl-home.php only.
   Every value names its source: a measurement of the live (inventory/design/raw/probe/L01, component hero-slider,
   1366x768 and 1920x1080) or the slider data of the old site (inventory/sliders.json). Nothing is copied from the
   CSS of the old slider or template. */

/* ==========================================================================
   Header slider frame
   Measured: #tm-top-hero 100% × window height, picture «cover» centred; its inner section ends 250px above the
   hero's end (the page content overlaps the hero by that much; the navbar becomes sticky at the section's end);
   the slider box starts 50px from the top, is as wide as the window and as tall as the window, white behind
   the pictures.
   ========================================================================== */
#tm-top-hero {
  position: relative;
  min-height: 100vh;
  background-position: 50% 50%;
  background-size: cover;
  background-repeat: no-repeat;
}
#tm-top-hero > section.tm-top-hero {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 250px;
  left: 0;
  display: block;
  margin: 0;
  padding: 0;
}
/* the slider cell of the old site was 1100px tall and centred in the section when the section is taller (probe of the
   live, English home, 2026-11-12: slider top 95px at 2560x1440 = 50 + (1440 - 250 - 1100) / 2; 50px at 768 and 1080) */
.en-hero {
  position: absolute;
  top: calc(50px + max(0px, (100vh - 1350px) / 2));
  left: 0;
  right: 0;
  height: 100vh;
  background-color: rgb(255, 255, 255);
  text-align: center;
}
/* in a computer window narrower than 1220px the hero is not window-high: it is as tall as the slider cell, 1100px,
   and the page starts under it (same probe at 1200, 1199, 1024, 960: hero 1100px, page container at 1100) */
@media (max-width: 1219px) {
  #tm-top-hero:has(.en-hero) { min-height: 1100px; }
}
/* the Greek slider of the old site sat in front of the page content (z-index 1001; the page container has 1000) */
.en-hero--front { z-index: 1001; }

/* ==========================================================================
   Slides (Owl Carousel fills the box; one slide at a time)
   ========================================================================== */
.en-hero .en-hero__slides,
.en-hero .owl-stage-outer,
.en-hero .owl-stage,
.en-hero .owl-item,
.en-hero .en-hero__slide {
  height: 100%;
}
/* before the script runs: the first slide alone */
.en-hero .en-hero__slides:not(.owl-loaded) { display: block; }
.en-hero .en-hero__slides:not(.owl-loaded) > .en-hero__slide:nth-child(n+2) { display: none; }
.en-hero__slide {
  position: relative;
  overflow: hidden;
}
/* picture: fitted whole in the box, centred (slide setting bg_fit «contain», bg_position «center center») */
.en-hero__image {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-position: 50% 50%;
  background-size: contain;
  background-repeat: no-repeat;
}
/* layers: placed by assets/js/hero.js; hidden until it has run */
.en-hero__layer { position: absolute; }
.en-hero:not(.is-ready) .en-hero__layer { visibility: hidden; }
.en-hero__shape { white-space: nowrap; }
.en-hero__shape img { display: block; max-width: none; }
.en-hero__shape--1 { z-index: 5; }
.en-hero__shape--2 { z-index: 6; }
.en-hero__shape--3 { z-index: 7; }
/* caption: measured white, Roboto 300, right aligned; size and line height are set by the script (40 / 60px on the
   1920 stage) */
.en-hero .en-hero__caption {
  z-index: 8;
  font-size: 40px;
  font-weight: 300;
  font-style: normal;
  line-height: 60px;
  letter-spacing: normal;
  color: rgb(255, 255, 255);
  text-align: right;
  white-space: normal;
}

/* ==========================================================================
   Motion (inventory/sliders.json: slide change 300ms; shapes come in from the right 500ms each, starting 1000 /
   1200 / 1400ms after the slide; caption fades in over 800ms from 1600ms; easing Power3.easeInOut)
   The resting state of every layer is its final place, so a frozen page shows the finished slide.
   ========================================================================== */
@keyframes en-hero-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes en-hero-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes en-hero-from-right { from { transform: translateX(60vw); } to { transform: none; } }
@keyframes en-hero-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes en-hero-timer { from { width: 0; } to { width: 100%; } }
.en-hero .owl-item.en-hero-in { animation: en-hero-in 300ms both; }
.en-hero .owl-item.en-hero-out { animation: en-hero-out 300ms both; }
.en-hero .owl-item.active .en-hero__shape { animation: en-hero-from-right 500ms cubic-bezier(0.645, 0.045, 0.355, 1) backwards; }
.en-hero .owl-item.active .en-hero__shape--1 { animation-delay: 1000ms; }
.en-hero .owl-item.active .en-hero__shape--2 { animation-delay: 1200ms; }
.en-hero .owl-item.active .en-hero__shape--3 { animation-delay: 1400ms; }
.en-hero .owl-item.active .en-hero__caption { animation: en-hero-fade 800ms cubic-bezier(0.645, 0.045, 0.355, 1) 1600ms backwards; }
@media (prefers-reduced-motion: reduce) {
  .en-hero .owl-item,
  .en-hero .en-hero__layer,
  .en-hero .en-hero__timer { animation: none !important; }
}

/* timer bar: 5px, rgba(0, 0, 0, 0.15), grows across the top while a slide is on show (measured part «timer») */
.en-hero__timer {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 200;
  width: 0;
  height: 5px;
  background-color: rgba(0, 0, 0, 0.15);
}
.en-hero__timer.is-running { animation: en-hero-timer linear both; }


/* slides that are not on show are hidden from readers and from the page text (Owl keeps them beside the stage) */
.en-hero .owl-item:not(.active):not(.animated) .en-hero__slide { visibility: hidden; }
