:root {
  --blue: #0587c5;
  --blue-dark: #0472a6;
  --white: #ffffff;
  --text: #17334a;
  --error: #c62828;
  --shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
  --input-border: #d7e7ee;
  --input-bg: #ffffff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #bfefff;
}

.giveaway-page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)),
    url("images/background.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding: 24px 20px 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.state {
  width: 100%;
  display: flex;
  justify-content: center;
}

.landing-state {
  flex: 1;
  align-items: center;
  padding-bottom: 55px;
}

.main-button,
.submit-button {
  appearance: none;
  border: 0;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.main-button {
  min-width: 158px;
  padding: 14px 34px;
  border-radius: 4px;
  font-size: 20px;
  letter-spacing: 1px;
  box-shadow: 0 8px 18px rgba(5, 135, 197, 0.35);
}

.main-button:hover,
.submit-button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.main-button:focus,
.submit-button:focus,
input:focus {
  outline: 3px solid rgba(5, 135, 197, 0.25);
  outline-offset: 2px;
}

.form-state,
.success-state {
  flex: 1;
  align-items: center;
  padding: 18px 0 14px;
}

.card {
  width: 100%;
  max-width: 390px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;
}

.form-card {
  padding: 22px 20px 20px;
  border: 1px solid rgba(5, 135, 197, 0.08);
}

.success-card {
  padding: 34px 24px;
}

.card h1 {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 27px;
  line-height: 1.12;
}

.intro-text {
  max-width: 315px;
  margin: 0 auto 16px;
  font-size: 15px;
  line-height: 1.42;
}

.form-group {
  position: relative;
  margin-bottom: 8px;
  text-align: left;
}

.icon-field {
  padding-top: 0;
}

.field-icon {
  position: absolute;
  left: 12px;
  top: 11px;
  width: 21px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.field-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--blue);
}

input[type="text"],
input[type="tel"],
input[type="email"] {
  width: 100%;
  height: 43px;
  border: 1px solid var(--input-border);
  border-radius: 4px;
  padding: 9px 12px 9px 44px;
  font-size: 15px;
  color: var(--text);
  background: var(--input-bg);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.03);
}

input::placeholder {
  color: #6f8793;
  opacity: 1;
}

input.has-error {
  border-color: var(--error);
}

.error-message {
  display: none;
  margin-top: 4px;
  color: var(--error);
  font-size: 12px;
  line-height: 1.3;
}

.error-message:not(:empty) {
  display: block;
}

.terms-group {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 10px;
  padding: 4px 0 0;
  text-align: left;
}

.terms-group input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--blue);
  flex: 0 0 auto;
}

.terms-group label {
  font-size: 13px;
  line-height: 1.35;
}

.terms-group a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
}

.terms-error {
  text-align: left;
  margin-bottom: 4px;
}

.form-message {
  display: none;
  margin: 7px 0 10px;
  font-size: 13px;
  line-height: 1.35;
}

.form-message:not(:empty) {
  display: block;
}

.form-message.is-error {
  color: var(--error);
}

.submit-button {
  width: 100%;
  min-height: 43px;
  border-radius: 4px;
  font-size: 16px;
  box-shadow: 0 7px 15px rgba(5, 135, 197, 0.25);
}

.submit-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.success-card p {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.45;
}

.success-card strong {
  display: block;
  color: var(--blue);
  font-size: 18px;
}

.site-footer {
  position: fixed;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 62px;
  padding: 12px 22px;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.site-footer a {
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.site-footer a:hover {
  text-decoration: underline;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-links a {
  display: inline-flex;
  width: 24px;
  height: 24px;
}

.social-links svg {
  width: 24px;
  height: 24px;
  fill: var(--white);
}

[hidden] {
  display: none !important;
}

/* Desktop and iPad preview: keep the campaign the same width as mobile. */
@media (min-width: 768px) {
  .giveaway-page {
    max-width: 430px;
    margin: 0 auto;
    box-shadow: 0 0 28px rgba(0, 0, 0, 0.18);
  }

  .hero-content {
    padding: 24px 20px 82px;
  }

  .card {
    max-width: 390px;
  }

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

  .card h1 {
    font-size: 27px;
  }

  .site-footer {
    left: 50%;
    right: auto;
    width: 100%;
    max-width: 430px;
    min-height: 62px;
    transform: translateX(-50%);
  }
}

@media (max-height: 720px) {
  .hero-content {
    padding-top: 16px;
  }

  .form-state,
  .success-state {
    padding-top: 12px;
  }

  .form-card {
    padding: 18px 18px 18px;
  }

  .card h1 {
    font-size: 25px;
  }

  .intro-text {
    margin-bottom: 13px;
    font-size: 14px;
  }

  .form-group {
    margin-bottom: 7px;
  }

  input[type="text"],
  input[type="tel"],
  input[type="email"] {
    height: 40px;
  }

  .field-icon {
    top: 9px;
  }

  .submit-button {
    min-height: 40px;
  }
}
