/* GREGO — Domov (homepage-only sections).
   Chrome (utility bar, nav, footer, WC overrides) lives in site.css. */

/* ---------- Hero carousel ---------- */
.hero {
  position: relative;
  height: 78vh;
  min-height: 560px;
  max-height: 820px;
  overflow: hidden;
  background: #1a1a14;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.hero-slide.active { opacity: 1; }
/* Two stacked scrims:
   1. A vertical gradient that floors brightness at top + bottom.
   2. A centered radial darker spot directly behind the title block so the
      copy remains readable over busy / high-key photography (olive groves,
      sun-lit foliage). Tuned for ~50% midtone behind the text, ~25% at edges. */
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 50%, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 70%, rgba(0,0,0,0.1) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.25) 40%, rgba(0,0,0,0.55) 100%);
}
.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 0 24px;
}
.hero-eyebrow {
  font-family: var(--script);
  font-size: clamp(28px, 3.6vw, 46px);
  color: #f0e7c8;
  margin-bottom: 8px;
  text-shadow: 0 2px 14px rgba(0,0,0,0.55);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .9s ease .15s, transform .9s ease .15s;
}
.hero-content .hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin: 0;
  max-width: 14ch;
  /* Parent theme (Blocksy) sets an explicit color on h1 via CSS variables,
     which beats the white inherited from .hero-content. Override here, and
     stack a stronger shadow so the title stays readable on bright photos. */
  color: #fff;
  text-shadow:
    0 2px 22px rgba(0,0,0,0.85),
    0 1px 3px rgba(0,0,0,0.7),
    0 0 1px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .9s ease .3s, transform .9s ease .3s;
}
/* Sentence-length titles (e.g. the "Dediščina in sedanjost" slide) overflow at
   the display size; scale them down and widen the measure so they fit with the
   paragraph + CTA. Applied automatically in front-page.php when title > 40 chars. */
.hero-content .hero-title--long {
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.2;
  letter-spacing: 0.005em;
  max-width: 26ch;
}
.hero-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 22px 0 22px;
  opacity: 0;
  transition: opacity .9s ease .5s;
}
.hero-ornament span {
  width: 64px;
  height: 1px;
  background: rgba(255,255,255,0.7);
}
.hero-ornament svg { width: 28px; height: 14px; color: rgba(255,255,255,0.85); }
.hero-sub {
  font-family: var(--sans);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.7;
  max-width: 56ch;
  color: #f3efe3;
  margin: 0 0 32px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .9s ease .65s, transform .9s ease .65s;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  background: var(--olive);
  color: #fff;
  border: none;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .9s ease .8s, transform .9s ease .8s, background .2s;
  text-decoration: none;
}
.hero-cta:hover { background: var(--paper); color: var(--olive-dk); }
.hero-slide.active .hero-eyebrow,
.hero-slide.active .hero-title,
.hero-slide.active .hero-ornament,
.hero-slide.active .hero-sub,
.hero-slide.active .hero-cta {
  opacity: 1;
  transform: none;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.55);
  padding: 0;
  transition: all .25s;
}
.hero-dot.active { background: #fff; transform: scale(1.15); }

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  transition: background .2s;
}
.hero-arrow:hover { background: rgba(0,0,0,0.5); }
.hero-arrow.prev { left: 28px; }
.hero-arrow.next { right: 28px; }
.hero-arrow svg { width: 18px; height: 18px; }

/* ---------- Sections ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 110px 32px;
}
.section-tight { padding: 80px 32px; }
.section-paper { background: var(--paper); max-width: none; padding-left: 0; padding-right: 0; }
.section-paper > .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Story (split) ---------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: center;
}
.split-img-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.split-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.split-img-wrap .corner {
  position: absolute;
  bottom: -22px; right: -22px;
  width: 160px; aspect-ratio: 1;
  border: 1px solid var(--olive);
  z-index: -1;
}
/* Story paragraph: justified (obojestranska poravnava). Scoped to #story so
   other .lede paragraphs keep their default alignment. */
#story .split-text .lede { text-align: justify; }

.stat-row {
  display: flex;
  gap: 48px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 500;
  color: var(--olive-dk);
  line-height: 1;
}
.stat-lbl {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Production 4 steps ---------- */
.production-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding-top: 110px;
}
.production-intro .divider { justify-content: center; }
.production-intro .lede { margin: 0 auto; }
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 60px;
  padding-bottom: 70px;
}
.step { text-align: left; }
.step-num {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--olive);
  letter-spacing: 0.1em;
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--olive);
  margin-bottom: 18px;
}
.step h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 8px;
}
.step p { color: var(--muted); margin: 0; font-size: 15px; line-height: 1.65; }

/* "Zakaj izbrati" selling points, below the four production steps */
.why-grego {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 110px;
  text-align: center;
}
.why-grego-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  margin: 0 0 28px;
}
.why-grego-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: inline-block;
  text-align: left;
}
.why-grego-list li {
  position: relative;
  padding: 10px 0 10px 32px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.why-grego-list li:last-child { border-bottom: none; }
.why-grego-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--olive);
}

/* ---------- Products ---------- */
.products-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
/* Products carousel: 3 cards visible, slides one card at a time. */
.products-carousel {
  position: relative;
  margin-top: 60px;
}
.products-viewport { overflow: hidden; }
.products-track {
  display: flex;
  gap: 28px;
  transition: transform .55s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}
.products-track .product { flex: 0 0 calc((100% - 56px) / 3); }
.products-arrow {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--white);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 32px -14px rgba(0, 0, 0, 0.3);
  transition: background .2s, color .2s, border-color .2s;
}
.products-arrow:hover { background: var(--olive); color: #fff; border-color: var(--olive); }
.products-arrow.prev { left: -22px; }
.products-arrow.next { right: -22px; }
.products-arrow.is-hidden { display: none; }
.products-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}
.products-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--rule);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.products-dot.active { background: var(--olive); transform: scale(1.25); }
.product {
  background: var(--paper);
  padding: 36px 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: transform .3s, box-shadow .3s;
}
.product:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.18); }
.product-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #2a2823;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-tag {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--olive);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 10px;
  font-weight: 600;
  z-index: 2;
}
.product h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 4px;
}
.product .subtitle {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.product .desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 18px;
  flex: 1;
}
.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
  gap: 10px;
}
.product .price {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--olive-dk);
}
.product-buy {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 10px 18px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  transition: all .2s;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.product-buy:hover { background: var(--ink); color: var(--bg); }

/* Hide WC's per-card auto-injected "View cart" / "Pojdi na blagajno" link —
   the homepage shows a single CTA below the grid instead. */
.products .added_to_cart,
.products a.added_to_cart,
.product-foot .added_to_cart { display: none !important; }

/* Stepper (replaces "DODAJ V KOŠARICO" once the product is in the cart). */
.grego-card-actions { display: inline-flex; align-items: center; }

.grego-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--olive);
  background: var(--bg);
  height: 38px;
  user-select: none;
}
.grego-step {
  width: 36px;
  height: 100%;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  border-left: 1px solid var(--olive);
  color: var(--olive-dk);
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s;
  padding: 0;
}
.grego-step:first-child { border-left: none; border-right: 1px solid var(--olive); }
.grego-step:hover:not(:disabled):not(.is-loading) {
  background: var(--olive);
  color: #fff;
}
.grego-step:disabled,
.grego-step.is-loading {
  opacity: 0.45;
  cursor: not-allowed;
}
.grego-step-qty {
  min-width: 36px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  background: var(--paper);
}

/* Single "Pojdi na blagajno" CTA below the products grid. */
.grego-checkout-cta {
  margin-top: 50px;
  text-align: center;
}
.grego-checkout-cta:empty { display: none; }
.grego-checkout-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  background: var(--olive);
  color: #fff !important;
  border: 1px solid var(--olive);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s, border-color .2s, transform .2s;
}
.grego-checkout-link:hover {
  background: var(--olive-dk);
  border-color: var(--olive-dk);
  transform: translateY(-2px);
}
.grego-checkout-count {
  font-weight: 500;
  opacity: 0.85;
}

/* ---------- Video block ---------- */
.video-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 50px;
}
.video-intro .divider { justify-content: center; }
.video-intro .lede { margin: 0 auto; }
.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a1916;
  cursor: pointer;
}
.video-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s; }
.video-wrap:hover img { transform: scale(1.03); }
.video-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.45));
  pointer-events: none;
}
.video-wrap.is-playing::after { display: none; }
.video-wrap iframe { width: 100%; height: 100%; border: 0; }
/* Direct YouTube embed (no click-to-play poster): kill the scrim + pointer. */
.video-wrap.is-embed { cursor: default; }
.video-wrap.is-embed::after { display: none; }
.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
}
.video-play .ring {
  width: 110px; height: 110px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  transition: all .3s;
}
.video-wrap:hover .ring { background: rgba(255,255,255,0.95); border-color: #fff; transform: scale(1.06); }
.video-play .tri {
  width: 0; height: 0;
  border-left: 22px solid #fff;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  margin-left: 6px;
  transition: border-left-color .3s;
}
.video-wrap:hover .tri { border-left-color: var(--olive-dk); }
.video-caption {
  position: absolute;
  bottom: 28px;
  left: 36px;
  z-index: 2;
  color: #fff;
}
.video-caption .tag {
  font-family: var(--script);
  font-size: 22px;
  color: var(--gold);
}
.video-caption h3 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  margin: 0;
  letter-spacing: 0.02em;
}

/* ---------- Testimonials ---------- */
.testimonials {
  position: relative;
  padding: 110px 32px 130px;
  background: var(--bg);
  text-align: center;
  overflow: hidden;
}
.testimonials-bg-script {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--script);
  font-size: clamp(70px, 9vw, 130px);
  color: var(--paper);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  letter-spacing: -0.02em;
}
.testi-inner { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; }
.testi-inner .heading { letter-spacing: -0.005em; margin-top: 30px; }
.testi-inner .lede { margin: 0 auto; max-width: 56ch; }
.testi-stage {
  position: relative;
  min-height: 240px;
  margin: 50px 0 30px;
}
.testi-card {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s, transform .6s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  pointer-events: none;
}
.testi-card.active { opacity: 1; transform: none; pointer-events: auto; }
.testi-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.55;
  color: var(--ink);
  max-width: 64ch;
  margin: 0;
}
.testi-meta { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.testi-stars { color: var(--gold); letter-spacing: 4px; font-size: 14px; }
.testi-name {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
}
.testi-loc { font-size: 12px; color: var(--muted); letter-spacing: 0.1em; }
.testi-arrows {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  transform: translateY(-50%);
  padding: 0 8px;
}
.testi-arrows button {
  pointer-events: auto;
  width: 38px; height: 38px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  font-family: var(--serif);
  transition: color .2s;
}
.testi-arrows button:hover { color: var(--ink); }
.testi-dots { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.testi-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #d4cdb8;
  border: none;
  padding: 0;
  transition: all .25s;
}
.testi-dot.active { background: var(--olive-dk); transform: scale(1.4); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .products-track .product { flex: 0 0 calc((100% - 28px) / 2); } /* 2 visible */
  .products-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .section { padding: 70px 24px; }
  .production-intro { padding-top: 70px; }
  .steps { padding-bottom: 70px; }
  .hero-arrow { display: none; }
  .products-track .product { flex: 0 0 100%; } /* 1 visible */
  .products-arrow.prev { left: 6px; }
  .products-arrow.next { right: 6px; }
  .video-caption { left: 18px; bottom: 18px; }
  .video-caption h3 { font-size: 22px; }
}
