/* ==========================================================================
   CyberFitting — global stylesheet
   Design tokens live in :root. Dark theme by default (cyber aesthetic).
   ========================================================================== */

:root {
  --bg: #070b14;
  --bg-elev: #0d1424;
  --bg-card: rgba(18, 27, 46, 0.6);
  --border: rgba(120, 160, 255, 0.12);
  --border-strong: rgba(120, 160, 255, 0.25);
  --text: #e6ecf7;
  --text-muted: #94a3c0;
  --text-dim: #64748b;
  --accent: #22d3a6;        /* signal green */
  --accent-2: #3b82f6;      /* electric blue */
  --accent-3: #a855f7;      /* violet */
  --danger: #f43f5e;
  --gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%);
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --container: 1180px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient background: grid + glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(120, 160, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  top: -30vh;
  left: 50%;
  width: 120vw;
  height: 80vh;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side at 35% 50%, rgba(34, 211, 166, 0.16), transparent),
    radial-gradient(closest-side at 65% 50%, rgba(59, 130, 246, 0.16), transparent);
  filter: blur(40px);
  pointer-events: none;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.7rem); }
h3 { font-size: 1.2rem; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-muted); max-width: 640px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--accent); color: #04110d; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  font-family: inherit;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--gradient); color: #04110d; box-shadow: 0 10px 30px -10px rgba(34, 211, 166, 0.6); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(59, 130, 246, 0.7); }
.btn-ghost { background: rgba(255,255,255,0.03); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); background: rgba(34, 211, 166, 0.06); }
.btn-sm { padding: 9px 16px; font-size: 0.875rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(7, 11, 20, 0.65);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(7, 11, 20, 0.85); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-mark { width: 34px; height: 34px; }
.brand span b { color: var(--accent); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color .2s ease, background .2s ease;
}
.nav-links a:not(.btn):hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-links a[aria-current="page"] { color: var(--text); background: rgba(34, 211, 166, 0.08); }
.nav-links .btn { margin-left: 10px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  width: 42px; height: 42px;
  color: var(--text);
  cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    background: rgba(7, 11, 20, 0.97);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 12px 14px; }
  .nav-links .btn { margin: 8px 0 0; }
}

/* ---------- Sections ---------- */
section { padding: 96px 0; position: relative; }
@media (max-width: 700px) { section { padding: 64px 0; } }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Hero ---------- */
.hero { padding: 110px 0 90px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 24px; }
.hero .lead { margin-bottom: 36px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 48px; color: var(--text-dim); font-size: 0.9rem; }
.hero-meta div { display: flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 18px; height: 18px; color: var(--accent); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding: 72px 0 56px; } }

/* Terminal card in hero */
.terminal {
  background: linear-gradient(180deg, rgba(16, 24, 42, 0.9), rgba(10, 16, 30, 0.9));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), 0 0 0 1px rgba(34, 211, 166, 0.05) inset;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.86rem;
}
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: #334155; display: block; }
.terminal-bar i:nth-child(1) { background: #f43f5e; }
.terminal-bar i:nth-child(2) { background: #f59e0b; }
.terminal-bar i:nth-child(3) { background: #22c55e; }
.terminal-bar span { margin-left: 10px; color: var(--text-dim); font-size: 0.78rem; }
.terminal-body { padding: 22px 22px 26px; min-height: 290px; color: var(--text-muted); }
.terminal-body .line { white-space: pre-wrap; word-break: break-word; }
.terminal-body .prompt { color: var(--accent); }
.terminal-body .ok { color: #4ade80; }
.terminal-body .key { color: #60a5fa; }
.terminal-body .val { color: var(--text); }
.cursor { display: inline-block; width: 8px; height: 1em; background: var(--accent); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Logos / stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat { background: var(--bg-elev); padding: 30px 26px; }
.stat strong { display: block; font-size: clamp(1.9rem, 3.2vw, 2.6rem); letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 6px; }
.stat span { color: var(--text-muted); font-size: 0.92rem; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
  backdrop-filter: blur(6px);
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: rgba(22, 33, 56, 0.7); }
.card p { color: var(--text-muted); margin-bottom: 0; }
.card .icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(34, 211, 166, 0.15), rgba(59, 130, 246, 0.15));
  border: 1px solid rgba(34, 211, 166, 0.25);
  color: var(--accent);
}
.card .icon svg { width: 24px; height: 24px; }

/* Steps / process */
.steps { counter-reset: step; }
.step { padding-top: 64px; }
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: 26px; left: 30px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

/* Two-column split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } }

.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-muted); }
.checklist li svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.checklist li strong { color: var(--text); }

/* Tag pills */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}
.tag.accent { color: var(--accent); border-color: rgba(34, 211, 166, 0.3); background: rgba(34, 211, 166, 0.07); }
.tag.blue { color: #60a5fa; border-color: rgba(59, 130, 246, 0.3); background: rgba(59, 130, 246, 0.07); }
.tag.violet { color: #c084fc; border-color: rgba(168, 85, 247, 0.3); background: rgba(168, 85, 247, 0.07); }

/* Specialisms cloud */
.specialisms { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.specialisms .tag { font-size: 0.95rem; padding: 10px 18px; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 72px);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 211, 166, 0.18), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(168, 85, 247, 0.18), transparent 50%),
    var(--bg-elev);
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { color: var(--text-muted); margin: 0; max-width: 560px; }
.cta-band .hero-cta { flex-shrink: 0; }

/* ---------- Page header (inner pages) ---------- */
.page-hero { padding: 96px 0 40px; }
.page-hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); }

/* ---------- Roles ---------- */
.roles-toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  margin-bottom: 28px;
}
@media (max-width: 820px) { .roles-toolbar { grid-template-columns: 1fr 1fr; } .roles-toolbar .search { grid-column: 1 / -1; } }
@media (max-width: 480px) { .roles-toolbar { grid-template-columns: 1fr; } }

.input, .select, .textarea {
  width: 100%;
  background: rgba(13, 20, 36, 0.8);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 12px;
  padding: 13px 16px;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(34, 211, 166, 0.12); }
.select {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3c0' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
.select option { background: var(--bg-elev); }
.search { position: relative; }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-dim); pointer-events: none; }
.search .input { padding-left: 44px; }

.roles-count { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 18px; font-family: var(--font-mono); }

.role-list { display: grid; gap: 14px; }
.role {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 24px 28px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.role:hover { border-color: rgba(34, 211, 166, 0.35); background: rgba(22, 33, 56, 0.7); }
.role h3 { margin: 0 0 6px; font-size: 1.15rem; }
.role-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 12px; }
.role-meta span { display: inline-flex; align-items: center; gap: 6px; }
.role-meta svg { width: 15px; height: 15px; color: var(--text-dim); }
.role-summary { color: var(--text-muted); font-size: 0.95rem; margin: 0 0 14px; }
.role-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.role-salary { font-family: var(--font-mono); font-size: 0.9rem; color: var(--accent); white-space: nowrap; }
@media (max-width: 700px) {
  .role { grid-template-columns: 1fr; padding: 22px; }
  .role-actions { flex-direction: row; align-items: center; justify-content: space-between; }
}
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); border: 1px dashed var(--border-strong); border-radius: var(--radius); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 32px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 8px; color: var(--text); }
.field label .opt { color: var(--text-dim); font-weight: 400; }
.textarea { min-height: 150px; resize: vertical; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 5px; background: rgba(13, 20, 36, 0.8); border: 1px solid var(--border-strong); border-radius: 14px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { margin: 0; text-align: center; padding: 10px; border-radius: 10px; cursor: pointer; color: var(--text-muted); font-weight: 500; transition: background .2s ease, color .2s ease; }
.segmented input:checked + label { background: var(--gradient); color: #04110d; }
.segmented input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-note { font-size: 0.85rem; color: var(--text-dim); margin: 0; }
.form-status { font-size: 0.92rem; padding: 12px 16px; border-radius: 12px; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: rgba(34, 211, 166, 0.1); border: 1px solid rgba(34, 211, 166, 0.3); color: var(--accent); }
.form-status.err { background: rgba(244, 63, 94, 0.1); border: 1px solid rgba(244, 63, 94, 0.3); color: #fb7185; }

.contact-item { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--border); }
.contact-item:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-item:first-of-type { padding-top: 0; }
.contact-item .icon { margin: 0; flex: 0 0 44px; width: 44px; height: 44px; }
.contact-item h4 { margin: 0 0 2px; font-size: 0.95rem; }
.contact-item p, .contact-item a { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.contact-item a:hover { color: var(--accent); }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; margin: 0 auto; }
.faq details { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 24px; transition: border-color .2s ease; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); font-size: 1.3rem; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-muted); padding-bottom: 20px; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 64px 0 32px; margin-top: 40px; background: rgba(7, 11, 20, 0.6); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); font-family: var(--font-mono); font-weight: 500; margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--text-muted); font-size: 0.95rem; transition: color .2s ease; }
.footer-grid a:hover { color: var(--accent); }
.footer-about p { color: var(--text-muted); font-size: 0.95rem; max-width: 320px; margin-top: 16px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 28px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 0.85rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
