:root {
  --green: #0a7d3c;
  --green-lt: #16a34a;
  --blue: #1f57c3;
  --red: #a71d2a;
  --gold: #e0a325;
  --ink: #10222d;
  --muted: #56676f;
  --line: #e5eaed;
  --field: #f5f8f9;
  --card: #ffffff;
  --radius: 24px;
  --shadow: 0 45px 90px -30px rgba(16, 34, 45, 0.45), 0 18px 40px -22px rgba(16, 34, 45, 0.30);
  --shadow-sm: 0 10px 30px -14px rgba(16, 34, 45, 0.25);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #eef1f0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Full-screen background photo — auto-fits every viewport via
   background-size:cover. The source photo is a busy edge-to-edge flat-lay
   (no clean empty zone), so it's blurred into soft ambient texture by
   default — that also hides any awkward cover-crop edges. On devices with
   a real mouse, a second sharp copy is masked to a soft circle that
   follows the cursor (see app.js), revealing the photo in full detail
   wherever you point. Both layers share the same oversized box
   (inset: -40px) so they line up pixel-for-pixel at the seam. */
.bg-photo-wrap { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg-photo-blur, .bg-photo-sharp {
  position: absolute; inset: -40px;
  background-color: #eef1f0;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.28), rgba(238,241,240,0.42)),
    url("bgimage.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.bg-photo-blur { filter: blur(9px) saturate(105%); }
.bg-photo-sharp {
  filter: saturate(105%);
  -webkit-mask-image: radial-gradient(circle 420px at var(--mx, 50%) var(--my, 50%), #000 0%, rgba(0,0,0,0.85) 55%, rgba(0,0,0,0) 82%);
  mask-image: radial-gradient(circle 420px at var(--mx, 50%) var(--my, 50%), #000 0%, rgba(0,0,0,0.85) 55%, rgba(0,0,0,0) 82%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.has-spotlight .bg-photo-sharp { opacity: 1; }

.c-green { color: var(--green); }
.c-blue { color: var(--blue); }
.c-red { color: var(--red); }
.req { color: var(--red); }

/* ---------- Sticky full-width logo bar ---------- */
.logo-bar {
  width: 100%;
  background: #fff;
  display: flex; justify-content: center; align-items: center;
  padding: clamp(0.5rem, 1.5vw, 0.85rem) clamp(1.25rem, 6vw, 4rem);
  box-shadow: 0 2px 14px rgba(16, 34, 45, 0.07);
  position: sticky; top: 0; z-index: 10;
}
.logo { display: block; width: min(100%, clamp(220px, 26vw, 480px)); height: auto; }

/* ---------- Layout: form only, centered over the blurred backdrop ---------- */
.page {
  max-width: 640px; margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) 1.25rem 2rem;
  text-align: center;
}

/* Frosted glass surroundings — softens the transition between the photo and
   the opaque white form card, rather than the card floating on raw pixels. */
.glass-frame {
  background: rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: calc(var(--radius) + 18px);
  padding: clamp(0.75rem, 2.5vw, 1.5rem);
  box-shadow: 0 30px 70px -25px rgba(16, 34, 45, 0.4);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-frame { background: rgba(255, 255, 255, 0.75); }
}

.card {
  text-align: left;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid rgba(255,255,255,0.7);
}
.loading-state { text-align: center; padding: 2.5rem 0; color: var(--muted); }

/* ---------- Form fields ---------- */
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.form-section { animation: fade 0.35s ease; }
.step-title { font-size: 1.05rem; font-weight: 600; margin: 0 0 1.1rem; padding-top: 0; border-top: 0; }
.form-section:not(:first-child) .step-title { margin-top: 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 520px) { .field-grid { grid-template-columns: 1fr; } }
.field { display: block; grid-column: span 2; }
.field.half { grid-column: span 1; }
@media (max-width: 520px) { .field.half { grid-column: span 2; } }
.field > span.field-label { display: block; font-size: 0.86rem; font-weight: 500; margin-bottom: 0.4rem; }

input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--field);
  border: 1.5px solid transparent; border-radius: 12px; padding: 0.85rem 1rem;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
input::placeholder, textarea::placeholder { color: #9aa7ad; }
input:focus, select:focus, textarea:focus { outline: none; background: #fff; border-color: var(--green); box-shadow: 0 0 0 4px rgba(10,125,60,0.12); }
select {
  appearance: none; cursor: pointer; padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2356676f' stroke-width='2'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}
.field-help { display: block; margin-top: 0.5rem; font-style: italic; font-size: 0.8rem; color: #b26a00; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); background: #fff5f5; }

.dropzone { border: 2px dashed #c4d0d5; border-radius: 14px; background: #fff; padding: 2rem 1rem; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.dropzone:hover, .dropzone:focus, .dropzone.drag { border-color: var(--green); background: #f3fbf6; outline: none; }
.dz-icon { width: 40px; height: 40px; stroke: var(--green); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 0.6rem; }
.dz-text { margin: 0; color: var(--muted); font-size: 0.9rem; } .dz-text b { color: var(--green); }
.dz-hint { margin: 0.3rem 0 0; color: #9aa7ad; font-size: 0.8rem; }
.dz-file { margin: 0.75rem 0 0; font-size: 0.85rem; font-weight: 600; color: var(--green); word-break: break-all; }

.check { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; font-size: 0.95rem; grid-column: span 2; }
.check input { width: 20px; height: 20px; accent-color: var(--green); cursor: pointer; }

/* ---------- Buttons / actions ---------- */
.actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.btn {
  font: inherit; font-weight: 600; border: none; border-radius: 12px; padding: 0.8rem 1.5rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; text-decoration: none;
  transition: transform 0.12s, box-shadow 0.2s, background 0.2s, opacity 0.2s;
}
.btn.lg { padding: 0.95rem 1.9rem; font-size: 1rem; border-radius: 14px; }
.btn:active { transform: translateY(1px); }
.primary { background: var(--red); color: #fff; box-shadow: 0 12px 24px -10px rgba(167,29,42,0.6); }
.primary:hover { background: #8f1824; transform: translateY(-1px); }
.primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.ghost { background: #eef1f2; color: var(--ink); }
.ghost:hover { background: #e3e8ea; }
.actions .primary, .actions #nextBtn { margin-left: auto; }

.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
.spinner.dark { border-color: rgba(16,34,45,0.2); border-top-color: var(--green); width: 28px; height: 28px; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-msg { min-height: 1.2rem; margin: 1rem 0 0; font-size: 0.88rem; text-align: center; color: var(--red); }

/* ---------- Success ---------- */
.success { text-align: center; padding: 1.5rem 0; animation: fade 0.4s ease; }
.success-badge { width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 50%; background: rgba(10,125,60,0.12); display: grid; place-items: center; }
.success-badge svg { width: 36px; height: 36px; stroke: var(--green); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.success h2 { color: var(--green); margin: 0 0 0.5rem; }
.success p { color: var(--muted); margin: 0 auto 1.5rem; max-width: 380px; }

[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
