/* ============================================
   Upwise Climber Training — Video Analysis
   Brand Colors from Logo:
     Navy:   #0B1D33
     Red:    #C43E1C
     Orange: #E07A2F
     Gold:   #F0A830
     Cream:  #F5E1C0
   ============================================ */

:root {
  --navy: #001c3e;
  --navy-light: #0a2a52;
  --red: #C43E1C;
  --orange: #E07A2F;
  --gold: #F0A830;
  --cream: #F5E1C0;
  --white: #FFFFFF;
  --gray-50: #F8F9FA;
  --gray-100: #F0F1F3;
  --gray-200: #E1E3E6;
  --gray-400: #9CA3AF;
  --gray-600: #6B7280;
  --gray-800: #1F2937;
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Lexend', sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Hero ---- */
.hero {
  background: var(--navy);
  padding: 48px 24px 56px;
  text-align: center;
  color: var(--cream);
}

.logo {
  width: 120px;
  height: auto;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-size: 1.1rem;
  font-weight: 300;
  max-width: 520px;
  margin: 0 auto 32px;
  opacity: 0.9;
  line-height: 1.7;
}

.hero .subtitle strong {
  color: var(--gold);
  font-weight: 600;
}

/* ---- Counter ---- */
.counter-section {
  max-width: 400px;
  margin: 0 auto;
}

.counter-bar-track {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  height: 14px;
  overflow: hidden;
  position: relative;
}

.counter-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--gold), var(--orange), var(--red));
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0%;
  position: relative;
}

.counter-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.25) 0%,
    transparent 60%
  );
  border-radius: 100px;
}

.counter-text {
  margin-top: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(245, 225, 192, 0.8);
}

.counter-text span {
  color: var(--gold);
  font-weight: 700;
  font-size: 1.05rem;
}

/* ---- Instructions ---- */
.instructions {
  margin-bottom: 40px;
}

.instructions h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 20px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--white);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}

.step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.step h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 2px;
}

.step p {
  font-size: 0.9rem;
  color: var(--gray-600);
  font-weight: 300;
}

/* ---- Form ---- */
.form-section {
  padding: 48px 0 64px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

/* ---- Upload Zones ---- */
.upload-group {
  display: flex;
  flex-direction: column;
}

.upload-label {
  margin-bottom: 8px;
}

.upload-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
}

.upload-desc {
  font-size: 0.8rem;
  color: var(--gray-600);
  font-weight: 300;
}

.upload-zone {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--white);
}

.upload-zone:hover {
  border-color: var(--orange);
  background: rgba(224, 122, 47, 0.03);
}

.upload-zone.drag-over {
  border-color: var(--orange);
  background: rgba(224, 122, 47, 0.06);
  transform: scale(1.01);
}

.upload-zone svg {
  color: var(--gray-400);
  margin-bottom: 12px;
}

.upload-zone:hover svg {
  color: var(--orange);
}

.upload-cta {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.upload-cta span {
  color: var(--orange);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upload-formats {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 300;
}

/* File Preview */
.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(240, 168, 48, 0.08);
  border: 1px solid rgba(240, 168, 48, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 8px;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  min-width: 0;
}

.file-info svg {
  flex-shrink: 0;
  color: var(--orange);
}

.file-name {
  font-size: 0.85rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-remove {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}

.file-remove:hover {
  color: var(--red);
}

/* ---- Video hint ---- */
.video-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--gray-600);
  background: rgba(240, 168, 48, 0.08);
  border: 1px solid rgba(240, 168, 48, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 4px;
}

.video-hint svg {
  flex-shrink: 0;
  color: var(--orange);
}

/* ---- Error states ---- */
.form-error-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.form-error-banner svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #dc2626;
}

.field-error {
  font-size: 0.82rem;
  color: #dc2626;
  font-weight: 400;
  margin-top: 5px;
}

.input-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.upload-row-error .upload-zone {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.02);
}

/* ---- Step required badge ---- */
.step-required {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--orange);
  background: rgba(224, 122, 47, 0.1);
  border-radius: 4px;
  padding: 2px 6px;
  vertical-align: middle;
  margin-left: 6px;
}

/* ---- Fields ---- */
.field {
  display: flex;
  flex-direction: column;
}

.field label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.required {
  color: var(--red);
}

.optional {
  font-weight: 300;
  color: var(--gray-400);
  font-size: 0.85rem;
}

.field input,
.field textarea {
  font-family: 'Lexend', sans-serif;
  font-size: 0.95rem;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-800);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--gray-400);
  font-weight: 300;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(224, 122, 47, 0.12);
}

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

/* ---- Submit Button ---- */
.btn-submit {
  font-family: 'Lexend', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--red));
  border: none;
  border-radius: var(--radius);
  padding: 16px 32px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  position: relative;
  overflow: hidden;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(196, 62, 28, 0.3);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

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

/* ---- Success ---- */
.success-message,
.closed-message {
  padding: 64px 0;
  text-align: center;
}

.success-card,
.closed-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 48px 32px;
  border: 1px solid var(--gray-200);
}

.success-icon svg {
  color: var(--orange);
  margin-bottom: 16px;
}

.closed-icon svg {
  color: var(--red);
  margin-bottom: 16px;
}

.success-card h2,
.closed-card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

.success-card p,
.closed-card p {
  font-size: 1rem;
  color: var(--gray-600);
  font-weight: 300;
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---- Footer ---- */
footer {
  background: var(--navy);
  color: rgba(245, 225, 192, 0.5);
  text-align: center;
  padding: 24px;
  font-size: 0.8rem;
  font-weight: 300;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }

  .form-section {
    padding: 32px 0 48px;
  }

  .upload-zone {
    padding: 24px 16px;
  }

  .btn-submit {
    width: 100%;
  }
}
