/* EU-SOLAR leadform — mobile first, no external resources. */
:root {
  --blue: #017fbf;
  --blue-dark: #016da4;
  --blue-light: #e6f2f9;
  --amber: #fbbc14;
  --text: #1e293b;
  --muted: #64748b;
  --border: #cbd5e1;
  --error: #d2232a;
  --bg: #f4f8fb;
  --card: #ffffff;
  --radius: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px env(safe-area-inset-bottom);
}

.brand { padding: 20px 0 16px; text-align: center; }
.brand img { display: block; width: 150px; height: auto; }

.card {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgb(15 23 42 / 8%), 0 8px 24px rgb(15 23 42 / 6%);
  padding: 24px 20px 28px;
}

.foot { color: var(--muted); font-size: 13px; padding: 20px 0 24px; }

/* Progress */
.progress { margin-bottom: 20px; }
.progress-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; display: flex; justify-content: space-between; }
.progress-bar { height: 6px; background: var(--blue-light); border-radius: 3px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--amber); border-radius: 3px; transition: width .3s ease; }

h1 { font-size: 22px; line-height: 1.25; margin: 0 0 6px; color: var(--text); }
.intro { color: var(--muted); margin: 0 0 20px; }

/* Fields */
.field { margin-bottom: 16px; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; padding: 0; }
.optional { font-weight: 400; color: var(--muted); font-size: 13px; }

.input-wrap { position: relative; display: flex; align-items: center; }
.suffix { position: absolute; right: 14px; color: var(--muted); pointer-events: none; }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom */
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgb(1 127 191 / 18%); }
[aria-invalid="true"] { border-color: var(--error) !important; }

/* Choice cards */
.choices { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  cursor: pointer; background: #fff;
  transition: border-color .15s, background .15s;
}
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--blue); flex: none; }
.choice:has(input:checked) { border-color: var(--blue); background: var(--blue-light); }
.choice:has(input:focus-visible) { box-shadow: 0 0 0 3px rgb(1 127 191 / 25%); }
.choices.invalid .choice { border-color: var(--error); }

/* Consent */
/* .field > .consent beats the generic `.field > label` rule (block, bold) */
.field > .consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; font-weight: 400; margin-bottom: 0; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--blue); flex: none; }
.consent a { color: var(--blue); }

.error { color: var(--error); font-size: 14px; margin-top: 6px; }
.notice { background: #fdecec; color: var(--error); border-radius: 10px; padding: 12px 14px; font-size: 14px; margin: 0 0 16px; }

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

/* Buttons */
.actions { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.btn {
  width: 100%; min-height: 54px;
  font: inherit; font-size: 17px; font-weight: 700;
  border: 0; border-radius: 10px; cursor: pointer;
  background: var(--blue); color: #fff;
  transition: background .15s, opacity .15s;
}
.btn:hover { background: var(--blue-dark); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-link { background: none; border: 0; color: var(--muted); font: inherit; font-size: 15px; padding: 10px; cursor: pointer; }
.btn-link:hover { color: var(--text); }

/* Ending */
.ending { text-align: center; padding: 12px 0 4px; }
.ending svg { width: 64px; height: 64px; margin-bottom: 12px; }
.ending p { color: var(--muted); margin: 0; }
.ending .redirect-note { margin-top: 20px; color: var(--text); font-weight: 600; display: flex; gap: 10px; align-items: center; justify-content: center; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #cfe3ef; border-top-color: #017fbf; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

@media (min-width: 600px) {
  .brand { padding: 36px 0 24px; }
  .brand img { width: 180px; }
  .card { padding: 32px 36px 36px; }
  h1 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
