/* Version: 1.0.0 */
/* Job Application Form Styles - The Graphite Lab */

/* ========================================
   GLOBAL VARIABLES
   ======================================== */
:root {
  /* Primary Brand Colors */
  --color-tangerine: #E96600;
  --color-marigold: #FCB500;
  --color-sand: #f26965;
  
  /* Secondary Brand Colors */
  --color-navy: #242965;
  --color-cerulean: #82BEE8;
  --color-ice: #DFF0FA;
  
  /* Neutral Colors */
  --color-graphite: #3A3938;
  --color-granite: #E1E1E1;
  --color-alabaster: #FFFFFF;
  
  /* Supporting/Semantic Colors */
  --color-error: #CB2D2D;
  --color-success: #319A49;
  --color-warning: #FEC42A;
  --color-info: #4692DF;
  
  /* Typography */
  --font-body: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  
  /* Spacing */
  --space-xs: 8px;
  --space-s: 16px;
  --space-m: 24px;
  --space-l: 32px;
  --space-xl: 48px;
  
  /* Border Radius */
  --radius-s: 6px;
  --radius-m: 8px;
  --radius-l: 12px;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-graphite);
  background: #f9fafb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========================================
   LAYOUT
   ======================================== */
.site-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 24px;
  background: var(--color-marigold);
  border-bottom: 3px solid var(--color-tangerine);
  box-shadow: 0 4px 12px rgba(233, 102, 0, 0.2);
}

.header-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.brand-logo {
  display: flex;
  align-items: center;
}

.logo-image {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-alabaster);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-alabaster);
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.site-main {
  flex: 1;
  padding: 0 var(--space-s) var(--space-l);
}

/* ========================================
   PROGRESS BAR
   ======================================== */
.progress-wrapper {
  background: var(--color-alabaster);
  padding: var(--space-m) var(--space-s);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: var(--space-m);
}

.progress-bar {
  height: 100%;
  background: var(--color-marigold);
  border-radius: 20px;
  transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(252, 181, 0, 0.4);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.progress-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 300ms;
}

.progress-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  border: 3px solid transparent;
  transition: all 300ms;
}

.progress-step.active .progress-step-number {
  background: var(--color-marigold);
  color: var(--color-graphite);
  border-color: var(--color-tangerine);
  box-shadow: 0 4px 12px rgba(252, 181, 0, 0.5);
  transform: scale(1.1);
}

.progress-step.completed .progress-step-number {
  background: var(--color-tangerine);
  color: var(--color-alabaster);
  border-color: var(--color-tangerine);
}

.progress-step.completed .progress-step-number::after {
  content: '✓';
}

.progress-step-label {
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  text-align: center;
  transition: all 300ms;
}

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

.progress-step.completed .progress-step-label {
  color: var(--color-tangerine);
  font-weight: 600;
}

.form-container {
  max-width: 680px;
  margin: var(--space-l) auto 0;
  background: var(--color-alabaster);
  border-radius: var(--radius-l);
  padding: var(--space-l);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-top: 4px solid var(--color-marigold);
}

.site-footer {
  width: 100%;
  padding: 16px 24px;
  background: #f9fafb;
  border-top: 1px solid var(--color-granite);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #6b7280;
  margin-top: var(--space-l);
}

.footer-primary {
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-secondary {
  font-size: 11px;
  color: #9ca3af;
}

.footer-separator {
  color: #d1d5db;
}

/* ========================================
   FORM SECTIONS
   ======================================== */
.form-step {
  animation: fadeInSlide 400ms ease-out;
}

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

.form-section {
  margin-bottom: var(--space-l);
  padding-bottom: var(--space-l);
  border-bottom: 2px solid #f3f4f6;
}

.form-section:last-of-type {
  border-bottom: none;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-m);
  padding-bottom: var(--space-s);
  border-bottom: 3px solid var(--color-marigold);
  display: inline-block;
}

/* ========================================
   THANK YOU STEP
   ======================================== */
.thank-you-step {
  text-align: center;
  padding: var(--space-xl) 0;
}

.thank-you-content {
  max-width: 600px;
  margin: 0 auto;
}

.success-icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-l);
  animation: checkmarkBounce 800ms ease-out;
}

.success-icon svg {
  color: var(--color-success);
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 4px 12px rgba(49, 154, 73, 0.3));
}

@keyframes checkmarkBounce {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(0deg);
  }
  70% {
    transform: scale(0.9) rotate(0deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.thank-you-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-m);
}

.thank-you-message {
  margin-bottom: var(--space-xl);
  padding: var(--space-m);
  background: #fffbf5;
  border-radius: var(--radius-l);
  border: 2px solid var(--color-marigold);
  box-shadow: 0 4px 16px rgba(252, 181, 0, 0.2);
}

.thank-you-message p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-graphite);
  margin: 0;
}

.thank-you-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-s);
}

.thank-you-actions .btn {
  text-decoration: none;
}

.assessment-intro {
  background: #fffbf5;
  padding: var(--space-s);
  border-radius: var(--radius-m);
  margin-bottom: var(--space-m);
  border-left: 4px solid var(--color-marigold);
  box-shadow: 0 2px 8px rgba(252, 181, 0, 0.1);
}

.assessment-intro p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-navy);
}

.attestation-text {
  background: #f9fafb;
  padding: var(--space-m);
  border-radius: var(--radius-m);
  margin-bottom: var(--space-m);
  border: 1px solid var(--color-granite);
}

.attestation-text p {
  margin-bottom: var(--space-s);
  font-size: 14px;
  line-height: 1.7;
  color: #374151;
}

.attestation-text p:last-child {
  margin-bottom: 0;
}

.attestation-text strong {
  color: var(--color-graphite);
  font-weight: 600;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-s);
  margin-bottom: var(--space-s);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-s);
}

.form-group label {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-graphite);
}

.label-block {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-graphite);
  margin-bottom: 8px;
  display: block;
}

.required {
  color: var(--color-error);
  font-weight: 700;
}

.help-text {
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
select,
textarea {
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-s);
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--color-graphite);
  background: var(--color-alabaster);
  transition: all 200ms;
  width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  outline: 3px solid var(--color-marigold);
  outline-offset: 0;
  border-color: var(--color-marigold);
  box-shadow: 0 0 0 3px rgba(252, 181, 0, 0.1);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
select:hover,
textarea:hover {
  border-color: #9ca3af;
}

input.error,
select.error,
textarea.error {
  border-color: var(--color-error);
  border-width: 2px;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233A3938' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ========================================
   RADIO BUTTONS
   ======================================== */
.radio-group {
  display: flex;
  gap: var(--space-m);
  flex-wrap: wrap;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 12px 20px;
  border: 2px solid #d1d5db;
  border-radius: var(--radius-m);
  background: var(--color-alabaster);
  transition: all 200ms;
  min-height: 48px;
}

.radio-label:hover {
  border-color: var(--color-marigold);
  background: #fffbf5;
}

.radio-label input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--color-marigold);
}

.radio-label input[type="radio"]:checked + span {
  font-weight: 600;
  color: var(--color-navy);
}

.radio-label:has(input:checked) {
  border-color: var(--color-marigold);
  background: #fffbf5;
  border-width: 2px;
}

/* ========================================
   FILE UPLOAD
   ======================================== */
.file-upload-zone {
  border: 2px dashed #d1d5db;
  border-radius: var(--radius-m);
  padding: var(--space-l);
  text-align: center;
  cursor: pointer;
  transition: all 200ms;
  background: #fafafa;
  position: relative;
}

.file-upload-zone:hover {
  border-color: var(--color-marigold);
  background: #fffbf5;
  box-shadow: 0 4px 12px rgba(252, 181, 0, 0.2);
}

.file-upload-zone.dragover {
  border-color: var(--color-tangerine);
  background: #fffbf5;
  border-style: solid;
  box-shadow: 0 6px 20px rgba(252, 181, 0, 0.3);
}

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

.file-upload-message {
  pointer-events: none;
}

.upload-icon {
  color: var(--color-marigold);
  margin-bottom: 12px;
}

.file-upload-message p {
  margin: 8px 0;
  color: var(--color-graphite);
}

.file-upload-message strong {
  color: var(--color-navy);
  font-weight: 600;
}

.file-help {
  font-size: 13px;
  color: #6b7280;
}

.file-list {
  margin-top: var(--space-s);
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-m);
  margin-bottom: 8px;
}

.file-icon {
  color: var(--color-marigold);
  flex-shrink: 0;
}

.file-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-graphite);
  word-break: break-word;
}

.file-size {
  font-size: 13px;
  color: #6b7280;
  flex-shrink: 0;
}

.btn-remove-file {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 24px;
  cursor: pointer;
  border-radius: var(--radius-s);
  transition: all 200ms;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-remove-file:hover {
  background: #fee2e2;
  color: var(--color-error);
}

/* ========================================
   SIGNATURE PAD
   ======================================== */
.signature-group {
  margin-top: var(--space-m);
}

.signature-container {
  position: relative;
  border: 2px solid #d1d5db;
  border-radius: var(--radius-m);
  background: var(--color-alabaster);
  padding: 8px;
  touch-action: none;
  -ms-touch-action: none;
}

#signaturePad {
  display: block;
  width: 100%;
  height: 200px;
  cursor: crosshair;
  touch-action: none;
  -ms-touch-action: none;
  border-radius: var(--radius-s);
}

.btn-clear-signature {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px 16px;
  background: var(--color-alabaster);
  border: 1px solid #d1d5db;
  border-radius: var(--radius-s);
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 200ms;
  z-index: 10;
}

.btn-clear-signature:hover {
  background: #fee2e2;
  color: var(--color-error);
  border-color: var(--color-error);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-m);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 200ms;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
}

.btn.primary {
  background: var(--color-marigold);
  color: var(--color-alabaster);
  box-shadow: 0 4px 12px rgba(252, 181, 0, 0.3);
  font-weight: 700;
}

.btn.primary:hover {
  background: var(--color-tangerine);
  color: var(--color-alabaster);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 102, 0, 0.4);
}

.btn.secondary {
  background: var(--color-alabaster);
  color: var(--color-graphite);
  border: 2px solid var(--color-granite);
}

.btn.secondary:hover {
  background: #f9fafb;
  border-color: var(--color-marigold);
  color: var(--color-tangerine);
  transform: translateY(-1px);
}

.btn.primary:active,
.btn.secondary:active {
  transform: translateY(0);
}

.btn.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn.large {
  padding: 16px 32px;
  font-size: 16px;
  min-height: 56px;
}

.btn svg {
  width: 20px;
  height: 20px;
}

.form-navigation {
  margin-top: var(--space-xl);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-s);
  padding-top: var(--space-m);
  border-top: 2px solid #f3f4f6;
}

.form-navigation:has(#btnPrevious:not([style*="display: none"])) {
  justify-content: space-between;
}

.form-actions {
  margin-top: var(--space-xl);
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  gap: var(--space-s);
}

/* ========================================
   ERROR & VALIDATION
   ======================================== */
.error-message {
  color: var(--color-error);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
}

.error-message::before {
  content: '⚠';
  flex-shrink: 0;
}

.submission-error {
  background: #fee2e2;
  border: 2px solid var(--color-error);
  border-radius: var(--radius-m);
  padding: var(--space-s);
  margin-bottom: var(--space-m);
  text-align: center;
}

.submission-error p {
  margin: 8px 0;
  color: var(--color-error);
}

.submission-error strong {
  font-weight: 700;
}

/* ========================================
   CONDITIONAL FIELDS
   ======================================== */
.conditional-field {
  animation: slideIn 300ms ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   ADDRESS CONTAINER
   ======================================== */
.address-container {
  background: #f9fafb;
  border: 2px solid var(--color-granite);
  border-radius: var(--radius-l);
  padding: var(--space-m);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.address-container .form-group {
  margin-bottom: var(--space-m);
}

.address-container .form-group:last-child,
.address-container .form-row:last-child {
  margin-bottom: 0;
}

.address-container .form-row {
  margin-bottom: 0;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.hidden {
  display: none !important;
}

/* ========================================
   CHARACTER COUNTER
   ======================================== */
.character-counter {
  font-size: 13px;
  color: var(--color-slate);
  margin-top: 6px;
  font-weight: 500;
  text-align: right;
  transition: color 200ms ease;
}

.character-counter.warning {
  color: #dc2626;
  font-weight: 600;
}

/* ========================================
   VIDEO QUESTION INSTRUCTIONS
   ======================================== */
.video-question-instructions {
  background: #f9fafb;
  border-left: 4px solid var(--color-marigold);
  border-radius: var(--radius-m);
  padding: var(--space-s) var(--space-m);
  margin-bottom: var(--space-s);
}

.video-question-instructions p {
  margin: 0;
  padding: 4px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-slate);
}

.video-question-instructions p:first-child {
  font-weight: 600;
  color: var(--color-graphite);
  margin-bottom: 8px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .site-header {
    padding: 12px 16px;
  }

  .header-left {
    gap: 12px;
    flex-direction: row;
  }

  .logo-image {
    height: 32px;
  }

  .logo-text,
  .page-title {
    font-size: 16px;
  }

  .progress-wrapper {
    padding: var(--space-s);
  }

  .progress-steps {
    gap: 4px;
  }

  .progress-step-number {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .progress-step-label {
    font-size: 10px;
  }

  .site-main {
    padding: 0 var(--space-xs) var(--space-s);
  }

  .form-container {
    margin-top: var(--space-s);
    padding: var(--space-s);
    border-radius: var(--radius-m);
  }

  .section-title {
    font-size: 22px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .radio-group {
    flex-direction: column;
    gap: 12px;
  }

  .radio-label {
    width: 100%;
  }

  .form-navigation {
    flex-direction: column-reverse;
  }

  .form-navigation .btn {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .footer-primary {
    flex-direction: column;
    gap: 4px;
  }

  .footer-separator {
    display: none;
  }

  .btn.large {
    width: 100%;
  }

  .thank-you-title {
    font-size: 26px;
  }

  .thank-you-message p {
    font-size: 16px;
  }

  .success-icon svg {
    width: 64px;
    height: 64px;
  }

  .thank-you-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .form-container {
    padding: var(--space-s);
  }

  #signaturePad {
    height: 150px;
  }

  .btn-clear-signature {
    position: static;
    width: 100%;
    margin-top: 8px;
  }
}

/* ========================================
   FOCUS INDICATORS (ACCESSIBILITY)
   ======================================== */
*:focus-visible {
  outline: 3px solid var(--color-marigold);
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-marigold);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(252, 181, 0, 0.2);
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  .site-header,
  .site-footer,
  .form-actions {
    display: none;
  }

  .form-container {
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }
}
