/*
  Site-level additions on top of the design system (components.css is the system's own
  bundle.css, unmodified). Only layout the system does not ship lives here.
*/
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); }
img { max-width: 100%; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--surface-white); color: var(--ink); padding: 8px 16px; border-radius: var(--radius-md); }
.skip-link:focus { left: 16px; }

/* Body copy gets the body style by default */
.pg-root { font-size: 16px; line-height: 28px; }

/* Inner-page header: the Hero without photo and panel */
.pg-hero-grid.pg-hero-solo { grid-template-columns: 1fr; min-height: 0; padding-bottom: var(--space-12); }
.pg-hero-solo .pg-hero-copy { grid-column: 1; max-width: 720px; }

/* Text column next to a photo */
.pg-copy { display: flex; flex-direction: column; gap: var(--space-4); align-items: flex-start; }
.pg-grid-center { align-items: center; }
.pg-photo-tall { min-height: 420px; }

/* Links inside body copy */
.pg-root .pg-inline-link { color: var(--teal); text-decoration: underline; }
.pg-root .pg-inline-link:hover { color: var(--ink); }

/* FAQ: cards that open */
.pg-faq { display: flex; flex-direction: column; gap: var(--space-3); }
.pg-faq details.pg-card { gap: 0; }
.pg-faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); color: var(--ink); text-transform: uppercase; }
.pg-faq summary::-webkit-details-marker { display: none; }
.pg-faq summary .pg-icon { transition: transform 150ms; color: var(--brand); }
.pg-faq details[open] summary .pg-icon { transform: rotate(180deg); }
.pg-faq details p { margin-top: var(--space-3); }

/* Contact page: the system's form, stacked, with a message field */
.pg-form.pg-form-stacked { grid-template-columns: 1fr; align-items: stretch; }
.pg-form-stacked .pg-form-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); align-items: end; }
.pg-form-stacked .pg-field-full { grid-column: 1 / -1; }
.pg-root textarea.pg-input { height: auto; min-height: 120px; padding: var(--space-3); resize: vertical; }
.pg-root select.pg-input { appearance: auto; }

/* Links inside an InfoCard row (phone, "Use our contact form") */
.pg-info-row a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.pg-info-row a:hover { color: var(--surface-white); }

/* Left-aligned section heads: the eyebrow keeps its pill width instead of stretching */
.pg-section-head:not(.pg-section-head-center) > .pg-eyebrow { align-self: flex-start; }

/* Anchors (#form, #natural-gas, ...) land with breathing room above */
#form, .pg-service-detail { scroll-margin-top: var(--space-6); }

/* Services page: one ServiceCard per service, description left, checklist right */
.pg-service-list { display: flex; flex-direction: column; gap: var(--space-6); }
.pg-service-detail { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--space-6) var(--space-12); align-items: start; padding: var(--space-8); }
.pg-service-detail .pg-link { margin-top: var(--space-2); }

/* About page: a single team card, centred under the heading */
.pg-team-solo { grid-template-columns: minmax(0, 320px); justify-content: center; }

/* Home quick form: title above, five fields and the button in one row */
.pg-cta-form .pg-form { grid-template-columns: 1fr; }
.pg-cta-form .pg-form-fields { grid-template-columns: repeat(5, minmax(0, 1fr)) auto; }
@media (max-width: 1240px) { .pg-cta-form .pg-form-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Mobile menu: on phones the hero nav is replaced by a square menu button next to
   "Request a consultation" in the top bar. A <details> element, so no JavaScript;
   it holds a copy of the nav links and drops them down over the page. */
.pg-menu { display: none; }
.pg-menu-toggle { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--brand); color: var(--on-dark); cursor: pointer; list-style: none; transition: background-color 150ms; }
.pg-menu-toggle::-webkit-details-marker { display: none; }
.pg-menu-toggle:hover, .pg-menu[open] .pg-menu-toggle { background: var(--navy); }
.pg-menu .pg-menu-close, .pg-menu[open] .pg-menu-open { display: none; }
.pg-menu[open] .pg-menu-close { display: block; }
.pg-menu-links { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-2); border-radius: var(--radius-lg); background: var(--brand); color: var(--on-dark); box-shadow: var(--shadow-float); }
.pg-menu-links .pg-nav-link { min-height: 44px; }
@media (max-width: 760px) {
  .pg-hero-nav { display: none; }
  .pg-hero { padding-top: var(--space-12); }
  .pg-topbar { position: relative; }
  .pg-menu { display: block; flex: none; width: 44px; }
}

/* Content still to confirm with the client. Remove "show-ph" from <body> to hide the highlight. */
.show-ph .ph { background: #fff1a8; outline: 1px dashed #a07a00; border-radius: 3px; padding: 0 4px; color: #3d2e00; }

@media (max-width: 960px) {
  .pg-form-stacked .pg-form-fields { grid-template-columns: 1fr; }
  .pg-photo-tall { min-height: 280px; }
  .pg-service-detail { grid-template-columns: minmax(0, 1fr); padding: var(--space-6); }
  .pg-cta-form .pg-form-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Phones: keep the name logo inside the screen next to the emblem */
@media (max-width: 600px) {
  .pg-topbar .pg-wordmark { flex: 1 1 100%; }
  .pg-topbar .pg-logo { flex: 1 1 0; width: 0; min-width: 0; }
}

/* Top bar: keep each contact value on one line */
.pg-contact-value { white-space: nowrap; }
.pg-topbar .pg-wordmark { flex: none; }
@media (max-width: 1240px) { .pg-topbar-contacts .pg-contact + .pg-contact { display: none; } }
@media (max-width: 600px) { .pg-topbar .pg-wordmark { flex: 1 1 100%; } }

/* Photos: fill their slot; the hero cut-out sits on the panel with no box behind it */
.pg-photo img { height: 100%; }
.pg-cta-photo .pg-photo, .pg-photo-tall { height: 100%; }
.pg-photo-cutout { background: transparent; }
.pg-photo-cutout img { object-fit: contain; object-position: center bottom; }
.pg-grid-3 > .pg-photo { min-height: 260px; }
.pg-photo-cutout { display: block; position: relative; }
.pg-photo-cutout img { position: absolute; inset: 0; width: 100%; height: 100%; }
.pg-cta-photo .pg-photo, .pg-grid-3 > .pg-photo, .pg-photo-tall { position: relative; display: block; }
.pg-cta-photo .pg-photo img, .pg-grid-3 > .pg-photo img, .pg-photo-tall img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
