/* Miers & Sons, LLC -- site design system
   Fixed theme derived from the approved Claude Design mockup
   (Miers & Sons Site.dc.html): dark navy background, blue accent,
   Spectral / IBM Plex Sans / IBM Plex Mono type stack.

   Fonts are self-hosted (static/fonts/) rather than loaded from a
   third-party font CDN -- the site's CSP is default-src 'self' with no
   font/style exceptions, and the app avoids external requests on
   public pages by policy. */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-variable.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-400.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/spectral-300.woff2') format('woff2');
}

@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/spectral-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Spectral';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/spectral-400italic.woff2') format('woff2');
}

:root {
  --bg: #0b1320;
  --bg-raised: #101a2c;
  --fg: #e9ecf2;
  --fg-soft: #cdd6e6;
  --fg-mute: #9aa7bd;
  --fg-dim: #8b97ad;
  --fg-faint: #6b7689;
  --accent: #8098c8;
  --accent-ink: #0b1320;
  --border: rgba(233, 236, 242, 0.10);
  --border-strong: rgba(233, 236, 242, 0.14);
  --error: #d98c8c;

  --serif: 'Spectral', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', 'SFMono-Regular', monospace;

  --wrap: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(128, 152, 200, 0.32);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(233, 236, 242, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 236, 242, 0.028) 1px, transparent 1px);
  background-size: 78px 78px;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

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

.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 300;
  color: #f1f3f8;
  margin: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(11, 19, 32, 0.72);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 32px;
  max-width: var(--wrap);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand svg {
  display: block;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: #eef1f6;
}

.brand-name .suffix {
  font-weight: 400;
  color: var(--fg-faint);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

.brand-tag {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.26em;
  color: var(--fg-faint);
  margin-top: 3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-nav a {
  font-size: 0.82rem;
  color: var(--fg-mute);
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: #eef1f6;
}

.nav-cta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--accent) !important;
  border: 1px solid rgba(128, 152, 200, 0.45);
  padding: 9px 16px;
  border-radius: 2px;
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--accent-ink) !important;
  border-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  color: var(--fg);
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 0.8rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 32px 20px;
  border-bottom: 1px solid var(--border);
}

.mobile-nav a {
  padding: 12px 4px;
  font-size: 0.92rem;
  color: var(--fg-mute);
  border-bottom: 1px solid var(--border);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav.is-open {
  display: flex;
}

/* ---------- Sections ---------- */

.section {
  border-top: 1px solid var(--border);
  padding: clamp(80px, 11vh, 130px) 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(36px, 6vw, 90px);
}

.section-head .col-label {
  flex: 0 0 190px;
}

.section-head .col-body {
  flex: 1 1 460px;
  min-width: 0;
  max-width: 760px;
}

.section h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-top: 18px;
  max-width: 760px;
}

.section .lede {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  line-height: 1.42;
  color: #e7ebf3;
  margin: 0;
}

.section .body-text {
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--fg-mute);
  margin: 34px 0 0;
  max-width: 640px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(88px, 13vh, 150px) 0 clamp(72px, 10vh, 120px);
}

.hero-inner {
  max-width: 780px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 5.1rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.hero h1 em {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}

.hero p {
  max-width: 580px;
  margin: 34px 0 0;
  font-size: 1.12rem;
  line-height: 1.68;
  color: var(--fg-soft);
  font-weight: 300;
}

.hero .stripe {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--fg-faint);
  margin-top: 30px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 42px;
}

.btn {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 15px 26px;
  font-weight: 500;
  font-size: 0.92rem;
  border-radius: 2px;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
}

.btn:hover {
  filter: brightness(1.1);
}

.link-underline {
  font-size: 0.92rem;
  color: var(--fg-soft);
  border-bottom: 1px solid rgba(205, 214, 230, 0.35);
  padding-bottom: 3px;
}

.link-underline:hover {
  border-color: var(--accent);
  color: #fff;
}

/* ---------- Capabilities ---------- */

.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0 clamp(40px, 5vw, 72px);
  margin-top: clamp(40px, 5vh, 64px);
}

.cap-item {
  display: flex;
  gap: 20px;
  border-top: 1px solid var(--border-strong);
  padding: 26px 0;
}

.cap-item .n {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  padding-top: 5px;
  flex: none;
}

.cap-item .t {
  font-size: 1.1rem;
  line-height: 1.45;
  color: #dbe2ee;
  font-weight: 300;
}

/* ---------- Differentiators ---------- */

.diff-list {
  margin-top: clamp(36px, 5vh, 56px);
}

.diff-row {
  display: grid;
  grid-template-columns: minmax(0, 360px) 1fr;
  gap: clamp(24px, 4vw, 64px);
  border-top: 1px solid var(--border-strong);
  padding: clamp(28px, 4vh, 40px) 0;
  align-items: baseline;
}

.diff-row .diff-title {
  display: flex;
  gap: 18px;
}

.diff-row .n {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  padding-top: 8px;
  flex: none;
}

.diff-row h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  line-height: 1.2;
  font-weight: 400;
}

.diff-row p {
  font-size: 1.04rem;
  line-height: 1.65;
  color: var(--fg-mute);
  margin: 0;
  max-width: 560px;
  font-weight: 300;
}

/* ---------- Engagement model ---------- */

.section-head-flex {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 60px);
  align-items: flex-end;
  justify-content: space-between;
}

.section-head-flex .body-text {
  max-width: 380px;
  margin: 0;
}

.eng-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin-top: clamp(40px, 5vh, 60px);
}

.eng-card {
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 200px;
  transition: border-color 0.15s ease;
}

.eng-card:hover {
  border-color: rgba(128, 152, 200, 0.4);
}

.eng-card .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eng-card .n {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--accent);
}

.eng-card .tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--fg-faint);
}

.eng-card h3 {
  font-family: var(--sans);
  font-size: 1.12rem;
  line-height: 1.35;
  color: #e7ebf3;
  margin: 6px 0 0;
  font-weight: 500;
}

.eng-card p {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--fg-dim);
  margin: auto 0 0;
  font-weight: 300;
}

/* ---------- Impact quote ---------- */

.impact {
  max-width: 980px;
  text-align: center;
}

.impact blockquote {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: #eaeef5;
  margin: 36px 0 0;
}

.impact blockquote em {
  color: var(--accent);
  font-style: italic;
}

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

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(40px, 7vw, 100px);
}

.contact-intro {
  flex: 1 1 360px;
  min-width: 0;
}

.contact-intro h2 {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  max-width: 520px;
}

.contact-intro p {
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--fg-mute);
  margin: 28px 0 0;
  max-width: 480px;
  font-weight: 300;
}

.contact-panel {
  flex: 1 1 380px;
  min-width: 0;
  max-width: 460px;
}

.contact-form {
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.form-input,
.form-textarea {
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 12px 14px;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.honeypot-group {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.errors {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
  color: var(--error);
}

.flashes {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flashes li {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 10px 14px;
  border-radius: 2px;
  border: 1px solid var(--border-strong);
}

.flashes li.success {
  color: var(--accent);
  border-color: rgba(128, 152, 200, 0.4);
}

.flashes li.error {
  color: var(--error);
  border-color: rgba(217, 140, 140, 0.4);
}

.direct-contact {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.direct-contact .label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: var(--fg-faint);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.direct-contact .email-link {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--accent);
  border-bottom: 1px solid rgba(128, 152, 200, 0.4);
  padding-bottom: 5px;
  display: inline-block;
  word-break: break-word;
}

.direct-contact .email-link:hover {
  color: #fff;
  border-color: #fff;
}

.direct-contact .principal-name {
  font-size: 1.05rem;
  color: var(--fg-soft);
}

.direct-contact .principal-title {
  font-size: 0.92rem;
  color: var(--fg-dim);
  margin-top: 3px;
}

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

.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 40px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--fg-soft);
}

.footer-meta {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--fg-faint);
  text-align: right;
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
}

.footer-links a {
  color: var(--fg-mute);
}

.footer-links a:hover {
  color: var(--fg);
}

/* ---------- Legal pages ---------- */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(70px, 10vh, 110px) 32px;
}

.legal h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.legal .updated {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--fg-faint);
  text-transform: uppercase;
  margin-top: 16px;
}

.legal h2 {
  font-size: 1.4rem;
  margin-top: 48px;
}

.legal p, .legal li {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--fg-mute);
  font-weight: 300;
}

.legal .pending-note {
  margin-top: 40px;
  padding: 16px 20px;
  border: 1px solid rgba(217, 140, 140, 0.35);
  border-radius: 2px;
  font-size: 0.88rem;
  color: var(--error);
}

/* ---------- Error pages ---------- */

.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 32px;
}

.error-page .code {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
}

.error-page h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-top: 18px;
}

.error-page p {
  color: var(--fg-mute);
  margin-top: 20px;
  max-width: 480px;
}

.error-page .btn {
  margin-top: 32px;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .contact-grid,
  .section-head,
  .section-head-flex {
    flex-direction: column;
  }

  .contact-panel {
    max-width: none;
  }

  .diff-row {
    grid-template-columns: 1fr;
  }
}
