/* ==========================================================================
   HB&S Industries — site styles
   Natural neutrals, boutique/premium tone, automatic light & dark mode.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Light mode (default) — warm stone & charcoal */
  --bg: #f6f4ef;
  --bg-alt: #edeae1;
  --surface: #fbfaf7;
  --text: #2b2925;
  --muted: #6b665c;
  --line: #dcd7ca;
  --accent: #7d6a4f;
  --accent-strong: #5f5140;
  --accent-soft: #efe9dd;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1c19;
    --bg-alt: #262320;
    --surface: #24211d;
    --text: #e8e4da;
    --muted: #a59d8e;
    --line: #3a362e;
    --accent: #b49b76;
    --accent-strong: #cbb48f;
    --accent-soft: #2e2a24;
  }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.005em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.25rem; }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 46em;
}

/* --------------------------------------------------------------------------
   Header & navigation
   -------------------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }

.brand .mark { width: 30px; height: 30px; color: var(--accent); flex: none; }

.brand .wordmark {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.4rem;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--text); }

.site-nav .nav-cta {
  color: var(--bg);
  background: var(--accent-strong);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
}
.site-nav .nav-cta:hover { background: var(--accent); color: var(--bg); }

/* --------------------------------------------------------------------------
   Sections & hero
   -------------------------------------------------------------------------- */

.section { padding: 4.5rem 0; }
.section.alt { background: var(--bg-alt); }

.hero { padding: 6rem 0 5rem; }
.hero h1 { max-width: 15em; margin-bottom: 1.25rem; }
.hero .lead { margin-bottom: 2.25rem; }

.section-head { margin-bottom: 2.5rem; max-width: 46em; }
.section-head p { color: var(--muted); margin-top: 0.75rem; }

.prose { max-width: 46em; }
.prose p + p { margin-top: 1rem; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent-strong); color: var(--bg); }
.btn-primary:hover { background: var(--accent); }

.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

/* --------------------------------------------------------------------------
   Cards & grids
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 1.6rem 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.75rem;
}

.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--muted); font-size: 0.98rem; }

/* "Core specialty" badge floats on the card's top border so headings
   stay aligned across the row. */
.card .tag {
  position: absolute;
  top: -0.8rem;
  left: 1.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent-strong);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  white-space: nowrap;
}

.card.featured { border-color: var(--accent); }

/* --------------------------------------------------------------------------
   Project list
   -------------------------------------------------------------------------- */

.project-list { list-style: none; border-top: 1px solid var(--line); max-width: 46em; }

.project-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.project-list .value {
  font-family: var(--font-display);
  color: var(--accent-strong);
  font-weight: 600;
  white-space: nowrap;
}

.orgs { margin-top: 2rem; color: var(--muted); max-width: 46em; }
.orgs strong { color: var(--text); font-weight: 600; }
.orgs p + p { margin-top: 0.75rem; }

/* --------------------------------------------------------------------------
   Service detail blocks
   -------------------------------------------------------------------------- */

.service-block {
  border-top: 1px solid var(--line);
  padding: 2.25rem 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
  gap: 1rem 3rem;
}

.service-block:last-of-type { border-bottom: 1px solid var(--line); }

.service-block .num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.service-block h3 { margin: 0.2rem 0 0.75rem; font-size: 1.35rem; }
.service-block .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  margin-top: 0.75rem;
}
.service-block p { color: var(--muted); max-width: 42em; }
.service-block p + p { margin-top: 0.75rem; }

@media (max-width: 720px) {
  .service-block { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* --------------------------------------------------------------------------
   Credentials / fact list
   -------------------------------------------------------------------------- */

.fact-list { list-style: none; max-width: 46em; }
.fact-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.fact-list .label {
  flex: 0 0 11rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.fact-list .val { color: var(--muted); flex: 1 1 16rem; }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */

.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 0.9rem; }
.cta-band p { color: var(--muted); max-width: 38em; margin: 0 auto 2rem; }

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 3rem;
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-channels { list-style: none; }
.contact-channels li { margin-bottom: 1.5rem; }
.contact-channels .label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.2rem;
}
.contact-channels a { font-size: 1.15rem; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.contact-channels .note { color: var(--muted); font-size: 0.95rem; margin-top: 0.2rem; }

.form-field { margin-bottom: 1.2rem; }
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.form-note { color: var(--muted); font-size: 0.9rem; margin-top: 1rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer .legal { max-width: 32em; }
