/* ================================================================
   Job Hunter – Main CSS
   Design: editorial/utilitarian z ostrymi akcentami
   Fonts: Syne (nagłówki) + DM Sans (body)
   ================================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: #0f1117;
  background: #f7f7f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: .75; }

img, svg { display: block; max-width: 100%; }

/* ── Typography ───────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.4rem; font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 600; }

p { margin-bottom: .75rem; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

/* ── Layout helpers ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.main-content {
  flex: 1;
}

/* ── Test mode banner ─────────────────────────────────────────── */
.test-banner {
  background: #f59e0b;
  color: #1a1a1a;
  text-align: center;
  font-size: .8rem;
  font-weight: 600;
  padding: 6px 16px;
  letter-spacing: .03em;
}

/* ── Navbar ───────────────────────────────────────────────────── */
.navbar {
  background: #fff;
  border-bottom: 1px solid #e5e5e0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.navbar-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  color: #0f1117;
  letter-spacing: -.03em;
}
.navbar-logo span { color: var(--primary); }

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.navbar-nav a {
  font-size: .875rem;
  font-weight: 500;
  color: #444;
}

.navbar-nav a:hover { color: var(--primary); opacity: 1; }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .875rem;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--primary) 85%, #000);
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 40%, transparent);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-secondary:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  opacity: 1;
}

.btn-ghost {
  background: transparent;
  color: #444;
  border: 1.5px solid #e5e5e0;
}
.btn-ghost:hover { background: #f0f0ec; opacity: 1; }

.btn-lg { font-size: 1rem; padding: 14px 28px; border-radius: 10px; }
.btn-sm { font-size: .8rem; padding: 7px 14px; }
.btn-full { width: 100%; }

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

/* ── Forms ────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: .9375rem;
  color: #0f1117;
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

.form-control::placeholder { color: #9ca3af; }

.form-control.is-error { border-color: #ef4444; }
.form-control.is-error:focus {
  box-shadow: 0 0 0 3px rgba(239,68,68,.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  font-size: .8rem;
  color: #6b7280;
  margin-top: 5px;
}

.form-error {
  font-size: .8rem;
  color: #ef4444;
  margin-top: 5px;
  display: none;
}
.form-error.visible { display: block; }

/* ── Alerts ───────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: .875rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warn    { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ── Auth pages ───────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f7f7f5;
}

.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
}

.auth-card {
  background: #fff;
  border: 1px solid #e5e5e0;
  border-radius: 16px;
  padding: 40px 44px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 4px 32px rgba(0,0,0,.06);
}

.auth-card-logo {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 28px;
  display: block;
  color: #0f1117;
}
.auth-card-logo span { color: var(--primary); }

.auth-card h1 {
  font-size: 1.75rem;
  margin-bottom: 6px;
}
.auth-card .auth-sub {
  color: #6b7280;
  font-size: .9rem;
  margin-bottom: 28px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #9ca3af;
  font-size: .8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e5e0;
}

.auth-footer-link {
  text-align: center;
  font-size: .875rem;
  color: #6b7280;
  margin-top: 20px;
}

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid #e5e5e0;
  border-radius: 12px;
  padding: 24px;
}

/* ── Pricing cards ────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.pricing-card {
  background: #fff;
  border: 1.5px solid #e5e5e0;
  border-radius: 16px;
  padding: 28px 24px 24px;
  position: relative;
  transition: transform .2s, box-shadow .2s;
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.1);
}
.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), 0 8px 32px color-mix(in srgb, var(--primary) 15%, transparent);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pricing-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.pricing-price-regular {
  font-size: .95rem;
  color: #9ca3af;
  text-decoration: line-through;
  min-height: 1.4em;
}

.pricing-price-main {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  color: #0f1117;
}
.pricing-price-main .currency { font-size: 1.2rem; font-weight: 600; vertical-align: top; margin-top: 6px; display: inline-block; }
.pricing-price-main .period   { font-size: .85rem; font-weight: 400; color: #6b7280; letter-spacing: 0; }

.pricing-promo-label {
  display: inline-block;
  background: color-mix(in srgb, var(--secondary) 15%, transparent);
  color: var(--secondary);
  font-size: .75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 6px;
}

.pricing-features {
  list-style: none;
  margin: 20px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.pricing-features li {
  font-size: .875rem;
  color: #374151;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.pricing-features li::before {
  content: '✓';
  color: var(--secondary);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Match score bar ──────────────────────────────────────────── */
.score-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.score-bar {
  flex: 1;
  height: 8px;
  background: #e5e5e0;
  border-radius: 4px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--primary);
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.score-bar-fill.good    { background: var(--secondary); }
.score-bar-fill.medium  { background: #f59e0b; }
.score-bar-fill.poor    { background: #ef4444; }

.score-value {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  min-width: 44px;
  text-align: right;
}

/* ── Keyword chips ────────────────────────────────────────────── */
.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.keyword-chip {
  font-size: .78rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}
.keyword-chip.matched {
  background: color-mix(in srgb, var(--secondary) 12%, transparent);
  color: color-mix(in srgb, var(--secondary) 70%, #000);
  border: 1px solid color-mix(in srgb, var(--secondary) 30%, transparent);
}
.keyword-chip.missing {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.keyword-chip.added {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
}

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid #e5e5e0;
  background: #fff;
  margin-top: auto;
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 32px 24px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-logo-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -.03em;
  display: block;
  margin-bottom: 4px;
}

.footer-tagline {
  font-size: .8rem;
  color: #9ca3af;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
}
.footer-links a {
  font-size: .85rem;
  color: #6b7280;
}
.footer-links a:hover { color: var(--primary); opacity: 1; }

.footer-lang {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: #9ca3af;
}
.footer-lang a { color: #6b7280; }
.footer-lang a.active { color: var(--primary); font-weight: 600; }

.footer-copy {
  text-align: center;
  font-size: .78rem;
  color: #9ca3af;
  padding: 12px 24px 20px;
  border-top: 1px solid #f0f0ec;
}

/* ── Spinner ──────────────────────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
.spinner.dark {
  border-color: rgba(0,0,0,.1);
  border-top-color: var(--primary);
}

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

/* ── Utilities ────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: #6b7280; }
.text-sm     { font-size: .875rem; }
.text-xs     { font-size: .78rem; }
.mt-1  { margin-top:  4px; }
.mt-2  { margin-top:  8px; }
.mt-3  { margin-top: 16px; }
.mt-4  { margin-top: 24px; }
.mt-6  { margin-top: 40px; }
.mb-2  { margin-bottom: 8px; }
.mb-4  { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.flex  { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .auth-card { padding: 28px 20px; }
  .navbar-nav { display: none; }
  .footer-inner { flex-direction: column; gap: 20px; }
}
