/* ============================================
   FREQ 10 - Job Finder Tool
   Brand Stylesheet
   ============================================ */

/* --- Brand Palette --- */
:root {
  --bg-primary: #080C14;
  --bg-secondary: #0F1520;
  --bg-card: #141C2B;
  --bg-elevated: #1A2436;
  --accent-cyan: #00D4FF;
  --accent-cyan-dim: rgba(0, 212, 255, 0.15);
  --accent-cyan-glow: rgba(0, 212, 255, 0.3);
  --accent-orange: #FF6B35;
  --accent-orange-hover: #FF8255;
  --text-primary: #F5F5F7;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --border: #1E293B;
  --border-light: #2D3A4D;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Background Effect --- */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(0, 212, 255, 0.04) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(255, 107, 53, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* --- Layout --- */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* --- Page Sections --- */
.page {
  display: none;
  min-height: 100vh;
  padding: 40px 0 60px;
  animation: fadeIn 0.5s ease;
}

.page.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

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

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

/* --- Logo & Navigation --- */
.logo {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 48px;
  text-align: center;
}

.logo img {
  max-height: 40px;
  width: auto;
}

/* --- Typography --- */
h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

h1 .highlight {
  color: var(--accent-cyan);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
}

.subhead {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.body-text {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 36px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  min-height: 52px;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-orange);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
  background: var(--accent-orange-hover);
  box-shadow: 0 6px 28px rgba(255, 107, 53, 0.4);
  transform: translateY(-2px);
}

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

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
}

.btn-answer {
  width: 100%;
  padding: 18px 24px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 1.125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.btn-answer:hover {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.1);
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* --- Upload Zone --- */
.upload-zone {
  width: 100%;
  max-width: 520px;
  padding: 48px 32px;
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-secondary);
  margin-bottom: 16px;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.08);
}

.upload-zone .icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}

.upload-zone .label {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.upload-zone .hint {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.upload-zone input[type="file"] {
  display: none;
}

.file-selected {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  width: 100%;
  max-width: 520px;
}

.file-selected.visible {
  display: flex;
}

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

.file-selected .file-size {
  font-size: 0.8125rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.file-selected .remove-file {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 4px;
  transition: color var(--transition);
}

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

/* --- Progress Bar --- */
.progress-bar {
  width: 100%;
  max-width: 480px;
  margin-bottom: 48px;
}

.progress-bar .steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.progress-bar .step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: all var(--transition);
}

.progress-bar .step-dot.active {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan-glow);
}

.progress-bar .step-dot.done {
  background: var(--success);
}

.progress-bar .step-line {
  width: 40px;
  height: 2px;
  background: var(--border);
  transition: background var(--transition);
}

.progress-bar .step-line.done {
  background: var(--success);
}

.progress-label {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 12px;
  font-weight: 500;
}

/* --- Question Card --- */
.question-card {
  width: 100%;
  max-width: 520px;
  text-align: center;
  animation: slideUp 0.4s ease;
}

.question-card .question-text {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 36px;
  color: var(--text-primary);
}

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

/* --- Analysis Loading --- */
.analysis-loading {
  display: none;
  text-align: center;
  padding: 40px 0;
}

.analysis-loading.visible {
  display: block;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

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

.analysis-loading .status-text {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* --- Results Page --- */
.results-wrapper {
  width: 100%;
  max-width: 600px;
  animation: slideUp 0.5s ease;
}

/* Technical Analysis Card */
.tech-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
}

.tech-card .card-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.tech-card .track-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  word-break: break-word;
}

.tech-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.metric {
  text-align: center;
  padding: 16px 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.metric .metric-icon {
  font-size: 1.25rem;
  margin-bottom: 6px;
  display: block;
}

.metric .metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 2px;
}

.metric .metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Strategic Function Card */
.strategy-card {
  background: var(--bg-card);
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.strategy-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-orange));
}

.strategy-card .function-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.strategy-card .function-name {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-cyan);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.strategy-card .strategy-body {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.strategy-card .why-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.strategy-card .why-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.strategy-card .next-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent-orange);
  margin-bottom: 6px;
}

.strategy-card .next-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Email Capture Form --- */
.email-capture {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}

.email-capture h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.email-capture .capture-benefits {
  list-style: none;
  padding: 0;
  margin-bottom: 24px;
  text-align: left;
}

.email-capture .capture-benefits li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  padding: 6px 0;
  padding-left: 28px;
  position: relative;
}

.email-capture .capture-benefits li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.form-group {
  margin-bottom: 14px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 1rem;
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-dim);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:read-only {
  opacity: 0.7;
  cursor: default;
}

.email-capture .btn-primary {
  width: 100%;
  margin-top: 8px;
}

/* --- Success State --- */
.success-message {
  display: none;
  text-align: center;
  padding: 32px;
  animation: slideUp 0.4s ease;
}

.success-message.visible {
  display: block;
}

.success-message .check-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.success-message h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.success-message p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* --- Manual Fallback --- */
.manual-fallback {
  display: none;
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 24px;
}

.manual-fallback.visible {
  display: block;
}

.manual-fallback h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.manual-fallback p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.manual-fallback .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 32px 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* --- Error Toast --- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-elevated);
  border: 1px solid var(--error);
  color: var(--text-primary);
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  z-index: 1000;
  transition: transform 0.3s ease;
  max-width: 90%;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .page {
    padding: 24px 0 40px;
  }

  h1 {
    font-size: 1.75rem;
  }

  .upload-zone {
    padding: 36px 20px;
  }

  .tech-metrics {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .metric {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: left;
    padding: 14px 16px;
  }

  .metric .metric-icon {
    margin-bottom: 0;
  }

  .tech-card,
  .strategy-card,
  .email-capture {
    padding: 24px 20px;
  }

  .strategy-card .function-name {
    font-size: 1.625rem;
  }

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

  .btn {
    min-height: 48px;
    padding: 14px 28px;
    font-size: 1rem;
  }

  .btn-answer {
    padding: 16px 20px;
    font-size: 1rem;
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: 1.5rem;
  }

  .subhead {
    font-size: 1.0625rem;
  }
}
