/* HCS Engineering, Inc. — Simple, responsive, single-page site */

/* ---- Base ---- */
:root{
  /* Dark professional palette */
  --bg: #0b1220;
  --panel: #0f1a2e;
  --card: #111f3a;

  --text: #eef2ff;
  --muted: rgba(238,242,255,.72);
  --line: rgba(230,232,238,.14);

  --brand: #1b4dff;
  --brand-2: #0b2d9f;

  --radius: 18px;
  --shadow: 0 10px 28px rgba(0,0,0,.35);

  --max: 1100px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

a{ color: var(--brand-2); text-decoration: none; }
a:hover{ text-decoration: underline; }

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

.skip-link{
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left: 18px;
  top: 12px;
  width:auto;
  height:auto;
  padding:10px 12px;
  background: var(--card);
  border:1px solid var(--line);
  border-radius:10px;
  z-index: 9999;
}

/* ---- Header / Nav ---- */
.site-header{
  background: rgba(15,26,46,.95);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 240px;
}
.brand:hover{ text-decoration: none; }

.brand-mark{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 800;
  letter-spacing: .5px;
}
.brand-text{ display:flex; flex-direction:column; }
.brand-name{ font-weight: 800; font-size: 14px; color: var(--text); }
.brand-sub{ font-size: 12px; color: var(--muted); margin-top: 1px; }

.site-nav{
  display:flex;
  gap: 14px;
  align-items:center;
}
.site-nav a{
  color: var(--text);
  font-weight: 650;
  font-size: 14px;
  padding: 10px 10px;
  border-radius: 10px;
}
.site-nav a:hover{
  background: rgba(255,255,255,.08);
  text-decoration: none;
}

.nav-toggle{ display:none; }
.nav-toggle-label{
  display:none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  align-items:center;
  justify-content:center;
  gap: 5px;
  flex-direction: column;
  cursor: pointer;
}
.nav-toggle-label span{
  display:block;
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,.85);
  border-radius: 99px;
}

/* ---- Sections ---- */
.hero{
  background: linear-gradient(180deg, #0b1220 0%, #0f1a2e 100%),
              radial-gradient(900px 520px at 20% -20%, rgba(27,77,255,.38) 0%, rgba(27,77,255,0) 60%),
              radial-gradient(820px 460px at 90% 0%, rgba(11,45,159,.28) 0%, rgba(11,45,159,0) 55%);
  padding: 34px 0 12px;
}
.section{
  background: var(--bg);

  padding: 26px 0;
}

.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.hero-card h1{
  margin: 8px 0 10px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.12;
}
.kicker{
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
}
.lead{
  color: var(--muted);
  font-size: 16px;
  margin: 10px 0;
}

.section-head{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.section-head h2{ margin: 0; }
.muted{ color: var(--muted); }

h2{
  margin: 0 0 10px;
  font-size: 22px;
}
p{ margin: 10px 0; }

/* ---- Buttons ---- */
.cta-row{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.btn{
  display:inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 750;
}
.btn:hover{ text-decoration:none; filter: brightness(0.98); }
.btn-secondary{
  background: var(--card);
  color: var(--text);
  border-color: var(--line);
}

/* ---- Staff Cards ---- */
.staff-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}
.staff-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  padding: 14px;
  text-align: center;
}
.staff-card img{
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.staff-card h3{
  margin: 10px 0 0;
  font-size: 16px;
}
.badge{
  display:inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-weight: 650;
  font-size: 12px;
}

/* ---- Contact ---- */
.contact-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  align-items: start;
}
.contact-block{ margin-top: 0; }
.contact-note{
  border: 1px dashed rgba(230,232,238,.22);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255,255,255,.04);
}

/* ---- Footer ---- */
.site-footer{
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 18px 0;
  color: var(--muted);
  background: var(--card);
  font-size: 13px;
}

/* ---- Mobile ---- */
@media (max-width: 840px){
  .brand{ min-width: unset; }
  .section-head{ flex-direction: column; align-items: flex-start; }

  /* Nav becomes dropdown */
  .nav-toggle-label{ display:flex; }
  .site-nav{
    position: absolute;
    right: 18px;
    top: 64px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    box-shadow: var(--shadow);
    display:none;
    flex-direction: column;
    gap: 2px;
    min-width: 210px;
  }
  .site-nav a{ padding: 10px 12px; }
  .nav-toggle:checked ~ .site-nav{ display:flex; }

  .contact-grid{ grid-template-columns: 1fr; }
}

/* ---- Projects Page (match Staff Card sizing) ---- */

.project-section {
  margin-top: 18px;
}

.project-grid{
  display: grid;
  /* Desktop+tablet: responsive multi-column grid */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 14px;
  align-items: stretch;
}

.project-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  padding: 14px;
  text-align: center;
  margin: 0;             /* reset figure default */
  width: 100%;
}

.project-card img{
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;   /* matches staff cards */
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: block;
}

.project-card figcaption{
  margin-top: 10px;
  font-size: 16px;
  font-weight: 650;
  color: var(--text);
}

.project-card figcaption .muted{
  display:block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 520px){
  .project-grid{
    grid-template-columns: 1fr;
    justify-content: center;
  }
  .project-card{
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---- Projects Filters (CSS-only, no JS) ---- */
.project-filters{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  align-items:center;
  margin: 12px 0 18px;
}
.project-filters input[type="radio"]{
  position:absolute;
  left:-9999px;
}
.project-filters label{
  display:inline-flex;
  align-items:center;
  gap: .4rem;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  cursor:pointer;
  user-select:none;
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
}
.project-filters label:hover{
  background: rgba(255,255,255,.07);
}
.project-filters input[type="radio"]:checked + label{
  background: rgba(255,255,255,.10);
  border-color: rgba(230,232,238,.28);
}

/* Wrapper used for filter targeting */
.projects-wrap .project-section{ display:block; }

/* Hide all categories when any specific filter (not All) is selected */
#filter-commercial:checked ~ .projects-wrap .project-section,
#filter-schools:checked ~ .projects-wrap .project-section,
#filter-green:checked ~ .projects-wrap .project-section,
#filter-utility:checked ~ .projects-wrap .project-section,
#filter-municipal:checked ~ .projects-wrap .project-section,
#filter-religious:checked ~ .projects-wrap .project-section{
  display:none;
}

/* Show only the selected category */
#filter-commercial:checked ~ .projects-wrap .cat-commercial{ display:block; }
#filter-schools:checked ~ .projects-wrap .cat-schools{ display:block; }
#filter-green:checked ~ .projects-wrap .cat-green{ display:block; }
#filter-utility:checked ~ .projects-wrap .cat-utility{ display:block; }
#filter-municipal:checked ~ .projects-wrap .cat-municipal{ display:block; }
#filter-religious:checked ~ .projects-wrap .cat-religious{ display:block; }

/* Sticky filter bar: projects scroll below */
.project-filters{
  position: sticky;
  top: 72px; /* sits below the site header */
  z-index: 20;
  padding: 10px 0;
  background: rgba(7, 10, 18, .88);
  backdrop-filter: blur(8px);
}
@media (max-width: 720px){
  .project-filters{ top: 64px; }
}


/* Parks and Recreation filter */
#filter-parks:checked ~ .projects-wrap .project-section{ display:none; }
#filter-parks:checked ~ .projects-wrap .cat-parks{ display:block; }



/* =========================================================
   Projects Page (scoped to avoid conflicts with other pages)
   Add class="projects-page" to <body> in projects.html
   ========================================================= */

/* Accessibility helper (safe globally) */
.sr-only{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

/* Ensure project page nav current state matches other styling */
.projects-page .site-nav a[aria-current="page"]{
  background: rgba(255,255,255,.08);
  text-decoration: none;
}

/* Normalize project captions: title + meta (consistent) */
.projects-page .project-card figcaption{
  margin-top: 10px;
  font-size: 16px;
  font-weight: 650;
  color: var(--text);
}
.projects-page .project-card figcaption .title{
  display:block;
}
.projects-page .project-card figcaption .meta{
  display:block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* Filters — scoped, sticky, keyboard focus */
.projects-page .project-filters{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  align-items:center;
  margin: 12px 0 18px;

  position: sticky;
  top: 72px; /* sits below the site header */
  z-index: 20;
  padding: 10px 0;
  background: rgba(7, 10, 18, .88);
  backdrop-filter: blur(8px);
}
@media (max-width: 720px){
  .projects-page .project-filters{ top: 64px; }
}

/* Radio inputs visually hidden but remain accessible */
.projects-page .project-filters input[type="radio"]{
  position:absolute;
  left:-9999px;
}

/* Chip labels */
.projects-page .project-filters label{
  display:inline-flex;
  align-items:center;
  gap: .4rem;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  cursor:pointer;
  user-select:none;
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
}
.projects-page .project-filters label:hover{
  background: rgba(255,255,255,.07);
}
.projects-page .project-filters input[type="radio"]:checked + label{
  background: rgba(255,255,255,.10);
  border-color: rgba(230,232,238,.28);
}
/* Visible keyboard focus on the selected chip */
.projects-page .project-filters input[type="radio"]:focus-visible + label{
  outline: 3px solid rgba(27,77,255,.65);
  outline-offset: 2px;
}

/* Filtering logic — scoped and updated: Schools -> Education */
.projects-page .projects-wrap .project-section{ display:block; }

/* Hide all categories when a specific filter (not All) is selected */
.projects-page #filter-commercial:checked ~ .projects-wrap .project-section,
.projects-page #filter-education:checked ~ .projects-wrap .project-section,
.projects-page #filter-green:checked ~ .projects-wrap .project-section,
.projects-page #filter-industrial:checked ~ .projects-wrap .project-section,
.projects-page #filter-municipal:checked ~ .projects-wrap .project-section,
.projects-page #filter-office:checked ~ .projects-wrap .project-section,
.projects-page #filter-parks:checked ~ .projects-wrap .project-section,
.projects-page #filter-religious:checked ~ .projects-wrap .project-section,
.projects-page #filter-transportation:checked ~ .projects-wrap .project-section,
.projects-page #filter-utility:checked ~ .projects-wrap .project-section{
  display:none;
}

/* Show only the selected category */
.projects-page #filter-commercial:checked ~ .projects-wrap .cat-commercial{ display:block; }
.projects-page #filter-education:checked ~ .projects-wrap .cat-education{ display:block; }
.projects-page #filter-green:checked ~ .projects-wrap .cat-green{ display:block; }
.projects-page #filter-industrial:checked ~ .projects-wrap .cat-industrial{ display:block; }
.projects-page #filter-municipal:checked ~ .projects-wrap .cat-municipal{ display:block; }
.projects-page #filter-office:checked ~ .projects-wrap .cat-office{ display:block; }
.projects-page #filter-parks:checked ~ .projects-wrap .cat-parks{ display:block; }
.projects-page #filter-religious:checked ~ .projects-wrap .cat-religious{ display:block; }
.projects-page #filter-transportation:checked ~ .projects-wrap .cat-transportation{ display:block; }
.projects-page #filter-utility:checked ~ .projects-wrap .cat-utility{ display:block; }

/* Back-compat: if an older projects.html still uses 'schools', keep it working
   (remove later when you're fully migrated). */
.projects-page #filter-schools:checked ~ .projects-wrap .project-section{ display:none; }
.projects-page #filter-schools:checked ~ .projects-wrap .cat-schools{ display:block; }


/* ---- Projects filter bar fix (sticky chips, not the whole fieldset) ---- */
.projects-page .project-filters{
  border: 0;
  padding: 0;
  margin: 12px 0 18px;
  min-inline-size: 0;
}

/* Sticky bar that stays at top while projects scroll underneath */
.projects-page .project-filters .filter-bar{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  align-items:center;

  position: sticky;
  top: 72px; /* below the site header */
  z-index: 30;
  padding: 10px 0;
  background: rgba(7, 10, 18, .88);
  backdrop-filter: blur(8px);
}
@media (max-width: 720px){
  .projects-page .project-filters .filter-bar{ top: 64px; }
}

/* Inputs hidden but accessible */
.projects-page .project-filters .filter-bar input[type="radio"]{
  position:absolute;
  left:-9999px;
}

/* Chips */
.projects-page .project-filters .filter-bar label{
  display:inline-flex;
  align-items:center;
  gap: .4rem;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  cursor:pointer;
  user-select:none;
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
}
.projects-page .project-filters .filter-bar label:hover{
  background: rgba(255,255,255,.07);
}
.projects-page .project-filters .filter-bar input[type="radio"]:checked + label{
  background: rgba(255,255,255,.10);
  border-color: rgba(230,232,238,.28);
}
.projects-page .project-filters .filter-bar input[type="radio"]:focus-visible + label{
  outline: 3px solid rgba(27,77,255,.65);
  outline-offset: 2px;
}

/* Give content a little breathing room under the sticky bar */
.projects-page .projects-wrap{
  padding-top: 6px;
}


/* ---- Projects filter bar (final) ---- */
.projects-page .project-filters input[type="radio"]{
  position:absolute;
  left:-9999px;
}

/* Selected chip styling using :has() (modern browsers) */
.projects-page .project-filters:has(#filter-all:checked) .filter-bar label[for="filter-all"],
.projects-page .project-filters:has(#filter-commercial:checked) .filter-bar label[for="filter-commercial"],
.projects-page .project-filters:has(#filter-education:checked) .filter-bar label[for="filter-education"],
.projects-page .project-filters:has(#filter-green:checked) .filter-bar label[for="filter-green"],
.projects-page .project-filters:has(#filter-industrial:checked) .filter-bar label[for="filter-industrial"],
.projects-page .project-filters:has(#filter-municipal:checked) .filter-bar label[for="filter-municipal"],
.projects-page .project-filters:has(#filter-office:checked) .filter-bar label[for="filter-office"],
.projects-page .project-filters:has(#filter-parks:checked) .filter-bar label[for="filter-parks"],
.projects-page .project-filters:has(#filter-religious:checked) .filter-bar label[for="filter-religious"],
.projects-page .project-filters:has(#filter-transportation:checked) .filter-bar label[for="filter-transportation"],
.projects-page .project-filters:has(#filter-utility:checked) .filter-bar label[for="filter-utility"]{
  background: rgba(255,255,255,.10);
  border-color: rgba(230,232,238,.28);
}


/* =========================================================
   FORCE LEFT JUSTIFICATION FOR PROJECT LIST / GROUPED CARDS
   ========================================================= */

.project-card.project-list-card,
.project-card.project-list-card * {
    text-align: left;
}

.project-card.project-list-card {
    align-items: flex-start;
}

.project-card.project-list-card ul {
    padding-left: 1.1rem;
    margin: 0.25rem 0 0 0;
}

.project-card.project-list-card li {
    text-align: left;
    list-style-position: outside;
}



/* =========================================================
   LIST CARD SCROLL AREA + DENSITY
   - Keeps cards a consistent height.
   - Long lists scroll inside the card (no JS).
   ========================================================= */

.project-card.project-list-card .list-scroll{
    max-height: 16rem;
    overflow: auto;
    width: 100%;
}

.project-card.project-list-card .project-list{
    margin: 0.5rem 0 0 0;
}
