/* Meigs Plumbing - page styles for every page.
   Tokens and component classes (.btn, .input, .tag, .lighten) come from
   nocturne.css; theme.css re-points the tokens per theme. Use tokens here,
   never literal colors, so every theme applies. */

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  text-wrap: pretty;
}
a { color: var(--color-accent-300); }
a:hover { color: var(--color-accent-200); }

.page {
  font-family: var(--font-body);
  color: var(--color-text);
  background: radial-gradient(1100px 520px at 0% 0%, var(--color-surface), transparent 70%), var(--color-bg);
  min-height: 100vh;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 56px);
}

/* Nocturne fading rule, applied as a border so it can sit on any box. */
.rule-t, .rule-b, .rule-tb {
  border-image: linear-gradient(90deg, transparent, var(--color-divider) 48px, var(--color-divider) calc(100% - 48px), transparent) 1;
}
.rule-t  { border-top: 1px solid var(--color-divider); }
.rule-b  { border-bottom: 1px solid var(--color-divider); }
.rule-tb { border-top: 1px solid var(--color-divider); border-bottom: 1px solid var(--color-divider); }

.eyebrow {
  font-family: var(--eyebrow-font, inherit);
  font-style: var(--eyebrow-style, normal);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-300);
  font-weight: 500;
}
.heading-block { display: flex; flex-direction: column; gap: 14px; }
.section-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.section-title.tight {
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.08;
}
.lede { margin: 0; line-height: 1.6; color: color-mix(in srgb, var(--color-text) 80%, transparent); }
.muted-78 { color: color-mix(in srgb, var(--color-text) 78%, transparent); }
.muted-72 { color: color-mix(in srgb, var(--color-text) 72%, transparent); }

.section { padding-top: clamp(64px, 8vw, 112px); }
.section-inner { padding-top: 48px; }

/* Buttons at page sizes; base styles come from nocturne .btn */
.btn-lg { font-size: 17px; padding: 14px 22px; }
.btn-md { font-size: 15px; padding: 12px 18px; }
.btn-arrow { justify-content: space-between; min-width: 220px; }
.btn-arrow.btn-md { min-width: 200px; }
.btn-secondary { color: var(--color-text); }
/* Primary buttons are outlined by default (Nocturne); a theme can fill them
   with --btn-primary-bg / -fg / -hover. */
.btn-primary { background: var(--btn-primary-bg, transparent); color: var(--btn-primary-fg, var(--color-accent)); }
.btn-primary:hover {
  background: var(--btn-primary-hover, color-mix(in srgb, var(--color-accent) 12%, transparent));
  color: var(--btn-primary-fg, var(--color-accent-200));
}
.lighten { mix-blend-mode: var(--photo-blend, lighten); }

/* Phone numbers echo the lettering on the truck when a theme sets these. */
.hero-phone-number, .contact-phone, .call-band-number, .header-call span, .footer-phone {
  font-style: var(--phone-style, normal);
}

.icon { width: 18px; height: 18px; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 22px; height: 22px; }

.arrow-icon { fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }

/* Header */
.site-header { width: 100%; background: var(--color-bg); font-family: var(--font-body); }
.topbar {
  background: var(--color-topbar-bg, var(--color-surface));
  color: var(--color-topbar-text, var(--color-neutral-300));
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.topbar-inner {
  padding-block: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  align-items: center;
}
.topbar-lic { margin-right: auto; }
.masthead-inner {
  padding-block: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 36px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text);
  margin-right: auto;
}
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-mark { width: 46px; height: 46px; flex: none; }
.brand-mark .ring { fill: var(--brand-ring, var(--color-accent)); }
.brand-mark .core { fill: var(--brand-core, var(--color-bg)); }
.brand-mark text {
  fill: var(--brand-letter, var(--color-text));
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15.5px;
  letter-spacing: -0.04em;
}
.brand:hover { color: var(--color-text); }
.brand-name {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand-sub {
  font-style: var(--eyebrow-style, normal);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-300);
}
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; font-weight: 500; }
.site-nav a { text-decoration: none; color: var(--color-text); }
.site-nav a:hover { color: var(--color-accent-200); }
.site-nav a[aria-current="page"] { color: var(--color-accent-300); }
.header-call {
  font-size: 20px;
  font-weight: 500;
  padding: 14px 22px;
  gap: 12px;
  justify-content: flex-start;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Hero (split variant) */
.hero {
  padding-block: clamp(40px, 6vw, 88px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 48px;
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 28px; container-type: inline-size; }
.hero-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: clamp(40px, 5.2vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.hero-lede { font-size: 18px; max-width: 52ch; }
.hero-phone {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--color-accent);
  padding: 20px 0;
}
.hero-phone:hover { color: var(--color-accent-300); }
.hero-phone-label {
  font-style: var(--eyebrow-style, normal);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  font-weight: 500;
}
.hero-phone-number {
  font-family: var(--font-heading);
  font-weight: var(--phone-weight, var(--font-heading-weight));
  font-size: clamp(40px, 12.5cqw, 84px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-left: -0.04em;
  white-space: nowrap;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn-primary { white-space: nowrap; }
.hero-photo { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-md); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 45%; display: block; }

/* Trust strip */
.trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}
.trust-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.trust-title {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 20px;
}
.trust-sub { font-size: 14px; }

/* Services */
.services { display: flex; flex-direction: column; gap: 36px; }
.services-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  align-items: flex-end;
  justify-content: space-between;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}
.service-card, .value-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text);
  min-height: 170px;
}
.service-card:hover { background: var(--color-accent-900); color: var(--color-text); }
.service-num {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-accent-300);
  font-feature-settings: 'tnum' 1;
}
.service-title {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 24px;
  letter-spacing: -0.01em;
}
.service-short { font-size: 15px; line-height: 1.55; }

/* About */
.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 48px;
  align-items: start;
}
.about-photo { aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-md); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; display: block; }
.about-copy { display: flex; flex-direction: column; gap: 20px; }
.about-copy .lede { font-size: 17px; line-height: 1.65; max-width: 56ch; }
.about-copy .btn { align-self: flex-start; }

/* Reviews */
.reviews { display: flex; flex-direction: column; gap: 36px; }
.review {
  margin: 0;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.stars { display: flex; gap: 4px; color: var(--color-accent); }
.stars svg { width: 18px; height: 18px; fill: currentColor; }
.review blockquote {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  flex: 1;
}
.review figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  margin-top: 0;
  color: color-mix(in srgb, var(--color-text) 72%, transparent);
}
.reviews .tag { align-self: flex-start; }

/* Service areas */
.areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 40px;
}
.areas .lede { font-size: 16px; max-width: 44ch; }
.area-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  column-gap: 24px;
}
.area-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 500;
}
.area-list li::before, .check-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  flex: none;
}

/* Contact */
.contact-section { padding-bottom: clamp(64px, 8vw, 112px); }
.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 48px;
}
.contact-copy { display: flex; flex-direction: column; gap: 20px; }
.contact-copy .lede { font-size: 17px; max-width: 44ch; }
.contact-phone {
  text-decoration: none;
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-weight: var(--phone-weight, var(--font-heading-weight));
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -0.025em;
}
.contact-phone:hover { color: var(--color-accent-300); }
.request-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 18px;
  background: var(--color-surface);
  padding: clamp(24px, 3vw, 36px);
}
.request-form .field { display: flex; flex-direction: column; gap: 6px; }
.request-form .field > span { font-size: 15px; }
.request-form .input { min-height: 44px; font-size: 16px; }
.request-form textarea.input { resize: vertical; }
.request-form .span-all { grid-column: 1 / -1; }
.request-form .btn { grid-column: 1 / -1; }
.request-done {
  background: var(--color-surface);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 4px solid var(--color-accent);
}
.request-done[hidden], .request-form[hidden] { display: none; }
.request-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error, .notice {
  margin: 0;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-accent-900);
  border-left: 3px solid var(--color-accent);
}
.form-error[hidden] { display: none; }
.request-done:focus-visible { outline: none; } /* programmatic focus for screen readers; the accent border already marks it */
.request-done-title {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 28px;
}
.request-done p { margin: 0; font-size: 16px; line-height: 1.6; }

/* Footer */
.site-footer { width: 100%; font-family: var(--font-body); background: var(--color-bg); }
.call-band {
  display: block;
  background: linear-gradient(160deg, var(--color-section-glow), var(--color-section) 60%);
  color: var(--color-on-section);
  text-decoration: none;
}
.call-band:hover { color: var(--color-on-section); }
.call-band-inner {
  padding-block: clamp(48px, 7vw, 96px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.call-band-label { font-style: var(--eyebrow-style, normal); font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; }
.call-band-number {
  font-family: var(--font-heading);
  font-weight: var(--phone-weight, var(--font-heading-weight));
  font-size: clamp(48px, 10vw, 148px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin-left: -0.05em;
}
.footer-grid {
  padding: 56px clamp(20px, 4vw, 56px) 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 40px;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-brand {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 22px;
  letter-spacing: -0.02em;
}
.footer-blurb { line-height: 1.6; color: color-mix(in srgb, var(--color-text) 75%, transparent); }
.footer-label {
  font-style: var(--eyebrow-style, normal);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-300);
  font-weight: 500;
}
.footer-col a { color: var(--color-text); text-decoration: none; }
.footer-col a:hover { color: var(--color-accent-200); }
.footer-phone { font-weight: 500; font-size: 18px; }
.footer-legal {
  padding: 20px 0 28px;
  font-size: 13px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}

/* Floating call button (shown after scrolling past the hero) */
.float-call {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  font-size: 18px;
  font-weight: 500;
  padding: 16px 22px;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  background: var(--btn-primary-bg, var(--color-bg));
}
.float-call:hover { background: var(--btn-primary-hover, color-mix(in srgb, var(--color-accent) 12%, var(--color-bg))); }
.float-call[hidden] { display: none; }

/* Theme preview bar (js/theme.js adds it only while previewing a theme) */
.theme-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  padding: 10px clamp(20px, 4vw, 56px);
  font-size: 14px;
  background: var(--color-accent-900);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-accent);
}
.theme-preview a { color: var(--color-text); text-underline-offset: 3px; padding-block: 4px; }
.theme-preview a:hover { color: var(--color-accent-300); }
.theme-preview a[aria-current] { color: var(--color-accent-300); font-weight: 600; text-decoration: none; }
.theme-preview-exit { margin-left: auto; }

/* Inner pages: shared page header */
.page-hero {
  padding-block: clamp(48px, 7vw, 96px) clamp(32px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.page-hero .hero-title { max-width: 20ch; }
.page-hero .lede { font-size: 18px; max-width: 60ch; }
.page-hero .hero-actions { margin-top: 4px; }

/* Services page */
.service-index { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.service-index a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
  font-size: 14px;
}
.service-index a:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.service-list { padding-bottom: clamp(64px, 8vw, 112px); }
.service-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 20px 48px;
  padding-block: 48px;
  scroll-margin-top: 16px;
}
.service-detail-head { display: flex; flex-direction: column; gap: 10px; }
.service-detail-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.service-detail-body { display: flex; flex-direction: column; gap: 22px; }
.service-detail-body > p { margin: 0; font-size: 17px; line-height: 1.65; max-width: 60ch; }
.service-detail-body .btn { align-self: flex-start; }
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  column-gap: 24px;
}
.check-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 16px; }

/* About page */
.about-hero { padding-top: clamp(48px, 7vw, 96px); align-items: center; }
.about-hero .about-copy { gap: 24px; }
.about-hero .hero-title { font-size: clamp(38px, 4.6vw, 64px); }
.value-card { min-height: 0; }
.value-card p { margin: 0; font-size: 15px; line-height: 1.6; }
.facts { margin: 0; display: flex; flex-direction: column; }
.facts > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 4px 24px;
  padding: 16px 0;
}
.facts dt {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 72%, transparent);
}
.facts dd { margin: 0; font-size: 17px; font-weight: 500; }
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 40px;
}

/* Contact page */
.contact-page { padding-block: clamp(48px, 7vw, 96px); }
.contact-page .contact-copy { gap: 24px; }
.contact-page .hero-title { font-size: clamp(38px, 4.6vw, 64px); }
.contact-page .facts { margin-top: 8px; }
