/*
  SAVSKI IZLOG — potpis izrade „powered by cabindesign.rs" (potpis.css)

  Učitava se poslednji (posle tamno.css). Dva mesta, kao na šablonima
  Maglica i Proplanak:
  - .hero-potpis — istaknuta svetla pločica u herou (desktop dole desno,
    telefon dole u sredini, ispod dugmadi), sa logom firme (pikselna
    kućica); boja teme obilazi kvadrate kao u logou na cabindesign.rs
    (8 s, u svakom trenutku svetli jedan);
  - .potpis — tih red ispod copyright-a u podnožju.

  Boje su boje logoa firme: svetla tema tinta #1C2620 / tema #2A5A3B,
  tamna tinta #F2EEE4 / tema #8CC79B. Pločica u herou je svetla u obe
  teme (stoji na fotografiji). Ime je u fontu logoa, Hanken Grotesk 600
  (učitava se uz Fraunces i Nunito).
*/

.hero-potpis,
.hero-potpis:link,
.hero-potpis:visited {
  --hp-tinta: #1c2620;
  --hp-tema: #2a5a3b;
  --hp-tiho: #56655b;
  --hp-papir: #f2eee4;
  position: absolute;
  right: 3.2rem;
  bottom: 3.2rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 5rem;
  padding: 0.6rem 0.6rem 0.6rem 1.4rem;
  border-radius: 100px;
  color: var(--hp-tinta);
  background: rgba(255, 253, 251, 0.92);
  text-align: left;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(255, 253, 251, 0.4), 0 1.2rem 2.8rem -1.2rem rgba(20, 24, 28, 0.6);
  transition: translate 300ms ease, box-shadow 300ms ease;
  animation: hp-ulaz 1400ms ease 900ms both;
}

/* samo pločica — hero slika i naslov se ne blede (LCP, vidi style.css) */
@keyframes hp-ulaz {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hp-znak {
  flex-shrink: 0;
  width: 2.8rem;
  height: 2.8rem;
}

.hp-krov {
  fill: none;
  stroke: var(--hp-tema);
  stroke-width: 6;
  stroke-linecap: square;
}

.hp-kv {
  fill: var(--hp-tinta);
  animation: hp-smena 8s ease-in-out infinite;
  animation-delay: var(--smena, 0s);
}

/* redosled kao u logou firme: dole desno → dole levo → gore levo → gore desno */
.hp-kv--1 {
  --smena: -4s;
}

.hp-kv--2 {
  --smena: -2s;
}

.hp-kv--3 {
  --smena: -6s;
}

.hp-kv--4 {
  --smena: 0s;
  fill: var(--hp-tema);
}

/* var() u @keyframes radi (i prati promenu boje usred animacije) */
@keyframes hp-smena {
  0%,
  22% {
    fill: var(--hp-tema);
  }
  28%,
  94% {
    fill: var(--hp-tinta);
  }
  100% {
    fill: var(--hp-tema);
  }
}

.hp-tekst {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.hp-uvod {
  font-family: "Nunito", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hp-tiho);
}

.hp-ime {
  margin-top: 0.2rem;
  font-family: "Hanken Grotesk", "Nunito", sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--hp-tinta);
}

.hp-rs {
  color: var(--hp-tema);
}

.hp-strelica {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 3.8rem;
  height: 3.8rem;
  margin-left: 0.4rem;
  border-radius: 50%;
  color: var(--hp-papir);
  background: var(--hp-tinta);
  transition: background-color 300ms ease;
}

.hp-strelica svg {
  width: 1.6rem;
  height: 1.6rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) {
  .hero-potpis:hover {
    translate: 0 -2px;
    box-shadow: 0 0 0 1px rgba(255, 253, 251, 0.6), 0 1.6rem 3.2rem -1.2rem rgba(20, 24, 28, 0.7);
  }

  .hero-potpis:hover .hp-strelica {
    background: var(--hp-tema);
  }
}

/* telefon: hero je poravnat uz dno, dugmad su preko cele širine — potpis
   ide u sredinu, u prostor ispod dugmadi (donji razmak heroa je 10rem,
   strelice za skrol tu nema) */
@media (max-width: 44em) {
  .hero-potpis,
  .hero-potpis:link,
  .hero-potpis:visited {
    right: auto;
    left: 50%;
    bottom: 2.4rem;
    transform: translateX(-50%);
  }
}

/* ————— podnožje ————— */

.potpis-red {
  display: flex;
  justify-content: center;
  margin-top: 0.8rem;
}

.potpis,
.potpis:link,
.potpis:visited {
  --pt-tinta: #1c2620;
  --pt-tema: #2a5a3b;
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  gap: 0.7rem;
  min-height: 4.4rem;
  font-size: 1.25rem;
  color: var(--boja-tekst-blaga);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 240ms ease;
}

.potpis-uvod {
  letter-spacing: 0.04em;
}

.potpis-znak {
  width: 2rem;
  height: 2rem;
}

.potpis-znak rect {
  fill: var(--pt-tinta);
}

.potpis-znak .potpis-kv--tema {
  fill: var(--pt-tema);
}

.potpis-krov {
  fill: none;
  stroke: var(--pt-tinta);
  stroke-width: 5;
  stroke-linecap: square;
}

.potpis-ime {
  font-family: "Hanken Grotesk", "Nunito", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--pt-tinta);
}

.potpis-rs {
  color: var(--pt-tema);
}

@media (hover: hover) {
  .potpis:hover {
    opacity: 1;
  }
}

[data-tema="tamna"] .potpis {
  --pt-tinta: #f2eee4;
  --pt-tema: #8cc79b;
}

@media (prefers-reduced-motion: reduce) {
  .hp-kv,
  .hero-potpis {
    animation: none;
  }
}
