/* ————— Franka & Antonio bday party ————— */

:root {
  --bg: #fdfefc;
  --ink: #333a32;
  --muted: #78826f;
  --pink: #b9cfb4;
  --pink-soft: #eff5ec;
  --pink-line: #dbe7d5;
  --accent: #55814f;
  --accent-dark: #446a3f;
  --card-shadow: 0 10px 30px rgba(68, 106, 63, 0.10);
  --font-display: "Baloo 2", "Avenir Next", "Trebuchet MS", sans-serif;
  --font-hand: "Caveat", "Bradley Hand", cursive;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  overflow-x: hidden;
  text-align: center;
}

/* vrlo suptilne pastelne mrlje koje polako "dišu" u pozadini */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 30% at 18% 22%, rgba(185, 207, 180, 0.30), transparent 70%),
    radial-gradient(34% 28% at 84% 12%, rgba(242, 184, 205, 0.22), transparent 70%),
    radial-gradient(36% 30% at 76% 78%, rgba(185, 207, 180, 0.26), transparent 70%),
    radial-gradient(30% 26% at 12% 86%, rgba(255, 209, 102, 0.14), transparent 70%);
  animation: bg-drift 26s ease-in-out infinite alternate;
}

@keyframes bg-drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(3%, -2%) scale(1.06); }
}

/* Confetti canvas overlays everything, never blocks taps */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

.hidden { display: none !important; }

/* ————— Hero ————— */

.hero {
  position: relative;
  padding: 3.5rem 1.25rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* na mobitelu naslov ide prvi, fotke ispod */
.hero-text { order: -1; }

.sparkle {
  position: absolute;
  font-size: 1.3rem;
  opacity: 0.55;
  user-select: none;
  animation: floaty 5s ease-in-out infinite;
}
.s1 { top: 1.2rem; left: 8%; }
.s2 { top: 3rem; right: 7%; font-size: 1.6rem; animation-delay: -1.2s; }
.s3 { top: 12rem; left: 4%; animation-delay: -2.4s; }
.s4 { top: 16rem; right: 5%; animation-delay: -3.1s; }
.s5 { top: 0.8rem; left: 48%; font-size: 1.1rem; animation-delay: -4s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.06em;
}

.name-line {
  position: relative;
  display: inline-block;
  font-size: clamp(2.9rem, 13vw, 5.2rem);
  letter-spacing: -0.015em;
  padding: 0.42em 0;
}

.name { position: relative; z-index: 1; }

/* velika godina niske prozirnosti iza imena */
.age-ghost {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  font-size: 2.3em;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.22;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.amp {
  position: relative;
  z-index: 1;
  color: var(--pink);
}

.bday {
  font-family: var(--font-hand);
  font-weight: 700;
  color: var(--accent);
  font-size: clamp(2.6rem, 11vw, 4.6rem);
  line-height: 1;
  transform: rotate(-2.5deg);
  margin-top: 0.05em;
}

.punch {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 4.6vw, 1.5rem);
  margin-top: 1.4rem;
}

.warm {
  color: var(--muted);
  max-width: 34ch;
  margin: 0.8rem auto 0;
  font-size: clamp(1rem, 4vw, 1.15rem);
}

/* ————— Polaroids ————— */

.polaroid {
  background: #fff;
  padding: 0.6rem 0.6rem 0.4rem;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(55, 43, 60, 0.18);
  display: inline-block;
}

.polaroid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.polaroid figcaption {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.35rem;
  color: #4f5a4c;
  padding: 0.25rem 0 0.15rem;
}

/* mobile: photos stacked under the headline, alternating tilt */
.hero-photo {
  width: min(85%, 420px);
  margin-top: 1.6rem;
}
.hero-photo-left { transform: rotate(-3deg); }
.hero-photo-right { transform: rotate(2.5deg); margin-top: 0.9rem; }

.divider-photo {
  width: min(85%, 460px);
  margin: 3rem auto 0;
  transform: rotate(-2deg);
}

/* ————— Countdown ————— */

.countdown { padding: 2.8rem 1.25rem 0; }

.count-label {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--accent);
  transform: rotate(-1.5deg);
}

.count-grid {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.7rem;
  flex-wrap: wrap;
}

.count-cell {
  background: var(--pink-soft);
  border: 1px solid var(--pink-line);
  border-radius: 14px;
  padding: 0.55rem 0.4rem 0.45rem;
  min-width: 4.4rem;
}

.count-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.count-unit {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.count-live {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--accent);
  margin-top: 0.5rem;
}

/* ————— Details ————— */

.details { padding: 3rem 1.25rem 0; }

.details-intro {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 4.4vw, 1.35rem);
  margin-bottom: 1.4rem;
}

.card {
  background: #fff;
  border: 1px solid var(--pink-line);
  border-radius: 22px;
  box-shadow: var(--card-shadow);
  max-width: 480px;
  margin: 0 auto;
  padding: 1.6rem 1.4rem 1.5rem;
}

.detail-list { margin-bottom: 1.4rem; }

.detail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.2rem;
  text-align: left;
}
.detail-row + .detail-row { border-top: 1px dashed var(--pink-line); }

.detail-row dt {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--accent);
  white-space: nowrap;
}

.detail-row dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.25;
  text-align: right;
}

/* ————— Buttons ————— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  cursor: pointer;
  border: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
  box-shadow: 0 6px 18px rgba(85, 129, 79, 0.35);
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.btn-ghost {
  background: var(--pink-soft);
  color: var(--accent-dark);
  flex: 1;
  font-size: 0.92rem;
  padding: 0.7rem 0.5rem;
}
.btn-ghost:hover { background: var(--pink-line); }

/* ————— Što te čeka ————— */

.expect { padding: 3rem 1.25rem 0; }

h2 {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--accent);
  transform: rotate(-1.5deg);
  margin-bottom: 1.1rem;
}

.expect-list {
  list-style: none;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.expect-list li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  background: #fff;
  border: 1px solid var(--pink-line);
  border-radius: 16px;
  padding: 0.9rem 1.1rem;
  font-weight: 500;
}

.expect-emoji { font-size: 1.6rem; flex-shrink: 0; }

/* ————— Closing ————— */

.closing { padding: 3.5rem 1.25rem 4rem; }

.closing-big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 6.5vw, 2.3rem);
  line-height: 1.15;
}

.signoff {
  margin-top: 2.5rem;
  color: var(--muted);
}

.signature {
  display: block;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--ink);
  transform: rotate(-2deg);
  margin-top: 0.3rem;
}

.sig-note {
  display: block;
  font-size: 0.9rem;
}

/* ————— Desktop: photos flank the headline ————— */

@media (min-width: 920px) {
  .hero {
    padding-top: 5rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
  }

  .hero-text { order: 0; grid-column: 2; max-width: 560px; }

  .hero-photo {
    width: 100%;
    max-width: 330px;
    margin-top: 0;
  }
  .hero-photo-left {
    grid-column: 1;
    justify-self: end;
    transform: rotate(-5deg);
  }
  .hero-photo-right {
    grid-column: 3;
    justify-self: start;
    transform: rotate(4deg);
  }

  .hero-photo:hover { transform: rotate(0deg) scale(1.04); transition: transform 0.25s ease; }
  .divider-photo:hover { transform: rotate(0deg) scale(1.03); transition: transform 0.25s ease; }
}

@media (prefers-reduced-motion: reduce) {
  .sparkle { animation: none; }
  body::before { animation: none; }
  html { scroll-behavior: auto; }
}
