/* Hero axes, shared by every hero variant (imported at the top of each stylesheet/blocks/hero/<variant>.css).
   Wrapper classes come from template/blocks/hero/_axes.twig; no class = the variant as designed.
   Selectors start with [data-section="hero"][data-variant] .et-hero-x.<axis> so they beat the variant rules
   (which come later in the cascade). Tokens only.
   ponytail: imported per variant, so it has no ?v= stamp — the core could link blocks/<block>/_axes.css itself (docs/07-backlog.md #46). */

/* ---- height: s / m / l / screen ---- */
.et-hero-x--h-s { --et-hero-h: 22.5rem; }
.et-hero-x--h-m { --et-hero-h: 30rem; }
.et-hero-x--h-l { --et-hero-h: 40rem; }
.et-hero-x--h-screen { --et-hero-h: 100svh; }

[data-section="hero"][data-variant] .et-hero-x.et-hero-x--h .et-hero__slider { height: var(--et-hero-h); }
/* static variants: the section is at least that tall, content centred vertically */
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--h :is(.et-hero-ex, .et-hero-co) {
  min-height: var(--et-hero-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--h .et-hero-co__tiles { min-height: calc(var(--et-hero-h) * 0.8); }
@media (max-width: 767.98px) {
  /* phones: never taller than the screen */
  [data-section="hero"][data-variant] .et-hero-x.et-hero-x--h .et-hero__slider { height: min(var(--et-hero-h), 85svh); }
}

/* ---- text position 3×3 (slider variants: text over the slide background / photo) ---- */
.et-hero-x--v-top { --et-hero-v: flex-start; }
.et-hero-x--v-middle { --et-hero-v: center; }
.et-hero-x--v-bottom { --et-hero-v: flex-end; }

[data-section="hero"][data-variant] .et-hero-x.et-hero-x--pos .et-hero__slide { align-items: var(--et-hero-v); }
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--x-center .et-hero__slide { justify-content: center; }
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--x-center .et-hero__slide-content { flex: 0 1 auto; text-align: center; padding-inline: 0; }
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--x-center .et-hero__slide-text { margin-inline: auto; }
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--x-end .et-hero__slide { flex-direction: row-reverse; }
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--x-end .et-hero__slide-content { text-align: end; padding-right: 0; padding-left: 2rem; }
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--x-end .et-hero__slide-text { margin-left: auto; }
/* centred text has no room for the side photo (full-bleed keeps it: there the photo is the backdrop); phones keep it — it goes under the text */
@media (min-width: 768px) {
  [data-section="hero"]:not([data-variant="full-bleed"]) .et-hero-x.et-hero-x--x-center .et-hero__slide-image { display: none; }
}

@media (max-width: 767.98px) {
  /* phones: the slide is a column — vertical position = main axis, horizontal = text alignment */
  [data-section="hero"][data-variant] .et-hero-x.et-hero-x--pos .et-hero__slide { align-items: stretch; justify-content: var(--et-hero-v); }
  [data-section="hero"][data-variant] .et-hero-x.et-hero-x--pos .et-hero__slide-content { flex: 0 1 auto; padding-left: 0; }
  [data-section="hero"][data-variant] .et-hero-x.et-hero-x--x-start .et-hero__slide-content { text-align: start; }
  [data-section="hero"][data-variant] .et-hero-x.et-hero-x--x-end .et-hero__slide-content { text-align: end; }
}

/* ---- overlay 0–80 %: veil over the photo in the hero tone (full-bleed: the photo is the backdrop) ---- */
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--overlay .et-hero__slide-image img { opacity: 1; }
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--overlay .et-hero-bleed .et-hero__slide-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--et-hero-from) var(--et-hero-overlay), transparent);
  pointer-events: none;
}

/* ---- plate under the text ---- */
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--plate .et-hero__slide-content {
  flex: 0 1 auto;
  max-width: 36rem;
  padding: var(--et-block-pad, 2rem);
  background: color-mix(in srgb, var(--et-hero-from) 72%, transparent);
  border-radius: var(--et-radius);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ---- slide view (settings.slide_view, _slider.twig): the photo covers the whole slide (cover, centre) — "picture" without texts,
   "picture-text" with the texts over it; the whole slide is a link (.et-hero__slide-link under the texts). The glow and the slide
   gradient give way; picture-text gets a veil in the hero tone (overlay, 35 % unset) so the light text reads on any photo. ---- */
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--pic .et-hero__slider::before { display: none; }
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--pic-picture .et-hero__slide { padding: 0; }
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--pic .et-hero__slide-image {
  display: block; position: absolute; inset: 0; z-index: 0; flex: none; width: auto; min-height: 0; margin: 0; }
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--pic .et-hero__slide-image img {
  display: block; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; object-position: 50% 50%; filter: none; opacity: 1; }
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--pic-picture-text .et-hero__slide-image::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: color-mix(in srgb, var(--et-hero-from) var(--et-hero-overlay, 35%), transparent); }
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--pic .et-hero__slide-content { position: relative; z-index: 2; pointer-events: none; }
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--pic .et-hero__slide-content :is(a, button) { pointer-events: auto; }
.et-hero__slide-link { position: absolute; inset: 0; z-index: 1; }
.et-hero__slide-link:focus-visible { outline: 3px solid var(--et-accent); outline-offset: -3px; }

/* ---- slider controls ---- */
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--no-arrows .et-hero__arrow,
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--no-dots .et-hero__dots { display: none; }

/* Slide photo with a phone version (blocks/hero/_slider.twig): <picture> must not become a box between the column and the img */
[data-section="hero"] .et-hero__slide-image picture { display: contents; }
/* phones: the slide photo stays, under the text, in the room the text leaves — the phone photo (<source>), else the main one. The core
   stylesheet hid it under 768 px, so a slide of a photo only was an empty coloured block (e2e 18.11). Full-bleed and panes place it themselves. */
@media (max-width: 767.98px) {
  /* text on the right: a column on a phone too (the row-reverse above would squeeze the photo beside the text) */
  [data-section="hero"][data-variant] .et-hero-x.et-hero-x--x-end .et-hero__slide { flex-direction: column; }
  [data-section="hero"]:not([data-variant="full-bleed"], [data-variant="panes"]) .et-hero__slide-content { flex: 0 1 auto; }
  [data-section="hero"]:not([data-variant="full-bleed"], [data-variant="panes"]) .et-hero__slide-image {
    display: flex; position: relative; flex: 1 1 0; min-height: 0; width: 100%; margin-top: 0.75rem; }
  [data-section="hero"]:not([data-variant="full-bleed"], [data-variant="panes"]) .et-hero__slide-image img { max-width: 100%; max-height: 100%; }
}

/* slide grade (template/blocks/hero/_slider.twig, slide.grade A…G, port 69): the class scale behind a cut-out product photo — seven
   glass bars growing longer (--n 0…6, colours --et-grade-*), on the active slide they pour in one by one, the class arrow (--on) slides
   to its bar, a glow of the class colour breathes behind the product, the product rises. The photo is contained on the right part.
   Transform and opacity only; reduced motion — final states. */
.et-hero__slide-image--grade { isolation: isolate; }
/* the product stands in front of the start of the bars: the bars come out from behind it */
.et-hero__slide-image--grade picture { position: absolute !important; z-index: 2; left: 40%; width: 34% !important; top: 6%; bottom: 0; height: auto !important; }
.et-hero__slide-image--grade img { width: 100% !important; height: 100% !important; object-fit: contain !important; object-position: 50% 100%; }
.et-hero-grade { position: absolute; z-index: 1; left: 52%; right: 2%; top: 7%; bottom: 7%; display: grid; grid-template-rows: repeat(7, 1fr); gap: 0.4375rem; pointer-events: none; }
.et-hero-grade i {
  position: relative; isolation: isolate; display: flex; align-items: center; justify-content: flex-end; width: calc(40% + var(--n) * 9%); padding-right: 1.5rem;
  overflow: hidden; clip-path: polygon(0 0, calc(100% - 1rem) 0, 100% 50%, calc(100% - 1rem) 100%, 0 100%);
  background: color-mix(in srgb, var(--g) 14%, color-mix(in srgb, var(--et-surface) 35%, transparent)); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.55);
  color: color-mix(in srgb, var(--et-text) 55%, transparent); font: 800 1.3rem/1 var(--et-font-price, var(--et-font-display)); font-style: normal;
}
.et-hero-grade i::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--g) 70%, transparent), color-mix(in srgb, var(--g) 30%, transparent));
  transform-origin: left; transform: scaleX(0); transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--n) * 70ms + 120ms);
}
.et-hero-grade i.is-on { width: calc(50% + var(--n) * 9%); color: var(--et-grade-ink); }
.et-hero-grade i.is-on::before { background: var(--g); }
.et-hero-grade__mark {
  position: absolute; z-index: 1; left: calc(50% + var(--on) * 9% + 0.5rem); top: calc(var(--on) * (100% + 0.4375rem) / 7); height: calc((100% - 2.625rem) / 7);
  display: grid; place-items: center; min-width: 4rem; padding: 0 0.5rem 0 1rem; background: var(--et-text); color: var(--et-surface);
  clip-path: polygon(0.875rem 0, 100% 0, 100% 100%, 0.875rem 100%, 0 50%); font: 850 1.5rem/1 var(--et-font-price, var(--et-font-display)); font-style: normal;
  opacity: 0; transform: translateX(2.5rem); transition: opacity 0.4s ease 0.9s, transform 0.6s cubic-bezier(0.2, 1.3, 0.4, 1) 0.9s; font-variation-settings: var(--et-figure-axes, normal); }
.et-hero-grade__glow {
  position: absolute; z-index: -1; left: -30%; top: 15%; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--g) 55%, transparent), transparent); opacity: 0;
}
.et-hero__slide--active .et-hero-grade i::before { transform: none; }
.et-hero__slide--active .et-hero-grade__mark { opacity: 1; transform: none; }
.et-hero__slide--active .et-hero-grade__glow { animation: et-hero-grade-breathe 4s ease-in-out 1s infinite both; }
.et-hero__slide--active .et-hero__slide-image--grade img { animation: et-hero-grade-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes et-hero-grade-breathe { 0%, 100% { opacity: 0.35; transform: scale(0.94); } 50% { opacity: 0.75; transform: scale(1.06); } }
@keyframes et-hero-grade-rise { from { opacity: 0; transform: translateY(1.5rem); } }
@media (max-width: 767.98px) {
  .et-hero__slide-image--grade picture { left: 46%; width: 30% !important; }
  .et-hero-grade { left: 56%; gap: 0.25rem; }
  .et-hero-grade i { font-size: 0.875rem; padding-right: 1rem; }
  .et-hero-grade__mark { min-width: 2.75rem; font-size: 1rem; height: calc((100% - 1.5rem) / 7); top: calc(var(--on) * (100% + 0.25rem) / 7); }
}
@media (prefers-reduced-motion: reduce) {
  .et-hero-grade i::before, .et-hero-grade__mark { transition: none !important; }
  .et-hero__slide--active .et-hero-grade__glow, .et-hero__slide--active .et-hero__slide-image--grade img { animation: none !important; }
  .et-hero__slide--active .et-hero-grade__glow { opacity: 0.5; }
}
html[data-motion="none"] .et-hero-grade i::before, html[data-motion="none"] .et-hero-grade__mark { transition: none; }

/* ---- slide switcher "count" (settings.dots): "01 — 03" and a progress line at the bottom left of the slide, the arrows round and always
   visible at the bottom right (_slider.twig .et-hero__count; js/elbuz_theme.js sets the number and --p) ---- */
.et-hero__count { display: none; }
[data-section="hero"][data-variant] .et-hero-x--count .et-hero__dots { display: none; }
[data-section="hero"][data-variant] .et-hero-x--count .et-hero__count {
  position: absolute; z-index: 3; left: 2.5rem; bottom: 1.75rem;
  display: flex; align-items: center; gap: 0.5rem;
  font: 600 var(--et-text-sm)/1 var(--et-font); font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--et-text-light) 70%, transparent); pointer-events: none;
}
[data-section="hero"][data-variant] .et-hero-x--count .et-hero__count b { color: var(--et-text-light); font-weight: inherit; }
[data-section="hero"][data-variant] .et-hero-x--count .et-hero__count-bar {
  position: relative; width: clamp(4rem, 12vw, 8rem); height: 2px; margin-left: 0.5rem; overflow: hidden;
  background: color-mix(in srgb, var(--et-text-light) 25%, transparent); border-radius: var(--et-radius-full);
}
[data-section="hero"][data-variant] .et-hero-x--count .et-hero__count-bar::after {
  content: ""; position: absolute; inset: 0; background: var(--et-text-light);
  transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform var(--et-motion-medium, 0.3s) var(--et-motion-ease, ease);
}
[data-section="hero"][data-variant] .et-hero-x--count .et-hero__arrow {
  top: auto; bottom: 1.25rem; left: auto; right: 1.25rem; transform: none; opacity: 1;
  background: transparent; color: var(--et-text-light);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--et-text-light) 40%, transparent);
}
[data-section="hero"][data-variant] .et-hero-x--count .et-hero__arrow--prev { right: calc(1.25rem + 44px + 0.5rem); }
[data-section="hero"][data-variant] .et-hero-x--count .et-hero__arrow:hover { transform: none; background: color-mix(in srgb, var(--et-text-light) 15%, transparent); }
[data-section="hero"][data-variant] .et-hero-x--count .et-hero__arrow:focus-visible { outline: 2px solid var(--et-accent); outline-offset: 2px; }
@media (max-width: 767.98px) {
  [data-section="hero"][data-variant] .et-hero-x--count .et-hero__count { left: 1.25rem; bottom: 1.5rem; }
  [data-section="hero"][data-variant] .et-hero-x--count .et-hero__count-bar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  [data-section="hero"][data-variant] .et-hero-x--count .et-hero__count-bar::after { transition: none; }
}
/* slide view picture / picture-text (any banner under the controls, light or dark): the counter, the arrows and the dots sit on
   capsules of the surface with the text colour (AA on any picture: the surface is 90 % opaque) */
[data-section="hero"][data-variant] .et-hero-x--pic.et-hero-x--count .et-hero__count {
  padding: 0.5rem 0.875rem; border-radius: var(--et-radius-full); color: var(--et-text-secondary);
  background: color-mix(in srgb, var(--et-surface) 90%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: var(--et-shadow-sm); }
[data-section="hero"][data-variant] .et-hero-x--pic.et-hero-x--count .et-hero__count b { color: var(--et-text); }
[data-section="hero"][data-variant] .et-hero-x--pic.et-hero-x--count .et-hero__count-bar { background: color-mix(in srgb, var(--et-text) 20%, transparent); }
[data-section="hero"][data-variant] .et-hero-x--pic.et-hero-x--count .et-hero__count-bar::after { background: var(--et-text); }
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--pic .et-hero__arrow {
  opacity: 1; color: var(--et-text); background: color-mix(in srgb, var(--et-surface) 90%, transparent);
  box-shadow: var(--et-shadow-sm), inset 0 0 0 1px var(--et-border); }
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--pic .et-hero__arrow:hover { background: var(--et-surface); }
[data-section="hero"][data-variant] .et-hero-x.et-hero-x--pic .et-hero__dots {
  width: fit-content; margin-inline: auto; padding: 0 0.5rem; border-radius: var(--et-radius-full);
  background: color-mix(in srgb, var(--et-surface) 90%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

