:root {
  color-scheme: light;
  /* Colors pulled from winerelease.com's own stylesheet, so this page reads
     as part of the same site rather than a bolted-on form. */
  --color-brand: #3e2bc5;
  --color-brand-alt: #2b21ab;
  --color-accent: #0ab1e8;
  --color-text: #7a7a7a;
  --color-text-dark: #202833;
  --color-white: #ffffff;
  --bg-body: #ffffff;
  --bg-light: #f3f2fb;
  --bg-gray: #f5f5f5;
  --border-light: #e1e1e1;
  --danger: #c0392b;
  --radius-lg: 25px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
}

body {
  background: var(--bg-light);
  color: var(--color-text-dark);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

/* ---------- Header / nav, matching the main site ---------- */

.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header-inner {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}
.site-logo img {
  height: 34px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.site-nav a {
  color: var(--color-text-dark);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--color-brand); }
.site-nav a.active { color: var(--color-brand); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-dark);
  border-radius: 2px;
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--border-light);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 0; border-bottom: 1px solid var(--bg-gray); }
  .site-header-inner { position: relative; }
}

/* ---------- Page content ---------- */

.signup-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px 90px;
  position: relative;
}

/* Decorative graphic from the main site, bleeding off the left edge of the
   form content — same effect as winerelease.com's hero banner background.
   Rendered as a ::before so it naturally paints behind the (opaque) form
   cards without needing z-index tricks. */
.signup-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: -400px;
  width: 900px;
  height: 900px;
  opacity: 0.2;
  background: url(/images/banner-bg.svg) no-repeat left center;
  pointer-events: none;
  z-index: -1;
  animation: winerelease-banner-rotation 50s linear infinite;
}
@media (max-width: 3399px) {
  .signup-container::before {
    left: -380px;
    width: 600px;
    height: 600px;
  }
}
@keyframes winerelease-banner-rotation {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .signup-container::before { animation: none; }
}

.page-intro { margin-bottom: 28px; }
h1 { font-size: 1.75rem; margin: 0 0 6px; color: var(--color-text-dark); letter-spacing: -0.01em; }
.intro { color: var(--color-text); margin: 0; font-size: 1.02rem; }

.form-section {
  background: var(--color-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  margin-bottom: 22px;
  box-shadow: 0 1px 3px rgba(32, 40, 51, 0.04);
}
.form-section h2 {
  font-size: 1.05rem;
  margin: 0 0 18px;
  color: var(--color-text-dark);
  font-weight: 600;
}

.field-row { display: flex; gap: 14px; }
.field-row label { flex: 1; }
.field-row-3 label { flex: 1; }

label {
  display: block;
  margin-bottom: 16px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--color-text-dark);
}
label.checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.94rem;
  font-weight: 400;
  color: var(--color-text-dark);
  margin-bottom: 0;
}
label.checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--color-brand);
}

input, select {
  width: 100%;
  margin-top: 6px;
  padding: 11px 13px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-white);
  color: var(--color-text-dark);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(62, 43, 197, 0.12);
}

.combobox { position: relative; }
.combobox-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  background: var(--color-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 16px rgba(32, 40, 51, 0.12);
}
.combobox-group-label {
  padding: 6px 13px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text);
}
.combobox-option {
  padding: 8px 13px;
  font-size: 0.94rem;
  color: var(--color-text-dark);
  cursor: pointer;
}
.combobox-option:hover,
.combobox-option.active {
  background: var(--bg-light);
}
.combobox-option[hidden],
.combobox-group-label[hidden] {
  display: none;
}

small { color: var(--color-text); display: block; margin-top: 2px; margin-bottom: 4px; font-size: 0.82rem; }

.winery-block {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 14px;
  background: var(--bg-light);
  /* Contains the floated logo below — without this, the card's own
     height/background wouldn't extend to enclose a logo taller than
     the surrounding text. */
  overflow: hidden;
}
.winery-heading {
  margin-bottom: 6px;
}
.winery-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text-dark);
}
/* Exact width/height set inline per-winery, admin-controlled. object-fit:
   fill (the default) stretches to exactly match those dimensions — no
   aspect-ratio preservation, matching intent: full manual control. */
.winery-logo {
  border-radius: 4px;
  object-fit: fill;
  float: right;
  margin: 0 0 10px 14px;
}
.winery-location {
  color: var(--color-text);
  font-size: 0.82rem;
  margin: 0 0 8px;
}
.winery-links {
  font-size: 0.86rem;
  color: var(--color-text-dark);
  margin: 0 0 8px;
}
.winery-links a {
  color: var(--color-brand);
  text-decoration: underline;
}
.winery-links a:hover { color: var(--color-brand-alt); }
.winery-description {
  font-size: 0.88rem;
  color: var(--color-text);
  line-height: 1.5;
  margin: 0 0 12px;
}
.channel-choices { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.select-all { color: var(--color-text); padding-left: 14px; border-left: 1px solid var(--border-light); }

.consent-text {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  max-height: 160px;
  overflow-y: auto;
  font-size: 0.86rem;
  color: var(--color-text);
  margin-bottom: 16px;
  white-space: pre-wrap;
  background: var(--bg-gray);
}

.submit-button {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--color-brand);
  color: var(--color-white);
  border: none;
  padding: 15px;
  border-radius: var(--radius-lg);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}
.submit-button:hover { background: var(--color-brand-alt); }

.error { color: var(--danger); font-size: 0.86rem; margin: 2px 0 14px; }
.banner-error {
  background: #fbeceb;
  border: 1px solid #f0c5c1;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 18px;
}
.muted { color: var(--color-text); }

/* Admin-only "Test entry" block on the signup form — amber so it can't be
   mistaken for part of the public form. */
.test-entry-section {
  background: #fff8e6;
  border-color: #f0d48a;
}
.test-entry-section h2 { color: #8a5a00; }
.test-entry-section .checkbox { margin: 12px 0 8px; font-weight: 600; }
.test-entry-note { font-size: 0.86rem; }
.test-entry-banner {
  background: #fff8e6;
  border: 1px solid #f0d48a;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 0 0 16px;
  font-size: 0.94rem;
}

.field-invalid { border-color: var(--danger); outline: 2px solid var(--danger); }

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

/* ---------- Confirmation page ---------- */

.confirmation-card {
  background: var(--color-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(32, 40, 51, 0.04);
}
.confirmation-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-brand);
  color: var(--color-white);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.winery-confirm-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.winery-confirm-list li {
  font-weight: 500;
  color: var(--color-text-dark);
}
.confirmation-link { display: inline-block; width: auto; padding: 13px 32px; }

@media (max-width: 480px) {
  .field-row { flex-direction: column; gap: 0; }
  .form-section { padding: 20px 18px; }
}
