/* ==========================================================================
   Meridian HVAC Facility Specialists — meridianhvac.xyz
   One stylesheet. No framework, no build step.

   LAYOUT: a quiet, slim publication-style bar — wordmark left, links right,
   and the phone number as the only call-to-action (a bordered pill, not a
   separate button). Every page is a single-column long read: a narrow text
   measure, with photographs that break out to the full width of the window.
   No card grids on the home page. The rhythm is text, image, text.

   01  Design tokens          08  Openers & page heads    15  Footer & call bar
   02  Reset & base           09  Long-read column        16  Images & placeholders
   03  Typography             10  Full-bleed figures      17  Motion
   04  Containers & sections  11  Lists, notes, asides    18  Utilities
   05  Eyebrows & heads       12  Service area & map      19  Responsive helpers
   06  Buttons & links        13  FAQ
   07  Header                 14  Forms
   ========================================================================== */

/* 01  Design tokens ======================================================= */

:root {
  --ink-950: #0b150f;
  --ink-900: #12211a;
  --ink-800: #1c2e25;
  --ink-700: #2d4237;
  --ink-600: #4a5e53;
  --ink-500: #5a6d62;   /* AA on --paper at small sizes; --ink-400 is dark-surface only */
  --ink-400: #93a69b;
  --ink-300: #b9c8bf;
  --ink-200: #d9e1dc;
  --ink-100: #e9eeeb;

  --paper: #f5f6f4;
  --paper-2: #eaede8;
  --white: #ffffff;

  --forest-900: #0f4424;
  --forest-800: #14532d;
  --forest-700: #166534;
  --forest-300: #86c79b;
  --forest-100: #e2f1e7;

  --rain-700: #3b5a78;
  --rain-100: #e4ecf3;

  --font: "Albert Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --step--2: clamp(0.74rem, 0.72rem + 0.1vw, 0.8rem);
  --step--1: clamp(0.9rem, 0.87rem + 0.14vw, 0.97rem);
  --step-0:  clamp(1.04rem, 1rem + 0.22vw, 1.14rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2:  clamp(1.45rem, 1.25rem + 0.95vw, 2.1rem);
  --step-3:  clamp(1.8rem, 1.45rem + 1.7vw, 2.9rem);
  --step-4:  clamp(2.2rem, 1.65rem + 2.7vw, 3.9rem);

  --sp-2: 0.8rem;
  --sp-3: 1.3rem;
  --sp-4: 2rem;
  --sp-5: 3.2rem;
  --section-y: clamp(3.2rem, 2.2rem + 4.6vw, 6rem);

  --measure: 680px;   /* the long-read column */

  --r-sm: 3px;
  --r:    6px;
  --r-pill: 999px;

  --line: 1px solid var(--ink-200);
  --line-strong: 2px solid var(--ink-900);
  --line-dark: 1px solid rgba(255, 255, 255, 0.14);
}

/* 02  Reset & base ======================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0; background: var(--paper); color: var(--ink-600);
  font-family: var(--font); font-size: var(--step-0); line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--forest-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--forest-900); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--forest-700); outline-offset: 3px;
}

.skip-link { position: absolute; left: 0; top: 0; z-index: 300; transform: translateY(-140%); background: var(--forest-800); color: #fff; padding: 0.85rem 1.4rem; font-weight: 600; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }
::selection { background: var(--forest-100); color: var(--ink-900); }

/* 03  Typography ========================================================== */

h1, h2, h3 {
  margin: 0 0 0.5em; font-weight: 700; color: var(--ink-900);
  line-height: 1.14; letter-spacing: -0.025em; text-wrap: balance;
}
h1 { font-size: var(--step-4); line-height: 1.05; letter-spacing: -0.035em; }
h2 { font-size: var(--step-3); letter-spacing: -0.03em; }
h3 { font-size: var(--step-1); line-height: 1.3; letter-spacing: -0.015em; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
.lede { font-size: var(--step-1); line-height: 1.55; color: var(--ink-700); }

strong, b { font-weight: 700; color: var(--ink-900); }

ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
li { margin-bottom: 0.45em; }
li:last-child { margin-bottom: 0; }

/* 04  Containers & sections ============================================== */

.wrap { width: min(100% - 2rem, 1180px); margin-inline: auto; }
.col { width: min(100% - 2rem, var(--measure)); margin-inline: auto; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2rem, 1.5rem + 2vw, 3rem); }
.section--white { background: var(--white); }
.section--paper2 { background: var(--paper-2); }
.section--dark { background: var(--ink-900); color: var(--ink-300); }
.section--dark h2, .section--dark h3 { color: var(--paper); }
.section--dark strong { color: var(--paper); }

/* A thin rule with a section number — the long read's chapter marker. */
.chapter { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.1rem; font-size: var(--step--2); font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--forest-700); }
.chapter::after { content: ""; flex: 1; height: 1px; background: var(--ink-200); }
.section--dark .chapter { color: var(--forest-300); }
.section--dark .chapter::after { background: var(--ink-700); }

/* 05  Eyebrows & heads =================================================== */

.eyebrow {
  display: block; margin-bottom: 0.9rem;
  font-size: var(--step--2); font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--forest-700);
}
.section--dark .eyebrow { color: var(--forest-300); }

.aud {
  display: inline-block; margin-bottom: 0.7rem; padding: 0.2rem 0.6rem;
  border-radius: var(--r-sm); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.aud--comm { background: var(--forest-100); color: var(--forest-900); }
.aud--home { background: var(--ink-100); color: var(--ink-700); }
.section--dark .aud--comm { background: rgba(22,101,52,0.45); color: var(--forest-300); }
.section--dark .aud--home { background: var(--ink-800); color: var(--ink-200); }

/* 06  Buttons & links ==================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; flex: none;
  padding: 0.82rem 1.5rem; border: 2px solid transparent; border-radius: var(--r-pill);
  font: inherit; font-weight: 700; font-size: var(--step--1);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn--forest { background: var(--forest-700); border-color: var(--forest-700); color: #fff; }
.btn--forest:hover { background: var(--forest-900); border-color: var(--forest-900); color: #fff; }
.btn--outline { background: transparent; border-color: var(--ink-300); color: var(--ink-900); }
.btn--outline:hover { border-color: var(--ink-900); }
.btn--white { background: #fff; border-color: #fff; color: var(--ink-900); }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,0.4); color: #fff; }
.btn--ghost:hover { border-color: #fff; color: #fff; }
.btn--lg { padding: 0.95rem 1.8rem; font-size: var(--step-0); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.65rem; }

/* The inline "next" link used at the end of long-read sections. */
.onward { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--forest-700); text-decoration: none; border-bottom: 2px solid var(--forest-100); padding-bottom: 2px; }
.onward:hover { border-bottom-color: var(--forest-700); }
.onward svg { width: 1em; height: 1em; }
.section--dark .onward { color: var(--forest-300); border-bottom-color: var(--ink-700); }

/* 07  Header =============================================================
   Slim and quiet. The phone pill is the only call-to-action in the bar.      */

.header { position: sticky; top: 0; z-index: 100; background: rgba(245, 246, 244, 0.96); border-bottom: var(--line); }
@supports (backdrop-filter: blur(6px)) { .header { background: rgba(245, 246, 244, 0.86); backdrop-filter: blur(6px); } }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 62px; }

.logo { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.logo__mark { width: 28px; height: 28px; flex: none; }
.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__name { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.03em; color: var(--ink-900); white-space: nowrap; }
.logo__sub { margin-top: 3px; font-size: 0.55rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-500); white-space: nowrap; }

.header__right { display: flex; align-items: center; gap: 0.6rem; }
.phone-pill {
  display: inline-flex; align-items: center; gap: 0.45rem; flex: none;
  padding: 0.45rem 0.95rem; border: 2px solid var(--forest-700); border-radius: var(--r-pill);
  color: var(--forest-800); font-weight: 700; font-size: var(--step--1); text-decoration: none; white-space: nowrap;
}
.phone-pill svg { width: 15px; height: 15px; flex: none; }
.phone-pill:hover { background: var(--forest-700); color: #fff; }

.nav { display: none; }
.nav__link { display: block; padding: 0.4rem 0.7rem; font-size: var(--step--1); font-weight: 600; color: var(--ink-600); text-decoration: none; white-space: nowrap; }
.nav__link:hover { color: var(--ink-900); }
.nav__link[aria-current="page"] { color: var(--ink-900); text-decoration: underline; text-decoration-color: var(--forest-700); text-decoration-thickness: 2px; text-underline-offset: 6px; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; padding: 0;
  background: transparent; border: 0; color: var(--ink-900); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }

@media (max-width: 959px) {
  .header__inner { position: relative; }
  .nav {
    position: absolute; inset: 100% -1rem auto -1rem;
    flex-direction: column; padding: 0.5rem 1rem 1.2rem;
    background: var(--paper); border-bottom: var(--line-strong);
    max-height: calc(100dvh - 70px); overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav__link { padding: 0.9rem 0; border-bottom: var(--line); font-size: var(--step-0); }
}
@media (min-width: 960px) {
  .nav { display: flex; align-items: center; gap: 0.1rem; margin-left: auto; margin-right: 0.6rem; }
  .nav-toggle { display: none; }
}
@media (max-width: 560px) {
  .logo__sub { display: none; }
}
@media (max-width: 400px) {
  .phone-pill { padding: 0.38rem 0.65rem; font-size: 0.8rem; }
  .phone-pill svg { display: none; }
}

/* 08  Openers & page heads ==============================================
   Openers are text only, in the long-read column. The photograph comes
   straight after, full width.                                              */

.opener { padding-block: clamp(2.6rem, 1.8rem + 3.6vw, 5rem) clamp(2rem, 1.5rem + 2vw, 3rem); }
.opener h1 { max-width: 15ch; }
.opener .lede { margin-top: 0.4rem; }
.opener__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin-top: 1.6rem; padding-top: 1.1rem; border-top: var(--line); font-size: var(--step--1); color: var(--ink-500); }
.opener__meta a { font-weight: 700; }

.crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.3rem; padding: 0; list-style: none; font-size: var(--step--2); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-500); }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.55rem; color: var(--ink-300); }
.crumbs a { color: var(--ink-600); text-decoration: none; }
.crumbs a:hover { color: var(--forest-700); }

/* 09  Long-read column =================================================== */

.col > h2 { margin-top: 0; }
.col > h3 { margin-top: 2.2rem; }
.col > h2 + p, .col > h3 + p { margin-top: 0; }

.pull {
  margin: 2.4rem 0; padding: 0 0 0 1.3rem; border-left: 3px solid var(--forest-700);
  font-size: var(--step-2); line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; color: var(--ink-900);
}
.section--dark .pull { color: var(--paper); border-left-color: var(--forest-300); }

/* Two stacked audience blocks inside the column — not side by side. */
.aud-block { padding: 1.6rem 0; border-top: var(--line); }
.aud-block:last-child { border-bottom: var(--line); }
.aud-block h3 { margin-top: 0; }
.section--dark .aud-block { border-color: var(--ink-700); }

/* 10  Full-bleed figures ================================================= */

.bleed { margin: 0; }
.bleed img, .bleed .img-placeholder { width: 100%; border-radius: 0; }
.bleed img { aspect-ratio: 2 / 1; object-fit: cover; }
@media (max-width: 700px) { .bleed img { aspect-ratio: 4 / 3; } }
.bleed figcaption { width: min(100% - 2rem, var(--measure)); margin: 0.8rem auto 0; }

.inset { margin: 2.2rem 0; }

/* 11  Lists, notes, asides =============================================== */

.kv { margin: 1.4rem 0; padding: 0; border-top: var(--line-strong); }
.kv > div { padding: 1.05rem 0; border-bottom: var(--line); }
.kv dt { font-weight: 700; color: var(--ink-900); }
.kv dd { margin: 0.2rem 0 0; font-size: var(--step--1); color: var(--ink-600); }
.section--dark .kv { border-top-color: var(--forest-300); }
.section--dark .kv > div { border-bottom-color: var(--ink-700); }
.section--dark .kv dt { color: var(--paper); }
.section--dark .kv dd { color: var(--ink-300); }

.ticks { margin: 1rem 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding-left: 1.6rem; margin-bottom: 0.6rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.7rem; height: 2px; background: var(--forest-700); }
.section--dark .ticks li::before { background: var(--forest-300); }

.note { margin: 2rem 0; padding: 1.3rem 1.4rem; background: var(--rain-100); border-radius: var(--r); }
.note h3 { font-size: var(--step-0); margin: 0 0 0.35em; }
.note p { font-size: var(--step--1); color: var(--ink-700); }

.band { background: var(--forest-800); color: #fff; padding-block: clamp(2.6rem, 1.8rem + 3vw, 4rem); }
.band h2 { color: #fff; font-size: var(--step-2); margin-bottom: 0.4em; }
.band p { color: rgba(255,255,255,0.9); max-width: 52ch; }

/* 12  Service area & map ================================================= */

.places { margin: 1rem 0 0; padding: 0; list-style: none; columns: 2; column-gap: 2rem; font-size: var(--step--1); }
@media (min-width: 620px) { .places { columns: 3; } }
.places li { break-inside: avoid; padding: 0.35rem 0; border-bottom: var(--line); margin: 0; }
.map-frame { width: 100%; aspect-ratio: 16 / 10; min-height: 280px; border: var(--line); border-radius: var(--r); }

/* 13  FAQ ================================================================ */

.faq { border-top: var(--line-strong); }
.faq details { border-bottom: var(--line); }
.faq summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.2rem;
  padding: 1.1rem 0; font-weight: 700; font-size: var(--step-0); color: var(--ink-900); cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.35rem; line-height: 1.1; color: var(--forest-700); transition: transform 0.22s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 1.2rem; }
.faq details p { font-size: var(--step--1); color: var(--ink-600); }

/* 14  Forms ============================================================== */

.form { display: grid; gap: 1rem; margin-top: 1.4rem; }
@media (min-width: 620px) { .form--2 { grid-template-columns: 1fr 1fr; } }
.field--full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field label { font-size: var(--step--1); font-weight: 700; color: var(--ink-900); }
.field .req { color: var(--forest-700); }

input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%; padding: 0.75rem 0.9rem; font: inherit; font-size: var(--step--1); color: var(--ink-900);
  background: var(--white); border: 1px solid var(--ink-300); border-radius: var(--r);
  transition: border-color 0.14s ease;
}
textarea { min-height: 140px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6d62' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.85rem center; background-size: 15px; padding-right: 2.4rem; }
input:focus, select:focus, textarea:focus { border-color: var(--forest-700); }
input::placeholder, textarea::placeholder { color: var(--ink-500); }

.field__error { min-height: 1rem; font-size: 0.8rem; font-weight: 700; color: #9b1c1c; margin: 0; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: #9b1c1c; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-consent { font-size: 0.82rem; color: var(--ink-500); }
.form-status { margin-top: 0.9rem; font-size: var(--step--1); font-weight: 700; min-height: 1.2rem; }
.form-status.is-error { color: #9b1c1c; }
.form-status.is-ok { color: var(--forest-700); }

.contact-lines { margin: 1.4rem 0; padding: 0; list-style: none; border-top: var(--line-strong); }
.contact-lines li { display: grid; gap: 0.2rem 1.5rem; padding: 1rem 0; border-bottom: var(--line); margin: 0; }
@media (min-width: 560px) { .contact-lines li { grid-template-columns: 8rem 1fr; } }
.contact-lines b { font-size: var(--step--2); letter-spacing: 0.16em; text-transform: uppercase; color: var(--forest-700); padding-top: 0.2rem; }
.contact-lines .big { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.03em; color: var(--ink-900); text-decoration: none; line-height: 1.2; }

/* 15  Footer & mobile call bar =========================================== */

.site-footer { background: var(--ink-950); color: var(--ink-400); padding-block: clamp(2.4rem, 2rem + 3vw, 3.6rem) 1.7rem; font-size: var(--step--1); }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid > * { min-width: 0; }
.site-footer h3 { font-size: var(--step--2); font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-400); margin-bottom: 0.9rem; }
.site-footer .logo__name { color: var(--paper); white-space: normal; }
.footer-links { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.footer-links li { margin: 0; }
.site-footer a { color: var(--ink-300); text-decoration: none; }
.site-footer a:hover { color: var(--paper); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.2rem; padding-top: 1.3rem; border-top: var(--line-dark); font-size: 0.8rem; color: var(--ink-400); }
.footer-bottom p { margin: 0; }

.callbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; display: grid; grid-template-columns: 1fr 1fr; padding-bottom: env(safe-area-inset-bottom); }
.callbar a { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.9rem 0.5rem; font-size: 0.92rem; font-weight: 700; text-decoration: none; }
.callbar svg { width: 17px; height: 17px; }
.callbar a:first-child { background: var(--forest-700); color: #fff; }
.callbar a:last-child { background: var(--ink-900); color: #fff; }
@media (min-width: 960px) { .callbar { display: none; } }
@media (max-width: 959px) { body { padding-bottom: 54px; } }

/* 16  Images & placeholders ============================================== */

figure { margin: 0; }
figure img, figure .img-placeholder { border-radius: var(--r); }
figcaption { margin-top: 0.7rem; font-size: var(--step--1); font-style: italic; color: var(--ink-500); }
.section--dark figcaption { color: var(--ink-400); }

.img-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem;
  padding: 1rem; width: 100%;
  background: var(--paper-2); border: 1px dashed var(--ink-300); border-radius: var(--r);
  text-align: center; color: var(--ink-500);
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.5;
}
.img-placeholder b { display: block; font-size: 0.95rem; letter-spacing: 0; text-transform: none; color: var(--ink-900); word-break: break-all; }
.bleed .img-placeholder { border-left: 0; border-right: 0; }

/* 17  Motion ============================================================= */

[data-reveal] { opacity: 0; transform: translateY(10px); }
.is-revealed[data-reveal] { opacity: 1; transform: none; transition: opacity 0.6s ease, transform 0.6s ease; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
:target { scroll-margin-top: 90px; }

/* 18  Utilities ========================================================== */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }

/* 19  Responsive helpers ================================================= */

@media (max-width: 560px) {
  .pull { font-size: var(--step-1); }
}
