/* ==========================================================================
   Kessler Pipe & Drain — site.css
   Move: grid / catalog (aligned price tables, hairlines) with one colour-block
   trait: the navy truck-side band with its 6px safety-orange stripe.
   Mobile first; layout changes at 48em and 60em.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */

:root {
  /* Truck colours */
  --navy: #0f2340;
  --orange: #b84300;          /* deeper cut of safety orange, 5.4:1 on white */
  --orange-dark: #973700;     /* hover */
  --steel: #eef2f6;           /* galvanised blue-grey surface */
  --on-navy-muted: #c9d3e0;   /* secondary text on navy, 10:1 */

  /* Foundation roles */
  --color-bg: #ffffff;
  --color-fg: var(--navy);
  --color-muted: #4a5870;
  --color-surface: var(--steel);
  --color-accent: var(--orange);
  --color-accent-fg: #ffffff;
  --color-border: #c8d1dc;
  --color-focus: var(--orange);

  /* Type: truck-door lettering over a sturdy body face */
  --font-heading: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", Arial, sans-serif;
  --weight-body: 400;
  --weight-heading: 700;
  --leading-heading: 1.04;
  --step--1: clamp(0.875rem, 0.84rem + 0.15vw, 0.95rem);
  --step-0: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --display: clamp(2.5rem, 1.85rem + 3.2vw, 4.5rem);
  --display-num: clamp(3rem, 1.9rem + 5.4vw, 6rem);

  /* Shape */
  --radius: 2px;
  --stripe: 6px;
  --rule: 1px solid var(--color-border);
  --rule-strong: 2px solid var(--navy);
  --wrap-max: 74rem;
}

/* ---------- 2. Base type ---------- */

h1 {
  font-size: var(--display);
  letter-spacing: -0.005em;
}

h2 {
  font-size: clamp(2rem, 1.6rem + 1.8vw, 3rem);
}

h3 {
  font-size: var(--step-2);
  font-weight: 600;
}

strong,
b {
  font-weight: 500;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.4;
}

/* Any price figure: same family as the phone number */
.price {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--orange);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}

/* A text link that is also a comfortable tap target */
.more-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-weight: 500;
}

/* ---------- 3. Buttons ---------- */

.button {
  min-height: 3rem;
  padding: 0.5rem 1.25rem;
  border-width: 2px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: 0.01em;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.button:hover {
  text-decoration: none;
  background: var(--orange-dark);
  border-color: var(--orange-dark);
}

.button--quiet {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.button--quiet:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.button--light {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
}

.button--light:hover {
  background: var(--steel);
  border-color: var(--steel);
  color: var(--navy);
}

/* ---------- 4. Header: the truck-side phone bar, then brand and nav ---------- */

.site-header {
  border-bottom: var(--rule);
}

.phone-bar {
  --color-focus: #ffffff;
  background: var(--navy);
  color: #fff;
  border-bottom: var(--stripe) solid var(--orange);
}

.phone-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-l);
  padding-block: var(--space-2xs) var(--space-xs);
}

.phone-bar__number {
  display: inline-flex;
  flex-shrink: 0;
  align-items: baseline;
  gap: 0.4rem;
  min-height: var(--tap);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-decoration: none;
}

.phone-bar__number:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--orange);
}

.phone-bar__label {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--on-navy-muted);
}

.phone-bar__note,
.phone-bar__hours {
  font-size: var(--step--1);
  line-height: 1.4;
}

.phone-bar__note {
  font-weight: 500;
}

.phone-bar__hours {
  display: none;
  color: var(--on-navy-muted);
}

@media (min-width: 60em) {
  .phone-bar__inner {
    flex-wrap: nowrap;
  }

  .phone-bar__number {
    font-size: 2.75rem;
  }

  .phone-bar__hours {
    display: block;
    margin-inline-start: auto;
    text-align: end;
  }
}

.site-header__inner {
  padding-block: var(--space-2xs);
}

.site-brand {
  font-size: clamp(1.45rem, 1.25rem + 1vw, 1.9rem);
  letter-spacing: 0.01em;
}

.site-brand__amp {
  color: var(--orange);
}

.nav-toggle {
  border: 2px solid var(--navy);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--step-1);
}

.site-nav a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--step-1);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration-color: var(--orange);
  text-decoration-thickness: 3px;
}

@media (max-width: 47.99em) {
  .site-nav ul {
    padding-block: 0 var(--space-2xs);
  }

  .site-nav li + li {
    border-top: var(--rule);
  }
}

/* ---------- 5. Page hero (home) ---------- */

.hero {
  padding-block: var(--space-l) var(--space-xl);
  border-bottom: var(--rule);
}

.hero__grid {
  display: grid;
  gap: var(--space-l);
}

.hero__main {
  --stack-space: var(--space-s);
}

.hero__main h1 {
  max-width: 16ch;
}

.hero__fact {
  padding-inline-start: var(--space-s);
  border-inline-start: 4px solid var(--navy);
  font-weight: 500;
}

.hero__fact .price {
  font-size: 1.5em;
  line-height: 1;
}

.actions {
  margin-block-start: var(--space-m);
  gap: var(--space-xs);
}

.actions .button {
  flex: 1 1 100%;
}

@media (min-width: 30em) {
  .actions .button {
    flex: 0 0 auto;
  }
}

@media (min-width: 60em) {
  .hero {
    padding-block: var(--space-xl);
  }

  .hero__grid {
    grid-template-columns: 7fr 5fr;
    gap: var(--space-2xl);
    align-items: start;
  }
}

/* ---------- 6. Hours box and hours table ---------- */

.hours-box {
  background: var(--steel);
  padding: var(--space-m);
  border-top: 4px solid var(--navy);
}

.hours-box h2 {
  font-size: var(--step-3);
  margin-block-end: var(--space-xs);
}

.hours {
  max-inline-size: none;
}

.hours th,
.hours td {
  padding-block: var(--space-2xs);
  border-bottom-color: var(--color-border);
}

.hours th {
  font-weight: 500;
  white-space: nowrap;
}

.hours tr:first-child th,
.hours tr:first-child td {
  border-top: var(--rule-strong);
}

.hours-note {
  margin-block-start: var(--space-xs);
  font-size: var(--step--1);
  color: var(--color-muted);
}

/* ---------- 7. Section heads and bands ---------- */

.section-head {
  margin-block-end: var(--space-l);
}

.section--ruled {
  border-top: var(--rule);
}

/* Home: price table beside its heading */
.jobs {
  display: grid;
  gap: var(--space-m);
}

@media (min-width: 60em) {
  .jobs {
    grid-template-columns: 4fr 8fr;
    gap: var(--space-2xl);
    align-items: start;
  }
}

/* ---------- 8. Price table (the catalog) ---------- */

.price-table {
  width: 100%;
  border-top: var(--rule-strong);
  font-variant-numeric: tabular-nums;
}

.price-table thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.price-table th,
.price-table td {
  text-align: start;
  vertical-align: top;
}

.price-table tbody th {
  font-weight: 500;
  font-size: var(--step-0);
}

.price-table .detail {
  color: var(--color-muted);
  font-size: var(--step--1);
  line-height: 1.45;
}

.price-table .price {
  text-align: end;
  font-size: var(--step-2);
  line-height: 1.1;
}

.price .from,
.price .extra {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--step--1);
  color: var(--color-muted);
}

.price-table .price.price--text {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--step--1);
  color: var(--color-muted);
  white-space: normal;
  line-height: 1.35;
}

/* Phone: each row is name over one line, price right */
@media (max-width: 47.99em) {
  .price-table,
  .price-table tbody {
    display: block;
  }

  .price-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: var(--space-s);
    row-gap: 0.15rem;
    padding-block: var(--space-xs);
    border-bottom: var(--rule);
  }

  .price-table tbody th {
    grid-column: 1;
    grid-row: 1;
    line-height: 1.3;
  }

  .price-table .detail {
    grid-column: 1;
    grid-row: 2;
  }

  .price-table .price {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
  }

  .price-table .price.price--text {
    max-width: 7.5rem;
  }
}

/* Wide: a real three-column table with shaded alternate rows */
@media (min-width: 48em) {
  .price-table thead {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
  }

  .price-table thead th {
    padding: var(--space-2xs) var(--space-s);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--step-0);
    letter-spacing: 0.02em;
    color: var(--color-muted);
    border-bottom: var(--rule);
  }

  .price-table thead th:last-child {
    text-align: end;
  }

  .price-table tbody th,
  .price-table td {
    padding: var(--space-s);
    border-bottom: var(--rule);
  }

  .price-table tbody tr:nth-child(even) {
    background: var(--steel);
  }

  .price-table .col-service {
    width: 34%;
  }

  .price-table .col-price {
    width: 11.5rem;
  }

  .price-table .detail {
    font-size: var(--step-0);
  }

  .price-table .price.price--text {
    white-space: nowrap;
    padding-top: calc(var(--space-s) + 0.25rem);
  }
}

/* ---------- 9. Visit sequence (home) ---------- */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  border-top: var(--rule-strong);
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--space-xs);
  padding-block: var(--space-s);
  border-bottom: var(--rule);
  max-inline-size: none;
}

.steps li::before {
  content: counter(step);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--step-3);
  line-height: 1;
}

@media (min-width: 60em) {
  .steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
  }

  .steps li {
    grid-template-columns: 1fr;
    align-content: start;
    padding: var(--space-m);
    border-bottom: 0;
    border-inline-start: var(--rule);
  }

  .steps li:first-child {
    border-inline-start: 0;
    padding-inline-start: 0;
  }
}

/* ---------- 10. Towns ---------- */

/* Inline list (home): the slash ends a line, never starts one */
.towns-inline {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.1em 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  line-height: 1.15;
}

.towns-inline li {
  max-inline-size: none;
}

.towns-inline li:not(:last-child)::after {
  content: "/" / "";
  padding-inline: 0.3em;
  color: #8796aa;
}

/* Grid (area page) */
.town-grid {
  list-style: none;
  padding: 0;
  display: grid;
  border-top: var(--rule-strong);
}

.town-grid li {
  max-inline-size: none;
  padding-block: var(--space-xs);
  border-bottom: var(--rule);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 1.6rem + 1.8vw, 3rem);
  line-height: 1.1;
}

.town-grid small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--step--1);
  color: var(--color-muted);
  line-height: 1.4;
}

@media (min-width: 48em) {
  .town-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .town-grid li {
    padding: var(--space-l) var(--space-m);
    border-inline-start: var(--rule);
  }

  .town-grid li:nth-child(3n + 1) {
    border-inline-start: 0;
    padding-inline-start: 0;
  }
}

/* Hours band (area page) */
.hours-band {
  background: var(--steel);
}

.hours-band__grid {
  display: grid;
  gap: var(--space-l);
}

@media (min-width: 60em) {
  .hours-band__grid {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-2xl);
    align-items: start;
  }
}

/* ---------- 11. Truck band: the one navy block per page ---------- */

.truck-band {
  --color-focus: #ffffff;
  background: var(--navy);
  color: #fff;
  border-bottom: var(--stripe) solid var(--orange);
  padding-block: var(--space-xl);
}

.truck-band__inner {
  display: grid;
  gap: var(--space-m);
}

.truck-band h2 {
  max-width: 22ch;
}

.truck-band p {
  color: var(--on-navy-muted);
}

.truck-band__call {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-l);
}

.truck-band__number {
  display: inline-block;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--display-num);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-decoration: none;
}

.truck-band__number:hover {
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 4px;
}

@media (min-width: 60em) {
  .truck-band__inner {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-2xl);
    align-items: end;
  }

  .truck-band__call {
    justify-content: flex-end;
  }
}

/* ---------- 12. Inner pages: head, anchors, price groups ---------- */

.page-head {
  padding-block: var(--space-l);
}

.page-head .stack {
  --stack-space: var(--space-s);
}

.page-head h1 {
  max-width: 18ch;
}

/* Anchor links on the price page */
.jump {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-l);
  border-top: var(--rule);
  border-bottom: var(--rule);
}

.jump li {
  max-inline-size: none;
}

.jump a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--step-1);
  color: var(--navy);
  text-decoration-color: var(--orange);
}

@media (max-width: 29.99em) {
  .jump {
    flex-direction: column;
  }

  .jump li + li {
    border-top: var(--rule);
  }

  .jump a {
    width: 100%;
  }
}

/* Same-day / service-call facts strip */
.facts-strip {
  display: grid;
  background: var(--steel);
  border-top: var(--rule-strong);
}

.facts-strip > div {
  padding: var(--space-m);
}

.facts-strip > div + div {
  border-top: var(--rule);
}

.facts-strip h2 {
  font-size: var(--step-2);
  margin-block-end: var(--space-3xs);
}

.facts-strip .price {
  font-size: var(--step-3);
}

@media (min-width: 48em) {
  .facts-strip {
    grid-template-columns: 1fr 1fr;
  }

  .facts-strip > div + div {
    border-top: 0;
    border-inline-start: var(--rule);
  }
}

.price-group {
  scroll-margin-top: var(--space-m);
}

.price-group h2 {
  margin-block-end: var(--space-s);
}

.price-group + .price-group {
  margin-block-start: var(--space-xl);
}

.fine-print {
  border-top: var(--rule-strong);
  padding-block-start: var(--space-l);
}

.fine-print ul {
  padding-inline-start: 1.1rem;
}

.fine-print li + li {
  margin-block-start: var(--space-2xs);
}

/* ---------- 13. About ---------- */

.about {
  display: grid;
  gap: var(--space-l);
  grid-template-areas: "head" "facts" "body";
}

.about__head {
  grid-area: head;
}

.about__facts {
  grid-area: facts;
}

.about__body {
  grid-area: body;
}

.about__head .stack {
  --stack-space: var(--space-s);
}

.facts {
  list-style: none;
  padding: 0;
  border-top: var(--rule-strong);
}

.facts li {
  max-inline-size: none;
  padding-block: var(--space-xs);
  border-bottom: var(--rule);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--step-2);
  line-height: 1.15;
}

.facts li small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--step--1);
  color: var(--color-muted);
  line-height: 1.4;
  margin-block-start: 0.3rem;
}

.trucks {
  margin-block: var(--space-m);
}

.trucks img {
  width: 100%;
  max-width: 30rem;
}

.habits {
  list-style: none;
  padding: 0;
  border-top: var(--rule-strong);
}

.habits li {
  padding-block: var(--space-xs);
  border-bottom: var(--rule);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--step-2);
  line-height: 1.2;
}

@media (min-width: 60em) {
  .about {
    grid-template-columns: minmax(0, 1fr) 20rem;
    grid-template-areas: "head facts" "body facts";
    column-gap: var(--space-2xl);
    row-gap: var(--space-xl);
    align-items: start;
  }

  .about__head,
  .about__body {
    max-width: 62ch;
  }

  .about__facts {
    margin-block-start: 0.75rem;
  }
}

/* ---------- 14. Contact ---------- */

.contact {
  display: grid;
  gap: var(--space-xl);
}

.contact h1 {
  font-size: clamp(2.25rem, 1.8rem + 2.2vw, 3.5rem);
}

.contact h1 .call-number {
  display: block;
  font-size: var(--display-num);
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
  margin-block: 0.1em;
}

.contact h1 .call-number:hover {
  text-decoration: underline;
  text-decoration-thickness: 4px;
}

.contact h2 {
  font-size: var(--step-3);
}

.contact__block {
  margin-block-start: var(--space-l);
  border-top: var(--rule-strong);
  padding-block-start: var(--space-s);
}

.contact__block h2 {
  margin-block-end: var(--space-2xs);
}

.contact__block .hours tr:first-child th,
.contact__block .hours tr:first-child td {
  border-top: 0;
}

.contact__form {
  background: var(--steel);
  padding: var(--space-m);
  border-top: 4px solid var(--navy);
  align-self: start;
}

.contact__form > p {
  margin-block: var(--space-2xs) var(--space-m);
}

.form .field label {
  font-weight: 500;
}

.form input:not([type="hidden"]),
.form textarea {
  border-radius: var(--radius);
  border-color: var(--color-muted);
  background: #fff;
}

@media (min-width: 60em) {
  .contact {
    grid-template-columns: 6fr 5fr;
    gap: var(--space-2xl);
  }

  .contact__form {
    padding: var(--space-l);
  }
}

/* ---------- 15. 404 ---------- */

.not-found .stack {
  --stack-space: var(--space-m);
}

.link-list {
  list-style: none;
  padding: 0;
  border-top: var(--rule-strong);
  max-width: 30rem;
}

.link-list li {
  border-bottom: var(--rule);
}

.link-list a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding-block: var(--space-2xs);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--step-2);
  color: var(--navy);
  text-decoration-color: var(--orange);
}

/* ---------- 16. Footer ---------- */

.site-footer {
  margin-block-start: 0;
  padding-block: var(--space-xl) var(--space-l);
  border-top: 0;
  font-size: var(--step-0);
}

.site-footer--ruled {
  border-top: var(--rule);
}

.footer-grid {
  display: grid;
  gap: var(--space-l);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.footer-grid > * > * + * {
  margin-block-start: var(--space-2xs);
}

.footer-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--step-2);
  line-height: 1.1;
}

.footer-heading {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--step-1);
}

.footer-tel {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--step-2);
  font-variant-numeric: tabular-nums;
}

.footer-hours {
  list-style: none;
  padding: 0;
}

.footer-hours li + li {
  margin-block-start: 0.2rem;
}

.site-footer nav ul {
  gap: 0 var(--space-m);
}

.site-footer nav a {
  color: var(--navy);
}

.footer-base {
  margin-block-start: var(--space-l);
  padding-block-start: var(--space-s);
  border-top: var(--rule);
  font-size: var(--step--1);
}
