/* ==========================================================================
   Vitamin Horgoš — home.css  (index.html, ORBIS rebuild)
   Hero (ORBIS 01) · resume row (in the trust band) · Kvalitet (02) · Mlin (03) · Asortiman (07–08)
   · Recepti · Za partnere (09) · Gde kupiti. The route is css/route.css.
   ========================================================================== */

/* ---------- Hero (premium 2 §1): the film, exactly one viewport tall, header over it ----------
   100vh → 100svh where supported; main.js sets --vh from innerHeight for browsers without svh (old iOS / Android). */
.phero--home {
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  height: 100svh;
  min-height: 0;
  padding: calc(var(--header-h) + var(--sp-24)) 0 136px; /* room for the cue; the hero ends in a straight line (no wave) */
  overflow: hidden;
}
@supports not (height: 100svh) { .phero--home { height: calc(var(--vh, 1vh) * 100); } }
/* the film: object-fit cover; a 1.08 base scale crops the dark edges some shots carry, then the slow 15s zoom to ×1.04 */
.phero--home .phero__media { object-position: 50% 50%; }
.phero__video {
  transform: scale(1.08);
  transform-origin: 46% 46%;
  opacity: 0;
  transition: opacity 800ms var(--ease-out);
}
.phero__video.is-playing { opacity: 1; animation: hero-zoom 15s linear infinite alternate; }
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1.123); } }
.phero__poster img { transform: scale(1.08); transform-origin: 46% 46%; }
/* Orbis overlay (premium 3): the footage reads clearly – about 45 % in the centre (≤ 55 %), heavier only at the top
   (header) and the bottom (cue, wave); a breath of burgundy at the edges so the film sits in the brand. The text keeps
   a soft shadow of its own so it stays legible on the brightest frames. */
.phero--home::after {
  background:
    linear-gradient(180deg, rgba(21, 17, 15, 0.74) 0%, rgba(21, 17, 15, 0.4) 22%, rgba(21, 17, 15, 0.38) 62%, rgba(21, 17, 15, 0.84) 100%),
    radial-gradient(120% 90% at 50% 45%, rgba(74, 14, 18, 0.08), rgba(74, 14, 18, 0.36));
}
.phero--home .phero__inner { text-shadow: 0 1px 2px rgba(21, 17, 15, 0.55), 0 0 24px rgba(21, 17, 15, 0.55); }
.phero--home .phero__inner { position: static; gap: var(--sp-20, 20px); }
.phero--home .phero__title { max-width: 24ch; font-weight: var(--fw-light, 300); letter-spacing: -0.01em; line-height: 1.05; }
.phero__l1 { display: block; }
.phero__script { margin: calc(var(--sp-8) * -1) 0 0; }
.phero--home .phero__lead { max-width: 62ch; font-size: clamp(1.125rem, 1rem + 0.35vw, 1.25rem); }
/* the two actions are always exactly the same width: two equal grid tracks */
.phero__actions--pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 560px;
  margin-top: var(--sp-16);
}
.phero__actions--pair .btn { width: 100%; min-height: 60px; padding-block: 2px; justify-content: center; text-align: center; } /* 2px more each side: they read heavier */
/* scroll cue: a gold line drawing down and the word, at the bottom of the hero (after the buttons in the entrance) */
.phero__cue {
  position: absolute;
  left: 50%;
  bottom: var(--sp-32);
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: var(--sp-8);
  min-width: var(--tap);
  min-height: var(--tap);
  translate: -50% 0;
  color: var(--gold);
  font-size: var(--t-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
}
.phero__cue-line { display: block; width: 1px; height: 48px; background: linear-gradient(var(--gold), rgba(201, 162, 77, 0)); transform-origin: top; }
.phero.is-play .phero__cue-line { animation: cue-draw 1600ms var(--ease-in-out) 1.4s infinite; }
@keyframes cue-draw { 0% { transform: scaleY(0); } 45% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.phero__cue:hover, .phero__cue:focus-visible { color: var(--on-dark); }
/* entrance (main.js playHero, data-hero-step): eyebrow → title line by line (clip + rise, 700ms, 120ms apart) → buttons → cue */
.phero--home .is-split .hw { clip-path: inset(-0.2em -0.1em -0.25em -0.1em); }
.js .phero--home.is-play .is-split .hw > span { animation: hero-line 700ms var(--ease-out) var(--d, 0ms) both; }
@keyframes hero-line { from { opacity: 0; transform: translate3d(0, 0.9em, 0); } to { opacity: 1; transform: none; } }
@media (max-height: 640px) and (min-width: 769px) {
  .phero--home .phero__lead { display: none; } /* very short desktop windows: title, accent and actions stay in view */
}
@media (prefers-reduced-motion: reduce) {
  .phero__video { display: none; }
  .phero.is-play .phero__cue-line { animation: none; }
}

/* ---------- „Nastavi gde ste stali“ (premium 3): the first row of the cream trust band under the hero, above
   „Prodajna mreža“ – never inside or over the hero (js/home.js). It shares the band's gold hairlines: its own top
   hairline, and the next row's top hairline below it. Text never clips: names wrap to two lines, then an ellipsis. ---------- */
.trust__resume {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition: opacity 350ms var(--ease-out), transform 350ms var(--ease-out), grid-template-rows 350ms var(--ease-out);
}
.trust__resume.is-in { opacity: 1; transform: none; }
.trust__resume.is-gone { grid-template-rows: 0fr; opacity: 0; transform: none; transition-duration: 350ms; }
.trust__resume > .trust__strip { min-height: 0; overflow: hidden; }
.trust__resume.is-gone > .trust__strip { border-width: 0; padding-block: 0; transition: padding 350ms var(--ease-out); }
.trust__strip--resume { padding-block: var(--sp-32); border-bottom: 0; }
.resume__title { margin: 0; }
.resume__list { display: flex; gap: var(--sp-16); flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; }
.resume__list > li { flex: 0 1 18rem; min-width: 0; }
.resume__item {
  display: flex;
  align-items: center;
  gap: var(--sp-16);
  height: 100%;
  min-height: var(--tap);
  padding: var(--sp-8) var(--sp-16) var(--sp-8) var(--sp-8);
  border: 1px solid var(--line-light-strong);
  border-radius: var(--radius);
  background: var(--warm-white);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
  text-decoration: none;
  transition: border-color var(--dur-hover) var(--ease-out), transform var(--dur-hover) var(--ease-out);
}
.resume__item:hover, .resume__item:focus-visible { border-color: var(--gold-ink); }
.resume__thumb { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: calc(var(--radius) - 2px); background: var(--plate); }
.resume__thumb img { width: 48px; height: 48px; object-fit: contain; }
.resume__icon { color: var(--gold-ink); }
.resume__icon .icon { width: 24px; height: 24px; }
.resume__text { display: grid; gap: 2px; min-width: 0; }
.resume__text small { font-size: var(--t-eyebrow); font-weight: var(--fw-semibold); letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--gold-ink); }
.resume__name { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
.resume__close { flex: none; display: grid; place-items: center; width: var(--tap); height: var(--tap); border: 1px solid var(--ink); border-radius: var(--radius); color: var(--ink); transition: background var(--dur-hover) var(--ease-out), color var(--dur-hover) var(--ease-out); }
.resume__close:hover, .resume__close:focus-visible { background: var(--ink); color: var(--cream); }
.resume__close .icon { width: 20px; height: 20px; }

/* ---------- Kvalitet: the owner's image under a dark veil, 2×2 certificate cards ---------- */
.home-quality {
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(160deg, var(--ground-burgundy-deep) 0%, var(--ground-black) 62%);
}
.home-quality__text { display: grid; gap: var(--sp-24); justify-items: start; max-width: 36rem; }
.home-quality__text .section__title { margin-bottom: var(--sp-8); }
.home-quality__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-16); }
.home-quality__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.home-quality__cards .ecard { gap: var(--sp-8); padding: var(--sp-24) var(--sp-24) var(--sp-32); }
.home-quality__cards .ecard__code { margin-bottom: var(--sp-4); }

/* ---------- Mlin: cream split, media card with a slow zoom ---------- */
.home-mill__text { display: grid; gap: var(--sp-24); justify-items: start; max-width: 34rem; }
.home-mill__text .section__title { margin-bottom: var(--sp-8); }
.home-mill__media { margin: 0; aspect-ratio: 4 / 3; }
.home-mill__media picture { display: block; width: 100%; height: 100%; }
.home-mill__media .mcard__cap { font-size: 0.9375rem; }
.home-lightbox { margin: 0; display: grid; gap: var(--sp-24); }
.home-lightbox img { width: 100%; height: auto; max-height: 70vh; object-fit: cover; border-radius: var(--radius); background: var(--ground-black); }
.home-lightbox figcaption { display: grid; gap: var(--sp-8); }
.home-lightbox__title { font-size: var(--t-h3); }

/* ---------- Asortiman: eyebrow with underline, H2, lead, season badge, full-bleed marquee ---------- */
.home-assort__head { justify-items: start; }
.home-assort .sz-slot { min-height: 48px; }
.home-assort__marquee { min-height: clamp(420px, 44vw, 640px); }
.home-assort__foot { display: flex; justify-content: center; margin-top: var(--sp-48); }
.home-assort__links { display: flex; flex-wrap: wrap; gap: var(--sp-12) var(--sp-24); font-size: var(--t-body); }
.home-assort__links a { text-decoration: underline; text-underline-offset: 4px; color: var(--ink); }
/* the season badge (css/season.css) sits on cream here: ink text, hairline, square corners, no glass */
.home-assort .sz-badge {
  min-height: 48px;
  border: 1px solid var(--line-light-strong);
  border-radius: var(--radius);
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--ink);
  font-size: 1rem;
}
.home-assort .sz-badge:hover { background: transparent; border-color: var(--gold-ink); }
.home-assort .sz-badge__label, .home-assort .sz-badge__sep { color: var(--gold-ink); }
.home-assort .sz-badge .icon { color: var(--gold-ink); }

/* ---------- Recepti ---------- */
.home-recipes .rcard { background: var(--warm-white); }
.home-recipes__intro { display: grid; gap: var(--sp-16); justify-items: start; }

/* ---------- Trust strip + signature band read as one cream pause under the hero ---------- */
.trust + .sigband { border-top: 0; padding-top: var(--sp-24); }

/* ---------- Za partnere: burgundy band ---------- */
.home-partners .ctaband__text p { max-width: 38rem; font-size: var(--t-body); color: var(--on-dark-body); }
.home-partners .btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-16) var(--sp-32); margin-top: var(--sp-8); }
.home-partners .ctaband > .section__title { margin: 0; }
/* premium 3: an owner background image under the burgundy tint (js/main.js initGrounds); the wave is the band's own colour */

/* ---------- premium 2 (sections agent): mill dust, kompas spice table ---------- */
/* paprika dust over the mill photo (js/dust.js): canvas inside the media card, under the caption and button */
.home-mill__media .dust-layer { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.home-mill__media .mcard__play, .home-mill__media .mcard__cap { z-index: 1; }
/* 05: the photo ground (.sbg--pozadina, js/main.js initGrounds) sits on the warm black */
#kompas-teaser { background-color: var(--ground-black); }

/* ---------- Gde kupiti: calm band with the sales network ---------- */
.home-wtb__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(var(--sp-48), 6vw, var(--sp-96)); align-items: start; }
.home-wtb__head { display: grid; gap: var(--sp-16); justify-items: start; }
.home-wtb__head p { max-width: 32rem; }
.home-wtb__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-32); }
.home-wtb__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: var(--sp-16) 0 var(--sp-8);
  border-top: 1px solid var(--line-light);
}
.home-wtb__label { font-size: var(--t-card-body); color: var(--ink-body); }
.home-wtb__val {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-8);
  min-height: var(--tap);
  font-size: 1.125rem;
  font-weight: var(--fw-semibold);
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-light-strong);
  text-underline-offset: 5px;
  white-space: nowrap;
}
.home-wtb__val:hover { text-decoration-color: currentColor; }
.home-wtb__val .icon { width: 18px; height: 18px; color: var(--gold-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .home-quality__grid { grid-template-columns: minmax(0, 1fr); }
  .home-quality__cards { margin-top: var(--sp-16); }
  .home-wtb__grid { grid-template-columns: minmax(0, 1fr); }
}
/* tablets and phones: label and close on one line, the cards a horizontal row that scrolls with snap */
@media (max-width: 1024px) {
  .trust__strip--resume { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--sp-16); text-align: left; }
  .trust__strip--resume .resume__title { flex: 1; align-self: center; }
  .resume__close { order: 1; }
  .resume__list { order: 2; flex-basis: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 0; overscroll-behavior-x: contain; padding-bottom: var(--sp-4); scrollbar-width: thin; }
  .resume__list > li { flex: 0 0 min(17rem, 78%); scroll-snap-align: start; }
}
@media (max-width: 600px) {
  .phero--home { padding-bottom: 120px; }
  .phero--home .phero__inner { gap: var(--sp-16); }
  .home-quality__cards { grid-template-columns: minmax(0, 1fr); }
  .home-wtb__list { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Reduced motion: the mill photo stands still ---------- */
@media (prefers-reduced-motion: reduce) {
  .home-mill__media img { animation: none !important; }
  .trust__resume, .trust__resume.is-gone > .trust__strip { transition: none; transform: none; }
}

/* hero actions stack on narrow phones, still equal (full) width */
@media (max-width: 480px) {
  .phero__actions--pair { grid-template-columns: minmax(0, 1fr); max-width: none; }
  .phero__cue { bottom: var(--sp-24); }
}

/* phones: the floating „Pitajte nas“ and back-to-top wait until the hero's actions and scroll cue are scrolled past
   (main.js initToTop toggles html.fab-rest); they slide back in after 35 % of the hero */
@media (max-width: 768px) {
  .asst-fab, .to-top { transition: opacity 350ms var(--ease-out), transform 350ms var(--ease-out), visibility 0s linear 0s; }
  .fab-rest .asst-fab, .fab-rest .to-top { opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity 350ms var(--ease-out), transform 350ms var(--ease-out), visibility 0s linear 350ms; }
}
