/* Jackstand site template — mobile-first, no dependencies.
   Palette colors come from :root vars injected by the build (see palettes.json).
   Never hardcode a brand color in this file. */

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

/* One typeface for everything: Inter Tight variable, 400-800, self-hosted. */
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/inter-tight-latin.woff2) format("woff2");
}

:root {
  --bg: #ffffff;
  --bg-alt: #F8F7F4; /* fallback; palettes override */
  --gold: #F5B301;   /* review stars only, all palettes */
  --text: #0F172A;
  --muted: #5B6472;
  --line: #dde3ea;
  --radius: 8px;   /* the one radius, site-wide */
  --wrap: 68.75rem; /* 1100px */
  --sticky-h: 3.75rem;
}

/* Palette presets — the single source of preset colors. build.js reads
   --primary from these blocks for the theme-color meta tag. A "custom"
   palette injects the same variables inline from config colors instead. */
[data-palette="pool-default"] {
  --primary: #1E293B; --primary-dark: #0F172A;
  --accent: #0D9488; --accent-dark: #0F766E;
  --on-accent: #FFFFFF; --bg-alt: #F8F7F4;
}
[data-palette="lawn-default"] {
  --primary: #1F3D2B; --primary-dark: #142B1D;
  --accent: #6A9A3B; --accent-dark: #55802E;
  --on-accent: #FFFFFF; --bg-alt: #F5F2EA;
}

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

body {
  margin: 0;
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem; /* 17px */
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  /* leave room for the sticky call bar on mobile */
  padding-bottom: calc(var(--sticky-h) + env(safe-area-inset-bottom, 0px));
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); }
a:hover { color: var(--primary); }

/* Type scale: H1 40/56, H2 28/36, body 17, small 14. Nothing else. */
h1, h2 { line-height: 1.1; margin: 0 0 0.75rem; letter-spacing: -0.02em; }
h1 { font-size: 2.5rem; font-weight: 800; }
h2 { font-size: 1.75rem; font-weight: 700; }
p { margin: 0 0 1rem; max-width: 65ch; }
ul { margin: 0; padding: 0; list-style: none; }
small, .small { font-size: 0.875rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
.muted { color: var(--muted); }

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

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border: 0; border-radius: var(--radius);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  min-height: 3rem;
}
.btn-lg { width: 100%; font-size: 1.1875rem; padding: 1rem 1.5rem; }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-dark); color: var(--on-accent); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }

/* (1) Header */
.site-header {
  background: var(--primary);
  color: #fff;
  position: sticky; top: 0; z-index: 10;
}
.header-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  min-height: 3.5rem; padding-top: 0.5rem; padding-bottom: 0.5rem;
}
.brand {
  color: #fff; text-decoration: none; font-weight: 800; font-size: 1.125rem; line-height: 1.2;
}
.header-phone {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: #fff; text-decoration: none; font-weight: 700; white-space: nowrap;
  font-size: 1.1875rem; /* 19px bold = WCAG large text; accent bg passes 3:1 */
  padding: 0.5rem 0.75rem; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent);
}
.header-phone:hover { background: var(--accent-dark); color: var(--on-accent); }
.header-phone-num { display: none; }
@media (min-width: 48em) {
  .header-phone-num { display: inline; }
  .header-phone-short { display: none; }
}

/* (3) Hero */
.hero {
  background: var(--primary-dark);
  color: #fff;
  padding: 2rem 0 2.25rem;
}
.hero h1 { color: #fff; }
.hero-sub { font-size: 1.0625rem; opacity: 0.92; margin-bottom: 1.25rem; }
.hero-note { margin: 1rem 0 0; font-size: 0.9375rem; opacity: 0.85; }

/* Hero with a real photo: full-bleed image, content pinned to the bottom over
   a dark gradient so the headline stays legible. */
.hero-has-photo {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 27rem;
  padding: 6rem 0 2.25rem;
}
.hero-img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center 62%;
}
.hero-has-photo::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top,
    rgba(15, 23, 42, 0.88) 0%,
    rgba(15, 23, 42, 0.55) 34%,
    rgba(15, 23, 42, 0.18) 62%,
    rgba(15, 23, 42, 0.05) 100%);
}
.hero-content { position: relative; z-index: 2; }

/* Trust bar */
.trust-bar {
  background: var(--bg-alt);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 0;
}
.trust-bar p { margin: 0; max-width: none; }
.trust-star { color: var(--gold); }

/* Offer strip: one gold-accented line between hero and services. No urgency. */
.offer-strip { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.offer-strip p {
  margin: 0; max-width: none; font-weight: 700;
  border-left: 4px solid var(--gold); padding-left: 0.75rem;
}

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); }

/* (4) Services: a plain list, two columns on wider screens. No boxes. */
.services { display: grid; gap: 0.65rem 3rem; max-width: 44rem; }
.services li { font-weight: 600; }

/* What's included in every visit: plain checklist under the services */
.visit-h { margin: 2.25rem 0 0.75rem; font-size: 1.0625rem; font-weight: 700; }
.visit-list { display: grid; gap: 0.5rem 3rem; max-width: 44rem; }
.visit-list li { position: relative; padding-left: 1.5rem; }
.visit-list li::before {
  content: "✓"; position: absolute; left: 0;
  color: var(--accent-dark); font-weight: 700;
}

/* (5) Service area: one plain line of towns */
.towns { display: flex; flex-wrap: wrap; gap: 0.25rem 0.6rem; margin-bottom: 1rem; font-weight: 600; }
.towns li + li::before { content: "·"; color: var(--muted); margin-right: 0.6rem; }
.neighborhoods { font-size: 0.9375rem; margin-top: -0.5rem; }

/* (6) Reviews: quiet columns, no boxes, no avatars */
.reviews { display: grid; gap: 2rem; margin-bottom: 1.5rem; }
.stars { color: var(--gold); letter-spacing: 0.1em; margin: 0 0 0.5rem; font-size: 0.875rem; }
.review blockquote { margin: 0 0 0.5rem; }
.reviewer { margin: 0; color: var(--muted); font-weight: 600; }
.link-out { font-weight: 700; }

/* (7) Gallery */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.gallery img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius); background: var(--line);
}

/* FAQ: plain questions and answers, always visible. No accordion, no JS. */
.faq-item { max-width: 65ch; }
.faq-item + .faq-item { margin-top: 1.5rem; }
.faq-item h3 { margin: 0 0 0.35rem; font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
.faq-item p { margin: 0; }

/* (8) Contact form */
.contact-form { display: grid; gap: 0.875rem; max-width: 34rem; }
.contact-form label { display: grid; gap: 0.3rem; font-weight: 600; }
.contact-form input, .contact-form textarea {
  font: inherit; width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--text);
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.contact-form button { justify-self: start; min-width: 10rem; }
.form-consent { margin: -0.25rem 0 0; font-size: 0.8125rem; color: var(--muted); }
.form-status { margin: 0; font-weight: 600; color: var(--primary); }
.form-fallback { margin: 0; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* (9) Hours */
.hours { margin: 0 0 1rem; display: grid; gap: 0.25rem; max-width: 22rem; }
.hours div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: 0.35rem 0; }
.hours dt { font-weight: 600; }
.hours dd { margin: 0; }
.hours-text { font-weight: 600; }
.license-line { font-weight: 600; margin: 0; }

/* (10) Footer */
.site-footer {
  background: var(--primary);
  color: #fff;
  padding: 2rem 0 2.5rem;
  font-size: 0.9375rem;
}
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 0.4rem; }
.footer-name { font-weight: 800; font-size: 1.125rem; }
.footer-area, .footer-hours { opacity: 0.85; }
.footer-social { display: flex; gap: 0.9rem; margin: 0.75rem 0 0.4rem; }
.footer-social .icon { width: 1.4rem; height: 1.4rem; }
.footer-credit { margin-top: 1.25rem; }

/* Jackstand brand badge: fixed navy/amber, never tied to the site palette. */
.jackstand-badge {
  display: inline-flex; align-items: baseline; gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius);
  background: #152238;
  font-size: 0.875rem; font-weight: 600; white-space: nowrap;
  text-decoration: none;
}
.site-footer .jackstand-badge, .site-footer .jackstand-badge:hover { color: #fff; }
.jackstand-badge strong { color: #F59E0B; font-weight: 700; }

/* (2) Sticky mobile call button */
.sticky-call {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--sticky-h);
  padding: 0.5rem 1rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
  background: var(--accent); color: var(--on-accent);
  font-weight: 800; font-size: 1.1875rem; text-decoration: none;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.18);
}
.sticky-call:hover { background: var(--accent-dark); color: var(--on-accent); }

/* Larger screens */
@media (min-width: 40em) {
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.25rem; }
  .btn-lg { width: auto; }
  .hero { padding: 3rem 0 3.5rem; }
  .hero-has-photo { min-height: 34rem; padding: 8rem 0 3rem; }
  .section { padding: 6rem 0; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visit-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
}

@media (min-width: 48em) {
  body { padding-bottom: 0; }
  .sticky-call { display: none; }
  .brand { font-size: 1.25rem; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
  /* intentionally empty: no animations on these sites */
}
