/* ═══════════════════════════════════════════════════
   SYSTEMOPS AUTOMATION — CLIENT INTAKE FORM
   ═══════════════════════════════════════════════════ */

:root {
  --teal:          #0e8585;
  --teal-dark:     #0a6b6b;
  --teal-light:    #d9f0ee;
  --teal-mid:      #b2e0dc;
  --teal-glow:     rgba(14,133,133,0.12);

  --bg:            #f5fafa;
  --surface:       #ffffff;
  --surface-2:     #f0f7f7;
  --border:        #d1e8e6;
  --divider:       #e4f0ef;

  --text:          #1a1f1f;
  --text-muted:    #4f6363;
  --text-faint:    #94a8a8;

  --shadow-sm:     0 1px 4px rgba(14,133,133,0.07);
  --shadow-md:     0 4px 16px rgba(14,133,133,0.1);

  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     12px;
  --radius-full:   9999px;

  --transition:    150ms cubic-bezier(0.16,1,0.3,1);
  --font:          'Inter', 'Helvetica Neue', sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: var(--font); font-size: var(--text-base); color: var(--text); background: var(--bg); line-height: 1.6; min-height: 100dvh; }
img { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
h1,h2,h3 { line-height: 1.25; }
::selection { background: var(--teal-light); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; } }

/* ─── UTILS ─── */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.cond-hidden { display: none !important; }

/* ─── CONTAINER ─── */
.container { max-width: 980px; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }

/* ─── HEADER ─── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 980px; margin-inline: auto;
  padding-inline: clamp(1rem,4vw,2.5rem);
  padding-block: 0.75rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.header-logo { height: 128px; width: auto; }
@media (max-width: 600px) { .header-logo { height: 72px; } }
.header-badge {
  font-size: var(--text-xs); font-weight: 600;
  color: var(--teal); background: var(--teal-light);
  padding: 3px 10px; border-radius: var(--radius-full);
  letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap;
}

/* ─── INTRO ─── */
.intro {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-block: clamp(1.75rem, 4vw, 3rem);
}
.intro-eyebrow {
  font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--teal); margin-bottom: 0.625rem;
}
.intro-title { font-size: clamp(1.5rem, 4vw, 1.75rem); font-weight: 700; color: var(--text); margin-bottom: 0.75rem; }
.intro-title span { color: var(--teal); }
.intro-body { font-size: var(--text-sm); color: var(--text-muted); max-width: 60ch; line-height: 1.7; margin-bottom: 1.25rem; }
.intro-body strong { color: var(--text); font-weight: 600; }
.intro-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.intro-chip {
  font-size: var(--text-xs); font-weight: 500;
  padding: 4px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-full); color: var(--text-muted); background: var(--surface-2);
}

/* ─── PROGRESS ─── */
.progress-wrap { height: 3px; background: var(--border); position: relative; }
.progress-bar { height: 100%; background: var(--teal); width: 0; transition: width 0.4s ease; }
.progress-label { position: absolute; right: clamp(1rem,4vw,2.5rem); top: 8px; font-size: var(--text-xs); color: var(--text-faint); font-weight: 500; }

/* ─── MAIN LAYOUT ─── */
.form-main { padding-block: clamp(1.5rem, 4vw, 3rem); }
.form-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 720px) {
  .form-layout { grid-template-columns: 1fr; }
}

/* ─── SECTION NAV ─── */
.snav {
  position: sticky; top: calc(128px + 1rem + 3px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 0.375rem;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 2px;
}
@media (max-width: 720px) {
  .snav {
    position: static;
    flex-direction: row; flex-wrap: wrap;
    top: auto;
  }
}
.snav-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.5rem; border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 500; color: var(--text-muted);
  text-align: left; transition: background var(--transition), color var(--transition);
  width: 100%;
}
@media (max-width: 720px) { .snav-btn { width: auto; } }
.snav-btn:hover { background: var(--surface-2); color: var(--text); }
.snav-btn.active { background: var(--teal-light); color: var(--teal); font-weight: 600; }
.snav-btn.done .snav-num { background: var(--teal); color: #fff; border-color: var(--teal); }
.snav-num {
  width: 20px; height: 20px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.snav-btn.active .snav-num { background: var(--teal); color: #fff; border-color: var(--teal); }
.snav-label { white-space: nowrap; font-size: var(--text-xs); }
@media (max-width: 720px) { .snav-label { display: none; } }

/* ─── FORM SECTIONS ─── */
.form-section { display: none; }
.form-section.active { display: block; }

/* ─── SECTION HEAD ─── */
.section-head {
  display: flex; align-items: flex-start; gap: 1rem;
  margin-bottom: 1.5rem; padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--divider);
}
.section-num {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  background: var(--teal); color: #fff;
  font-size: var(--text-sm); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.section-title { font-size: clamp(1.1rem, 3vw, 1.375rem); font-weight: 700; color: var(--text); }
.section-desc { font-size: var(--text-sm); color: var(--text-muted); margin-top: 0.25rem; }

/* ─── TIER BANNERS ─── */
.tier-banner {
  display: flex; align-items: flex-start; gap: 0.625rem;
  padding: 0.625rem 1rem; border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 500; margin-bottom: 1.5rem;
  line-height: 1.5;
}
.tier-required { background: #ecfdf5; border: 1px solid #86efac; color: #166534; }
.tier-launch   { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }

/* ─── FIELD GRID ─── */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 560px) { .field-grid { grid-template-columns: 1fr; } }
.span-2 { grid-column: 1 / -1; }

/* ─── FIELD GROUP ─── */
.field-group { display: flex; flex-direction: column; gap: 0.375rem; }
.field-label { font-size: var(--text-sm); font-weight: 600; color: var(--text); }
.opt {
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-faint);
  background: var(--surface-2); border-radius: 3px; padding: 1px 5px;
  margin-left: 4px;
}
.field-input {
  padding: 0.75rem 1rem;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); font-size: var(--text-base);
  color: var(--text); width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-glow); }
.field-input::placeholder { color: var(--text-faint); }
textarea.field-input { resize: vertical; min-height: 90px; line-height: 1.6; }
.field-hint { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; }
.field-warn {
  background: #fff8e6; border: 1px solid #f5c842;
  border-radius: var(--radius-sm); padding: 0.5rem 0.75rem;
  font-size: var(--text-xs); color: #7a5a00; line-height: 1.5;
}

/* ─── PILL / RADIO ROW ─── */
.radio-row { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.radio-pill {
  display: flex; align-items: center; gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 500; color: var(--text-muted);
  cursor: pointer; background: var(--surface); user-select: none;
  transition: all var(--transition);
}
.radio-pill:hover { border-color: var(--teal); color: var(--text); }
.radio-pill:has(input:checked) { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.radio-pill input { display: none; }

/* ─── CHECKBOXES ─── */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 0.375rem; }
.check-label {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.625rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-md); font-size: var(--text-sm);
  cursor: pointer; background: var(--surface);
  transition: border-color var(--transition), background var(--transition);
}
.check-label:hover { border-color: var(--teal); }
.check-label:has(input:checked) { border-color: var(--teal); background: var(--teal-light); }
.check-label input { accent-color: var(--teal); flex-shrink: 0; }

/* ─── FILE INPUT ─── */
.field-file {
  padding: 0.625rem; background: var(--surface-2);
  border: 1.5px dashed var(--border); border-radius: var(--radius-md);
  font-size: var(--text-sm); color: var(--text-muted);
  cursor: pointer; width: 100%;
  transition: border-color var(--transition);
}
.field-file:hover { border-color: var(--teal); }

/* ─── SERVICE SELECTION ROWS ─── */
.svc-row-list {
  display: flex; flex-direction: column;
  border: 1.5px solid var(--border); border-radius: var(--radius-md); overflow: hidden;
}
.svc-row-hdr {
  display: grid; grid-template-columns: 1fr 130px 1fr;
  gap: 0.75rem; align-items: center;
  padding: 0.5rem 1rem;
  background: var(--surface-2); border-bottom: 1.5px solid var(--border);
  font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
}
.svc-row {
  display: grid; grid-template-columns: 1fr 130px 1fr;
  gap: 0.75rem; align-items: center;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--divider); background: var(--surface);
}
.svc-row:last-child { border-bottom: none; }
.svc-row-extra { background: var(--surface-2); }
.svc-row-label { font-size: var(--text-sm); font-weight: 500; color: var(--text); }
.svc-row-divider {
  padding: 0.375rem 1rem;
  font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--teal);
  background: var(--teal-light);
  border-bottom: 1px solid var(--teal-mid); border-top: 1px solid var(--teal-mid);
}
/* Mobile: stack service rows vertically */
@media (max-width: 560px) {
  .svc-row-hdr { display: none; }
  .svc-row {
    grid-template-columns: 1fr;
    gap: 0.5rem; padding: 0.875rem 1rem;
  }
}

/* ─── SERVICE TABS ─── */
.svc-tabs { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--divider); }
.svc-tab {
  padding: 0.375rem 0.875rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: 600;
  color: var(--text-muted); background: var(--surface);
  transition: all var(--transition);
}
.svc-tab:hover { border-color: var(--teal); color: var(--text); }
.svc-tab.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.svc-panel { display: none; }
.svc-panel.active { display: block; }
.svc-panel-title {
  font-size: var(--text-lg); font-weight: 700; color: var(--text);
  margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.svc-panel-title::before { content: ''; width: 4px; height: 1.25em; background: var(--teal); border-radius: 2px; flex-shrink: 0; }

/* ─── REPEATER ─── */
.repeater { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.rep-row {
  display: flex; gap: 0.5rem; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 0.625rem;
}
.rep-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 0.5rem; flex: 1; }
.rep-fields input {
  padding: 0.625rem 0.75rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: var(--text-sm);
  background: var(--surface); width: 100%;
}
.rep-fields input:focus { outline: none; border-color: var(--teal); }
.rep-remove {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  color: var(--text-faint); display: flex; align-items: center;
  justify-content: center; font-size: 14px; flex-shrink: 0; margin-top: 2px;
  transition: background var(--transition), color var(--transition);
}
.rep-remove:hover { background: #fee2e2; color: #dc2626; }
.btn-add {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.375rem 0.875rem; border: 1.5px dashed var(--teal);
  border-radius: var(--radius-md); color: var(--teal);
  font-size: var(--text-sm); font-weight: 600; background: var(--teal-light);
  transition: all var(--transition);
}
.btn-add:hover { background: var(--teal-mid); }

/* ─── DIVIDER ─── */
.divider { border: none; border-top: 1px solid var(--divider); margin-block: 1.75rem; }
.subsection-title {
  font-size: var(--text-sm); font-weight: 700; color: var(--teal);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

/* ─── FORM NAV ─── */
.form-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid var(--divider);
  gap: 0.75rem; flex-wrap: wrap;
}
.form-nav-mid { flex: 1; text-align: center; font-size: var(--text-sm); color: var(--text-faint); font-weight: 500; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.625rem 1.25rem; border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 600;
  transition: all var(--transition); white-space: nowrap; border: 2px solid transparent;
}
.btn-primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }
.btn-ghost:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-submit { background: var(--text); color: #fff; border-color: var(--text); padding: 0.625rem 2rem; }
.btn-submit:hover { background: var(--teal); border-color: var(--teal); }

/* ─── SUCCESS ─── */
.success-state { display: none; max-width: 520px; margin-inline: auto; text-align: center; padding-block: 5rem; }
.success-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--teal-light); display: flex; align-items: center; justify-content: center; margin-inline: auto; margin-bottom: 1.5rem; }
.success-icon svg { color: var(--teal); }
.success-title { font-size: var(--text-xl); font-weight: 700; margin-bottom: 0.75rem; }
.success-body { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.7; }

/* ─── FOOTER ─── */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding-block: 1.25rem; margin-top: 3rem; }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.footer-logo { height: 40px; width: auto; opacity: 0.7; }
.footer-text { font-size: var(--text-xs); color: var(--text-faint); }
