/*
Theme Name: Neher–McGrath
Description: Lane Coburn & Associates' engineering reference for underground cable ampacity and duct-bank heating.
Version: 1.0.7
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: neher-mcgrath
*/

:root {
  --ink: #25231f;
  --paper: #f6f3ed;
  --white: #fffdf9;
  --line: #ded6ca;
  --muted: #625a50;
  --accent: #9d3822;
  --bright: #ffb18c;
  --dark: #232521;
  --measure: 48rem;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.65 system-ui, sans-serif; }
img { display: block; height: auto; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: .085em; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .15em; }
:focus-visible { outline: 3px solid #d37a42; outline-offset: 4px; }
.shell { width: min(calc(100% - 3rem), 75rem); margin-inline: auto; }
.skip-link { position: absolute; top: .5rem; left: .5rem; z-index: 3; padding: .5rem 1rem; background: var(--white); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; padding-block: 1.15rem; }
.brand { display: inline-flex; gap: .85rem; align-items: center; color: var(--ink); font-size: 1.18rem; font-weight: 750; text-decoration: none; line-height: 1.2; }
.brand small { display: block; margin-top: .3rem; color: var(--muted); font-size: .59rem; letter-spacing: .12em; }
.brand-mark { display: grid; grid-template-columns: repeat(3, 1fr); gap: .2rem; width: 2.5rem; height: 2.5rem; padding: .45rem; flex: none; border: 1px solid var(--line); }
.brand-mark i { border: 1.5px solid var(--accent); border-radius: 50%; }
.brand-mark i:nth-child(5) { background: var(--accent); }
.main-nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; align-items: center; list-style: none; padding: 0; margin: 0; }
.main-nav a { display: block; color: var(--ink); font-size: .88rem; font-weight: 620; text-decoration: none; padding: .45rem 0; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }

.hero { color: var(--white); background: linear-gradient(90deg, #22241f 12%, #24251feb 100%), url("media/soil-texture.jpg") center / cover; }
.hero-inner { display: grid; align-items: center; gap: 2.25rem; padding-block: clamp(2.8rem, 6vw, 5.2rem); }
.hero-home .hero-inner { grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 5rem); }
.eyebrow, .hero-figure span, .nm-card :is(p:first-child) { font-family: ui-monospace, Consolas, monospace; font-size: .74rem; font-weight: 650; letter-spacing: .13em; }
.eyebrow { color: var(--bright); margin: 0 0 1.15rem; }
h1, h2, h3 { line-height: 1.12; text-wrap: balance; letter-spacing: -.035em; }
.hero h1 { margin: 0; font-size: clamp(2.4rem, 5.5vw, 4.5rem); font-weight: 760; overflow-wrap: anywhere; }
.hero-home h1 { font-size: clamp(2.4rem, 5vw, 3.95rem); text-wrap: balance; }
.hero-intro { max-width: 36rem; margin: 1.35rem 0 0; color: #e5ddd0; font-size: clamp(1.06rem, 1.8vw, 1.33rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem 1.45rem; margin-top: 1.85rem; }
.button { display: inline-flex; gap: .8rem; align-items: center; background: #a43c25; color: #fff; padding: .7rem 1rem; font-weight: 700; text-decoration: none; }
.button:hover { background: #bc482b; }
.hero-link { color: var(--white); font-weight: 650; }
.hero-contact { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin-top: .9rem; }
.hero-contact a { color: var(--bright); overflow-wrap: anywhere; }
.hero-figure { margin: 0; background: #1b1d19; border: 1px solid #6a6053; }
.hero-figure img { width: 100%; aspect-ratio: 1.65; object-fit: cover; object-position: center 45%; }
.hero-figure figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; padding: .65rem .85rem; color: #e5ddd0; font-size: .8rem; }
.hero-figure span { color: var(--bright); }

.page-content { padding-block: clamp(2.5rem, 6vw, 5rem); }
.page-content > :not(.nm-cards) { max-width: var(--measure); margin-inline: auto; }
.page-content h2 { font-size: clamp(1.65rem, 3.3vw, 2.35rem); margin-block: 2.6rem 1.1rem; }
.page-content h3 { font-size: 1.35rem; }
.page-content h2:first-child, .page-content > p:first-child { margin-top: 0; }
.page-content h2, .page-content h3 { scroll-margin-top: 1rem; }
.page-content li + li { margin-top: .4rem; }
.page-content a { overflow-wrap: anywhere; }
.page-content .wp-block-image { margin-block: 1.5rem; }
.page-content .wp-block-image img { border: 1px solid var(--line); background: #fff; }
.page-content .wp-block-image a { display: inline-block; }
.home .page-content > h2:first-child { max-width: none; }
.nm-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.nm-services, .nm-software { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nm-cards > .wp-block-group__inner-container { display: contents; }
.nm-card { padding: clamp(1.1rem, 2vw, 1.65rem); background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--accent); }
.nm-card p:first-child { color: var(--accent); margin-top: 0; }
.nm-card h3 { margin: .75rem 0; }
.nm-card h3 a { color: var(--ink); }
.nm-card p:last-child { margin-bottom: 0; color: var(--muted); }
.nm-software .nm-card h2 { margin: 0 0 1rem; font-size: 1.6rem; }
.nm-picture-placeholder { display: grid; place-items: center; aspect-ratio: 16 / 9; margin: 0; padding: 1rem; border: 1px dashed #a89b8b; background: var(--paper); color: var(--muted); text-align: center; }
.nm-demo-placeholder { font-weight: 650; }
.site-footer { background: var(--dark); color: var(--white); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 2rem; }
.site-footer p { margin: .2rem 0 0; color: #dfd5c7; }
.site-footer a { color: var(--bright); }

@media (max-width: 58rem) {
  .header-inner { align-items: flex-start; flex-direction: column; gap: .7rem; }
  .hero-home .hero-inner { grid-template-columns: 1fr; }
}
@media (max-width: 43rem) {
  .shell { width: calc(100% - 2rem); }
  .nm-cards { grid-template-columns: 1fr; }
}
