/* ============================================================
   Helping Hub Ltd — Site styles
   Palette:
   --ink       #16262B  near-black teal (text)
   --petrol    #10454F  deep petrol teal (brand)
   --petrol-2  #0C3640  darker hover state
   --amber     #E8A33D  warm amber (action/highlight)
   --mist      #EEF3F3  cool pale wash (section bg)
   --line      #D8E2E2  hairlines
   ============================================================ */

:root {
  --ink: #16262B;
  --petrol: #10454F;
  --petrol-2: #0C3640;
  --amber: #E8A33D;
  --amber-2: #D08F27;
  --mist: #EEF3F3;
  --line: #D8E2E2;
  --white: #ffffff;
  --radius: 10px;
  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}

img { max-width: 100%; display: block; }
a { color: var(--petrol); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--amber); color: var(--ink); padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.01em;
}

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--petrol); color: var(--white);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.25rem;
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; right: -3px; bottom: -3px;
  width: 12px; height: 12px; border-radius: 4px; background: var(--amber);
}
.brand-text {
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  display: flex; flex-direction: column; line-height: 1.05;
}
.brand-sub {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--petrol);
}

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: 0.98rem;
  padding: 8px 14px; border-radius: 8px;
}
.site-nav a:hover { background: var(--mist); }
.site-nav a.active { color: var(--petrol); background: var(--mist); }
.site-nav .nav-cta {
  background: var(--petrol); color: var(--white); margin-left: 8px;
}
.site-nav .nav-cta:hover, .site-nav .nav-cta.active { background: var(--petrol-2); color: var(--white); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 24px; height: 2.5px; background: var(--ink);
  margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s;
}

/* ---------- Flash ---------- */
.flash { margin: 16px 0; padding: 14px 18px; border-radius: var(--radius); font-weight: 600; }
.flash-success { background: #E7F4EC; color: #1F6B3C; border: 1px solid #BFE3CC; }
.flash-error   { background: #FBEAEA; color: #96302D; border: 1px solid #F0C7C6; }

/* ---------- Hero ---------- */
.hero {
  background: var(--petrol);
  color: var(--white);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 85% 10%, rgba(232,163,61,.18), transparent 70%),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.025) 0 2px, transparent 2px 14px);
  pointer-events: none;
}
/* When real photo slides are present, the decorative diagonal pattern is
   redundant (and can look noisy layered over an actual photo) — the dark
   overlay below handles both the cohesive tint and text-legibility jobs. */
.hero.has-slides::before { display: none; }

.hero-slideshow { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.4s ease;
}
.hero-slide.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}
/* Dark tint over the photos — guarantees the white headline/search bar stay
   legible regardless of how bright any individual photo is. Not optional:
   this is what keeps text readable across arbitrary future photo uploads. */
.hero-slideshow-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(12,54,64,.82) 0%, rgba(12,54,64,.68) 45%, rgba(12,54,64,.45) 100%);
}

.hero-wave {
  position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 64px;
  display: block; pointer-events: none; z-index: 2;
}
.hero-inner { position: relative; max-width: 780px; z-index: 2; }
.hero .eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 14px;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 800;
  margin-bottom: 14px;
}
.hero h1 em { font-style: normal; color: var(--amber); }
.hero p.lead { font-size: 1.15rem; color: #D7E4E6; max-width: 560px; margin-bottom: 30px; }

/* Search bar — the hero's working part */
.search-bar {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 10px;
  background: var(--white);
  padding: 10px;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
}
.search-bar input, .search-bar select {
  border: 0; background: transparent; font: inherit; color: var(--ink);
  padding: 12px 14px; width: 100%;
}
.search-bar input:focus, .search-bar select:focus { outline: 2px solid var(--amber); border-radius: 8px; }
.search-bar .field { border-right: 1px solid var(--line); }
.search-bar .field:last-of-type { border-right: 0; }

.hero-stats { display: flex; gap: 34px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats div { border-left: 3px solid var(--amber); padding-left: 12px; }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.4rem; }
.hero-stats span { font-size: 0.9rem; color: #C4D6D9; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  padding: 12px 26px; border-radius: 10px; border: 0; cursor: pointer;
  text-decoration: none; text-align: center;
  transition: background .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: var(--amber-2); }
.btn-dark { background: var(--petrol); color: var(--white); }
.btn-dark:hover { background: var(--petrol-2); }
.btn-outline { background: transparent; color: var(--petrol); border: 2px solid var(--petrol); }
.btn-outline:hover { background: var(--mist); }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-mist { background: var(--mist); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
.section-head .sub { color: #4A5D62; margin-top: 6px; }

/* ---------- Job cards ---------- */
.job-list { display: grid; gap: 14px; }
.job-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--petrol);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: box-shadow .15s, border-color .15s;
}
.job-card:hover { box-shadow: 0 10px 26px rgba(16,69,79,.10); }
.job-card.featured { border-left-color: var(--amber); }
.job-card h3 { font-size: 1.15rem; margin-bottom: 4px; }
.job-card h3 a { color: var(--ink); text-decoration: none; }
.job-card h3 a:hover { color: var(--petrol); text-decoration: underline; }
.job-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.92rem; color: #4A5D62; }
.job-meta span { display: inline-flex; align-items: center; gap: 5px; }
.job-meta .salary { color: var(--petrol); font-weight: 600; }
.job-tags { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 0.78rem; font-weight: 600;
  background: var(--mist); color: var(--petrol);
  padding: 3px 10px; border-radius: 999px;
}
.tag-featured { background: #FBEED6; color: #8A5E12; }
.job-card-side { text-align: right; display: grid; gap: 8px; justify-items: end; }
.job-posted { font-size: 0.82rem; color: #6B7C80; }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; text-decoration: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.cat-card:hover { border-color: var(--petrol); box-shadow: 0 8px 20px rgba(16,69,79,.08); }
.cat-card { display: block; }
.cat-card-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--petrol);
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.cat-card:hover .cat-card-icon { background: var(--amber-2); }
.cat-card strong { font-family: var(--font-display); display: block; margin-bottom: 4px; }
.cat-card span { font-size: 0.88rem; color: #4A5D62; }

/* ---------- Steps (how it works) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  color: var(--white); background: var(--petrol);
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.08rem; margin-bottom: 6px; }
.step p { font-size: 0.95rem; color: #4A5D62; }

/* ---------- Jobs page: filters ---------- */
.jobs-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.filters {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; position: sticky; top: 88px;
}
.filters h2 { font-size: 1.05rem; margin-bottom: 14px; }
.filters label { display: block; font-weight: 600; font-size: 0.88rem; margin: 12px 0 4px; }
.filters input, .filters select {
  width: 100%; padding: 10px 12px; font: inherit;
  border: 1px solid var(--line); border-radius: 8px;
}
.filters .btn { width: 100%; margin-top: 16px; }
.results-count { color: #4A5D62; }

/* ---------- Job details ---------- */
.job-header { background: var(--mist); padding: 44px 0; border-bottom: 1px solid var(--line); }
.job-header h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-bottom: 8px; }
.job-detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; margin-top: 36px; }
.job-body h2 { font-size: 1.25rem; margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--mist); }
.job-body h2:first-child { margin-top: 0; }
.job-body ul { padding-left: 22px; margin: 8px 0; }
.job-body li { margin: 6px 0; }
.apply-box {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; position: sticky; top: 88px;
}
.apply-box dl { margin: 14px 0; }
.apply-box dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: #6B7C80; margin-top: 12px; }
.apply-box dd { font-weight: 600; }
.apply-box .btn { width: 100%; }
.deadline-warn { color: #96302D; font-weight: 600; font-size: 0.9rem; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; max-width: 720px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 0.95rem; }
.form-group .req { color: #96302D; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 13px; font: inherit;
  border: 1px solid #B9C8CB; border-radius: 8px; background: var(--white);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: 2px solid var(--amber); border-color: var(--petrol);
}
.form-hint { font-size: 0.85rem; color: #6B7C80; margin-top: 4px; }
.form-error { background: #FBEAEA; border: 1px solid #F0C7C6; color: #96302D; padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--petrol); color: var(--white); padding: 56px 0; }
.cta-band h2 { color: var(--white); font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 8px; }
.cta-band p { color: #D7E4E6; margin-bottom: 22px; max-width: 620px; }

/* ---------- Content pages ---------- */
.page-head { background: var(--mist); padding: 48px 0; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.page-head p { color: #4A5D62; margin-top: 8px; max-width: 640px; }
.prose { max-width: 760px; }
.prose p { margin-bottom: 16px; }
.prose h2 { margin: 30px 0 10px; font-size: 1.35rem; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px;
  text-decoration: none; font-weight: 600; color: var(--ink);
}
.pagination a:hover { background: var(--mist); }
.pagination .current { background: var(--petrol); color: var(--white); border-color: var(--petrol); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #B9C8CB; margin-top: 64px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; padding: 52px 20px 32px;
}
.footer-brand .brand-text, .footer-brand .brand-sub { color: var(--white); }
.footer-brand .brand-sub { color: var(--amber); }
.footer-blurb { margin-top: 14px; font-size: 0.95rem; max-width: 340px; }
.site-footer h3 { color: var(--white); font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 12px; }
.footer-links { list-style: none; }
.footer-links li { margin: 8px 0; }
.footer-links a { color: #B9C8CB; text-decoration: none; }
.footer-links a:hover { color: var(--amber); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid #2A3C41; padding-top: 20px; padding-bottom: 24px; font-size: 0.88rem;
}
.footer-bottom a { color: #8DA3A8; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .jobs-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .job-detail-layout { grid-template-columns: 1fr; }
  .apply-box { position: static; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 10px 16px 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav .nav-cta { margin-left: 0; margin-top: 6px; }
  .search-bar { grid-template-columns: 1fr; }
  .search-bar .field { border-right: 0; border-bottom: 1px solid var(--line); }
  .job-card { grid-template-columns: 1fr; }
  .job-card-side { text-align: left; justify-items: start; }
  .form-grid { grid-template-columns: 1fr; }
}