/* ============================================================
   GUARDIAN GROUP SURVEY — survey.css
   Brand: #16435B (dark), #2A5C76 (mid), #52829C (steel),
          #77A4BC (light), #F6F6F6 (off-white)
   Font: Barlow + Barlow Condensed
   ============================================================ */

:root {
  --gg-dark:    #16435B;
  --gg-mid:     #2A5C76;
  --gg-steel:   #52829C;
  --gg-light:   #77A4BC;
  --gg-pale:    #C8DCE9;
  --gg-off:     #F6F6F6;
  --gg-white:   #FFFFFF;
  --gg-black:   #0D1B24;
  --gg-text:    #1C3444;
  --gg-muted:   #6B8FA3;

  --radius:     8px;
  --radius-lg:  16px;
  --shadow:     0 4px 24px rgba(22,67,91,0.10);
  --shadow-lg:  0 8px 48px rgba(22,67,91,0.16);

  --font-body: 'Barlow', sans-serif;
  --font-display: 'Barlow Condensed', sans-serif;

  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--gg-off);
  color: var(--gg-text);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
}

/* ── HEADER ──────────────────────────────────────────────── */
.site-header {
  background: var(--gg-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}
.header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-img { height: 36px; width: auto; }
.logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--gg-white);
  letter-spacing: 0.08em;
}
.header-tag {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gg-pale);
  opacity: 0.8;
}

/* ── LOADING / ERROR ─────────────────────────────────────── */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
  color: var(--gg-muted);
}
.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--gg-pale);
  border-top-color: var(--gg-mid);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-screen {
  max-width: 560px;
  margin: 80px auto;
  padding: 24px;
  text-align: center;
}
.error-inner {
  background: var(--gg-white);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow);
}
.shield-icon { font-size: 48px; margin-bottom: 16px; }
.error-inner h2 { font-family: var(--font-display); font-size: 28px; color: var(--gg-dark); margin-bottom: 12px; }
.error-inner p { color: var(--gg-muted); line-height: 1.7; }
.error-inner a { color: var(--gg-mid); }

/* ── WORKSHOP HERO ───────────────────────────────────────── */
.workshop-hero {
  background: linear-gradient(135deg, var(--gg-dark) 0%, var(--gg-mid) 100%);
  padding: 56px 24px 48px;
  position: relative;
  overflow: hidden;
}
.workshop-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}
.workshop-hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  pointer-events: none;
}
.hero-inner {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.pre-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gg-pale);
  margin-bottom: 12px;
}
.workshop-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  color: var(--gg-white);
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.workshop-subtitle {
  font-size: 17px;
  color: var(--gg-pale);
  opacity: 0.9;
  margin-bottom: 20px;
  font-weight: 300;
}
.hero-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.meta-item {
  font-size: 13px;
  color: var(--gg-pale);
  opacity: 0.75;
  font-weight: 500;
}
.meta-item:empty { display: none; }

/* ── PROGRESS ────────────────────────────────────────────── */
.progress-wrap {
  background: var(--gg-white);
  border-bottom: 1px solid rgba(22,67,91,0.08);
  position: sticky;
  top: 65px;
  z-index: 90;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.progress-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.progress-steps {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.progress-step {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--gg-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--gg-muted);
  transition: all var(--transition);
  cursor: default;
  font-family: var(--font-display);
}
.progress-step.active {
  background: var(--gg-mid);
  border-color: var(--gg-mid);
  color: white;
  transform: scale(1.1);
}
.progress-step.done {
  background: var(--gg-dark);
  border-color: var(--gg-dark);
  color: white;
}
.progress-bar-track {
  flex: 1;
  height: 4px;
  background: var(--gg-pale);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gg-dark), var(--gg-steel));
  border-radius: 2px;
  transition: width 0.4s ease;
}
.progress-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gg-muted);
  flex-shrink: 0;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}

/* ── SURVEY CONTAINER / FORM ─────────────────────────────── */
.survey-container {
  max-width: 860px;
  margin: 0 auto;
  padding-bottom: 80px;
}

.survey-form { width: 100%; }

/* ── FORM SECTIONS ───────────────────────────────────────── */
.form-section {
  display: none;
  padding: 48px 24px 24px;
  animation: fadeSlideIn 0.35s ease;
}
.form-section.active { display: block; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 36px;
}
.section-number {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: var(--gg-pale);
  flex-shrink: 0;
  letter-spacing: -0.02em;
  margin-top: -4px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--gg-dark);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.section-desc {
  font-size: 15px;
  color: var(--gg-muted);
  margin-top: 6px;
  font-weight: 300;
}

/* ── FIELDS ──────────────────────────────────────────────── */
.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group.full { grid-column: 1 / -1; }
.field-group.half { grid-column: span 1; }

.field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gg-dark);
  letter-spacing: 0.01em;
}
.field-hint {
  font-size: 12px;
  color: var(--gg-muted);
  margin-top: -2px;
  font-style: italic;
}
.required { color: var(--gg-steel); }

.field-input {
  background: var(--gg-white);
  border: 1.5px solid var(--gg-pale);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--gg-text);
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
}
.field-input:focus {
  border-color: var(--gg-mid);
  box-shadow: 0 0 0 3px rgba(42,92,118,0.12);
}
.field-input.error {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192,57,43,0.10);
}
.field-input::placeholder { color: var(--gg-muted); opacity: 0.7; }

.field-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2352829C' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.field-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

/* ── CHECKBOXES ──────────────────────────────────────────── */
.checkbox-group, .radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.check-item, .radio-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--gg-pale);
  background: var(--gg-white);
  transition: all var(--transition);
  font-size: 14px;
  color: var(--gg-text);
  user-select: none;
}
.check-item:hover, .radio-item:hover {
  border-color: var(--gg-steel);
  background: rgba(42,92,118,0.04);
}
.check-item input, .radio-item input { display: none; }

.check-box, .radio-box {
  width: 20px; height: 20px;
  border: 2px solid var(--gg-pale);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  background: var(--gg-white);
}
.radio-box { border-radius: 50%; }

.check-item input:checked ~ .check-box {
  background: var(--gg-mid);
  border-color: var(--gg-mid);
}
.check-item input:checked ~ .check-box::after {
  content: '';
  width: 10px; height: 6px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translateY(-1px);
}
.radio-item input:checked ~ .radio-box {
  border-color: var(--gg-mid);
}
.radio-item input:checked ~ .radio-box::after {
  content: '';
  width: 10px; height: 10px;
  background: var(--gg-mid);
  border-radius: 50%;
}
.check-item input:checked ~ span:last-child,
.radio-item input:checked ~ span:last-child {
  color: var(--gg-dark);
  font-weight: 500;
}
.check-item:has(input:checked),
.radio-item:has(input:checked) {
  border-color: var(--gg-mid);
  background: rgba(42,92,118,0.05);
}

/* ── FORM NAV ────────────────────────────────────────────── */
.form-nav {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(22,67,91,0.08);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.required-note {
  font-size: 12px;
  color: var(--gg-muted);
  font-style: italic;
}

.btn {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
}
.btn-primary {
  background: var(--gg-mid);
  color: white;
  box-shadow: 0 4px 16px rgba(42,92,118,0.3);
}
.btn-primary:hover {
  background: var(--gg-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(22,67,91,0.35);
}
.btn-submit {
  background: var(--gg-dark);
  color: white;
  box-shadow: 0 4px 16px rgba(22,67,91,0.3);
}
.btn-submit:hover {
  background: #0d2e3f;
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--gg-muted);
  border: 1.5px solid var(--gg-pale);
}
.btn-ghost:hover {
  border-color: var(--gg-steel);
  color: var(--gg-dark);
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ── SUCCESS SCREEN ──────────────────────────────────────── */
.success-screen {
  max-width: 600px;
  margin: 80px auto;
  padding: 24px;
  text-align: center;
  animation: fadeSlideIn 0.5s ease;
}
.success-inner {
  background: var(--gg-white);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--gg-dark);
}
.success-shield {
  width: 80px; height: 80px;
  margin: 0 auto 24px;
  background: var(--gg-off);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}
.success-logo { width: 60px; height: auto; }
.success-inner h2 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--gg-dark);
  margin-bottom: 16px;
}
.success-inner p {
  color: var(--gg-muted);
  line-height: 1.8;
  margin-bottom: 8px;
}
.success-sub {
  font-style: italic;
  color: var(--gg-steel) !important;
  margin-top: 24px !important;
}
.success-tag {
  font-size: 13px;
  color: var(--gg-pale);
  margin-top: 32px;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background: var(--gg-dark);
  text-align: center;
  padding: 20px 24px;
}
.site-footer p {
  font-size: 12px;
  color: var(--gg-pale);
  opacity: 0.6;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── VALIDATION ERROR MESSAGE ────────────────────────────── */
.field-error {
  font-size: 12px;
  color: #c0392b;
  margin-top: 4px;
  display: none;
}
.field-group.has-error .field-error { display: block; }
.field-group.has-error .field-input { border-color: #c0392b; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .fields-grid { grid-template-columns: 1fr; }
  .field-group.half { grid-column: 1 / -1; }
  .form-nav { flex-direction: column; align-items: stretch; }
  .nav-right { flex-direction: column; align-items: stretch; }
  .btn { text-align: center; }
  .progress-steps { display: none; }
  .workshop-hero { padding: 40px 20px 32px; }
  .section-header { flex-direction: column; gap: 8px; }
  .section-number { font-size: 36px; }
  .success-inner { padding: 40px 24px; }
}
