:root {
  --bg-navy: #141026;
  --card-cream: #fddf8f;
  --cream-light: #FDF3D7;
  --accent-red: #ea4a3f;
  --accent-yellow: #ebba28;
  --ink: #1A1430;
  --text-light: #F5F0E1;
  --muted: #8A7F6A;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-navy);
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-light);
}

.page {
  min-height: 100vh;
  width: 100%;
  background-color: var(--bg-navy);
  background-image:
    linear-gradient(180deg, rgba(20, 16, 38, 0.88), rgba(20, 16, 38, 0.96)),
    url("assets/hero-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px 24px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  margin-bottom: 28px;
}

.logo-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 440px;
}

.logo-row > .sponsor-logo:first-child {
  justify-self: end;
  margin-right: 29px;
}

.logo-row > .sponsor-logo:last-child {
  justify-self: start;
}

.logo {
  max-width: clamp(90px, 32vw, 170px);
  width: 100%;
  height: auto;
  justify-self: center;
  min-width: 0;
}

.tagline {
  max-width: 100%;
  margin: 14px 0 0;
  font-family: 'Luckiest Guy', 'Poppins', sans-serif;
  font-weight: 400;
  font-size: clamp(10px, 5vw, 38px);
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  color: var(--accent-yellow);
  letter-spacing: 0;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}

.card {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 440px;
  border-radius: 24px;
  background: var(--card-cream);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  animation: cardIn 300ms ease-out both;
  overflow: hidden;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-inner {
  position: relative;
  z-index: 1;
  padding: 24px;
}

@media (min-width: 480px) {
  .card-inner {
    padding: 32px;
  }
}

.blob {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
}

.blob-red {
  width: 90px;
  height: 90px;
  background: var(--accent-red);
  top: -30px;
  right: -30px;
}

.blob-yellow {
  width: 60px;
  height: 60px;
  background: var(--accent-yellow);
  bottom: -20px;
  left: -20px;
}

.hello {
  font-style: italic;
  color: var(--accent-red);
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 4px;
}

.heading {
  font-size: 32px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 20px;
}

.form-error {
  background: var(--accent-red);
  color: var(--cream-light);
  font-weight: 500;
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.field {
  margin-bottom: 16px;
}

.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  left: -9999px;
}

.input-box {
  position: relative;
  min-width: 0;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: var(--cream-light);
  padding: 14px 12px 10px;
  transition: border-color 150ms;
}

.input-box:focus-within {
  border-color: var(--accent-red);
}

.input-label {
  position: absolute;
  top: -9px;
  border-radius: 12px;
  left: 12px;
  background: var(--card-cream);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 0 8px 4px;
}

.field.invalid .input-box {
  border-color: var(--accent-red);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"] {
  display: block;
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  padding: 4px 2px;
}

input::placeholder {
  color: var(--muted);
  font-weight: 400;
}

.helper {
  margin: 6px 2px 0;
  font-size: 12px;
  color: var(--muted);
}

.error {
  margin: 6px 2px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-red);
}

.checkbox-field {
  margin-top: 20px;
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--ink);
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  background: var(--ink);
  color: var(--accent-yellow);
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: transform 150ms, box-shadow 150ms, opacity 150ms;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

#successView {
  text-align: center;
  padding: 8px 0;
}

.success-icon {
  margin: 0 auto 16px;
  display: block;
}

.success-copy {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 20px;
}

.link-reset {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-red);
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
}

.sponsor-logo {
  height: clamp(28px, 8vw, 48px);
  width: auto;
  object-fit: contain;
  min-width: 0;
}

.sponsor-logo-ewc {
  height: clamp(15px, 4.3vw, 26px);
}

.footer {
  margin-top: 28px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
}
