/* Zaid To Aid Towing — single-page site
   Content follows the reference page word for word: header, hero (headline, service areas,
   ETA line, call buttons, one paragraph), footer.
   Styling: light editorial layout, condensed uppercase display type, the owner's photo in a
   framed column, square red primary button. All text/background pairs meet WCAG 2.2 AA contrast. */

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/barlow-condensed-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/barlow-condensed-700.woff2") format("woff2");
}

:root {
  --ink: #111111;
  --white: #ffffff;
  --paper: #f5f4f0;          /* hero background */
  --line: #dcd9d2;
  --muted: #555555;          /* 6.7:1 on --paper */
  --red: #c8141f;            /* white text 5.9:1; on --paper 5.4:1 */
  --red-dark: #a10e17;
  --header-h: 84px;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --container: 76rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  /* Header, content, footer: the content stretches so the footer always sits at the bottom of
     the screen, even when the page is shorter than the window. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}
main { flex: 1 0 auto; display: flex; }

img, svg { display: block; max-width: 100%; height: auto; }
p { margin: 0; }
.nowrap { white-space: nowrap; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.icon { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

/* ---------- Accessibility helpers ---------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

main:focus { outline: none; }

:focus-visible {
  outline: 3px solid #1a5fd0;
  outline-offset: 3px;
}
.site-footer :focus-visible { outline-color: var(--white); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid #e6e6e6;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding-block: 0.5rem;
}
.brand { display: block; flex: none; }
.brand img { width: auto; height: 60px; }

.header-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
.header-tagline {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}
.header-phone {
  display: inline-block;
  padding-block: 0.65rem 0.45rem; /* keeps the tap target at least 44px tall */
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--red);
  text-decoration: none;
  text-transform: uppercase;
}
.header-phone:hover { color: var(--red-dark); }

/* ---------- Hero ---------- */

.hero {
  flex: 1;
  display: flex;
  align-items: center; /* content stays vertically centered when the screen is taller */
  background: var(--paper);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
  padding-block: clamp(1.5rem, 5vh, 4.5rem); /* scales with screen height so the page fits */
}
.hero-text { grid-column: 1; grid-row: 1; }

/* Owner's photo, framed, with a red block offset behind it */
.hero-photo {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  isolation: isolate;
  margin: 0 1.25rem 1.25rem 0;
}
.hero-photo::before {
  content: "";
  position: absolute;
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  z-index: -1;
  background: var(--red);
}
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  /* never taller than the space between header and footer */
  max-height: calc(100svh - var(--header-h) - 11.5rem);
  object-fit: cover;
  object-position: 50% 66%;
}

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, min(5.2vw, 8vh), 4.8rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--red); }

.hero-sub {
  margin-top: 1.25rem;
  max-width: 34rem;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  color: var(--muted);
}

.eta {
  margin-top: 2rem;
  padding: 0.2rem 0 0.2rem 0.85rem;
  border-left: 3px solid var(--red);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.3;
}

.btn-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 58px;
  margin-top: 1.1rem;
  padding: 0.8rem 2.2rem;
  border: 0;
  border-radius: 2px;
  background: var(--red);
  color: var(--white);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn-call:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-call:active { transform: none; }

.hero-copy {
  max-width: 36rem;
  margin-top: clamp(2.5rem, 5vw, 3.25rem);
  padding-top: clamp(1.75rem, 4vw, 2.25rem);
  border-top: 1px solid var(--line);
}
.hero-copy h2 {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}
.hero-copy p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 1.25rem;
  padding: 0.75rem 1rem;
  background: #0b0b0b;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  font-size: 0.9rem;
}
.site-footer a {
  display: inline-block;
  padding: 0.45rem 0.5rem;
  color: var(--white);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Shorter desktop/laptop screens: tighter spacing so the footer stays on screen ---------- */

@media (min-width: 861px) and (max-height: 860px) {
  .hero-sub { margin-top: 0.75rem; font-size: 1rem; }
  .eta { margin-top: 1.25rem; }
  .btn-call { min-height: 52px; margin-top: 0.8rem; }
  .hero-copy { margin-top: 1.5rem; padding-top: 1.25rem; }
  .hero-copy h2 { margin-bottom: 0.5rem; font-size: 1.3rem; }
  .hero-copy p { font-size: 0.95rem; line-height: 1.6; }
}

/* ---------- Tablet / mobile ---------- */

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem;
    padding-block: 1.5rem 3rem;
  }
  .hero-text, .hero-photo { grid-column: 1; grid-row: auto; }
  .hero-photo { margin: 0 0.75rem 0.75rem 0; }
  .hero-photo::before { inset: 0.75rem -0.75rem -0.75rem 0.75rem; }
  .hero-photo img { aspect-ratio: 4 / 3; object-position: 50% 62%; }
}

/* Phones: the whole page fits on one screen. Header, content and footer stack to exactly the
   screen height. The text keeps its size, and the photo flexes to fill whatever space is left,
   so it never pushes text off screen. Very short screens (under ~560px) scroll instead. */
@media (max-width: 640px) {
  :root { --header-h: 62px; }
  .brand img { height: 40px; }
  .header-tagline { font-size: 0.68rem; letter-spacing: 0.08em; }
  .header-phone { font-size: 1.15rem; padding-block: 0.4rem 0.25rem; }

  .hero { align-items: stretch; } /* the photo flexes to fill the leftover height */
  .hero-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding-block: 0.85rem;
  }
  .hero-photo {
    flex: 1 1 0;
    display: flex;
    min-height: 96px;
    max-height: 300px;
    margin: 0 0.5rem 0.5rem 0;
  }
  .hero-photo::before { inset: 0.5rem -0.5rem -0.5rem 0.5rem; }
  .hero-photo img { width: 100%; height: 100%; aspect-ratio: auto; object-position: 50% 52%; }

  .hero h1 { font-size: clamp(1.7rem, 4.3svh, 2.3rem); line-height: 0.95; }
  .hero-sub { margin-top: 0.45rem; font-size: 0.9rem; line-height: 1.4; }
  .eta { margin-top: 0.75rem; padding-block: 0.1rem; font-size: 0.92rem; }
  .btn-call {
    width: 100%;
    min-height: 48px;
    margin-top: 0.55rem;
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
  }
  .hero-copy { margin-top: 0.9rem; padding-top: 0.8rem; }
  .hero-copy h2 { margin-bottom: 0.3rem; font-size: 1rem; line-height: 1.15; }
  .hero-copy p { font-size: 0.86rem; line-height: 1.5; }

  .site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    column-gap: 0.75rem;
    padding: 0.4rem 1rem calc(0.4rem + env(safe-area-inset-bottom));
    font-size: 0.78rem;
  }
  .site-footer a { padding: 0.3rem 0.4rem; font-size: 1rem; }
}

/* Short phone screens (e.g. iPhone SE with Safari's bars): drop the photo and tighten the
   spacing so every line of text still fits on one screen. */
@media (max-width: 640px) and (max-height: 620px) {
  .hero-photo { display: none; }
  .hero-grid { padding-block: 0.6rem; }
  .hero-copy { margin-top: 0.7rem; padding-top: 0.6rem; }
}

@media (max-width: 360px) {
  .header-tagline { display: none; }
}

/* ---------- User preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn-call:hover { transform: none; }
}

@media (forced-colors: active) {
  .btn-call { border: 2px solid ButtonText; }
  .eta { border-left-color: CanvasText; }
}
