*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cream: #f5f4e7;
  --brown-dark: #4a3728;
  --brown-mid: #7b6141;
  --brown-warm: #96794f;
  --brown-bg: #6b5638;
  --gold: #c8a96e;
  --gold-light: #d4ba82;
  --red-heart: #c0392b;
  --dark-txt: #1a1a1a;
  --card-shadow: rgba(58, 36, 18, 0.25);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Albert Sans", sans-serif;

  background: var(--cream);
  color: var(--brown-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding: 1.2rem 2rem;
  background: rgba(74, 55, 40, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s;
}
.nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: "Albert Sans", sans-serif;
  font-weight: 600;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.nav a:hover {
  opacity: 1;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url("img/hero.png") center/cover no-repeat;
  /* placeholder gradient if no image */
  background-color: var(--brown-mid);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(74, 55, 40, 0.7) 0%,
    rgba(74, 55, 40, 0.3) 50%,
    rgba(74, 55, 40, 0.1) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 8rem 6vw 4rem;
  max-width: 920px;
  text-align: center;
}
.hero-title {
  font-family: "Aboreto", serif;
  font-size: clamp(3rem, 7vw, 6rem);
  color: var(--cream);
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
  font-weight: 400;
  text-align: center;
}
.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  color: var(--cream);
  letter-spacing: 0.12em;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}
.btn-cta {
  display: inline-block;
  font-family: "Annie Use Your Telescope", cursive;
  font-size: 2rem;
  color: var(--dark-txt);
  background: url(img/tape.png);
  background-size: cover;
  background-position: center;
  padding: 1.5rem 2.5rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.btn-cta:hover {
  transform: translateY(-2px) rotate(-1deg);
}

/* ============ INTRO ============ */
.intro {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
  overflow: hidden;
}
.intro-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.intro-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.intro-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 5vw;
  background: var(--cream);
  position: relative;
}
.intro-text::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--gold);
}
.intro-text p {
  font-size: 1.2rem;
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 1.5rem;
  color: var(--brown-dark);
}
.intro-text .btn-cta {
  align-self: flex-start;
}

/* ============ GALLERY STRIP ============ */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.gallery-strip img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

/* ============ VOTING SECTION ============ */
.voting {
  background: var(--brown-bg);
  padding: 5rem 4vw 6rem;
}
.voting-header {
  text-align: center;
  margin-bottom: 4rem;
}
.voting-header h2 {
  color: var(--Base-color, #1a1a1a);
  text-align: center;
  font-family: Aboreto;
  font-size: 35px;
  font-style: normal;
  font-weight: 400;
  line-height: 56px; /* 160% */
  letter-spacing: 0.7px;
}
.voting-header p {
  color: var(--gold-light);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* ============ CARD GRID ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1680px;
  margin: 0 auto;
}

/* ============ POLAROID CARD ============ */
.card {
  padding: 0;
  transform: rotate(var(--r, -1deg));
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  cursor: default;
  position: relative;
}
.card:nth-child(4n + 1) {
  --r: -1.5deg;
}
.card:nth-child(4n + 2) {
  --r: 0.8deg;
}
.card:nth-child(4n + 3) {
  --r: -0.5deg;
}
.card:nth-child(4n + 4) {
  --r: 1.2deg;
}
.card:hover {
  transform: rotate(0deg) translateY(-4px);
}

.card-photo {
  width: 96%;
  height: auto;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  margin-bottom: -25px;
}

.card-body {
  width: 100%;
  text-align: center;

  background-repeat: no-repeat;
  min-height: 120px;
  position: relative;
}
.paper_bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 120px;
  z-index: 0;
}

.cta {
  background: url(img/cta_paper.png);
  background-position: center top;
  background-size: cover;
  width: 90%;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 1rem 1rem 1rem;
}

.card-name {
  color: var(--Base-color, #1a1a1a);
  font-family: "Annie Use Your Telescope";
  font-size: 25px;
  font-style: normal;
  font-weight: 400;
  line-height: 100%; /* 25px */
  letter-spacing: 0.5px;
  text-align: left;
}
.card-data {
  padding: 0.5rem;
}

.card-location {
  color: var(--Base-color, #1a1a1a);
  font-family: "Annie Use Your Telescope";
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%;
  letter-spacing: 0.4px;
  text-align: left;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--Base-color, #1a1a1a);
  text-align: center;
  font-family: "Albert Sans";
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  line-height: 100%; /* 15px */
  letter-spacing: 0.3px;
  text-decoration: none;
  width: 100%;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.card-link:hover {
  color: var(--brown-dark);
}
.card-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.card-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  z-index: 2;
}

.card-vote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}
.vote-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  transition: transform 0.2s;
}
.vote-btn:hover {
  transform: scale(1.2);
}
.vote-btn:active {
  transform: scale(0.9);
}
.vote-btn.voted {
  pointer-events: none;
}
.vote-btn svg {
  width: 22px;
  height: 22px;
  transition:
    fill 0.3s,
    stroke 0.3s;
}
.vote-btn svg.heart-empty {
  fill: none;
  stroke: var(--brown-warm);
  stroke-width: 1.5;
}
.vote-btn svg.heart-full {
  fill: var(--red-heart);
  stroke: var(--red-heart);
  stroke-width: 1.5;
}
.vote-count {
  font-family: "Annie Use Your Telescope", cursive;
  font-size: 1.6rem;
  color: var(--dark-txt);
  min-width: 1.5em;
}

/* voted animation */
@keyframes heartPop {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.4);
  }
  60% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}
.vote-btn.pop svg {
  animation: heartPop 0.4s ease;
}

/* ============ O IZBORU ============ */
.about {
  background: var(--cream);
  padding: 5rem 4vw;
}
.about-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about h2 {
  font-family: "Aboreto", serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
  color: var(--brown-dark);
}
.about p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--brown-mid);
}
.about-image {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  box-shadow: 4px 4px 0 var(--gold);
}

/* ============ NAGRADA ============ */
.prize {
  background: var(--brown-dark);
  color: var(--dark-txt);
  padding: 5rem 4vw;
}
.prize-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;

  align-items: center;
}

.prize-inner div {
  background: url(img/papiric.png);
  background-size: cover;
  background-position: center;
}
.prize h2 {
  font-family: "Aboreto", serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
}
.prize p {
  font-size: 1.1rem;
  line-height: 1.8;
  opacity: 0.85;
}
.prize-name {
  font-family: "Annie Use Your Telescope", cursive;
  font-size: 1.6rem;
  color: var(--gold);
  margin-top: 1.5rem;
}
.prize-value {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.3rem;
  opacity: 0.7;
}
.prize-image {
  width: 100%;
  object-fit: cover;
  transform: rotate(2deg);
}

/* ============ FOOTER ============ */
.footer {
  background: var(--cream);
  padding: 2rem 4vw;
  border-top: 1px solid #ddd5c5;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-logos {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.footer-logos img {
  height: 60px;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  color: var(--brown-mid);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-links a:hover {
  color: var(--brown-dark);
}

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--brown-dark);
  color: var(--cream);
  padding: 0.8rem 2rem;
  font-family: "Annie Use Your Telescope", cursive;
  font-size: 1.2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 200;
  transition: transform 0.4s ease;
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .gallery-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .nav {
    gap: 1.5rem;
    padding: 1rem 1.5rem;
  }
  .nav a {
    font-size: 0.8rem;
  }
  .hero-content {
    padding: 7rem 5vw 3rem;
  }
  .intro {
    grid-template-columns: 1fr;
  }
  .intro-images {
    grid-template-columns: 1fr 1fr;
    max-height: 300px;
    overflow: hidden;
  }
  .intro-text {
    padding: 3rem 5vw;
  }
  .intro-text::before {
    display: none;
  }
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .gallery-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-strip img {
    height: 200px;
  }
  .about-inner,
  .prize-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-image {
    max-width: 400px;
  }
  .footer-logos {
    flex-direction: column;
  }
}
@media (max-width: 480px) {
  .hero-title {
    font-size: 2.6rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .card {
    padding: 0.5rem 0.5rem 0.8rem;
  }
  .card-name {
    font-size: 1.1rem;
  }
  .card-location {
    font-size: 0.78rem;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .card-info {
    padding-top: 1rem;
  }
  .voting-header h2 {
    font-size: 26px;
  }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
