* {
  box-sizing: border-box;
}

:root {
  --sky: #90dcf6;
  --sky-light: #dff7ff;
  --sky-soft: #f5fcff;
  --grass: #63c957;
  --grass-dark: #33a843;
  --field: #c6aa63;

  --orange: #ff8a00;
  --orange-dark: #ef6c00;
  --blue: #2779e8;
  --blue-dark: #155fc4;
  --pink: #ff4fa3;
  --green: #36c66a;
  --yellow: #ffd43b;
  --brown: #4b2a18;

  --text: #24324a;
  --muted: #5b6f88;
  --white: #ffffff;

  --shadow: 0 20px 50px rgba(32, 69, 100, 0.18);
  --soft-shadow: 0 12px 28px rgba(32, 69, 100, 0.12);
  --radius-xl: 34px;
  --radius-lg: 26px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--sky);
  color: var(--text);
  font-family: "Trebuchet MS", "Comic Sans MS", "Arial Rounded MT Bold", "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* =========================
   MAIN WRAPPER
========================= */

.invite-shell {
  width: min(540px, 100%);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.main-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #dff7ff 0%, #ffffff 42%, #f0fbff 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.45), 0 28px 80px rgba(24,74,114,.16);
}

/* =========================
   FARM SCENE
========================= */

.scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.cloud {
  position: absolute;
  height: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  filter: drop-shadow(0 10px 10px rgba(39,121,232,.08));
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
}

.cloud::before {
  width: 36px;
  height: 36px;
  top: -16px;
  left: 16px;
}

.cloud::after {
  width: 46px;
  height: 46px;
  top: -24px;
  right: 16px;
}

.cloud-1 {
  width: 92px;
  top: 30px;
  left: 24px;
}

.cloud-2 {
  width: 138px;
  top: 42px;
  left: 205px;
}

.cloud-3 {
  width: 108px;
  top: 34px;
  right: 26px;
}

.hill {
  position: absolute;
  border-radius: 50%;
}

.hill-back {
  width: 650px;
  height: 235px;
  left: -55px;
  bottom: 142px;
  background: #8fca69;
}

.hill-front {
  width: 730px;
  height: 315px;
  left: -70px;
  bottom: -95px;
  background: var(--grass);
}

.hill-front::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 190px;
  right: -44px;
  top: 24px;
  border-radius: 50%;
  background: var(--grass-dark);
}

.hill-front::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 178px;
  left: 190px;
  top: 18px;
  background: var(--field);
  opacity: .9;
  clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
}

.barn {
  position: absolute;
  left: 54px;
  top: 92px;
  width: 130px;
  height: 118px;
  opacity: .96;
}

.barn-roof {
  position: absolute;
  left: 7px;
  top: -14px;
  width: 112px;
  height: 54px;
  background: #ee6864;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.barn-body {
  position: absolute;
  left: 12px;
  top: 26px;
  width: 92px;
  height: 78px;
  background: #ee6864;
  border: 4px solid #fff;
}

.barn-side {
  position: absolute;
  right: 0;
  top: 46px;
  width: 54px;
  height: 58px;
  background: #e85e58;
  border: 4px solid #fff;
}

.barn-door {
  position: absolute;
  width: 16px;
  height: 42px;
  bottom: 14px;
  background: #c94f4f;
  border: 2px solid rgba(255,255,255,.65);
}

.barn-door-left {
  left: 34px;
}

.barn-door-right {
  left: 52px;
}

.barn-window {
  position: absolute;
  left: 42px;
  top: 40px;
  width: 22px;
  height: 22px;
  background: #604848;
  border: 3px solid #fff;
  box-shadow:
    inset -8px 0 0 rgba(255,255,255,.45),
    inset 0 -8px 0 rgba(255,255,255,.45);
}

.animal-badge {
  position: absolute;
  z-index: 3;
  font-size: 44px;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.10));
}

/* posisi hewan dibuat lebih jauh dari teks utama */
.animal-a { left: 30px; top: 215px; }
.animal-b { left: 196px; top: 230px; }
.animal-c { right: 58px; top: 215px; }
.animal-d { left: 54px; bottom: 172px; }
.animal-e { left: 100px; bottom: 82px; font-size: 38px; }
.animal-f { right: 48px; bottom: 100px; font-size: 40px; }

/* =========================
   OPENING SCREEN
========================= */

.gate-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--sky);
  display: flex;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: opacity .75s ease, visibility .75s ease;
}

.gate-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-shell {
  min-height: 100svh;
  background: linear-gradient(180deg, #8fd8f5 0%, #bceefe 45%, #dff7ff 100%);
}

.gate-content {
  position: relative;
  z-index: 8;
  min-height: 100svh;
  padding: 28px 22px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}

/* label */
.theme-badge,
.section-label,
.section-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 1000;
  box-shadow: var(--soft-shadow);
  border: 2px solid rgba(255,255,255,.85);
}

.theme-badge {
  margin-top: 6px;
}

/* guest */
.guest-box {
  width: 100%;
  max-width: 330px;
  margin: 14px auto 12px;
  padding: 13px 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--soft-shadow);
  border: 2px solid rgba(47,128,237,.10);
}

.guest-box small {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 1000;
}

.guest-box strong {
  display: block;
  color: var(--text);
  font-size: 23px;
  line-height: 1.2;
  font-weight: 1000;
}

/* judul opening dibuat card putih agar tidak bentrok background */
.gate-title,
.hero-title {
  width: 100%;
  position: relative;
  z-index: 9;
  margin: 4px auto 12px;
  padding: 18px 16px 16px;
  border-radius: 30px;
  background: rgba(255,255,255,.93);
  box-shadow: var(--shadow);
  border: 3px solid rgba(255,255,255,.9);
}

.gate-title p,
.hero-title p {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: clamp(34px, 8.5vw, 44px);
  line-height: .9;
  font-weight: 1000;
  letter-spacing: -2px;
  text-shadow: 0 3px 0 rgba(255,255,255,.95);
}

.gate-title h1,
.hero-title h1 {
  margin: 0;
  color: var(--pink);
  font-size: clamp(38px, 10vw, 54px);
  line-height: .9;
  font-weight: 1000;
  letter-spacing: -3px;
  text-shadow: 0 4px 0 rgba(255,255,255,.95);
}

.gate-title h1 span,
.hero-title h1 span {
  color: var(--brown);
  font-size: .72em;
}

.gate-title h2,
.hero-title h2 {
  margin: 9px 0 0;
  color: var(--blue);
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1;
  font-weight: 1000;
}

.gate-title h2 strong {
  color: var(--orange);
}

/* foto depan besar tapi tombol tetap aman terlihat */
.hero-photo-card {
  width: 100%;
  margin: 10px auto 16px;
  padding: 8px;
  background: #fff;
  border-radius: 32px;
  box-shadow: var(--shadow);
  border: 2px solid rgba(255,255,255,.9);
}

.gate-photo-card {
  max-width: 360px;
  transform: rotate(-.6deg);
}

.hero-photo-card.big {
  max-width: 100%;
  transform: none;
}

.hero-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 4.65;
  object-fit: cover;
  object-position: center;
  border-radius: 24px;
}

/* button selalu besar dan terlihat */
.main-button {
  width: 100%;
  min-height: 64px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #ffb000);
  box-shadow: 0 12px 0 rgba(239,108,0,.20), 0 18px 34px rgba(255,138,0,.25);
  font-size: 19px;
  font-weight: 1000;
  transition: transform .25s ease, filter .25s ease;
  position: relative;
  z-index: 20;
}

.main-button:hover {
  transform: translateY(-4px);
  filter: brightness(1.04);
}

.main-button.orange {
  background: linear-gradient(135deg, var(--orange), #ffb000);
}

.main-button.blue {
  background: linear-gradient(135deg, var(--blue), #54a6ff);
  box-shadow: 0 12px 0 rgba(23,102,194,.20), 0 18px 34px rgba(47,128,237,.25);
}

.main-button.green {
  background: linear-gradient(135deg, var(--green), #72de92);
  box-shadow: 0 12px 0 rgba(38,146,76,.20), 0 18px 34px rgba(69,199,111,.25);
}

.animal-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}

.bottom-animals {
  margin-top: 20px;
}

.animal-row span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  font-size: 32px;
  box-shadow: var(--soft-shadow);
}

.animal-row.small span {
  width: 46px;
  height: 46px;
  font-size: 28px;
}

/* =========================
   MUSIC
========================= */

.music-button {
  position: fixed;
  right: calc(50% - 250px);
  bottom: 18px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 4px solid #fff;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 1000;
  box-shadow: var(--soft-shadow);
  cursor: pointer;
}

.music-button.is-show {
  display: flex;
}

.music-button.is-playing {
  animation: pulseMusic 1.2s ease-in-out infinite;
}

@keyframes pulseMusic {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* =========================
   HERO MAIN
========================= */

.hero-section {
  position: relative;
  min-height: 100svh;
  background: linear-gradient(180deg, #8fd8f5 0%, #bceefe 43%, #dff7ff 100%);
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 8;
  min-height: 100svh;
  padding: 28px 22px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-title {
  margin-top: 12px;
}

.event-pill {
  width: 100%;
  margin-bottom: 18px;
  padding: 18px 16px;
  border-radius: 26px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--soft-shadow);
  border: 3px dashed rgba(47,128,237,.18);
  position: relative;
  z-index: 12;
}

.event-pill span {
  display: block;
  color: var(--pink);
  font-size: 17px;
  font-weight: 1000;
}

.event-pill strong {
  display: block;
  margin: 4px 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.event-pill small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.hero-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

/* =========================
   SECTIONS
========================= */

.section-block {
  padding: 56px 22px;
}

.section-head {
  text-align: center;
  margin-bottom: 28px;
}

.section-head h3,
.soft-card h3 {
  margin: 14px 0 10px;
  color: var(--text);
  font-size: 40px;
  line-height: .95;
  letter-spacing: -2px;
  font-weight: 1000;
}

.section-head p,
.soft-card p,
.photo-caption p,
.kid-card p,
.detail-card p,
.site-footer span {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
  font-weight: 800;
}

/* =========================
   PHOTO GRID
========================= */

.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.photo-card {
  min-height: 285px;
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 7px solid #fff;
}

.photo-card.wide {
  grid-column: span 2;
  min-height: 360px;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.58) 100%);
}

.photo-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  padding: 8px 13px;
  border-radius: 999px;
  background: #fff;
  color: var(--orange);
  font-size: 12px;
  font-weight: 1000;
}

.photo-tag.pink { color: var(--pink); }
.photo-tag.blue { color: var(--blue); }
.photo-tag.green { color: var(--green); }

.photo-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  color: #fff;
}

.photo-caption h4 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  font-weight: 1000;
}

.photo-caption p {
  color: rgba(255,255,255,.9);
}

/* =========================
   CARDS
========================= */

.soft-card,
.kid-card,
.detail-card {
  background: #fff;
  border-radius: 30px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 4px solid rgba(255,255,255,.85);
}

.kids-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.kid-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 38px;
  box-shadow: var(--soft-shadow);
}

.kid-icon.pink {
  background: linear-gradient(135deg, var(--pink), #ff9ac9);
}

.kid-icon.blue {
  background: linear-gradient(135deg, var(--blue), #73b7ff);
}

.kid-card small,
.parents-list small,
.detail-card small {
  display: block;
  color: var(--blue);
  font-size: 12px;
  font-weight: 1000;
}

.kid-card h4 {
  margin: 8px 0 2px;
  color: var(--pink);
  font-size: 34px;
  line-height: 1;
  font-weight: 1000;
}

.kid-card:nth-child(2) h4 {
  color: var(--blue);
}

.kid-card strong {
  display: inline-flex;
  padding: 9px 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  font-size: 12px;
  font-weight: 1000;
}

.parents-list {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.parents-list div {
  padding: 17px;
  border-radius: 22px;
  background: #f1fbff;
  border: 2px dashed rgba(47,128,237,.18);
}

.parents-list strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 1000;
}

.countdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.countdown-grid div {
  padding: 22px 10px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.countdown-grid strong {
  display: block;
  color: var(--orange);
  font-size: 44px;
  line-height: .9;
  font-weight: 1000;
}

.countdown-grid span {
  display: block;
  margin-top: 8px;
  color: var(--blue);
  font-weight: 1000;
}

.detail-grid {
  display: grid;
  gap: 14px;
}

.detail-card .detail-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 23px;
  background: #f1fbff;
  font-size: 33px;
}

.detail-card h4 {
  margin: 8px 0 6px;
  color: var(--text);
  font-size: 26px;
  line-height: 1.1;
  font-weight: 1000;
}

.map-card .main-button {
  margin-top: 22px;
}

.closing-card strong {
  display: block;
  margin-top: 22px;
  color: var(--orange);
  font-size: 18px;
}

.closing-card > span:last-child {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 21px;
  font-weight: 1000;
}

.site-footer {
  padding: 24px 18px 42px;
  text-align: center;
}

.site-footer p {
  margin: 0 0 8px;
  color: var(--text);
  font-weight: 1000;
}

/* =========================
   ANIMATIONS
========================= */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.confetti-wrap {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 16px;
  border-radius: 5px;
  opacity: 0;
  animation: confettiPop 1.15s ease-out forwards;
}

@keyframes confettiPop {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(.4) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1) rotate(var(--r));
  }
}

/* =========================
   RESPONSIVE FIX
========================= */

@media (min-width: 561px) {
  .gate-content,
  .hero-inner {
    justify-content: center;
  }

  .gate-title,
  .hero-title {
    max-width: 420px;
  }

  .main-button {
    max-width: 390px;
  }
}

@media (max-width: 560px) {
  .invite-shell,
  .main-shell {
    width: 100%;
  }

  .gate-content {
    padding: 22px 18px 26px;
  }

  .theme-badge {
    margin-top: 0;
    font-size: 12px;
  }

  .guest-box {
    margin: 12px auto 10px;
    padding: 11px 14px;
  }

  .guest-box strong {
    font-size: 20px;
  }

  .gate-title {
    padding: 15px 12px 14px;
    border-radius: 24px;
  }

  .gate-title p {
    font-size: 32px;
  }

  .gate-title h1 {
    font-size: 39px;
    letter-spacing: -2px;
  }

  .gate-title h2 {
    font-size: 21px;
  }

  .gate-photo-card {
    max-width: 100%;
    margin: 8px auto 14px;
  }

  .hero-photo-card img {
    aspect-ratio: 4 / 4.55;
    border-radius: 22px;
  }

  .main-button {
    min-height: 62px;
    font-size: 18px;
  }

  .bottom-animals {
    margin-top: 17px;
  }

  .animal-row span {
    width: 47px;
    height: 47px;
    font-size: 28px;
  }

  .music-button {
    right: 14px;
    bottom: 14px;
  }

  .barn {
    left: 22px;
    top: 88px;
    transform: scale(.82);
    transform-origin: top left;
    opacity: .75;
  }

  .cloud-1 {
    left: 18px;
    top: 24px;
    width: 78px;
  }

  .cloud-2 {
    left: 142px;
    top: 36px;
    width: 112px;
  }

  .cloud-3 {
    right: 14px;
    top: 28px;
    width: 84px;
  }

  .animal-a { left: 12px; top: 225px; font-size: 35px; opacity: .76; }
  .animal-b { left: 152px; top: 230px; font-size: 36px; opacity: .72; }
  .animal-c { right: 22px; top: 218px; font-size: 36px; opacity: .76; }
  .animal-d { left: 34px; bottom: 175px; font-size: 36px; opacity: .78; }
  .animal-e { left: 70px; bottom: 82px; font-size: 32px; opacity: .84; }
  .animal-f { right: 24px; bottom: 100px; font-size: 34px; opacity: .84; }

  .hero-inner {
    padding: 24px 18px 34px;
  }

  .hero-title {
    padding: 15px 12px 14px;
    border-radius: 24px;
  }

  .hero-title p {
    font-size: 31px;
  }

  .hero-title h1 {
    font-size: 38px;
    letter-spacing: -2px;
  }

  .hero-title h2 {
    font-size: 21px;
  }

  .event-pill {
    padding: 15px 13px;
  }

  .event-pill strong {
    font-size: 24px;
  }

  .section-block {
    padding: 48px 18px;
  }

  .section-head h3,
  .soft-card h3 {
    font-size: 34px;
  }

  .photo-grid {
    grid-template-columns: 1fr;
  }

  .photo-card,
  .photo-card.wide {
    grid-column: auto;
    min-height: 285px;
  }

  .kids-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 740px) and (max-width: 560px) {
  .gate-content {
    justify-content: flex-start;
    padding-top: 16px;
  }

  .theme-badge {
    font-size: 11px;
    min-height: 30px;
    padding: 6px 11px;
  }

  .guest-box {
    margin: 9px auto 8px;
  }

  .guest-box small {
    font-size: 12px;
  }

  .guest-box strong {
    font-size: 18px;
  }

  .gate-title {
    margin-bottom: 8px;
    padding: 12px 10px;
  }

  .gate-title p {
    font-size: 29px;
  }

  .gate-title h1 {
    font-size: 35px;
  }

  .gate-title h2 {
    font-size: 19px;
  }

  .gate-photo-card {
    padding: 6px;
    margin-bottom: 11px;
  }

  .hero-photo-card img {
    aspect-ratio: 4 / 4.05;
  }

  .main-button {
    min-height: 58px;
    font-size: 17px;
  }

  .animal-row span {
    width: 42px;
    height: 42px;
    font-size: 24px;
  }

  .bottom-animals {
    margin-top: 13px;
  }
}