:root {
  --tescoma-red:      #bd0d2e;   /* primary brand red: header, button, links, focus */
  --tescoma-red-dark: #a00b26;   /* hover/active */
  --ink:              #1a1a1a;   /* body text */
  --muted:            #6b6b6b;   /* secondary text */
  --bg:               #f5f5f5;   /* page background */
  --surface:          #ffffff;   /* card background */
  --border:           #e0e0e0;   /* input borders */
  --error:            #c0182f;
  --radius:           10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Content area ---------- */
/* Wraps everything below the header + accent stripe. Acts as the
   positioning context for the captcha overlay so the overlay can only
   ever cover the region beneath the header, never the header itself. */
.content-area {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
/* White header bar with a left-aligned Tescoma logo, mirroring the storefront.
   A thin red accent stripe sits directly beneath it for brand emphasis. */
.site-header {
  background: #ffffff;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 48px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.logo {
  display: block;
  height: auto;
  max-height: 176px;
  width: auto;
  max-width: 100%;
}

/* Thin red brand stripe under the white header. */
.header-accent {
  height: 4px;
  background: var(--tescoma-red);
}

/* ---------- Layout ---------- */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px;
  gap: 20px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  max-width: 480px;
  width: 100%;
  padding: 32px;
}

/* ---------- Typography ---------- */
h1 {
  font-size: 26px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px;
}

.subheading {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 6px;
}

.prize {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px;
}

.form-intro {
  font-size: 15px;
  color: var(--ink);
  margin: 0 0 20px;
}

/* ---------- Form ---------- */
.field {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--ink);
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  height: 44px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
  outline: none;
  border-color: var(--tescoma-red);
  box-shadow: 0 0 0 3px rgba(189, 13, 46, 0.15);
}

input[aria-invalid="true"] {
  border-color: var(--error);
}

/* ---------- Consent ---------- */
.consent-field {
  margin-top: 4px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.consent-row input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: var(--tescoma-red);
  cursor: pointer;
}

.consent-label {
  display: inline;
  font-weight: 400;
  font-size: 14px;
  color: var(--ink);
  margin: 0;
  cursor: pointer;
}

.policy-link {
  color: var(--tescoma-red);
  text-decoration: underline;
}

.policy-link:hover {
  color: var(--tescoma-red-dark);
}

/* ---------- Button ---------- */
.submit-btn {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  color: #ffffff;
  background: var(--tescoma-red);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.submit-btn:hover:not(:disabled) {
  background: var(--tescoma-red-dark);
}

.submit-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(189, 13, 46, 0.35);
}

.submit-btn:disabled {
  background: #cccccc;
  cursor: not-allowed;
}

/* ---------- Errors & success ---------- */
.error {
  color: var(--error);
  font-size: 13px;
  margin: 6px 0 0;
  min-height: 0;
}

.error:empty {
  display: none;
}

.form-error {
  text-align: center;
  margin-top: 12px;
}

.success {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  padding: 8px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 12px;
  font-size: 13px;
  color: var(--muted);
  padding: 4px 16px 8px;
  text-align: center;
}

/* ---------- Captcha overlay ---------- */
/* Absolutely positioned inside .content-area so it only covers the region
   below the header + accent stripe. The captcha card is centered in this
   area. The backdrop dims the underlying content, and the form is
   non-interactive via `inert`. */
.captcha-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 16px 16px;
  overflow: hidden;
}

.captcha-overlay[hidden] {
  display: none;
}

.captcha-overlay-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

.captcha-overlay-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.28);
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 244px);
  overflow-y: auto;
  padding: 20px 24px 24px;
  z-index: 1;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: auto;
}

.captcha-overlay-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px;
  text-align: center;
}

/* Make the embedded captcha widget fit nicely inside the overlay card. */
.captcha-overlay-card .wheezy-captcha .card {
  box-shadow: none;
  padding: 0;
  max-width: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .site-header {
    padding: 18px 20px;
    min-height: 150px;
  }

  .logo {
    max-height: 120px;
  }

  .card {
    padding: 24px 20px;
  }

  h1 {
    font-size: 22px;
  }
}