/* ==========================================
   APPLYJOBS.CO.UK — DESIGN SYSTEM
   Shared across homepage + every generated city/category page.
   ========================================== */

/* ── Tokens ── */
:root {
  /* Ground */
  --bg: #0A0B0D;
  --bg-raised: #131519;
  --bg-raised-2: #1B1E24;
  --border: #262A31;
  --border-strong: #363B44;

  /* Text — bright and readable, not dim gray */
  --text-primary: #F2F4F7;
  --text-secondary: #9AA3AF;
  --text-tertiary: #6B7280;
  --text-read: #DDE1E7; /* long-form article body — bright but softened for sustained reading */

  /* Functional accents — teal = signal/match found (data), amber = action */
  --signal: #34E7B8;
  --signal-dim: #1D8F72;
  --energy: #FF8A3D;
  --energy-dim: #C96A2C;
  --warn: #FF5C5C;

  /* Type scale */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --radius: 10px;
  --radius-sm: 6px;
  --max-width: 1180px;
}

/* ── Reset ── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }

/* Visible keyboard focus — never remove */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ==========================================
   HEADER
   ========================================== */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(10,11,13,0.92);
  backdrop-filter: blur(8px);
  z-index: 50;
}
.logo {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.logo .tld { color: var(--text-tertiary); font-weight: 500; }
.logo-mark { color: var(--signal); }
.site-header nav { display: flex; gap: 28px; align-items: center; }
.site-header nav a {
  font-size: 14.5px; color: var(--text-secondary);
  transition: color 0.15s ease;
}
.site-header nav a:hover { color: var(--text-primary); }
.nav-cta {
  background: var(--energy); color: #0A0B0D !important;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px !important;
}
.nav-cta:hover { background: #FFA05C !important; }

/* ==========================================
   HERO
   ========================================== */
.hero {
  padding: 72px 24px 56px;
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px;
  align-items: start;
}
.hero h1 {
  font-size: 44px; line-height: 1.12;
  max-width: 15ch;
}
.hero-sub {
  margin-top: 18px; font-size: 17px; color: var(--text-secondary);
  max-width: 46ch; line-height: 1.6;
}
.hero-trust {
  margin-top: 28px; display: flex; gap: 28px; flex-wrap: wrap;
}
.trust-stat { display: flex; flex-direction: column; gap: 2px; }
.trust-stat .num {
  font-family: var(--font-mono); font-size: 22px; font-weight: 600;
  color: var(--signal);
}
.trust-stat .label { font-size: 13px; color: var(--text-tertiary); }

/* ── Upload panel (the actual product, front and center) ── */
.upload-panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.upload-panel::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(52,231,184,0.06), transparent 40%);
  pointer-events: none;
}
.upload-panel h2 {
  font-size: 19px; display: flex; align-items: center; gap: 9px;
}
.upload-panel .icon-scan { color: var(--signal); flex-shrink: 0; }
.upload-panel .panel-sub {
  font-size: 14px; color: var(--text-secondary); margin-top: 6px;
}

.dropzone {
  margin-top: 20px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 32px 20px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.dropzone:hover, .dropzone.is-dragover {
  border-color: var(--signal);
  background: rgba(52,231,184,0.04);
}
.dropzone .icon-upload { color: var(--text-secondary); margin: 0 auto 10px; }
.dropzone-label { font-size: 14.5px; color: var(--text-primary); font-weight: 500; }
.dropzone-hint { font-size: 12.5px; color: var(--text-tertiary); margin-top: 4px; }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-chosen {
  margin-top: 12px; font-size: 13.5px; color: var(--signal);
  display: none; align-items: center; gap: 6px;
}
.file-chosen.is-visible { display: flex; }

.field-group { margin-top: 18px; }
.field-group label {
  display: block; font-size: 13px; color: var(--text-secondary);
  margin-bottom: 6px;
}
.field-group select {
  width: 100%; padding: 11px 12px;
  background: var(--bg-raised-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-family: var(--font-body); font-size: 14.5px;
}

.btn-match {
  width: 100%; margin-top: 20px;
  background: var(--energy); color: #0A0B0D;
  border: none; border-radius: var(--radius-sm);
  padding: 14px; font-weight: 600; font-size: 15.5px;
  transition: background 0.15s ease;
}
.btn-match:hover { background: #FFA05C; }
.btn-match:disabled { background: var(--border-strong); color: var(--text-tertiary); cursor: not-allowed; }

.panel-note {
  margin-top: 14px; font-size: 12px; color: var(--text-tertiary);
  display: flex; align-items: flex-start; gap: 6px; line-height: 1.5;
}

#upload-status {
  display: none; margin-top: 16px; font-size: 13.5px; color: var(--signal);
}
#upload-error {
  display: none; margin-top: 16px; font-size: 13.5px; color: var(--warn);
  background: rgba(255,92,92,0.08); border: 1px solid rgba(255,92,92,0.25);
  padding: 10px 12px; border-radius: var(--radius-sm);
}

/* Scan-line — the one deliberate motion moment on the page */
@keyframes scan-sweep {
  0% { transform: translateY(-100%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(2200%); opacity: 0; }
}
.dropzone.is-scanning {
  position: relative; overflow: hidden; border-color: var(--signal);
}
.dropzone.is-scanning::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px;
  background: var(--signal); box-shadow: 0 0 12px 2px var(--signal);
  animation: scan-sweep 1.4s ease-in-out infinite;
}

/* ==========================================
   MATCH RESULTS (populated by core.js)
   ========================================== */
#match-results:empty { display: none; }
#match-results { margin-top: 40px; }
.narrative {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 24px;
}
.narrative h2 { font-size: 17px; margin-bottom: 8px; }
.narrative h3 { font-size: 14px; color: var(--text-secondary); margin: 16px 0 6px; }
.narrative p, .narrative li { font-size: 14.5px; color: var(--text-secondary); }
.narrative ul { padding-left: 18px; list-style: disc; }
.matched-jobs h2 { font-size: 18px; margin-bottom: 14px; }
.match-card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 18px; margin-bottom: 12px;
}
.match-card h3 { font-size: 15.5px; margin: 6px 0 4px; }
.match-card a:hover { color: var(--signal); }
.score { font-family: var(--font-mono); font-size: 13px; color: var(--signal); margin-top: 6px; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
}
.badge-strong_match { background: rgba(52,231,184,0.15); color: var(--signal); }
.badge-possible_match { background: rgba(255,138,61,0.15); color: var(--energy); }
.badge-stretch { background: rgba(107,114,128,0.2); color: var(--text-secondary); }
.skills-matched { color: var(--signal); font-size: 13px; margin-top: 6px; }
.skills-missing { color: var(--text-tertiary); font-size: 13px; margin-top: 2px; }

/* ==========================================
   SECTIONS (shared rhythm)
   ========================================== */
section.page-section { padding: 64px 24px; border-bottom: 1px solid var(--border); }
.section-head { max-width: 60ch; margin-bottom: 36px; }
.section-head h2 { font-size: 28px; }
.section-head p { margin-top: 10px; font-size: 15.5px; color: var(--text-secondary); }

/* ── How it works (legitimate 3-step sequence) ── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.step-card .step-index {
  font-family: var(--font-mono); color: var(--signal); font-size: 13px;
}
.step-card h3 { font-size: 16.5px; margin: 10px 0 8px; }
.step-card p { font-size: 14px; color: var(--text-secondary); }

/* ── City & category grids ── */
.city-grid, .category-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.city-card, .category-card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 18px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.city-card:hover, .category-card:hover {
  border-color: var(--signal); background: var(--bg-raised-2);
}
.city-card .icon-pin { color: var(--text-tertiary); }
.city-card-name { font-size: 15px; font-weight: 500; margin-top: 8px; }
.city-card-meta { font-size: 12.5px; color: var(--text-tertiary); margin-top: 2px; }
.view-all-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 20px; font-size: 14px; color: var(--signal); font-weight: 500;
}

/* ── International students callout ── */
.eligibility-panel {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
}
.eligibility-panel .icon-shield { color: var(--signal); }
.eligibility-list { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.eligibility-item { display: flex; gap: 10px; font-size: 14.5px; color: var(--text-secondary); }
.eligibility-item svg { flex-shrink: 0; color: var(--signal); margin-top: 2px; }

/* ── FAQ ── */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-question {
  width: 100%; text-align: left; background: none; border: none;
  color: var(--text-primary); font-size: 15.5px; font-weight: 500;
  padding: 18px 0; display: flex; justify-content: space-between; align-items: center;
}
.faq-question .icon-chevron { transition: transform 0.15s ease; color: var(--text-tertiary); flex-shrink: 0; }
.faq-item[open] .icon-chevron { transform: rotate(180deg); }
.faq-answer { padding: 0 0 18px; font-size: 14.5px; color: var(--text-secondary); max-width: 65ch; }

/* ==========================================
   FOOTER — sitemap-depth for crawl/backlinks
   ========================================== */
.site-footer { padding: 56px 24px 32px; }
.footer-grid {
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr repeat(4, 1fr); gap: 32px;
}
.footer-col h4 { font-size: 13px; color: var(--text-tertiary); margin-bottom: 14px; font-weight: 500; }
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: 13.5px; color: var(--text-secondary); }
.footer-col a:hover { color: var(--signal); }
.footer-brand p { font-size: 13.5px; color: var(--text-tertiary); margin-top: 12px; max-width: 32ch; }
.footer-bottom {
  max-width: var(--max-width); margin: 40px auto 0;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-tertiary);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* ==========================================
   AD SLOT
   ========================================== */
.ad-slot { margin: 24px 0; min-height: 0; }

/* ==========================================
   JOB LISTING CARDS (city/category pages)
   ========================================== */
.job-listings { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.job-card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 18px 20px;
}
.job-card h3 { font-size: 16px; }
.job-card h3 a:hover { color: var(--signal); }
.job-company { font-size: 13.5px; color: var(--text-secondary); margin-top: 4px; }
.job-salary { font-family: var(--font-mono); font-size: 13px; color: var(--signal); margin-top: 6px; }
.job-type { font-size: 12.5px; color: var(--text-tertiary); margin-top: 4px; }
.no-jobs { color: var(--text-secondary); font-size: 14.5px; padding: 24px 0; }
.intro { font-size: 15.5px; color: var(--text-secondary); margin-top: 10px; max-width: 65ch; }
.cta-upload {
  margin-top: 24px; padding: 20px; background: var(--bg-raised);
  border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.cta-upload p { font-size: 14.5px; color: var(--text-secondary); max-width: 42ch; }
.btn-primary {
  background: var(--energy); color: #0A0B0D; padding: 11px 20px;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 14.5px; white-space: nowrap;
}
.related-links { margin-top: 40px; }
.related-links h2 { font-size: 16px; margin-bottom: 12px; color: var(--text-secondary); }
.related-links ul { display: flex; flex-direction: column; gap: 8px; }
.related-links a { font-size: 14px; color: var(--signal); }

/* ==========================================
   LONG-FORM SEO CONTENT SECTION
   ========================================== */
.seo-content-section { padding: 64px 24px 80px; }
.seo-content { max-width: 740px; margin: 0 auto; }
.seo-content > .section-head { max-width: none; margin-bottom: 32px; }
.seo-toc {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 48px;
}
.seo-toc h2 { font-size: 14px; color: var(--text-tertiary); font-weight: 500; margin-bottom: 12px; }
.seo-toc ul { columns: 2; gap: 24px; }
.seo-toc li { break-inside: avoid; margin-bottom: 8px; }
.seo-toc a { font-size: 13.5px; color: var(--signal); }
.seo-toc a:hover { text-decoration: underline; }

.seo-article h2 {
  font-size: 25px; margin-top: 56px; margin-bottom: 16px;
  scroll-margin-top: 90px;
}
.seo-article h2:first-child { margin-top: 0; }
.seo-article h3 {
  font-size: 18px; margin-top: 28px; margin-bottom: 10px; color: var(--text-primary);
}
.seo-article p {
  font-size: 16px; line-height: 1.75; color: var(--text-read);
  margin-bottom: 18px;
}
.seo-article ul, .seo-article ol {
  margin-bottom: 18px; padding-left: 22px; color: var(--text-read);
}
.seo-article ul { list-style: disc; }
.seo-article ol { list-style: decimal; }
.seo-article li { font-size: 16px; line-height: 1.7; margin-bottom: 8px; }
.seo-article a { color: var(--signal); }
.seo-article a:hover { text-decoration: underline; }
.seo-article strong { color: var(--text-primary); font-weight: 600; }
.seo-callout {
  background: var(--bg-raised); border: 1px solid var(--border-strong);
  border-left: 3px solid var(--energy);
  border-radius: var(--radius-sm); padding: 18px 20px; margin: 24px 0;
}
.seo-callout p { margin-bottom: 0; font-size: 14.5px; color: var(--text-secondary); }
.seo-callout p:first-child { color: var(--text-primary); font-weight: 500; margin-bottom: 6px; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; max-width: none; }
  .steps { grid-template-columns: 1fr; }
  .city-grid, .category-grid { grid-template-columns: repeat(2, 1fr); }
  .eligibility-panel { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .site-header nav { gap: 16px; }
  .site-header nav a:not(.nav-cta) { display: none; }
}
@media (max-width: 520px) {
  .city-grid, .category-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 20px 40px; }
  section.page-section { padding: 48px 20px; }
}