/* CSS custom properties — defaults match conduitflow.json (the default brand).
   applyBranding() overrides these at runtime for each client slug. */
:root {
  --color-navy: #0D1E2B;
  --color-blue: #1A8FA8;
  --color-mid: #3DBDD4;
  --color-light: #E8F6F8;
  --color-border: #B8DEE4;
  --color-muted: #4D6B74;
  --color-orange: #3DBDD4;
  --color-white: #FFFFFF;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

html, body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--color-light);
  color: var(--color-navy);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------------------------------------------------------------------------
   Header
--------------------------------------------------------------------------- */
.site-header {
  background: var(--color-navy);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  min-height: 64px;
}

#header-logo {
  max-height: 44px;
  width: auto;
  display: block;
}

#header-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-white);
  display: none;
}

/* ---------------------------------------------------------------------------
   Progress bar
--------------------------------------------------------------------------- */
.progress-wrap {
  background: var(--color-navy);
  padding: 0 24px 16px;
}

.progress-label {
  font-size: 13px;
  color: #8fa5b8;
  margin-bottom: 6px;
  font-family: var(--font-body);
}

#progress-text {
  color: #8fa5b8;
}

.progress-track {
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  background: var(--color-orange);
  border-radius: 4px;
  transition: width 0.4s ease;
  width: 0%;
}

/* ---------------------------------------------------------------------------
   Main layout
--------------------------------------------------------------------------- */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 48px;
}

/* ---------------------------------------------------------------------------
   Card
--------------------------------------------------------------------------- */
#card {
  background: var(--color-white);
  border-radius: 12px;
  padding: 36px 40px;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 4px 24px rgba(28,43,58,0.10);
}

@media (max-width: 600px) {
  #card {
    padding: 24px 20px;
  }
}

.fade-in {
  animation: fadeIn 0.22s ease;
}

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

/* ---------------------------------------------------------------------------
   Slide typography
--------------------------------------------------------------------------- */
.slide-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.2;
  margin-bottom: 10px;
}

.slide-subtitle {
  font-size: 15px;
  color: var(--color-muted);
  line-height: 1.55;
  margin-bottom: 24px;
}

.question-label {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 12px;
}

/* ---------------------------------------------------------------------------
   Radio cards
--------------------------------------------------------------------------- */
.radio-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

/* Inline grid for small options like household size numbers */
.radio-cards.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
}

.radio-card {
  display: flex;
  align-items: center;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  padding: 14px 18px;
  cursor: pointer;
  min-height: 52px;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.radio-card:hover {
  border-color: var(--color-blue);
  background: var(--color-light);
}

.radio-card.selected {
  border-color: var(--color-blue);
  background: var(--color-light);
}

.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-card-label {
  font-size: 16px;
  color: var(--color-navy);
  line-height: 1.3;
  pointer-events: none;
}

.radio-card.selected .radio-card-label {
  font-weight: 600;
  color: var(--color-blue);
}

/* ---------------------------------------------------------------------------
   Household size — number grid
--------------------------------------------------------------------------- */
#slide-body .radio-cards:has(input[name="householdSize"]) {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

#slide-body .radio-card:has(input[name="householdSize"]) {
  justify-content: center;
  text-align: center;
  padding: 18px 8px;
}

/* ---------------------------------------------------------------------------
   Contact form
--------------------------------------------------------------------------- */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-navy);
}

.req { color: var(--color-orange); }
.optional { font-weight: 400; color: var(--color-muted); font-size: 13px; }

.field-input {
  font-family: var(--font-body);
  font-size: 16px;
  border: 2px solid var(--color-border);
  border-radius: 7px;
  padding: 12px 14px;
  color: var(--color-navy);
  background: var(--color-white);
  transition: border-color 0.15s;
  width: 100%;
}

.field-input:focus {
  outline: none;
  border-color: var(--color-blue);
}

.field-input::placeholder { color: #b0bec8; }

/* ---------------------------------------------------------------------------
   Navigation
--------------------------------------------------------------------------- */
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  gap: 16px;
}

.btn-next {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: var(--color-orange);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  padding: 15px 32px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  flex: 1;
  text-align: center;
  text-transform: uppercase;
}

.btn-next:hover { background: #c05200; }
.btn-next:active { transform: scale(0.98); }

.btn-back {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-muted);
  cursor: pointer;
  padding: 8px 4px;
  white-space: nowrap;
  text-decoration: underline;
  flex-shrink: 0;
}

.btn-back:hover { color: var(--color-navy); }

@media (max-width: 480px) {
  .nav-row { flex-direction: column-reverse; }
  .btn-next { width: 100%; }
  .btn-back { width: 100%; text-align: center; }
}

/* ---------------------------------------------------------------------------
   Error message
--------------------------------------------------------------------------- */
.error-msg {
  color: #c0392b;
  font-size: 14px;
  background: #fdf0ee;
  border: 1px solid #f1c0ba;
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 12px;
}

/* ---------------------------------------------------------------------------
   Inline notices
--------------------------------------------------------------------------- */
.inline-notice {
  font-size: 14px;
  color: var(--color-orange);
  background: #fff3e0;
  border: 1px solid #f5c892;
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 12px;
  line-height: 1.5;
}

/* ---------------------------------------------------------------------------
   Spinner
--------------------------------------------------------------------------- */
.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid var(--color-border);
  border-top-color: var(--color-orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------------------------------------------------------------------------
   Footer
--------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-navy);
  padding: 18px 24px;
  text-align: center;
  font-size: 13px;
  color: #6a7f8c;
  font-family: var(--font-body);
}

.site-footer a {
  color: #8fa5b8;
  text-decoration: none;
}
