/* Shared stylesheet for interior pages (services, industries, compliance, about, blog).
   Mirrors the design system in index.html — tokens, nav, footer, buttons must stay
   visually identical to the homepage. index.html keeps its own inline styles. */

/* ---------- Fonts (latin subsets) ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-italic-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens + base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #FAFAF7;
  --bg-warm: #F5F4EF;
  --bg-card: #FFFFFF;
  --ink: #0A0A0A;
  --ink-soft: #2D2D2D;
  --muted: #737373;
  --muted-soft: #A3A3A3;
  --border: #E8E8E3;
  --border-soft: #F0F0EB;
  --accent: #000000;
  --accent-dim: #171717;
  --sage: #4A5D43;
  --coral: #E4572E;
}

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--bg); }

/* ---------- Nav (matches homepage; mobile menu is CSS-only so it works without JS) ---------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(250, 250, 247, 0.85);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand-mark {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.mobile-toggle {
  display: none;
  font-size: 1.25rem;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
#menu-state { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { transform: translateY(-2px); }
.btn-outline { border: 1px solid var(--border); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--ink); }

/* ---------- Page header ---------- */
.page-header {
  max-width: 880px;
  margin: 0 auto;
  padding: 10rem 2rem 3rem;
}
.breadcrumbs {
  font-size: 0.8rem;
  color: var(--muted-soft);
  margin-bottom: 1.5rem;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--coral); }
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--coral);
  margin-bottom: 1rem;
}
.page-header h1 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}
.page-header h1 em { font-style: italic; color: var(--coral); }
.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 640px;
}
.header-cta { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.header-cta .phone-note { color: var(--muted); font-size: 0.9rem; }
.header-cta .phone-note a { color: var(--ink); font-weight: 600; text-decoration: none; }

/* ---------- Article / content ---------- */
.content {
  max-width: 880px;
  margin: 0 auto;
  padding: 1rem 2rem 4rem;
}
.content h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1.2;
  margin: 3rem 0 1rem;
}
.content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}
.content p { color: var(--ink-soft); margin-bottom: 1rem; max-width: 70ch; }
.content ul, .content ol { margin: 0 0 1rem 1.4rem; color: var(--ink-soft); }
.content li { margin-bottom: 0.5rem; max-width: 65ch; }
.content a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--coral); text-underline-offset: 3px; }
.content a:hover { color: var(--coral); }
.content strong { color: var(--ink); }

/* ---------- Cards & grids ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
}
.card h3 { margin: 0 0 0.5rem; font-size: 1rem; font-weight: 600; }
.card p { font-size: 0.92rem; color: var(--muted); margin: 0; }
.card .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--coral);
  display: block;
  margin-bottom: 0.75rem;
}

/* ---------- Checklist table ---------- */
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}
.content th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.content td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-soft);
  color: var(--ink-soft);
  vertical-align: top;
}

/* ---------- Callout ---------- */
.callout {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--coral);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.callout p { margin: 0; font-size: 0.95rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: var(--bg);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  margin: 3rem 0 1rem;
}
.cta-band h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 1.9rem;
  margin: 0 0 0.75rem;
  color: var(--bg);
}
.cta-band h2 em { font-style: italic; color: var(--coral); }
.cta-band p { color: rgba(250, 250, 247, 0.75); margin-bottom: 1.5rem; max-width: 56ch; }
.cta-band .btn-coral { background: var(--coral); color: #fff; }

/* ---------- Contact form (plain POST to Formspree — works without JS) ---------- */
.mini-form { display: grid; gap: 0.9rem; max-width: 480px; margin-top: 1rem; }
.mini-form label { font-size: 0.8rem; font-weight: 600; }
.mini-form input, .mini-form textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
}
.mini-form input:focus, .mini-form textarea:focus { outline: 2px solid var(--coral); border-color: transparent; }

/* ---------- FAQ (CSS-only accordion via details/summary) ---------- */
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
}
.faq summary {
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--coral); font-size: 1.2rem; flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 0.75rem; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Footer (matches homepage) ---------- */
footer {
  background: var(--bg-warm);
  padding: 6rem 2rem 3rem;
  margin-top: 6rem;
}
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}
.footer-brand p {
  color: var(--muted);
  margin-top: 1rem;
  font-size: 0.95rem;
  max-width: 340px;
  line-height: 1.6;
}
.footer-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--coral); }
.footer-col span { display: block; color: var(--muted-soft); font-size: 0.85rem; }
.footer-bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-bottom a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-bottom a:hover { color: var(--coral); }

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 2rem 1.25rem;
  }
  .nav-links a { padding: 0.7rem 0; width: 100%; }
  #menu-state:checked ~ .nav-links { display: flex; }
  .page-header { padding-top: 8rem; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .cta-band { padding: 2.25rem 1.5rem; }
}

/* ---------- Nav dropdown (click-to-open <details>, works without JS) ---------- */
.has-dropdown { position: relative; }
.drop-trigger {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.2s;
}
.drop-trigger::-webkit-details-marker { display: none; }
.drop-trigger::after { content: " ▾"; font-size: 0.85em; }
.has-dropdown[open] .drop-trigger::after { content: " ▴"; }
.has-dropdown:hover .drop-trigger,
.has-dropdown[open] .drop-trigger { color: var(--ink); }
.dropdown {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem 0;
  min-width: 230px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}
.dropdown a {
  display: block;
  padding: 0.55rem 1.25rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}
.dropdown a:hover { color: var(--coral); }

@media (max-width: 768px) {
  .has-dropdown { width: 100%; }
  .dropdown {
    position: static;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.25rem 0 0 1rem;
    min-width: 0;
  }
  .dropdown a { padding: 0.5rem 0; }
}

/* ---------- Blog ---------- */
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
}
.post-meta .byline strong { color: var(--ink); }
.post-list { display: grid; gap: 1.25rem; margin: 2rem 0; }
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  display: block;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s;
}
.post-card:hover { transform: translateY(-2px); border-color: var(--coral); }
.post-card .date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.post-card h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--ink);
  margin: 0.5rem 0;
}
.post-card p { color: var(--muted); font-size: 0.95rem; margin: 0; }
