/* =========================================================
   Tech Jobs — landing styles (design 07 "Aqua Glass")
   Palette rule: light / pastel only. No black, no brown —
   including shadows and overlays (tint with --ink instead).
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* text */
  --ink: #233067;
  --ink-soft: #4a5890;
  --ink-muted: #6b77a8;

  /* accents */
  --aqua: #5ec7c0;
  --aqua-ink: #1f7c76;
  --aqua-tint: rgba(94, 199, 192, .18);
  --lilac: #9d8cf2;
  --lilac-ink: #5b48c6;
  --lilac-tint: rgba(157, 140, 242, .18);

  /* surfaces */
  --bg-gradient: linear-gradient(135deg, #d9f6f4 0%, #e9f1ff 45%, #ece6ff 100%);
  --blob-aqua: #bdeeea;
  --blob-lilac: #dcd3ff;
  --glass-bg: rgba(255, 255, 255, .55);
  --glass-bg-strong: rgba(255, 255, 255, .78);
  --glass-border: rgba(255, 255, 255, .85);
  --glass-blur: 16px;
  --field-bg: rgba(255, 255, 255, .75);
  --accent-gradient: linear-gradient(90deg, #4bbab3, #8c79ee);
  --shadow: 0 10px 30px rgba(35, 48, 103, .08);
  --overlay: rgba(35, 48, 103, .22);

  /* shape & rhythm */
  --radius-card: 22px;
  --radius-control: 12px;
  --radius-pill: 999px;
  --container: 1160px;
  --gutter: 20px;
  --section-gap: clamp(56px, 8vw, 96px);

  --font: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg-gradient) fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.muted { color: var(--ink-muted); font-size: 14px; }

/* Decorative background blobs */
.bg-blobs::before,
.bg-blobs::after {
  content: '';
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .6;
  pointer-events: none;
}
.bg-blobs::before { width: 520px; height: 520px; background: var(--blob-aqua); top: -160px; right: -120px; }
.bg-blobs::after  { width: 440px; height: 440px; background: var(--blob-lilac); bottom: -160px; left: -100px; }

/* ---------- Glass surface ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(255, 255, 255, .85); }
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--aqua-ink);
  margin-bottom: 10px;
}

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

h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius-control);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--accent-gradient); color: #fff; box-shadow: 0 8px 20px rgba(140, 121, 238, .25); }
.btn-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  color: var(--ink);
}
.btn-white { background: #fff; color: var(--ink); }
.btn-ink { background: var(--ink); color: #f3f6ff; }
.btn-sm { min-height: 36px; padding: 8px 14px; font-size: 13px; border-radius: 10px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 12px;
  z-index: 10;
  margin-top: 16px;
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px 10px 18px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aqua), var(--lilac));
  color: #fff;
  font-size: 14px;
}

.site-nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 24px); font-size: 14px; }
.site-nav__link { color: var(--ink-soft); white-space: nowrap; }
.site-nav__link:hover { color: var(--ink); }

.lang-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .45);
}
.lang-toggle__btn {
  border: 0;
  background: transparent;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}
.lang-toggle__btn.is-active { background: #fff; color: var(--ink); font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* becomes 2 columns (copy + stats) from 900px */
  padding-top: clamp(56px, 9vw, 110px);
  padding-bottom: clamp(40px, 6vw, 72px);
}
.hero__copy { max-width: 760px; }
.hero__title {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.03em;
}
.hero__lede {
  margin-top: 20px;
  max-width: 600px;
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--ink-soft);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Hero stats panel */
.hero-stats {
  display: grid;
  gap: 4px;
  padding: 10px 24px 20px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}
.hero-stats__list { display: grid; }
.hero-stats__item {
  display: flex;
  flex-direction: row-reverse;   /* number first visually, label second; dt stays first for screen readers */
  justify-content: flex-end;
  align-items: baseline;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .9);
}
.hero-stats__num {
  min-width: 2.4ch;
  font-size: clamp(32px, 4vw, 40px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stats__item dt { font-size: 15px; color: var(--ink-soft); }
.hero-stats__note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}
.hero-stats__note:hover { color: var(--ink); }
.live-dot {
  flex: 0 0 auto;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 4px var(--aqua-tint);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    align-items: center;
    gap: 48px;
  }
}
@media (max-width: 899px) {
  .hero { gap: 32px; }
  .hero-stats__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .hero-stats__item { flex-direction: column-reverse; align-items: flex-start; gap: 6px; border-bottom: 0; padding: 12px 0; }
  .hero-stats__note { border-top: 1px solid rgba(255, 255, 255, .9); }
}

/* ---------- Section heading ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.section-head--center { justify-content: center; text-align: center; }
.section-head--center h2 { max-width: 640px; margin-inline: auto; }

.result-count { font-size: 14px; color: var(--ink-soft); }
.result-count__num { font-weight: 600; color: var(--ink); }

/* ---------- Openings ---------- */
.openings { padding-top: 16px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.field { display: flex; flex: 1 1 150px; min-width: 0; }
.field--search { flex: 3 1 260px; }
.input {
  width: 100%;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: var(--field-bg);
  padding: 11px 14px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
select.input {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%234a5890' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.input::placeholder { color: var(--ink-muted); }
.input:focus { border-color: var(--lilac); background-color: #fff; }

.btn-clear {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  padding: 0 14px;
  min-height: 46px;
  border-radius: var(--radius-control);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
.btn-clear:hover { background: rgba(255, 255, 255, .6); color: var(--ink); }

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 22px;
}
.tab {
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, .4);
  border-radius: var(--radius-pill);
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color .15s ease;
}
.tab:hover { background: rgba(255, 255, 255, .75); }
.tab.is-active { background: var(--ink); border-color: var(--ink); color: #eef3ff; }

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 16px;
}

/* Job card */
.job-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  transition: transform .15s ease, background-color .15s ease;
}
.job-card:hover { transform: translateY(-2px); background: var(--glass-bg-strong); }
.job-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
}
.job-card__title { font-size: 19px; font-weight: 600; line-height: 1.3; }
.stretched-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.job-card__foot {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.job-card__meta { min-width: 0; }
.job-card__foot .btn { flex: 0 0 auto; }

.pay { font-weight: 600; font-size: 15px; }
.pay--missing { font-weight: 500; font-size: 14px; color: var(--ink-muted); font-style: italic; }

.badge {
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.badge--job { background: var(--aqua-tint); color: var(--aqua-ink); }
.badge--freelance { background: var(--lilac-tint); color: var(--lilac-ink); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  background: rgba(255, 255, 255, .8);
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 12px;
}

.load-error {
  margin-top: 16px;
  padding: 20px 24px;
  border-radius: var(--radius-card);
  text-align: center;
  color: var(--ink-soft);
}
.load-error[hidden], .load-more-wrap [hidden] { display: none; }

.load-more-wrap { display: flex; justify-content: center; margin-top: 26px; }

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 40px 24px;
  border-radius: var(--radius-card);
  text-align: center;
}
.empty-state[hidden] { display: none; }
.empty-state h3 { font-size: 20px; font-weight: 600; }
.empty-state p { color: var(--ink-soft); max-width: 420px; }

/* ---------- How it works ---------- */
.how { padding-top: var(--section-gap); }
.how .section-head { margin-bottom: 28px; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  counter-reset: none;
}
.how-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}
.how-step__num {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.how-step:nth-child(2) .how-step__num { background: linear-gradient(135deg, var(--lilac), #b9a9ff); }
.how-step:nth-child(3) .how-step__num { background: linear-gradient(135deg, #7ad4cd, var(--aqua)); }
.how-step h3 { font-size: 17px; font-weight: 600; }
.how-step p { color: var(--ink-soft); font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer { padding-top: var(--section-gap); padding-bottom: 24px; }
.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 18px 32px;
  padding: 26px 28px;
  border-radius: var(--radius-card);
}
.site-footer__brand { display: grid; gap: 8px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--ink-soft); }
.site-footer__links a:hover { color: var(--ink); }
.site-footer__copy {
  grid-column: 1 / -1;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .9);
  font-size: 13px;
}

/* ---------- Job detail dialog ---------- */
.job-dialog {
  width: min(840px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
.job-dialog::backdrop {
  background: var(--overlay);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.job-dialog__panel {
  position: relative;
  display: grid;
  gap: 16px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 30px;
  border-radius: 26px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 24px 60px rgba(35, 48, 103, .18);
}
.job-dialog__content { display: grid; gap: 16px; }
html:has(.job-dialog[open]) { overflow: hidden; } /* no background scroll while the pop-up is open */

.job-dialog__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(233, 241, 255, .9);
  font-size: 20px;
  line-height: 1;
}
.job-dialog__eyebrow { font-size: 13px; color: var(--ink-soft); padding-right: 44px; }
.job-dialog__title { font-size: clamp(22px, 3vw, 28px); line-height: 1.2; padding-right: 44px; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.facts__item { padding: 12px 14px; border-radius: 14px; background: rgba(217, 246, 244, .6); }
.facts__item:nth-child(4n+2),
.facts__item:nth-child(4n+3) { background: rgba(236, 230, 255, .75); }
.facts dt { font-size: 12px; color: var(--ink-soft); }
.facts dd { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }

.job-dialog__section { display: grid; gap: 6px; }
.job-dialog__section h3 { font-size: 15px; font-weight: 600; }
.job-dialog__section p,
.job-dialog__list { font-size: 14px; color: var(--ink-soft); line-height: 1.65; }
.job-dialog__list { list-style: disc; padding-left: 1.2em; }

.job-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.job-dialog__desc { font-size: 14px; color: var(--ink-soft); line-height: 1.65; }
.job-dialog__desc ul, .job-dialog__desc ol { list-style: disc; padding-left: 1.2em; margin-top: 6px; }
.job-dialog__desc > * + * { margin-top: 8px; }
.job-dialog__desc h4 { font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 14px; }
.job-dialog__desc h4:first-child { margin-top: 0; }
.badge--featured { background: rgba(255, 255, 255, .9); color: var(--lilac-ink); }
.job-card__badges { display: inline-flex; gap: 6px; }
.job-dialog__note { font-size: 12px; color: var(--ink-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .site-nav__link { display: none; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .job-dialog__panel { padding: 24px 20px; }
}

@media (max-width: 480px) {
  .facts { grid-template-columns: 1fr; }
  .facts__item:nth-child(n) { background: rgba(217, 246, 244, .6); }
  .facts__item:nth-child(even) { background: rgba(236, 230, 255, .75); }
  .hero__actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .job-card, .tab { transition: none; }
  .btn:hover, .job-card:hover { transform: none; }
}
