/* Buvica Vunica — homepage layer.
   Loaded after main.css; only the homepage links it.
   Uses tokens from tokens.css — no raw hex except inside SVG-free fallbacks. */

/* =========================================================
   Shared homepage bits
   ========================================================= */

/* Warm highlighter swipe — replaces the old scribble PNG treatment. */
.home-underline {
  background: linear-gradient(transparent 55%, var(--rose-100) 55%, var(--rose-100) 91%, transparent 91%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0 2px;
}

.home-section-title {
  text-align: center;
  margin-bottom: var(--sp-7);
}

/* =========================================================
   Hero — signature yarn-heart motif + polaroids
   ========================================================= */

.main-section.section {
  padding-top: 200px;
}

/* The one bold moment: a single yarn thread that curls into a heart. */
.home-yarn-motif {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 116%;
  height: auto;
  transform: translate(-50%, -8%);
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

/* main.css sets a global `svg { fill: ... }`, which is inherited — the thread
   must opt out explicitly or it renders as a filled blob. */
.home-yarn-motif,
.home-yarn-motif__thread {
  fill: none;
}

.home-yarn-motif__thread {
  stroke: var(--rose-300);
}

.home-yarn-motif__heart {
  fill: var(--rose-300);
}

.home-yarn-motif__heart--lilac {
  fill: var(--lilac-300);
}

@media (prefers-reduced-motion: no-preference) {
  .home-yarn-motif__thread {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: home-yarn-draw 2.6s cubic-bezier(0.22, 0.61, 0.36, 1) 0.25s forwards;
  }

  .home-yarn-motif__heart {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: home-heart-pop 0.5s ease-out forwards;
  }

  .home-yarn-motif__heart:nth-of-type(2) { animation-delay: 1.5s; }
  .home-yarn-motif__heart:nth-of-type(3) { animation-delay: 1.9s; }
  .home-yarn-motif__heart:nth-of-type(4) { animation-delay: 2.3s; }
}

@keyframes home-yarn-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes home-heart-pop {
  from { opacity: 0; transform: scale(0.4); }
  60%  { opacity: 1; transform: scale(1.15); }
  to   { opacity: 1; transform: scale(1); }
}

/* Polaroid frames — white mat, warm brown-tinted shadow.
   The frame lives on .photo-item because .photo-img__block is an inset,
   overflow-clipped layer where a box-shadow could never render. */
.photo-item {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* 8px mat on the hero polaroids only — .description-photo-item-1 relies on its
   own 24px padding to fit its rotated caption. */
.main-photo .photo-item,
.emotional-photo .photo-item {
  padding: 8px;
}

.photo-img__block {
  border-radius: calc(var(--radius-md) - 4px);
  overflow: hidden;
}

.main-photo-item {
  z-index: 2;
}

.main-title {
  margin-bottom: var(--sp-5);
}

/* Keep the highlighted phrase on one line so the swipe reads as one gesture. */
.main-title .home-underline {
  white-space: nowrap;
}

.home-hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
}

/* main.css forces .main-container .btn to 280px/100% — the hero now has two. */
.main-container .home-hero__cta .btn {
  width: auto;
  max-width: none;
}

.main-container .home-hero__cta .btn_secondary {
  padding: 11px 20px;
  font-size: 16px;
}

@media screen and (max-width: 1023px) {
  .home-hero__cta {
    justify-content: center;
  }

  /* Stacked layout puts the copy directly under the photos — move the motif
     into the open space above them so it never runs through the h1. */
  .home-yarn-motif {
    top: auto;
    bottom: 100%;
    width: 128%;
    transform: translate(-50%, 22%);
  }
}

@media screen and (max-width: 579px) {
  .home-yarn-motif {
    width: 150%;
  }
}

/* =========================================================
   Section rhythm
   ========================================================= */

#iskustvo-igracke {
  background-color: var(--cream-50);
}

/* =========================================================
   #isporuka — warm numbered steps
   ========================================================= */

#isporuka .description-container .wysiwyg ol {
  counter-reset: home-step;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}

#isporuka .description-container .wysiwyg ol > li {
  counter-increment: home-step;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: 0;
  padding-left: 0;
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 130%;
}

#isporuka .description-container .wysiwyg ol > li::before,
#isporuka .description-container .wysiwyg ol > li:nth-child(-n+9)::before {
  content: counter(home-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 38px;
  height: 38px;
  min-width: 38px;
  margin-left: 0;
  border-radius: 50%;
  background-color: var(--rose-100);
  color: var(--rose-600);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
}

/* =========================================================
   Testimonials strip (#utisci-home)
   ========================================================= */

/* Flex (not grid) so a strip of 1 or 2 testimonials still reads as centred. */
.home-testimonials__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-5);
}

.home-testimonials .testimonial-card {
  flex: 1 1 300px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  color: var(--color-ink);
  text-decoration: none;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.home-testimonials .testimonial-card:hover,
.home-testimonials .testimonial-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--color-ink);
}

.home-testimonials .testimonial-stars {
  font-size: 18px;
  line-height: 1;
  letter-spacing: 2px;
  color: var(--rose-300);
}

.home-testimonials .testimonial-stars .star--filled {
  color: var(--color-primary-ink);
}

.home-testimonials .testimonial-content {
  margin: 0;
  font-size: 16px;
  line-height: 150%;
  color: var(--color-ink);
}

.home-testimonials .testimonial-author {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-testimonials .testimonial-author strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--color-heading);
}

.home-testimonials .testimonial-location {
  font-size: 13px;
  color: var(--color-ink-soft);
}

.home-testimonials .testimonial-product {
  padding-top: var(--sp-3);
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-ink-soft);
}

.home-testimonials__more {
  margin: var(--sp-6) 0 0;
  text-align: center;
}

/* =========================================================
   Featured products slider (#kolekcija)
   ========================================================= */

.featured-slide__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.featured-slide__link:hover {
  color: inherit;
  text-decoration: none;
}

.featured-slider .post-slider__image {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  background-color: var(--cream-200);
}

.featured-slider .post-slider__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-slider .post-slider__info .wysiwyg {
  -webkit-line-clamp: 2;
  min-height: 42px;
}

.featured-slider .post-slider__item {
  border-radius: var(--radius-md);
}

/* =========================================================
   Maker teaser (#o-meni-home)
   ========================================================= */

.home-maker {
  background-color: var(--rose-100);
}

.home-maker.section,
.home-maker.section:last-of-type {
  padding: 88px 0;
}

.home-maker__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.home-maker__photo {
  flex: none;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--cream-50);
  border: 8px solid var(--cream-50);
  box-shadow: var(--shadow-md);
}

.home-maker__text {
  max-width: 620px;
}

.home-maker__text h2 {
  margin-bottom: var(--sp-4);
}

.home-maker__text p {
  margin: 0 0 var(--sp-5);
  font-size: 17px;
  line-height: 155%;
  color: var(--color-ink);
}

/* The default translucent rose fill would sit on a rose wash — go solid so the
   rose-700 label keeps its AA contrast. */
.home-maker .btn.btn_secondary,
.home-maker .btn.btn_secondary:hover,
.home-maker .btn.btn_secondary:focus {
  background-color: var(--color-surface);
  font-size: 16px;
  padding: 11px 22px;
}

@media screen and (max-width: 1023px) {
  .home-maker.section,
  .home-maker.section:last-of-type {
    padding: 72px 0;
  }

  .home-maker__inner {
    flex-direction: column;
    text-align: center;
    gap: var(--sp-6);
  }

  .home-maker__photo {
    width: 200px;
    height: 200px;
  }
}

@media screen and (max-width: 767px) {
  .home-maker.section,
  .home-maker.section:last-of-type {
    padding: 56px 0;
  }
}

/* Featured slider navigation — one pair of real buttons for the whole slider,
   not a decorative pair duplicated into every slide. */
.featured-slider__nav {
  padding: 0;
  border: 1px solid var(--color-border);
  color: var(--brown-700);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: color .2s ease, border-color .2s ease;
}

.featured-slider__nav:hover,
.featured-slider__nav:focus-visible {
  color: var(--color-primary-strong);
  border-color: var(--color-primary);
  background-color: var(--color-surface);
  transform: none;
}

@media screen and (max-width: 767px) {
  .featured-slider__nav { display: none; }
}
