/* ============================================================
   PIP — Site Survey Stylesheet
   site-survey.html
   ============================================================ */

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

    :root {
      --navy: #002B5B;
      --navy-light: #0A4AA3;
      --ice: #56C7F2;
      --lime: #B8FF2C;
      --bg: #F7FAFD;
      --surface: #FFFFFF;
      --border: #DDE6F2;
      --text: #1B2430;
      --muted: #5B6678;
      --success: #17A34A;
      --error: #DC2626;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: 'Inter', sans-serif;
      color: var(--text);
      background: var(--bg);
      -webkit-font-smoothing: antialiased;
    }

    /* ── NAV ─────────────────────────────────────────────── */
    .top-bar {
      background: var(--navy);
      padding: 14px 48px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .top-bar img {
      height: 36px;
      width: auto;
      display: block;
    }

    .top-bar-tag {
      font-size: .72rem;
      font-weight: 600;
      color: rgba(255, 255, 255, .4);
      letter-spacing: .06em;
    }

    /* ── HERO ─────────────────────────────────────────────── */
    .hero {
      background: linear-gradient(135deg, var(--navy) 0%, #0A3A7A 100%);
      padding: 64px 48px 56px;
      text-align: center;
      position: relative;
      overflow: hidden;
    }

    .hero::before {
      content: '';
      position: absolute;
      inset: 0;
      background-image: url('../img/watermark-PIP-3.png');
      background-repeat: repeat;
      background-size: auto;
      opacity: .03;
      pointer-events: none;
    }

    .hero-inner {
      max-width: 680px;
      margin: 0 auto;
      position: relative;
      z-index: 1;
    }

    .hero-chip {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      background: rgba(86, 199, 242, .12);
      border: 1px solid rgba(86, 199, 242, .25);
      border-radius: 999px;
      padding: 6px 16px;
      font-size: .72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .12em;
      color: var(--ice);
      margin-bottom: 20px;
    }

    .hero-chip::before {
      content: '';
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--ice);
    }

    .hero h1 {
      font-family: 'Montserrat', sans-serif;
      font-size: clamp(1.7rem, 3.5vw, 2.5rem);
      font-weight: 800;
      color: #fff;
      line-height: 1.2;
      margin-bottom: 16px;
    }

    .hero p {
      font-size: 1rem;
      color: rgba(255, 255, 255, .65);
      line-height: 1.75;
      margin-bottom: 32px;
    }

    .hero-stats {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 40px;
      flex-wrap: wrap;
    }

    .hero-stat {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: .82rem;
      color: rgba(255, 255, 255, .5);
      font-weight: 500;
    }

    .hero-stat svg {
      width: 15px;
      height: 15px;
      color: var(--ice);
    }

    /* ── PROGRESS ─────────────────────────────────────────── */
    .progress-bar-wrap {
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      padding: 16px 48px;
      position: sticky;
      top: 0;
      z-index: 50;
    }

    .progress-bar-inner {
      max-width: 760px;
      margin: 0 auto;
    }

    .progress-steps {
      display: flex;
      align-items: center;
      gap: 0;
    }

    .progress-step-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      position: relative;
    }

    .progress-step-item:not(:last-child)::after {
      content: '';
      position: absolute;
      left: 50%;
      right: -50%;
      top: 12px;
      height: 2px;
      background: var(--border);
      z-index: 0;
    }

    .progress-step-item.done:not(:last-child)::after {
      background: var(--navy);
    }

    .step-circle {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      border: 2px solid var(--border);
      background: var(--surface);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: .65rem;
      font-weight: 800;
      color: var(--muted);
      position: relative;
      z-index: 1;
      transition: all .3s;
    }

    .progress-step-item.active .step-circle {
      border-color: var(--navy);
      background: var(--navy);
      color: #fff;
    }

    .progress-step-item.done .step-circle {
      border-color: var(--success);
      background: var(--success);
      color: #fff;
    }

    .step-label {
      font-size: .62rem;
      font-weight: 600;
      color: var(--muted);
      text-align: center;
      white-space: nowrap;
    }

    .progress-step-item.active .step-label {
      color: var(--navy);
      font-weight: 700;
    }

    .progress-step-item.done .step-label {
      color: var(--success);
    }

    /* ── FORM LAYOUT ──────────────────────────────────────── */
    .form-wrap {
      max-width: 760px;
      margin: 0 auto;
      padding: 48px 48px 80px;
    }

    .form-section {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 16px;
      overflow: hidden;
      margin-bottom: 24px;
      scroll-margin-top: 80px;
    }

    .section-header {
      padding: 20px 28px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      user-select: none;
    }

    .section-header:hover { background: rgba(0,43,91,.02); }

    .section-chevron {
      margin-left: auto;
      width: 20px;
      height: 20px;
      color: var(--muted);
      flex-shrink: 0;
      transition: transform .25s ease;
    }

    .form-section.collapsed .section-chevron { transform: rotate(-90deg); }
    .form-section.collapsed .section-body { display: none; }
    .form-section.collapsed .section-header { border-bottom-color: transparent; }

    .section-num.complete {
      background: var(--success);
      transition: background .3s ease;
    }

    .section-num {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: var(--navy);
      color: #fff;
      font-family: 'Montserrat', sans-serif;
      font-size: .78rem;
      font-weight: 800;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .section-header h2 {
      font-family: 'Montserrat', sans-serif;
      font-size: .95rem;
      font-weight: 700;
      color: var(--navy);
    }

    .section-body {
      padding: 28px;
      display: flex;
      flex-direction: column;
      gap: 24px;
    }

    /* Field styles */
    .field {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .field-label {
      font-size: .7rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .09em;
      color: var(--muted);
    }

    .field-hint {
      font-size: .78rem;
      color: var(--muted);
      margin-top: -4px;
      line-height: 1.55;
    }

    .row-2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }

    .row-3 {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 16px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select {
      width: 100%;
      height: 50px;
      background: var(--bg);
      border: 1.5px solid var(--border);
      border-radius: 12px;
      padding: 0 14px;
      font-family: 'Inter', sans-serif;
      font-size: .9rem;
      color: var(--text);
      outline: none;
      appearance: none;
      transition: border-color .15s, box-shadow .15s;
    }

    input::placeholder {
      color: #b0bac8;
    }

    input:focus,
    select:focus {
      border-color: var(--ice);
      box-shadow: 0 0 0 3px rgba(86, 199, 242, .15);
      background: var(--surface);
    }

    select {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235B6678' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 14px center;
      padding-right: 40px;
      cursor: pointer;
    }

    textarea {
      width: 100%;
      min-height: 120px;
      background: var(--bg);
      border: 1.5px solid var(--border);
      border-radius: 12px;
      padding: 14px;
      font-family: 'Inter', sans-serif;
      font-size: .9rem;
      color: var(--text);
      outline: none;
      resize: vertical;
      transition: border-color .15s, box-shadow .15s;
    }

    textarea::placeholder {
      color: #b0bac8;
    }

    textarea:focus {
      border-color: var(--ice);
      box-shadow: 0 0 0 3px rgba(86, 199, 242, .15);
      background: var(--surface);
    }

    /* Choice cards */
    .choice-group {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .choice-card {
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 11px 18px;
      border-radius: 12px;
      border: 1.5px solid var(--border);
      background: var(--bg);
      cursor: pointer;
      font-size: .87rem;
      font-weight: 500;
      color: var(--text);
      transition: border-color .15s, background .15s;
      user-select: none;
    }

    .choice-card input {
      accent-color: var(--navy);
      flex-shrink: 0;
    }

    .choice-card:hover {
      border-color: var(--ice);
    }

    .choice-card.sel {
      border-color: var(--navy);
      background: rgba(0, 43, 91, .05);
      color: var(--navy);
      font-weight: 600;
    }

    /* Check grid */
    .check-group {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .check-card {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 13px 16px;
      border-radius: 12px;
      border: 1.5px solid var(--border);
      background: var(--bg);
      cursor: pointer;
      font-size: .85rem;
      font-weight: 500;
      color: var(--text);
      transition: border-color .15s, background .15s;
      user-select: none;
    }

    .check-card input {
      accent-color: var(--navy);
      flex-shrink: 0;
    }

    .check-card:hover {
      border-color: var(--ice);
    }

    .check-card.sel {
      border-color: var(--navy);
      background: rgba(0, 43, 91, .05);
      color: var(--navy);
      font-weight: 600;
    }

    /* Upload */
    .upload-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .upload-zone {
      border: 1.5px dashed var(--border);
      border-radius: 12px;
      padding: 20px 14px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      text-align: center;
      cursor: pointer;
      transition: border-color .15s, background .15s;
      position: relative;
    }

    .upload-zone:hover {
      border-color: var(--ice);
      background: rgba(86, 199, 242, .03);
    }

    .upload-zone.uploaded {
      border-color: var(--navy);
      border-style: solid;
      background: rgba(0, 43, 91, .04);
    }

    .upload-zone input[type="file"] {
      position: absolute;
      inset: 0;
      opacity: 0;
      cursor: pointer;
      width: 100%;
      height: 100%;
    }

    .upload-icon {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      background: rgba(0, 43, 91, .06);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .upload-icon svg {
      width: 18px;
      height: 18px;
      color: var(--navy-light);
    }

    .upload-zone.uploaded .upload-icon {
      background: rgba(23, 163, 74, .1);
    }

    .upload-zone.uploaded .upload-icon svg {
      color: var(--success);
    }

    .upload-zone h4 {
      font-size: .82rem;
      font-weight: 700;
      color: var(--text);
    }

    .upload-zone p {
      font-size: .7rem;
      color: var(--muted);
    }

    .upload-req-label {
      font-size: .68rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .08em;
      color: var(--muted);
      margin-bottom: -4px;
    }

    /* ── SUBMIT ───────────────────────────────────────────── */
    .submit-section {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 32px 28px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
      text-align: center;
    }

    .submit-section p {
      font-size: .88rem;
      color: var(--muted);
      line-height: 1.65;
      max-width: 480px;
    }

    .btn-submit {
      padding: 15px 48px;
      border-radius: 15px;
      border: none;
      background: var(--navy);
      color: #fff;
      font-family: 'Montserrat', sans-serif;
      font-size: .95rem;
      font-weight: 700;
      cursor: pointer;
      transition: background .15s;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .btn-submit:hover {
      background: var(--navy-light);
    }

    .btn-submit svg {
      width: 16px;
      height: 16px;
    }

    .submit-note {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: .75rem;
      color: var(--muted);
    }

    .submit-note svg {
      width: 13px;
      height: 13px;
      flex-shrink: 0;
    }

    /* ── THANK YOU ────────────────────────────────────────── */
    .thankyou {
      display: none;
      min-height: 70vh;
      align-items: center;
      justify-content: center;
      padding: 80px 48px;
    }

    .thankyou.show {
      display: flex;
    }

    .thankyou-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 24px;
      padding: 56px 48px;
      max-width: 560px;
      width: 100%;
      text-align: center;
    }

    .ty-icon {
      width: 80px;
      height: 80px;
      border-radius: 50%;
      background: rgba(23, 163, 74, .08);
      border: 2px solid rgba(23, 163, 74, .2);
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 28px;
    }

    .ty-icon svg {
      width: 36px;
      height: 36px;
      color: var(--success);
    }

    .thankyou-card h2 {
      font-family: 'Montserrat', sans-serif;
      font-size: 1.7rem;
      font-weight: 800;
      color: var(--navy);
      margin-bottom: 12px;
    }

    .thankyou-card p {
      font-size: .93rem;
      color: var(--muted);
      line-height: 1.75;
      margin-bottom: 8px;
    }

    .ty-divider {
      height: 1px;
      background: var(--border);
      margin: 28px 0;
    }

    .ty-detail {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      text-align: left;
      padding: 14px 0;
      border-bottom: 1px solid var(--border);
    }

    .ty-detail:last-child {
      border-bottom: none;
    }

    .ty-detail svg {
      width: 18px;
      height: 18px;
      color: var(--navy);
      flex-shrink: 0;
      margin-top: 1px;
    }

    .ty-detail-body h4 {
      font-size: .87rem;
      font-weight: 700;
      color: var(--navy);
      margin-bottom: 2px;
    }

    .ty-detail-body p {
      font-size: .82rem;
      color: var(--muted);
      line-height: 1.55;
    }

    /* ── SPINNER ──────────────────────────────────────────── */
    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    .spinner {
      width: 18px;
      height: 18px;
      border: 2px solid rgba(255, 255, 255, .3);
      border-top-color: #fff;
      border-radius: 50%;
      animation: spin .7s linear infinite;
    }

    /* ── FOOTER ───────────────────────────────────────────── */
    footer {
      background: var(--navy);
      padding: 28px 48px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 16px;
    }

    footer img {
      height: 28px;
      width: auto;
    }

    footer p {
      font-size: .78rem;
      color: rgba(255, 255, 255, .35);
    }

/* See responsive rules below */
@media (max-width: 640px) {

  /* ── Gutters ── */
  .top-bar,
  .hero,
  .progress-bar-wrap,
  .form-wrap,
  footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* ── Hero ── */
  .hero { padding-top: 40px; padding-bottom: 36px; }
  .hero-stats { gap: 20px; }

  /* ── Progress bar — 7 steps, hide labels ── */
  .progress-bar-wrap { padding-top: 12px; padding-bottom: 12px; }

  /* ── Field grid — always stack ── */
  .row-2,
  .row-3 { grid-template-columns: 1fr; }
  .check-group { grid-template-columns: 1fr; }
  .upload-grid { grid-template-columns: 1fr; }
  .step-label { display: none; }

  /* ── Form layout ── */
  .form-wrap { padding-top: 28px; padding-bottom: 48px; }
  .section-header { padding: 16px 20px; }
  .section-body { padding: 20px; gap: 20px; }

  /* ── iOS auto-zoom prevention — inputs < 16px trigger zoom on focus ── */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea { font-size: 1rem; }

  /* ── Tap targets — minimum 44px ── */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select { height: 52px; }
  .choice-card { padding: 13px 16px; min-height: 44px; }
  .check-card  { padding: 14px 16px; min-height: 44px; }

  /* ── Submit button — full width ── */
  .btn-submit { width: 100%; justify-content: center; }

  /* ── Thank you ── */
  .thankyou { padding: 40px 20px; }
  .thankyou-card { padding: 36px 20px; }

  /* ── Footer ── */
  footer { flex-direction: column; gap: 8px; }
}

@media (max-width: 400px) {

  /* ── Extra-small phones — tighten progress circles ── */
  .step-circle { width: 20px; height: 20px; font-size: .58rem; }

  /* ── Tighter section padding ── */
  .section-body { padding: 16px; gap: 18px; }
  .section-header { padding: 14px 16px; }
  .form-wrap { padding-left: 12px; padding-right: 12px; }
  .top-bar, .hero, .progress-bar-wrap, footer { padding-left: 16px; padding-right: 16px; }
}
