:root {
  --bg-main: #f7f1e3;
  --card: rgba(255, 250, 241, 0.96);
  --text: #2e2117;
  --muted: #6b5645;
  --blue: #1d5fa7;
  --blue-dark: #12477f;
  --gold: #d99b25;
  --gold-dark: #b37808;
  --cream: #fffaf1;
  --border: rgba(61, 41, 23, 0.12);
  --shadow: 0 20px 60px rgba(49, 32, 14, 0.14);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Montserrat', system-ui, sans-serif;
  color: var(--text);
    background: url('oktoberfest-bg.jpg') no-repeat center center fixed;
    background-size: cover;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.05), rgba(255,255,255,0.05)),
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 24px,
      rgba(29, 95, 167, 0.035) 24px,
      rgba(29, 95, 167, 0.035) 48px
    );
}

.site-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, 1020px);
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.hero-card,
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.hero-card {
  padding: 28px 20px 24px;
  margin-bottom: 22px;
  text-align: center;
}

.logo-area {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.site-logo {
  display: block;
  max-width: min(100%, 320px);
  width: 100%;
  height: auto;
  object-fit: contain;
}

.date-banner {
  display: inline-block;
  margin: 0 auto 22px;
  padding: 12px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #efbf59);
  color: #fff;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 12px 30px rgba(217, 155, 37, 0.28);
}

.intro-box {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 22px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,247,231,0.98));
  border: 1px solid rgba(217, 155, 37, 0.18);
}

.intro-box p {
  margin: 0 0 16px;
  line-height: 1.8;
  font-size: 1rem;
}

.intro-box p:last-child {
  margin-bottom: 0;
}

.form-card {
  padding: 28px 20px;
}

.section-head {
  text-align: center;
}

.section-head h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.section-head p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.6;
}

.notice {
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-weight: 700;
}

.notice.error {
  background: #fff0f0;
  border: 1px solid #e4a8a8;
  color: #8a2d2d;
}

.name-fields {
  display: grid;
  gap: 14px;
}

.name-row {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px;
}

.name-row label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

.input-row {
  display: flex;
  gap: 10px;
}

input[type="text"] {
  width: 100%;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid rgba(46, 33, 23, 0.15);
  background: #fff;
  font: inherit;
  color: var(--text);
}

input[type="text"]:focus {
  outline: 2px solid rgba(29, 95, 167, 0.18);
  border-color: var(--blue);
}

.form-actions-inline,
.form-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.form-actions-inline {
  margin-top: 16px;
}

.form-actions {
  margin-top: 24px;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  box-shadow: 0 12px 28px rgba(29, 95, 167, 0.24);
}

.btn-secondary {
  background: linear-gradient(135deg, #f2dfaf, #edc878);
  color: #5b3a00;
}

.btn-remove {
  min-width: 48px;
  padding-inline: 14px;
  background: #f3ede5;
  color: #6a523d;
}

.popup-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(18, 24, 31, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 20;
}

.popup-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

.popup-card {
  width: min(100%, 560px);
  background: linear-gradient(180deg, #fffdf8, #fff6e4);
  border-radius: 26px;
  padding: 28px 22px;
  text-align: center;
  border: 1px solid rgba(217, 155, 37, 0.2);
  box-shadow: 0 24px 70px rgba(24, 23, 21, 0.25);
}

.popup-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 12px;
}

.popup-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
}

.popup-card p {
  margin: 0 0 20px;
  line-height: 1.7;
  font-size: 1.05rem;
  font-weight: 600;
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 30;
}

@media (max-width: 700px) {
  .site-wrap {
    padding: 16px 12px 36px;
  }

  .hero-card,
  .form-card {
    border-radius: 22px;
  }

  .hero-card,
  .form-card {
    padding-inline: 16px;
  }

  .intro-box {
    padding: 20px 16px;
  }

  .input-row {
    flex-direction: column;
  }

  .btn-remove {
    width: 100%;
  }

  .popup-card {
    padding: 24px 18px;
  }
}
