/* Gotham fallback stack */
@font-face {
  font-family: 'Gotham';
  src: local('Gotham'), local('Gotham-Book');
  font-weight: 400;
}

@font-face {
  font-family: 'Gotham';
  src: local('Gotham Bold'), local('Gotham-Bold');
  font-weight: 700;
}

:root {
  --pk-navy: #1D2E58;
  --pk-orange: #F16924;
  --pk-orange-light: #f47f3a;
  --pk-cream: #f8f8f9;
  --pk-white: #ffffff;
  --pk-gray: #6b7280;
  --pk-gray-light: #DADBDF;
  --pk-border: #c8c9cd;
  --pk-success: #2d6a4f;
  --radius: 4px;
  --shadow: 0 2px 16px rgba(29,46,88,0.10);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Gotham', 'Barlow', 'Gill Sans', sans-serif;
  background: var(--pk-cream);
  color: var(--pk-navy);
  min-height: 100vh;
  padding: 0 0 60px;
  font-size: 0.92rem;
}

/* HEADER */
.header {
  background: var(--pk-navy);
  padding: 16px 34px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 3px solid var(--pk-orange);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: auto;
  height: 48px;
  object-fit: contain;
}

/* HERO STRIP */
.hero {
  background: linear-gradient(135deg, #1D2E58 0%, #253870 100%);
  padding: 38px 34px 34px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  border: 40px solid rgba(232,96,10,0.12);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 280px;
  height: 280px;
  border: 50px solid rgba(255,255,255,0.04);
  border-radius: 50%;
}

.hero h1 {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: 44px;
  font-weight: 700;
  color: var(--pk-white);
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}

.hero h1 span {
  color: var(--pk-orange);
}

.hero p {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* FORM CARD */
.form-wrap {
  max-width: 660px;
  margin: -24px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

.form-card {
  background: var(--pk-white);
  border-radius: 8px;
  box-shadow: var(--shadow), 0 0 0 1px var(--pk-border);
  overflow: visible;
  animation: slideUp 0.5s ease both;
  margin-top: 35px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SECTION HEADER */
.section-label {
  background: var(--pk-gray-light);
  border-bottom: 1px solid var(--pk-border);
  padding: 12px 28px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pk-gray);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--pk-orange);
  border-radius: 2px;
  flex-shrink: 0;
}

/* FORM BODY */
.form-body {
  padding: 26px 28px 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.field-row.single {
  grid-template-columns: 1fr;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--pk-navy);
  text-transform: uppercase;
}

label .req {
  color: var(--pk-orange);
  margin-left: 2px;
}

input[type="text"],
input[type="date"],
input[type="email"] {
  border: 1.5px solid var(--pk-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: 'Gotham', 'Barlow', 'Gill Sans', sans-serif;
  font-size: 14px;
  color: var(--pk-navy);
  background: var(--pk-white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
}

input:focus {
  border-color: var(--pk-orange);
  box-shadow: 0 0 0 3px rgba(232,96,10,0.1);
}

input::placeholder {
  color: #b0aaa3;
}

/* RADIO GROUP */
.radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 15px;
  border: 1.5px solid var(--pk-border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--pk-gray);
  transition: all 0.18s;
  user-select: none;
}

.radio-option input {
  display: none;
}

.radio-option.selected {
  border-color: var(--pk-orange);
  background: rgba(232,96,10,0.06);
  color: var(--pk-navy);
}

.radio-dot {
  width: 14px;
  height: 14px;
  border: 2px solid var(--pk-border);
  border-radius: 50%;
  transition: all 0.18s;
  flex-shrink: 0;
}

.radio-option.selected .radio-dot {
  border-color: var(--pk-orange);
  background: var(--pk-orange);
  box-shadow: inset 0 0 0 3px white;
}

/* DISABLED RADIO GROUP */
.disabled-group {
  opacity: 0.45;
  pointer-events: none;
}

.disabled-group .radio-option {
  cursor: not-allowed;
}

/* PARTIAL ADDRESS CONDITIONAL */
#partialAddressWrap {
  display: none;
  opacity: 0;
  overflow: visible;
  margin-top: 0;
  width: 100%;
}

#partialAddressWrap.visible {
  display: block;
  opacity: 1;
  overflow: visible;
  margin-top: 20px;
}

#partialAddressWrap[hidden] {
  display: none !important;
}

#fg-partialaddr {
  display: block;
  width: 100%;
  margin-bottom: 26px;
}

#partialAddressList {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  width: 100%;
}

.partial-address-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  position: static;
}

.partial-address-input {
  flex: 1;
  width: 100%;
  position: static;
}

.original-address {
  display: block;
}

.original-address .partial-address-input {
  width: 100%;
}

.btn-add-address,
.btn-remove-address {
  border: none;
  border-radius: var(--radius);
  font-family: 'Gotham', 'Barlow', 'Gill Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  position: static;
}

.btn-add-address {
  display: inline-block;
  background: var(--pk-navy);
  color: white;
  padding: 10px 14px;
  margin-top: 6px;
  margin-bottom: 24px;
  z-index: auto;
}

.btn-add-address:hover {
  background: #243460;
}

.btn-remove-address {
  background: #f1f1f1;
  color: var(--pk-navy);
  padding: 10px 12px;
  border: 1px solid var(--pk-border);
  flex-shrink: 0;
}

.btn-remove-address:hover {
  background: #ffe8e0;
  color: var(--pk-orange);
  border-color: var(--pk-orange);
}

.partial-address-input:disabled,
.btn-add-address:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* DIVIDER */
.divider {
  height: 1px;
  background: var(--pk-border);
  margin: 8px 0 8px;
}

/* SIGNATURE PAD */
.sig-area {
  padding: 0 28px 28px;
}

.sig-canvas-wrap {
  border: 1.5px solid var(--pk-border);
  border-radius: var(--radius);
  background: #fdfcfb;
  position: relative;
  overflow: hidden;
  cursor: crosshair;
  transition: border-color 0.2s;
}

.sig-canvas-wrap:focus-within,
.sig-canvas-wrap.active {
  border-color: var(--pk-orange);
  box-shadow: 0 0 0 3px rgba(232,96,10,0.1);
}

#sigCanvas {
  display: block;
  width: 100%;
  height: 120px;
  touch-action: none;
}

.sig-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s;
}

.sig-placeholder.hidden {
  opacity: 0;
}

.sig-placeholder svg {
  opacity: 0.25;
}

.sig-placeholder p {
  font-size: 13px;
  color: #bbb;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.sig-baseline {
  position: absolute;
  bottom: 36px;
  left: 32px;
  right: 32px;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    var(--pk-border) 0,
    var(--pk-border) 6px,
    transparent 6px,
    transparent 12px
  );
}

.sig-controls {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.btn-clear-sig {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--pk-gray);
  cursor: pointer;
  padding: 4px 0;
  font-family: 'Gotham', 'Barlow', 'Gill Sans', sans-serif;
  text-decoration: underline;
  transition: color 0.15s;
}

.btn-clear-sig:hover {
  color: var(--pk-orange);
}

/* ERROR STATE */
.field-error {
  font-size: 11px;
  color: #c0392b;
  margin-top: 2px;
  display: none;
}

.field-group.has-error input,
.field-group.has-error .sig-canvas-wrap {
  border-color: #c0392b !important;
}

.field-group.has-error .field-error {
  display: block;
}

/* SUBMIT */
.form-footer {
  padding: 20px 28px 28px;
  border-top: 1px solid var(--pk-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-note {
  font-size: 12px;
  color: var(--pk-gray);
  line-height: 1.5;
  max-width: 320px;
}

.btn-submit {
  background: var(--pk-orange);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 12px 32px;
  font-family: 'Gotham', 'Barlow', 'Gill Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(232,96,10,0.3);
  white-space: nowrap;
}

.btn-submit:hover {
  background: var(--pk-orange-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232,96,10,0.35);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  background: #ccc;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* SUCCESS OVERLAY */
.success-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,39,68,0.7);
  z-index: 100;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.success-overlay.show {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.success-card {
  background: white;
  border-radius: 10px;
  padding: 48px 40px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  animation: popIn 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-icon {
  width: 64px;
  height: 64px;
  background: rgba(45,106,79,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.success-card h2 {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--pk-navy);
  margin-bottom: 10px;
}

.success-card p {
  font-size: 14px;
  color: var(--pk-gray);
  line-height: 1.6;
  margin-bottom: 24px;
}

.btn-done {
  background: var(--pk-navy);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 12px 32px;
  font-family: 'Gotham', 'Barlow', 'Gill Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-done:hover {
  background: #243460;
}

/* SPINNER */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .header {
    padding: 14px 18px;
  }

  .logo-icon {
    height: 42px;
  }

  .hero {
    padding: 32px 18px 42px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 13px;
  }

  .form-wrap {
    padding: 0 12px;
  }

  .form-body,
  .sig-area,
  .form-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .section-label {
    padding: 12px 20px;
  }

  .form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-submit {
    width: 100%;
    text-align: center;
  }

  #sigCanvas {
    height: 110px;
  }

  .partial-address-item {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-remove-address {
    width: 100%;
  }

  .btn-add-address {
    width: 100%;
  }
}
/* Tighten gap between partial address input and add button */
#partialAddressWrap #fg-partialaddr {
  gap: 0 !important;
  margin-bottom: 2px !important;
}



.partial-address-item {
  margin-bottom: 0 !important;
}

.partial-address-input {
  margin-bottom: 0 !important;
}

.btn-add-address {
  margin-top: 6px !important;
  margin-bottom: 6px !important;
}