/* Pesta Ria — shared fun-fair & festival theme */
@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Nunito:wght@500;700;800;900&display=swap');

:root {
  --night: #1a0f3d;
  --night-2: #2b1660;
  --red: #e63946;
  --red-deep: #b5212e;
  --cream: #fff4dc;
  --gold: #ffc93c;
  --gold-deep: #f29e02;
  --teal: #2ec4b6;
  --pink: #ff5d8f;
  --purple: #8f5bff;
  --green: #5bd16b;
  --ink: #2a1846;
  --white: #ffffff;
  --shadow: 0 6px 0 rgba(0, 0, 0, .25);
  --font-display: 'Lilita One', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--cream);
  background:
    radial-gradient(ellipse at 20% 120%, rgba(255, 93, 143, .35), transparent 55%),
    radial-gradient(ellipse at 85% 110%, rgba(255, 201, 60, .25), transparent 50%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* faint stars */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 20%, #fff8 50%, transparent),
    radial-gradient(1.5px 1.5px at 30% 8%, #fff6 50%, transparent),
    radial-gradient(1px 1px at 55% 25%, #fff8 50%, transparent),
    radial-gradient(1.5px 1.5px at 75% 12%, #fff7 50%, transparent),
    radial-gradient(1px 1px at 90% 30%, #fff6 50%, transparent),
    radial-gradient(1px 1px at 45% 40%, #fff5 50%, transparent);
  z-index: 0;
}

/* ---------- Tent canopy ---------- */
.canopy {
  position: relative;
  height: 54px;
  background: repeating-linear-gradient(90deg, var(--red) 0 48px, var(--cream) 48px 96px);
  box-shadow: inset 0 -8px 12px rgba(0, 0, 0, .15);
  z-index: 2;
}
.canopy::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 22px;
  background:
    radial-gradient(circle at 24px 0, var(--red) 23px, transparent 24px) 0 0 / 96px 22px repeat-x,
    radial-gradient(circle at 24px 0, var(--cream) 23px, transparent 24px) 48px 0 / 96px 22px repeat-x;
  filter: drop-shadow(0 4px 2px rgba(0, 0, 0, .25));
}

/* ---------- Bunting & lights ---------- */
.bunting {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 0 10px;
  height: 34px;
  position: relative;
  z-index: 1;
}
.bunting::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 2px;
  height: 2px;
  background: rgba(255, 244, 220, .5);
}
.bunting span {
  flex: 0 0 26px;
  height: 30px;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  animation: flutter 2.4s ease-in-out infinite;
}
.bunting span:nth-child(5n+1) { background: var(--red); }
.bunting span:nth-child(5n+2) { background: var(--gold); animation-delay: -.4s; }
.bunting span:nth-child(5n+3) { background: var(--teal); animation-delay: -.8s; }
.bunting span:nth-child(5n+4) { background: var(--pink); animation-delay: -1.2s; }
.bunting span:nth-child(5n+5) { background: var(--purple); animation-delay: -1.6s; }

@keyframes flutter {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}

.lights {
  display: flex;
  justify-content: space-between;
  padding: 0 14px;
  height: 18px;
  position: relative;
}
.lights::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 3px;
  border-top: 2px dotted rgba(255, 244, 220, .35);
}
.lights i {
  width: 10px; height: 14px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  margin-top: 4px;
  background: var(--gold);
  box-shadow: 0 0 10px 3px rgba(255, 201, 60, .7);
  animation: twinkle 1.6s ease-in-out infinite;
}
.lights i:nth-child(3n+2) { background: var(--pink); box-shadow: 0 0 10px 3px rgba(255, 93, 143, .7); animation-delay: -.5s; }
.lights i:nth-child(3n+3) { background: var(--teal); box-shadow: 0 0 10px 3px rgba(46, 196, 182, .7); animation-delay: -1s; }

@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* ---------- Typography & controls ---------- */
.display {
  font-family: var(--font-display);
  letter-spacing: .5px;
  font-weight: 400;
}

.marquee-title {
  font-family: var(--font-display);
  color: var(--gold);
  text-shadow: 0 3px 0 var(--red-deep), 0 6px 0 rgba(0, 0, 0, .3), 0 0 24px rgba(255, 201, 60, .45);
}

.btn {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: .5px;
  border: 0;
  border-radius: 14px;
  padding: 10px 18px;
  cursor: pointer;
  color: var(--ink);
  background: var(--gold);
  box-shadow: 0 5px 0 var(--gold-deep), 0 8px 14px rgba(0, 0, 0, .3);
  transition: transform .08s, box-shadow .08s, filter .15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--gold-deep), 0 3px 6px rgba(0, 0, 0, .3); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.red { background: var(--red); color: var(--cream); box-shadow: 0 5px 0 var(--red-deep), 0 8px 14px rgba(0, 0, 0, .3); }
.btn.teal { background: var(--teal); color: var(--ink); box-shadow: 0 5px 0 #1b8f84, 0 8px 14px rgba(0, 0, 0, .3); }
.btn.ghost { background: rgba(255, 255, 255, .1); color: var(--cream); box-shadow: inset 0 0 0 2px rgba(255, 244, 220, .35); }
.btn.ghost:active { transform: translateY(2px); }
.btn.small { font-size: 15px; padding: 7px 12px; border-radius: 10px; }

input[type=text], input[type=number], input[type=password], input[type=email], textarea, select {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  background: var(--cream);
  border: 3px solid transparent;
  border-radius: 12px;
  padding: 9px 12px;
  width: 100%;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--gold); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .bunting span, .lights i { animation: none; }
}
