/* ==========================================================================
   Bernco Solutions — blueprint / technical-drawing design language
   Palette derived from the logo: ink navy #2A3572, flame red #D02434.
   Paper neutrals are cool (HVAC), never pure white/black.
   ========================================================================== */

:root {
  --navy-900: #141A38;
  --navy-800: #1C2451;
  --navy-700: #242E63;
  --ink: #2A3572;
  --ink-soft: #4A5378;
  --paper: #F3F5F9;
  --paper-2: #E9EDF4;
  --paper-3: #DEE4EE;
  --line: rgba(42, 53, 114, 0.28);
  --line-soft: rgba(42, 53, 114, 0.14);
  --line-light: rgba(214, 224, 244, 0.28);
  --line-light-soft: rgba(214, 224, 244, 0.12);
  --light-text: #EDF1F9;
  --light-text-dim: #B9C2DC;
  --red: #D02434;
  --red-dark: #B01E2C;
  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Space Mono", "Courier New", monospace;
  --measure: 62ch;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); letter-spacing: 0.03em; }

p { margin: 0 0 1em; max-width: var(--measure); }

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* --------------------------------------------------------------------------
   Drawing-sheet motifs: figure labels, dimension rules, registration ticks
   -------------------------------------------------------------------------- */

.fig {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}

.fig::after {
  content: "";
  flex: 1 1 4rem;
  max-width: 7rem;
  height: 1px;
  background: var(--line);
}

.bp-dark .fig, .bp-dark .fig-num { color: var(--light-text-dim); }
.bp-dark .fig::after { background: var(--line-light); }

.dim {
  position: relative;
  height: 1px;
  background: var(--line);
  margin: 2.5rem 0;
}

.dim::before, .dim::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 1px;
  height: 9px;
  background: var(--line);
}

.dim::before { left: 0; }
.dim::after { right: 0; }

.bp-dark .dim, .bp-dark .dim::before, .bp-dark .dim::after { background: var(--line-light); }

.panel {
  position: relative;
  border: 1px solid var(--line);
  padding: 1.5rem;
  background: var(--paper);
}

.panel::before, .panel::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  pointer-events: none;
}

.panel::before {
  top: -6px;
  left: -6px;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.panel::after {
  bottom: -6px;
  right: -6px;
  border-bottom: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
}

/* --------------------------------------------------------------------------
   Dark blueprint ground with drafting grid
   -------------------------------------------------------------------------- */

.bp-dark {
  background-color: var(--navy-800);
  background-image:
    linear-gradient(var(--line-light-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-light-soft) 1px, transparent 1px),
    linear-gradient(rgba(214, 224, 244, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 224, 244, 0.05) 1px, transparent 1px);
  background-size: 140px 140px, 140px 140px, 28px 28px, 28px 28px;
  color: var(--light-text);
}

.bp-dark h1, .bp-dark h2, .bp-dark h3 { color: var(--light-text); }
.bp-dark p { color: var(--light-text-dim); }
.bp-dark a { color: var(--light-text); }
.bp-dark a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Buttons — sharp drafting rectangles, no pills
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: #FDF6F4;
}

.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #FDF6F4; }

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-outline:hover { background: var(--ink); color: var(--paper); }

.bp-dark .btn-outline { border-color: var(--light-text); color: var(--light-text); }
.bp-dark .btn-outline:hover { background: var(--light-text); color: var(--navy-800); }

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

/* --------------------------------------------------------------------------
   Utility top bar
   -------------------------------------------------------------------------- */

.topbar {
  background: var(--navy-900);
  color: var(--light-text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.topbar a { color: var(--light-text); text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }

/* --------------------------------------------------------------------------
   Header — light paper, sticky, ruled like a sheet border
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { width: 132px; height: auto; }

.site-nav { display: flex; align-items: center; gap: 1.6rem; }

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--red); }

.site-nav a[aria-current="page"] {
  color: var(--red);
  border-bottom-color: var(--red);
}

.site-nav .btn { border-bottom: 1px solid var(--red); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */

.crumbs {
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-2);
}

.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0.55rem var(--gutter);
  max-width: 72rem;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--ink-soft); }
.crumbs a { text-decoration: none; color: var(--ink-soft); }
.crumbs a:hover { color: var(--red); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--ink); }

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

.hero { padding: clamp(3rem, 8vw, 5.5rem) 0; }

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--light-text-dim);
  margin: 0 0 1rem;
}

.hero p.lede { font-size: 1.08rem; }

.hero-art { position: relative; }

.hero-art .annotation {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light-text-dim);
  margin-top: 0.75rem;
  text-align: right;
}

/* Inner-page hero (shorter, headline only) */
.page-hero { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.page-hero p.lede { font-size: 1.08rem; max-width: 56ch; }

/* --------------------------------------------------------------------------
   Title block — drawing-style stat strip
   -------------------------------------------------------------------------- */

.titleblock { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-2); }

.titleblock .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-top: 0;
  padding-bottom: 0;
}

.titleblock .cell {
  padding: 1.1rem 1.25rem;
  border-left: 1px solid var(--line);
}

.titleblock .cell:last-child { border-right: 1px solid var(--line); }

.titleblock .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.2rem;
}

.titleblock .value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

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

.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-tint { background: var(--paper-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

.section-head { max-width: 46rem; margin-bottom: 2.25rem; }

/* --------------------------------------------------------------------------
   Sheet index — services listed like a drawing set's sheet list
   -------------------------------------------------------------------------- */

.sheet-index { border-top: 1px solid var(--line); }

.sheet {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}

.sheet-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--red);
}

.sheet h3 { margin-bottom: 0.3rem; }
.sheet p { margin: 0; max-width: 52ch; }

.sheet-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Detail callouts — numbered process, drawn like detail bubbles
   -------------------------------------------------------------------------- */

.callouts { list-style: none; margin: 0; padding: 0; counter-reset: callout; }

.callouts li {
  position: relative;
  counter-increment: callout;
  padding: 0 0 1.75rem 4.25rem;
}

.callouts li::before {
  content: counter(callout, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
}

.callouts li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1.3rem;
  top: 2.9rem;
  bottom: 0.25rem;
  width: 1px;
  background: var(--line);
}

.callouts h3 { margin-bottom: 0.25rem; }
.callouts p { margin: 0; }

/* --------------------------------------------------------------------------
   Spec list — checked items drawn as drafting ticks
   -------------------------------------------------------------------------- */

.spec-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }

.spec-list li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.9rem;
  border-bottom: 1px solid var(--line-soft);
  max-width: var(--measure);
}

.spec-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 1.05rem;
  width: 0.9rem;
  height: 0.45rem;
  border-left: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Two-column service detail layout with sticky aside
   -------------------------------------------------------------------------- */

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(15rem, 4fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.detail-aside { position: sticky; top: 5.5rem; }

.detail-aside .panel { background: var(--paper-2); }

.aside-phone {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: block;
  margin: 0.25rem 0 0.75rem;
}

.aside-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
}

.detail-aside .btn { display: block; text-align: center; margin: 1rem 0 0; }

.related { list-style: none; margin: 0.75rem 0 0; padding: 0; }

.related li { border-top: 1px solid var(--line-soft); }

.related a {
  display: block;
  padding: 0.6rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Pricing table (maintenance plans)
   -------------------------------------------------------------------------- */

.price-table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; }

.price-table caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 0.6rem;
}

.price-table th, .price-table td {
  border: 1px solid var(--line);
  padding: 0.7rem 1rem;
  text-align: left;
}

.price-table thead th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--paper-2);
}

.price-table .num {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Testimonial — drawn as a general-note block
   -------------------------------------------------------------------------- */

.note-block { max-width: 46rem; }

.note-block blockquote {
  margin: 0 0 1rem;
  padding: 0 0 0 1.5rem;
  border-left: 2px solid var(--red);
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  line-height: 1.5;
  color: var(--ink);
}

.bp-dark .note-block blockquote { color: var(--light-text); }

.note-block cite {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.bp-dark .note-block cite { color: var(--light-text-dim); }

.rating {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 1.25rem;
}

.rating .stars { color: var(--red); letter-spacing: 0.2em; }

/* --------------------------------------------------------------------------
   Service area & hours
   -------------------------------------------------------------------------- */

.area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem;
}

.area-grid ul { list-style: none; margin: 0; padding: 0; }

.area-grid li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.coords {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

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

.cta-band { padding: clamp(3rem, 7vw, 4.5rem) 0; }

.cta-band .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta-band h2 { margin: 0; }

.cta-band .sub {
  margin: 0.4rem 0 0;
  color: var(--light-text-dim);
}

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

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(15rem, 4fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.lead-form { display: grid; gap: 1.1rem; }

.field { display: grid; gap: 0.3rem; }

.field label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field .req { color: var(--red); }

.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.7rem 0.85rem;
  width: 100%;
}

.field textarea { min-height: 9rem; resize: vertical; }

.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

.form-note { font-size: 0.85rem; color: var(--ink-soft); max-width: none; }

.contact-list { list-style: none; margin: 0; padding: 0; }

.contact-list li { padding: 0.7rem 0; border-bottom: 1px solid var(--line-soft); }

.contact-list .aside-label { margin-bottom: 0.1rem; }

.contact-list a { text-decoration: none; font-weight: 600; }
.contact-list a:hover { text-decoration: underline; }

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

.site-footer {
  background: var(--navy-900);
  color: var(--light-text-dim);
  padding: clamp(2.5rem, 6vw, 4rem) 0 1.5rem;
  border-top: 3px solid var(--red);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

.footer-mark {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--light-text);
  margin: 0 0 0.25rem;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--light-text-dim);
}

.site-footer h2 {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--light-text);
  margin-bottom: 0.9rem;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 0.25rem 0; }
.site-footer a { color: var(--light-text-dim); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer-legal {
  border-top: 1px solid var(--line-light-soft);
  padding-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

/* --------------------------------------------------------------------------
   Schematic SVG line art
   -------------------------------------------------------------------------- */

.schematic { stroke: var(--light-text); fill: none; stroke-width: 1.2; }
.schematic .dim-line { stroke: var(--light-text-dim); stroke-width: 0.8; stroke-dasharray: 4 3; }
.schematic text {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  fill: var(--light-text-dim);
  stroke: none;
  text-transform: uppercase;
}
.schematic .accent { stroke: var(--red); }

.schematic-light { stroke: var(--ink); }
.schematic-light .dim-line { stroke: var(--ink-soft); }
.schematic-light text { fill: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 56rem) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: 26rem; }
  .titleblock .wrap { grid-template-columns: 1fr 1fr; }
  .titleblock .cell { border-right: 0; }
  .titleblock .cell:nth-child(even) { border-right: 1px solid var(--line); }
  .titleblock .cell:nth-child(n+3) { border-top: 1px solid var(--line); }
  .detail-grid, .form-grid { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 44rem) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.25rem;
  }

  .site-nav.open { display: flex; }

  .site-nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .site-nav a[aria-current="page"] { border-bottom-color: var(--red); }

  .site-nav .btn { margin-top: 1rem; text-align: center; border-bottom: 1px solid var(--red); }

  .sheet { grid-template-columns: 1fr; gap: 0.35rem; }
  .sheet-link { justify-self: start; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .topbar .area-note { display: none; }
}
