/* ==========================================================================
   Pitstop Garage Holsworthy
   Plain CSS, no build step. Mobile-first: the base rules are the phone
   layout, and the two media queries at the bottom widen it out.

   Design rules this file sticks to:
   1. Hazard yellow means "phone" and nothing else. If you find yourself
      using --hazard on something that isn't a phone link, use --lamp.
   2. Hairline rules do the grouping. No box shadows, no card borders.
   3. No animation anywhere, so there is nothing for prefers-reduced-motion
      to switch off (the media query is still there as a backstop).
   ========================================================================== */

:root {
  --oil:    #101215;  /* page ground */
  --steel:  #20242a;  /* raised surfaces: form, footer */
  --line:   #39414a;  /* hairline rules */
  --lamp:   #f2f0ea;  /* body text */
  --zinc:   #98a0a9;  /* secondary text */
  --hazard: #f5c518;  /* the phone, and only the phone */

  /* Type scale, 1.25 ratio */
  --t--1: 0.875rem;   /* 14 */
  --t-0:  1rem;       /* 16 */
  --t-1:  1.25rem;    /* 20 */
  --t-2:  1.5625rem;  /* 25 */
  --t-3:  1.9375rem;  /* 31 */
  --t-4:  2.75rem;    /* 44 */
  --t-5:  3.5rem;     /* 56 */

  --head: "Archivo Narrow", "Arial Narrow", system-ui, sans-serif;
  --body: "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;

  --gutter: 1.25rem;
  --measure: 62rem;
}

/* One self-hosted variable font, covering 600 and 700 from a single file. */
@font-face {
  font-family: "Archivo Narrow";
  src: url("/fonts/archivo-narrow-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--oil);
  color: var(--lamp);
  font-family: var(--body);
  font-size: var(--t-0);
  line-height: 1.55;
  /* Room for the fixed call bar so it never covers the footer. */
  padding-bottom: 4.75rem;
}

h1, h2, h3 {
  font-family: var(--head);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--lamp); }

/* Visible, high-contrast focus ring on everything focusable. */
:focus-visible {
  outline: 3px solid var(--hazard);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--hazard);
  color: var(--oil);
  padding: 0.75rem 1rem;
  font-weight: 700;
  z-index: 50;
}
.skip:focus { left: 0; }

/* --------------------------------------------------------------- topbar */

.topbar {
  border-bottom: 1px solid var(--line);
  padding: 0.875rem 0;
}

.topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: var(--head);
  font-weight: 700;
  font-size: var(--t-1);
  letter-spacing: 0.02em;
  line-height: 1;
}

.wordmark__town {
  color: var(--zinc);
  font-weight: 600;
}

/* The header number is hidden on phones, where the fixed bottom bar does
   this job with a much bigger target. */
.topbar__call { display: none; }

/* ----------------------------------------------------------------- hero */

.hero { padding: 1.75rem 0 2.5rem; }

h1 {
  /* Deliberately smaller than the desktop size: on a phone the job is to get
     the phone number, address AND hours above the fold, not to be a poster. */
  font-size: 2.375rem;
  margin-bottom: 0.75rem;
}

.hero__sub {
  font-size: var(--t-1);
  color: var(--zinc);
  max-width: 34ch;
  margin-bottom: 1.5rem;
}

/* The one loud element on the page. */
.call {
  display: block;
  background: var(--hazard);
  color: var(--oil);
  text-decoration: none;
  padding: 0.875rem 1.25rem 1rem;
  border-radius: 2px;
  min-height: 56px;
}

.call__label {
  display: block;
  font-family: var(--head);
  font-weight: 600;
  font-size: var(--t--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}

.call__num {
  display: block;
  font-family: var(--head);
  font-weight: 700;
  font-size: var(--t-3);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.call:hover { background: #ffd429; }

.hero__alt {
  margin-top: 1.125rem;
  color: var(--zinc);
  font-size: var(--t--1);
  max-width: 34ch;
}
.hero__alt a { color: var(--lamp); font-weight: 600; text-underline-offset: 3px; }

/* Facts: address and hours, ruled rather than boxed. */
.hero__facts { margin-top: 1.75rem; }

.fact {
  border-top: 1px solid var(--line);
  padding-top: 1.125rem;
  margin-top: 1.5rem;
}

.fact__h {
  font-size: var(--t-1);
  font-weight: 600;
  margin-bottom: 0.625rem;
}

address {
  font-style: normal;
  font-size: var(--t-1);
  line-height: 1.45;
}

.dirlink {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--lamp);
  font-weight: 600;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  /* Padded out to a 44px touch target without changing how it looks. */
  padding: 0.625rem 0;
}

.hours { margin: 0; }

.hours__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3125rem 0;
  border-bottom: 1px solid rgba(57, 65, 74, 0.55);
}
.hours__row:last-child { border-bottom: 0; }

.hours dt { color: var(--zinc); }

.hours dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.hours__row--shut dd { color: var(--zinc); font-weight: 400; }

/* ----------------------------------------------------------- hazard tape */

/* Pure CSS, no image, so it costs nothing and cannot shift the layout. */
.tape {
  height: 6px;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--hazard) 0 10px,
    var(--oil)    10px 20px
  );
}

/* ------------------------------------------------------------- services */

.services { padding: 2.75rem 0; }

.sec__h {
  font-size: var(--t-3);
  margin-bottom: 1.5rem;
}

.jobs {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.job {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.8125rem 0;
  border-bottom: 1px solid var(--line);
}

.job__n {
  font-family: var(--head);
  font-weight: 600;
  font-size: var(--t--1);
  color: var(--zinc);
  font-variant-numeric: tabular-nums;
  flex: 0 0 1.75rem;
}

.job__t {
  font-family: var(--head);
  font-weight: 600;
  font-size: var(--t-2);
  line-height: 1.15;
}

.services__note {
  margin-top: 1.5rem;
  color: var(--zinc);
  max-width: 48ch;
}

/* -------------------------------------------------------------- contact */

.contact { padding: 2.75rem 0 3rem; }

.contact__lead { margin-bottom: 2rem; }
.contact__lead p { color: var(--zinc); max-width: 44ch; }

.contact__alt {
  margin-top: 0.5rem;
  font-weight: 600;
  line-height: 1.3;
}
/* Both are real touch targets, so they get 44px of height each. */
.contact__alt a {
  display: inline-block;
  color: var(--lamp);
  text-underline-offset: 4px;
  padding: 0.6875rem 0;
}

.form {
  background: var(--steel);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1.25rem;
}

.field { margin-bottom: 1.125rem; }

.field label {
  display: block;
  font-family: var(--head);
  font-weight: 600;
  font-size: var(--t-1);
  margin-bottom: 0.375rem;
}

.req {
  font-family: var(--body);
  font-size: var(--t--1);
  font-weight: 400;
  color: var(--zinc);
}

.hint {
  color: var(--zinc);
  font-size: var(--t--1);
  margin: -0.25rem 0 1rem;
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
  width: 100%;
  font-family: inherit;
  font-size: var(--t-0);
  color: var(--lamp);
  background: var(--oil);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.75rem;
  min-height: 48px;
}

textarea { min-height: 8rem; resize: vertical; }

input:focus, textarea:focus { border-color: var(--hazard); }

/* Registrations are always read as capitals. */
.reg {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.submit {
  width: 100%;
  min-height: 56px;
  font-family: var(--head);
  font-weight: 700;
  font-size: var(--t-1);
  letter-spacing: 0.02em;
  color: var(--oil);
  background: var(--lamp);
  border: 0;
  border-radius: 2px;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
}
.submit:hover { background: #fff; }

.form__privacy {
  margin-top: 0.875rem;
  font-size: var(--t--1);
  color: var(--zinc);
  line-height: 1.5;
}
.form__privacy a { color: var(--lamp); text-underline-offset: 3px; }

/* --------------------------------------------------------------- footer */

.foot {
  border-top: 1px solid var(--line);
  background: var(--steel);
  padding: 2rem 0;
  font-size: var(--t--1);
  color: var(--zinc);
}

.foot a {
  display: inline-block;
  color: var(--lamp);
  text-underline-offset: 3px;
  padding: 0.3125rem 0;
}

.foot__name {
  font-family: var(--head);
  font-weight: 700;
  font-size: var(--t-1);
  color: var(--lamp);
  margin-bottom: 0.375rem;
}

.foot p { margin: 0 0 0.375rem; }

.foot__hours { margin-top: 0.75rem; }

.foot__legal { margin-top: 1.5rem; }

/* ----------------------------------------------------- fixed call bar */

.stickycall {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.75rem;
  padding: 0.75rem 1rem;
  /* Keeps clear of the Android gesture bar. */
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: var(--hazard);
  color: var(--oil);
  font-family: var(--head);
  font-weight: 700;
  font-size: var(--t-2);
  letter-spacing: 0.01em;
  text-decoration: none;
  border-top: 2px solid var(--oil);
}

.stickycall:focus-visible { outline-offset: -6px; }

/* =================================================== 600px and wider === */

@media (min-width: 600px) {
  :root { --gutter: 2rem; }

  .hero { padding: 2.75rem 0 3rem; }
  h1 { font-size: var(--t-4); }

  .call {
    display: inline-block;
    padding: 1rem 2rem 1.125rem;
  }
  .call__num { font-size: var(--t-4); }

  .hero__facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .fact { margin-top: 0; }

  .jobs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
  }

  .form { padding: 1.75rem; }

  .foot__in {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
  }
  .foot__legal { margin-top: 0; text-align: right; }
}

/* =================================================== 900px and wider === */

@media (min-width: 900px) {
  body { padding-bottom: 0; }

  /* On desktop the number moves into the header and the fixed bar goes,
     because there is no thumb reach problem to solve. */
  .stickycall { display: none; }

  .topbar__call {
    display: inline-block;
    font-family: var(--head);
    font-weight: 700;
    font-size: var(--t-2);
    color: var(--hazard);
    text-decoration: none;
    letter-spacing: 0.01em;
  }
  .topbar__call:hover { text-decoration: underline; text-underline-offset: 4px; }

  .hero { padding: 4rem 0 4.5rem; }
  h1 { font-size: var(--t-5); }

  .hero__in {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 3.5rem;
    align-items: start;
  }

  .hero__facts {
    margin-top: 0;
    grid-template-columns: 1fr;
    gap: 0;
  }
  .fact + .fact { margin-top: 1.75rem; }

  .services { padding: 4rem 0; }

  .contact { padding: 4rem 0 4.5rem; }

  .contact__in {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 3.5rem;
    align-items: start;
  }
  .contact__lead { margin-bottom: 0; }

  /* Two-up on the short fields once there is room. */
  .form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
  .form .field:nth-of-type(1) { grid-column: 1 / -1; }
  .form .hint { grid-column: 1 / -1; }
  .form .field:nth-of-type(4),
  .form .field:nth-of-type(5),
  .form .submit,
  .form .form__privacy { grid-column: 1 / -1; }
  .submit { width: auto; justify-self: start; padding-inline: 2.5rem; }
}

/* ===================================================== reduced motion === */

/* There is no animation on this site by design. This is a backstop in case
   any is ever added. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ====================================================== privacy page === */

.wordmark--link { text-decoration: none; color: var(--lamp); }
.wordmark--link:hover { text-decoration: underline; text-underline-offset: 4px; }

.prose { padding: 2.5rem 0 3rem; }

.prose h1 { font-size: var(--t-3); margin-bottom: 1rem; }

.prose h2 {
  font-size: var(--t-1);
  font-weight: 600;
  margin: 2rem 0 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.prose p { max-width: 68ch; color: var(--lamp); }

.prose__lead { color: var(--zinc); font-size: var(--t-1); line-height: 1.5; }

.prose a { color: var(--lamp); text-underline-offset: 3px; }

.prose__back {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

@media (min-width: 900px) {
  .prose { padding: 3.5rem 0 4rem; }
  .prose h1 { font-size: var(--t-4); }
}
