/* Granite Facility Services - granite.css

   Only what Headwater's stylesheet (site.css) does not already provide. Everything
   uses the same colour variables, so the palette stays one thing in one place.

   1. Utility classes the Granite pages use that Headwater's never needed
   2. The estimate tool's radio, checkbox and slider (Headwater used Radix widgets)
   3. Article typography for News posts */

/* ------------------------------------------------ 1. extra utility classes */

/* header: more room above and below the logo than Headwater (19px, was 16px) */
.py-\[19px\] { padding-top: 19px; padding-bottom: 19px; }

/* top-bar links beyond the phone number and "Selling..." link wait for desktop width (they are in the menu below 1024px) */
@media (max-width: 63.99rem) {
  .topbar-extra, .topbar-sep.topbar-extra { display: none; }
}

/* the 1px pipe between top-bar links, in the links' own colour (white at 70%) */
.topbar-sep { display: inline-block; width: 1px; height: 0.9em; background: rgba(255, 255, 255, 0.7); }

/* the split hero: the photograph is laid over the navy section in "luminosity" blend at
   5% opacity, so it only just shows through (as in Photoshop) */
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-bg img { mix-blend-mode: luminosity; opacity: 0.05; }

/* The scope tables hold visually hidden (.sr-only, absolutely positioned) labels. Without a
   positioned scroll wrapper they escape its clipping and widen the whole page on phones
   (Headwater's own pages do this). */
.overflow-x-auto { position: relative; }

.overflow-y-auto { overflow-y: auto; }
.size-14 { width: 3.5rem; height: 3.5rem; }
.pb-10 { padding-bottom: 2.5rem; }
.mb-5 { margin-bottom: 1.25rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

/* the News empty state: icon beside the text from 640px up */
@media (min-width: 40rem) {
  .sm\:flex { display: flex; }
  .sm\:items-start { align-items: flex-start; }
  .sm\:gap-6 { gap: 1.5rem; }
  .sm\:mb-0 { margin-bottom: 0; }
}

/* a Careers opening: text left, Apply button right from 640px up. Used only once a
   position is added to careers.mjs, so the class check cannot see it until then. */
@media (min-width: 40rem) {
  .sm\:grid { display: grid; }
  .sm\:grid-cols-\[1fr_auto\] { grid-template-columns: 1fr auto; }
  .sm\:gap-8 { gap: 2rem; }
  .sm\:mt-0 { margin-top: 0; }
}

/* -------------------------------------------- 2. the estimate tool widgets */

/* Cards: the whole label highlights when its control is checked. This wins over
   the utility border/background (those sit in a cascade layer, this does not). */
.wiz-choice:has(input:checked) { border-color: var(--green-500); background-color: var(--slate-50); }
.wiz-choice:has(input:focus-visible) { outline: 2px solid var(--blue-600); outline-offset: 2px; }

.wiz-radio,
.wiz-checkbox {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 1rem;
  height: 1rem;
  margin: 0;
  border: 1px solid var(--line-200);
  background: #fff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  cursor: pointer;
}
.wiz-radio { border-radius: 9999px; }
.wiz-radio:checked { border-color: var(--navy-900); background: radial-gradient(circle, var(--navy-900) 0 28%, transparent 32%) #fff; }

.wiz-checkbox { border-radius: 4px; }
.wiz-checkbox:checked {
  border-color: var(--navy-900);
  background: var(--navy-900) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
}

/* The slider: a 6px track filled with navy up to the thumb (--pct is set by script) over
   the Line colour (Headwater used the section's own pale slate, which left the unfilled
   part invisible),
   and a 16px white thumb with a navy ring, as in Headwater's tool. */
.wiz-range {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 1rem;
  background: transparent;
  cursor: pointer;
  --pct: 3.6%;
}
.wiz-range::-webkit-slider-runnable-track {
  height: 0.375rem;
  border-radius: 9999px;
  background: linear-gradient(to right, var(--navy-900) var(--pct), var(--line-200) var(--pct));
}
.wiz-range::-moz-range-track {
  height: 0.375rem;
  border-radius: 9999px;
  background: linear-gradient(to right, var(--navy-900) var(--pct), var(--line-200) var(--pct));
}
.wiz-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  margin-top: -0.3125rem;
  border-radius: 9999px;
  border: 1px solid var(--navy-900);
  background: #fff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}
.wiz-range::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  border: 1px solid var(--navy-900);
  background: #fff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}
.wiz-range:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 4px; }

/* Before the script runs, every step is visible; Next and Back only make sense once
   it has taken over. */
.wizard:not(.is-enhanced) .wiz-step + .wiz-step { margin-top: 3rem; }
.wizard:not(.is-enhanced) [data-back] { display: none; }

/* --------------------------------------------------- 3. News article text */

/* Headwater has no long-form text, so this follows its own values: Inter body at
   the page's 1.7 leading, Poppins headings at its heading sizes, links and callouts
   styled the way its pages style them. */
.article > * + * { margin-top: 1.25rem; }
.article h2 { margin-top: 2.5rem; font-size: 1.5rem; line-height: 1.15; }
.article h3 { margin-top: 2rem; font-size: 1.25rem; line-height: 1.15; }
.article h2 + *, .article h3 + * { margin-top: 0.75rem; }
.article ul, .article ol { padding-left: 1.5rem; }
.article ul { list-style: disc; }
.article ol { list-style: decimal; }
.article li + li { margin-top: 0.5rem; }
.article li::marker { color: var(--green-500); }
.article a { font-weight: 600; color: var(--blue-600); text-underline-offset: 4px; }
.article a:hover { text-decoration: underline; }
.article strong { font-weight: 600; color: var(--navy-900); }
.article blockquote {
  border-left: 4px solid var(--green-500);
  background: var(--slate-50);
  padding: 1.5rem;
  color: var(--mist-500);
}
.article blockquote p + p { margin-top: 0.75rem; }
.article hr { border-top: 1px solid var(--line-200); margin: 2.5rem 0; }
.article code { background: var(--slate-50); padding: 0.1em 0.35em; font-size: 0.9em; }
.article figure { margin: 2rem 0; }
.article img { display: block; width: 100%; height: auto; }

/* desktop: the main menu sits against the estimate button, not centred */
.nav-right { margin-left: auto; }

/* the footer's cliff watermark, as on the brand wallpapers: the white cliff mark at 7%
   opacity, large, bleeding off the bottom right */
.footer-mark { position: relative; overflow: hidden; }
.footer-mark::before {
  content: "";
  position: absolute;
  right: -9rem;
  bottom: -11rem;
  width: 40rem;
  aspect-ratio: 442 / 404;
  background: url("/assets/brand/granite-cliff-watermark.svg") no-repeat center / contain;
  opacity: 0.07;
  pointer-events: none;
}
