/* FlexCareers — handcrafted stylesheet (no build step) */
:root {
  /* Surfaces */
  --bg: #f7f2e8;
  --bg-elev: #fbf7ed;
  --bg-card: #ffffff;
  --bg-tint: #f0e9da;

  /* Ink */
  --ink: #18241e;
  --ink-soft: #455048;
  --muted: #7a8880;
  --line: #e2dac8;
  --line-soft: #ece5d3;

  /* Brand */
  --sage: #4f7058;
  --sage-dark: #2f4938;
  --sage-deep: #1d3527;
  --sage-soft: #e6efe4;
  --sage-mist: #f0f5ec;

  --amber: #c47a3d;
  --amber-soft: #fbe8d6;
  --terracotta: #b15a3d;
  --terracotta-deep: #8d4530;

  --gold: #c4a13d;
  --cream: #f4ecd8;

  --shadow-xs: 0 1px 2px rgba(24, 36, 30, 0.04);
  --shadow-sm: 0 2px 6px rgba(24, 36, 30, 0.06);
  --shadow-md: 0 8px 24px -8px rgba(24, 36, 30, 0.12), 0 2px 6px rgba(24, 36, 30, 0.05);
  --shadow-lg: 0 24px 48px -12px rgba(24, 36, 30, 0.18), 0 4px 12px rgba(24, 36, 30, 0.06);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', 'Georgia', serif;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  line-height: 1.15;
}
h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); font-weight: 600; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p  { margin: 0 0 1em; }

a { color: var(--sage-dark); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--terracotta); text-decoration: underline; }

::selection { background: var(--sage-soft); color: var(--sage-deep); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  background: rgba(247, 242, 232, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
  position: sticky; top: 0; z-index: 50;
}
.site-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 700;
  color: var(--ink); letter-spacing: -0.015em;
}
.brand:hover { text-decoration: none; color: var(--sage-deep); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--sage) 0%, var(--sage-dark) 100%);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: 'Fraunces', serif; font-size: 1.15rem;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.18);
}
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { color: var(--ink-soft); font-size: 0.94rem; font-weight: 500; }
.nav a:hover { color: var(--sage-deep); text-decoration: none; }
.nav .nav-cta {
  background: linear-gradient(180deg, var(--sage) 0%, var(--sage-dark) 100%);
  color: var(--cream);
  padding: 10px 18px; border-radius: 999px; font-weight: 600;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: transform .15s ease, box-shadow .15s ease;
}
.nav .nav-cta:hover {
  background: linear-gradient(180deg, var(--sage-dark) 0%, var(--sage-deep) 100%);
  color: white; text-decoration: none;
  transform: translateY(-1px); box-shadow: var(--shadow-md);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse at 18% 30%, rgba(196, 161, 61, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 82% 80%, rgba(177, 90, 61, 0.08) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-elev) 100%);
  padding: 80px 0 90px;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(247,242,232,0.7) 42%, rgba(247,242,232,0) 62%),
    url('/assets/hero.png') center right / cover no-repeat;
  z-index: 0;
  opacity: 0.96;
}
.hero > .container { position: relative; z-index: 1; }
.hero-inner { max-width: 640px; }
.hero h1 { margin-bottom: 20px; }
.hero h1 em {
  font-style: italic;
  background: linear-gradient(120deg, var(--terracotta) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede {
  font-size: 1.18rem; color: var(--ink-soft);
  margin-bottom: 30px; max-width: 560px;
}
.hero-stats {
  display: flex; gap: 36px; margin-top: 28px; flex-wrap: wrap;
  padding-top: 26px; border-top: 1px solid var(--line);
}
.hero-stats .stat strong {
  display: block; font-family: 'Fraunces', serif;
  font-size: 1.85rem; color: var(--sage-deep); font-weight: 600;
  letter-spacing: -0.02em;
}
.hero-stats .stat span {
  font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(180deg, var(--terracotta) 0%, var(--terracotta-deep) 100%);
  color: white;
  padding: 13px 24px; border-radius: 999px;
  font-weight: 600; font-size: 0.97rem;
  border: none; cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover {
  background: linear-gradient(180deg, var(--terracotta-deep) 0%, #6e3624 100%);
  color: white; text-decoration: none;
  transform: translateY(-1px); box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: linear-gradient(180deg, var(--sage) 0%, var(--sage-dark) 100%);
}
.btn-secondary:hover {
  background: linear-gradient(180deg, var(--sage-dark) 0%, var(--sage-deep) 100%);
}
.btn-ghost {
  background: transparent; color: var(--sage-deep);
  border: 1.5px solid var(--sage); box-shadow: none;
}
.btn-ghost:hover {
  background: var(--sage-soft); color: var(--sage-deep);
  border-color: var(--sage-dark);
}
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- Sections ---------- */
section.block { padding: 72px 0; }
section.block.tight { padding: 48px 0; }
section.block.dark {
  background: linear-gradient(180deg, var(--sage-deep) 0%, #14271d 100%);
  color: #d6cfb9;
}
section.block.dark h2, section.block.dark h3 { color: white; }
section.block.dark .eyebrow { color: var(--gold); }

.section-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 32px; flex-wrap: wrap; gap: 14px;
}
.section-head h2 { margin: 0; }
.eyebrow {
  color: var(--terracotta); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.14em;
  font-weight: 700; margin-bottom: 8px; display: block;
}

/* ---------- Grids ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--sage);
  text-decoration: none;
}
.card h3 { margin-bottom: 6px; font-size: 1.1rem; color: var(--ink); }
.card p { color: var(--ink-soft); font-size: 0.93rem; margin: 0; }

.cat-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 24px;
  background: linear-gradient(160deg, var(--sage-soft) 0%, var(--sage-mist) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid #d2dccd;
  position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.cat-card::after {
  content: '→'; position: absolute; right: 22px; bottom: 18px;
  font-size: 1.4rem; color: var(--sage); opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
}
.cat-card:hover {
  text-decoration: none; transform: translateY(-3px);
  box-shadow: var(--shadow-md); border-color: var(--sage);
}
.cat-card:hover::after { opacity: 1; transform: translateX(4px); }
.cat-card h3 { font-family: 'Fraunces', serif; color: var(--sage-deep); margin: 0 0 4px; font-size: 1.15rem; }
.cat-card .count { font-size: 0.85rem; color: var(--ink-soft); font-weight: 500; }

/* ---------- Job Card ---------- */
.job-row {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 16px;
  align-items: center;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  color: inherit;
  text-decoration: none;
  position: relative;
}
.job-row:hover {
  border-color: var(--sage); transform: translateY(-2px);
  box-shadow: var(--shadow-md); text-decoration: none; color: inherit;
}
.job-row .avatar {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.2rem;
  color: white; letter-spacing: -0.02em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.job-row .meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 8px; font-size: 0.84rem; color: var(--ink-soft);
}
.job-row .title {
  font-family: 'Fraunces', serif; font-size: 1.18rem;
  color: var(--ink); margin: 0 0 3px; font-weight: 600;
  line-height: 1.25; letter-spacing: -0.015em;
}
.job-row:hover .title { color: var(--sage-deep); }
.job-row .company { color: var(--ink-soft); font-size: 0.92rem; }
.job-row .right { text-align: right; }
.job-row .badge-strip { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

@media (max-width: 600px) {
  .job-row { grid-template-columns: 44px 1fr; }
  .job-row .avatar { width: 44px; height: 44px; font-size: 1rem; }
  .job-row .right { grid-column: 1 / -1; text-align: left; }
  .job-row .badge-strip { justify-content: flex-start; }
}

.badge {
  display: inline-block;
  font-size: 0.74rem; padding: 4px 11px;
  border-radius: 999px;
  background: var(--sage-soft); color: var(--sage-deep);
  font-weight: 600; border: 1px solid #d4dfcc;
  letter-spacing: 0.01em;
}
.badge.amber { background: var(--amber-soft); color: var(--terracotta-deep); border-color: #efd6b4; }
.badge.muted { background: var(--bg-tint); color: var(--ink-soft); border-color: var(--line); }
.badge.gold  { background: #f7eecf; color: #6e5a19; border-color: #e6d39a; }

.parent-score {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; color: var(--muted); font-weight: 500;
}
.score-pill {
  display: inline-block; min-width: 38px; text-align: center;
  padding: 4px 9px; border-radius: 7px;
  background: var(--sage-soft); color: var(--sage-dark); font-weight: 700;
  border: 1px solid #cdd9c8;
  font-variant-numeric: tabular-nums;
}
.score-pill.high { background: linear-gradient(180deg, #d6ecc8, #c2e2b0); color: #244a2c; border-color: #a4ce98; }
.score-pill.mid  { background: linear-gradient(180deg, #f6e6c4, #efd9a4); color: #6e5119; border-color: #e0c890; }
.score-pill.low  { background: linear-gradient(180deg, #f0dcd6, #e6c5b9); color: #6e3a26; border-color: #d4ad9a; }

/* ---------- Job detail ---------- */
.detail-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px;
  align-items: start;
}
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }

.detail-main {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-xl); padding: 40px;
  box-shadow: var(--shadow-sm);
}
.detail-main h1 { margin-bottom: 8px; }
.detail-main h2 {
  font-size: 1.35rem; margin-top: 36px;
  padding-top: 24px; border-top: 1px solid var(--line-soft);
}
.detail-main h2:first-of-type { border-top: none; padding-top: 0; }
.detail-main h3 { font-size: 1.08rem; margin-top: 22px; }
.detail-main p, .detail-main li { color: var(--ink); font-size: 1rem; }
.detail-main a { color: var(--terracotta); }
.detail-main a.btn, .detail-main a.btn:hover { color: white; }
.detail-main a.btn-ghost, .detail-main a.btn-ghost:hover { color: var(--sage-deep); }
.detail-main ul, .detail-main ol { padding-left: 22px; margin: 0 0 1em; }
.detail-main ul li, .detail-main ol li { margin-bottom: 6px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 18px 0 26px; }
@media (max-width: 700px) { .detail-main { padding: 28px 22px; } }

.sidebar {
  display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: 86px;
}
.sidebar .panel {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-xs);
}
.sidebar .panel h3 {
  margin: 0 0 14px; font-size: 0.78rem;
  color: var(--sage-deep);
  text-transform: uppercase; letter-spacing: 0.12em;
  font-family: 'Inter', sans-serif; font-weight: 700;
  padding-bottom: 12px; border-bottom: 1px solid var(--line-soft);
}
.sidebar dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.sidebar dt {
  font-size: 0.74rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
}
.sidebar dd { margin: 0 0 4px; color: var(--ink); font-size: 0.95rem; }
.sidebar dd a { color: var(--sage-deep); font-weight: 500; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, #18241e 0%, #0f1813 100%);
  color: #c4bea8; padding: 64px 0 28px; margin-top: 96px;
  position: relative;
}
.site-footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 161, 61, 0.4), transparent);
}
.site-footer h4 {
  color: #fbf7f0; font-family: 'Inter', sans-serif;
  text-transform: uppercase; font-size: 0.78rem;
  letter-spacing: 0.14em; margin-bottom: 16px; font-weight: 700;
}
.site-footer a { color: #c4d6c8; transition: color .15s ease; }
.site-footer a:hover { color: var(--gold); text-decoration: none; }
.site-footer .brand { color: white; }
.site-footer .brand:hover { color: white; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.92rem; }
.footer-grid p { color: #95a59a; font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid #2a3a32; padding-top: 22px; margin-top: 48px;
  font-size: 0.82rem; color: #7a8a80;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex; gap: 6px; justify-content: center;
  margin-top: 36px; flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: 9px 14px; border-radius: 9px; border: 1px solid var(--line);
  font-size: 0.9rem; background: var(--bg-card); color: var(--ink-soft);
  font-weight: 500; transition: all .15s ease;
}
.pagination a:hover {
  background: var(--sage-soft); color: var(--sage-deep);
  text-decoration: none; border-color: var(--sage);
}
.pagination .current {
  background: linear-gradient(180deg, var(--sage), var(--sage-dark));
  color: var(--cream); border-color: var(--sage-dark); font-weight: 600;
  box-shadow: var(--shadow-xs);
}

/* ---------- Filters bar ---------- */
.filters {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.filter-label {
  font-size: 0.78rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.1em; font-weight: 700; margin: 18px 0 10px;
}
.filters a {
  font-size: 0.86rem; padding: 7px 14px; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--line);
  color: var(--ink-soft); font-weight: 500; transition: all .15s ease;
}
.filters a:hover {
  background: var(--sage-mist); color: var(--sage-deep);
  border-color: var(--sage); text-decoration: none;
}
.filters a.active {
  background: linear-gradient(180deg, var(--sage), var(--sage-dark));
  color: var(--cream); border-color: var(--sage-dark);
  box-shadow: var(--shadow-xs);
}

/* ---------- Article / Resource ---------- */
.article {
  max-width: 760px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-xl); padding: 56px;
  box-shadow: var(--shadow-sm);
}
.article h1 { margin-bottom: 12px; }
.article .lede { font-size: 1.18rem; color: var(--ink-soft); margin-bottom: 32px; }
.article h2 { margin-top: 36px; }
.article p, .article li { font-size: 1.04rem; line-height: 1.75; }
@media (max-width: 700px) { .article { padding: 32px 22px; } }

/* ---------- Adsense placeholder ---------- */
.ads-slot {
  border: 1px dashed #d6ccaf;
  background: #fdf6e6;
  color: #9a7d3a;
  padding: 14px;
  border-radius: 12px;
  text-align: center;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  margin: 24px 0;
  text-transform: uppercase;
  font-weight: 600;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.86rem; color: var(--muted); margin-bottom: 22px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
}
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--sage-deep); text-decoration: none; }
.breadcrumb span { margin: 0 4px; color: var(--muted); }

/* ---------- Empty state ---------- */
.empty {
  background: var(--bg-card); border: 1px dashed var(--line);
  padding: 48px; border-radius: var(--radius-lg); text-align: center;
  color: var(--ink-soft);
}

/* ---------- Trust strip ---------- */
.trust-strip {
  background: var(--bg-elev);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 20px 0;
  font-size: 0.86rem; color: var(--ink-soft);
}
.trust-strip-inner {
  display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
  align-items: center;
}
.trust-strip-inner span {
  display: inline-flex; align-items: center; gap: 8px;
}
.trust-strip-inner span::before {
  content: '✓'; color: var(--sage); font-weight: 700;
}

/* ---------- Featured banner (job count callout) ---------- */
.live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(79, 112, 88, 0.10);
  color: var(--sage-deep);
  font-size: 0.82rem; font-weight: 600;
  padding: 6px 14px 6px 12px; border-radius: 999px;
  border: 1px solid rgba(79, 112, 88, 0.18);
  margin-bottom: 18px;
}
.live-pill::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--sage); box-shadow: 0 0 0 4px rgba(79, 112, 88, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(79, 112, 88, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(79, 112, 88, 0.05); }
}
