/* ═══════════════════════════════════════════════
   PathFinder LK — Stylesheet
   ═══════════════════════════════════════════════ */

:root {
  --saffron: #E8922F;
  --saffron-light: #F4B45A;
  --saffron-deep: #D47A1A;
  --maroon: #8B1A2B;
  --maroon-deep: #6B1420;
  --navy: #0A1628;
  --navy-mid: #121F36;
  --navy-light: #1A2D4A;
  --teal: #14B8A6;
  --teal-glow: #2DD4BF;
  --cream: #FFF8F0;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-dim: #64748B;
  --green: #22C55E;
  --blue: #3B82F6;
  --purple: #A855F7;
  --rose: #F43F5E;
  --card-bg: rgba(255,255,255,0.04);
  --card-border: rgba(255,255,255,0.08);
  --card-hover: rgba(255,255,255,0.07);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--navy);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Background Atmosphere ─── */
.bg-pattern {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(232,146,47,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(139,26,43,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(20,184,166,0.03) 0%, transparent 60%);
}

.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ─── Screen Management ─── */
.screen {
  display: none;
  position: relative;
  z-index: 1;
  min-height: 100vh;
  animation: screenIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.screen.active { display: block; }

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

/* ─── Landing Page ─── */
.landing {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh;
  padding: 2rem; text-align: center;
}

.logo-mark {
  width: 80px; height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--saffron), var(--maroon));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin-bottom: 2rem;
  box-shadow: 0 20px 60px rgba(232,146,47,0.25);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.landing h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900; line-height: 1.1;
  margin-bottom: 1rem; letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--saffron), var(--saffron-light), var(--teal-glow));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing .subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 540px; margin: 0 auto 2.5rem;
  line-height: 1.6; font-weight: 300;
}

.features {
  display: flex; gap: 1.5rem; margin-bottom: 3rem;
  flex-wrap: wrap; justify-content: center;
}

.feature-pill {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border-radius: 100px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  font-size: 0.85rem; color: var(--text-secondary);
}

/* ─── Buttons ─── */
.cta-btn {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 1rem 2.5rem; font-size: 1.1rem; font-weight: 600;
  font-family: 'Outfit', sans-serif; color: var(--navy);
  background: linear-gradient(135deg, var(--saffron), var(--saffron-light));
  border: none; border-radius: 14px; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 30px rgba(232,146,47,0.3);
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(232,146,47,0.4); }
.cta-btn .arrow { transition: transform 0.3s; }
.cta-btn:hover .arrow { transform: translateX(4px); }

.btn-primary {
  padding: 0.8rem 2rem; font-size: 0.95rem; font-weight: 600;
  font-family: 'Outfit', sans-serif; color: var(--navy);
  background: linear-gradient(135deg, var(--saffron), var(--saffron-light));
  border: none; border-radius: 12px; cursor: pointer;
  transition: all 0.25s; margin-left: auto;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(232,146,47,0.3); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  padding: 0.8rem 1.5rem; font-size: 0.95rem; font-weight: 500;
  font-family: 'Outfit', sans-serif; color: var(--text-secondary);
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 12px; cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { background: var(--card-hover); color: var(--text-primary); }

.disclaimer {
  margin-top: 2rem; font-size: 0.78rem;
  color: var(--text-dim); max-width: 400px;
}

/* ─── Form Layout ─── */
.form-container {
  max-width: 680px; margin: 0 auto; padding: 2rem;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
}

.step-indicator {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 2rem;
  font-family: 'Space Mono', monospace; font-size: 0.8rem; color: var(--text-dim);
}

.step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--card-border); transition: all 0.3s;
}
.step-dot.active { background: var(--saffron); box-shadow: 0 0 12px rgba(232,146,47,0.5); }
.step-dot.done { background: var(--teal); }
.step-line { width: 24px; height: 1px; background: var(--card-border); }

.form-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.5rem; }
.form-subtitle { color: var(--text-secondary); margin-bottom: 2rem; font-weight: 300; }
.form-nav { display: flex; justify-content: space-between; margin-top: 2.5rem; gap: 1rem; }

/* ─── Inputs ─── */
.input-group { margin-bottom: 1.5rem; }
.input-group label {
  display: block; font-size: 0.85rem; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 0.5rem;
}
.input-group label .required { color: var(--rose); }

.text-input, .select-input {
  width: 100%; padding: 0.85rem 1.1rem; font-size: 1rem;
  font-family: 'Outfit', sans-serif;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 12px; color: var(--text-primary);
  transition: all 0.3s; outline: none;
}
.text-input:focus, .select-input:focus {
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(232,146,47,0.12);
}
.text-input::placeholder { color: var(--text-dim); }

select.select-input {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 2.5rem;
}
select.select-input option { background: var(--navy-mid); color: var(--text-primary); }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.q-counter { font-family: 'Space Mono', monospace; font-size: 0.75rem; color: var(--text-dim); margin-bottom: 0.3rem; }

/* ─── Option Cards ─── */
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 0.5rem; }

.option-card {
  padding: 1rem 1.2rem; border-radius: 14px;
  background: var(--card-bg); border: 1.5px solid var(--card-border);
  cursor: pointer; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}
.option-card:hover { background: var(--card-hover); border-color: rgba(255,255,255,0.15); transform: translateY(-1px); }
.option-card.selected { border-color: var(--saffron); background: rgba(232,146,47,0.08); box-shadow: 0 0 0 2px rgba(232,146,47,0.15); }
.option-card .option-icon { font-size: 1.3rem; margin-bottom: 0.4rem; }
.option-card .option-label { font-weight: 600; font-size: 0.95rem; }
.option-card .option-desc { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.2rem; }

/* ─── Validation ─── */
.text-input.error, .select-input.error { border-color: var(--rose); box-shadow: 0 0 0 2px rgba(244,63,94,0.15); }
.error-msg { color: var(--rose); font-size: 0.78rem; margin-top: 0.25rem; display: none; }
.error-msg.show { display: block; }

/* ─── Loading Screen ─── */
.loading-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; padding: 2rem; text-align: center;
}

.loader-ring {
  width: 72px; height: 72px; border-radius: 50%;
  border: 3px solid var(--card-border);
  border-top-color: var(--saffron); border-right-color: var(--teal);
  animation: spin 1.2s linear infinite; margin-bottom: 2rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-steps { list-style: none; text-align: left; margin-top: 1.5rem; }
.loading-steps li {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0; color: var(--text-dim); font-size: 0.95rem;
  transition: all 0.4s;
}
.loading-steps li.active { color: var(--text-primary); }
.loading-steps li.done { color: var(--teal); }
.loading-steps li .check { opacity: 0; transition: opacity 0.3s; }
.loading-steps li.done .check { opacity: 1; }
.loading-steps li .spinner-sm {
  width: 16px; height: 16px;
  border: 2px solid var(--card-border); border-top-color: var(--saffron);
  border-radius: 50%; animation: spin 0.8s linear infinite; display: none;
}
.loading-steps li.active .spinner-sm { display: block; }

/* ─── Error screen ─── */
.error-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; padding: 2rem; text-align: center;
}
.error-icon { font-size: 3rem; margin-bottom: 1rem; }
.error-screen h2 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.error-screen p { color: var(--text-secondary); margin-bottom: 2rem; max-width: 400px; }

/* ─── Results Page ─── */
.results-container {
  max-width: 900px; margin: 0 auto; padding: 3rem 2rem 4rem;
}

.results-header { text-align: center; margin-bottom: 3rem; }
.results-header .tag {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 1rem; border-radius: 100px;
  background: rgba(20,184,166,0.1); border: 1px solid rgba(20,184,166,0.2);
  color: var(--teal-glow); font-size: 0.8rem; font-weight: 500;
  margin-bottom: 1rem; font-family: 'Space Mono', monospace;
}
.results-header h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 0.5rem; }
.results-header p { color: var(--text-secondary); font-weight: 300; font-size: 1.05rem; }
.results-header .student-summary {
  margin-top: 1rem; max-width: 600px; margin-left: auto; margin-right: auto;
  padding: 1rem 1.5rem; border-radius: 14px;
  background: rgba(232,146,47,0.06); border: 1px solid rgba(232,146,47,0.12);
  color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6;
}

/* ─── Path Card ─── */
.path-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 20px; padding: 2rem; margin-bottom: 2rem;
  transition: all 0.3s;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.path-card:nth-child(2) { animation-delay: 0.15s; }
.path-card:nth-child(3) { animation-delay: 0.3s; }
.path-card:nth-child(4) { animation-delay: 0.45s; }
.path-card:hover { border-color: rgba(255,255,255,0.12); }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.path-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }

.path-number {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; flex-shrink: 0; color: #fff;
}
.path-card:nth-child(2) .path-number { background: linear-gradient(135deg, var(--saffron), var(--maroon)); }
.path-card:nth-child(3) .path-number { background: linear-gradient(135deg, var(--teal), var(--blue)); }
.path-card:nth-child(4) .path-number { background: linear-gradient(135deg, var(--purple), var(--rose)); }

.path-name { font-size: 1.25rem; font-weight: 700; }
.path-type {
  display: inline-block; margin-top: 0.3rem;
  padding: 0.2rem 0.6rem; border-radius: 6px;
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em;
}
.path-type.local { background: rgba(34,197,94,0.15); color: var(--green); }
.path-type.global { background: rgba(59,130,246,0.15); color: var(--blue); }
.path-type.hybrid { background: rgba(168,85,247,0.15); color: var(--purple); }

.path-why {
  color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6;
  margin-bottom: 1.5rem; padding-left: 0.75rem;
  border-left: 2px solid var(--card-border);
}

/* ─── Timeline ─── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(to bottom, var(--saffron), var(--teal), var(--purple));
}
.timeline-item { position: relative; padding-bottom: 1.5rem; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute; left: -2rem; top: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--navy); border: 3px solid var(--saffron); z-index: 1;
}
.timeline-item:nth-child(2) .timeline-dot { border-color: var(--saffron-light); }
.timeline-item:nth-child(3) .timeline-dot { border-color: var(--teal); }
.timeline-item:nth-child(4) .timeline-dot { border-color: var(--blue); }
.timeline-item:nth-child(5) .timeline-dot { border-color: var(--purple); }
.timeline-item:nth-child(6) .timeline-dot { border-color: var(--green); }

.timeline-year {
  font-family: 'Space Mono', monospace; font-size: 0.75rem;
  font-weight: 700; color: var(--saffron); margin-bottom: 0.2rem;
}
.timeline-item:nth-child(3) .timeline-year { color: var(--teal); }
.timeline-item:nth-child(5) .timeline-year { color: var(--purple); }

.timeline-role { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.15rem; }
.timeline-detail { font-size: 0.85rem; color: var(--text-dim); }
.timeline-salary {
  display: inline-flex; align-items: center; gap: 0.3rem;
  margin-top: 0.3rem; padding: 0.2rem 0.6rem; border-radius: 6px;
  background: rgba(34,197,94,0.1); color: var(--green);
  font-size: 0.78rem; font-weight: 600; font-family: 'Space Mono', monospace;
}

/* ─── Info Boxes ─── */
.info-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.info-box {
  padding: 1rem; border-radius: 12px;
  background: rgba(255,255,255,0.02); border: 1px solid var(--card-border);
}
.info-box .info-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim); margin-bottom: 0.4rem; font-weight: 600;
}
.info-box .info-value { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; }

.first-steps {
  margin-top: 1rem; padding: 1rem; border-radius: 12px;
  background: rgba(20,184,166,0.05); border: 1px solid rgba(20,184,166,0.12);
}
.first-steps .info-label { color: var(--teal); }
.first-steps .info-value { color: var(--text-secondary); }

.future-outlook {
  margin-top: 1rem; padding: 1rem; border-radius: 12px;
  background: rgba(168,85,247,0.05); border: 1px solid rgba(168,85,247,0.12);
}
.future-outlook .info-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--purple); margin-bottom: 0.4rem; font-weight: 600;
}
.future-outlook .info-value {
  font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6;
}

/* ─── General Advice ─── */
.general-advice {
  text-align: center; padding: 2rem; margin-top: 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(232,146,47,0.06), rgba(20,184,166,0.06));
  border: 1px solid rgba(232,146,47,0.1);
}
.general-advice p {
  font-size: 1.05rem; color: var(--text-secondary); line-height: 1.7;
  max-width: 700px; margin: 0 auto; font-style: italic;
}

/* ─── Footer ─── */
.results-footer {
  text-align: center; margin-top: 3rem;
  padding-top: 2rem; border-top: 1px solid var(--card-border);
}
.results-footer p { color: var(--text-dim); font-size: 0.8rem; margin-bottom: 1rem; }
.restart-btn {
  padding: 0.7rem 1.5rem; font-family: 'Outfit', sans-serif;
  font-size: 0.9rem; font-weight: 500; color: var(--text-secondary);
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 12px; cursor: pointer; transition: all 0.2s;
}
.restart-btn:hover { color: var(--text-primary); border-color: var(--saffron); }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .options-grid { grid-template-columns: 1fr; }
  .row-2 { grid-template-columns: 1fr; }
  .info-row { grid-template-columns: 1fr; }
  .features { flex-direction: column; align-items: center; }
  .form-container { padding: 1.5rem; }
  .results-container { padding: 2rem 1rem; }
  .path-card { padding: 1.25rem; }
  .landing h1 { font-size: 2.2rem; }
}