/* Kingston Appliance Repairs — single sitewide stylesheet */

:root {
  --ink: #1d2733;
  --ink-soft: #46566a;
  --bg: #ffffff;
  --bg-soft: #f3f6f9;
  --brand: #14538c;
  --brand-dark: #0e3d68;
  --line: #d9e2ec;
  --cta: #c2410c;
  --cta-dark: #9a3412;
  --radius: 10px;
  --maxw: 68rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  /* leave room for the sticky call bar on mobile */
  padding-bottom: 0;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

h1, h2, h3 {
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); margin-top: 0; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: 0.4em; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brand-dark);
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--ink); font-weight: 600; }

.site-nav {
  display: flex;
  gap: 0.25rem 1.1rem;
  flex-wrap: wrap;
  margin-right: auto;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.25rem 0;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--brand-dark); }
.site-nav a[aria-current="page"] { border-bottom: 2px solid var(--brand); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
}

.btn-call {
  background: var(--cta);
  color: #fff;
}
.btn-call:hover { background: var(--cta-dark); color: #fff; }

.btn-outline {
  border-color: var(--brand);
  color: var(--brand);
  background: transparent;
}
.btn-outline:hover { background: var(--brand); color: #fff; }

.header-call { padding: 0.5rem 1rem; font-size: 0.95rem; white-space: nowrap; }

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

.hero {
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  padding: 3rem 0 2.5rem;
}

.hero .lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 44rem;
}

.cta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.hero-note {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ---------- Sections ---------- */

.section { padding: 2.5rem 0; }
.section-alt { background: var(--bg-soft); }

.section > .container > p:last-child { margin-bottom: 0; }

/* ---------- Service cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.card h3 { margin-bottom: 0.35rem; }
.card h3 a { text-decoration: none; color: var(--brand-dark); }
.card h3 a:hover { text-decoration: underline; }
.card p { color: var(--ink-soft); font-size: 0.97rem; margin-bottom: 0.75rem; }
.card .card-link {
  margin-top: auto;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 1rem;
}

.steps li {
  counter-increment: step;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 1rem 1.25rem 1rem 3.4rem;
  position: relative;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps strong { display: block; margin-bottom: 0.15rem; }

/* ---------- Callout ---------- */

.callout {
  border-left: 4px solid var(--brand);
  background: var(--bg-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- Two-column symptom lists ---------- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0 2rem;
}

/* ---------- FAQ ---------- */

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
  background: var(--bg);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.85rem 1.1rem;
  list-style-position: inside;
}

.faq details[open] summary { border-bottom: 1px solid var(--line); }

.faq details p {
  padding: 0.85rem 1.1rem;
  margin: 0;
  color: var(--ink-soft);
}

/* ---------- Form ---------- */

.form-section { background: var(--bg-soft); }

.service-form {
  display: grid;
  gap: 0.9rem;
  max-width: 34rem;
  margin-top: 1.25rem;
}

.service-form label {
  font-weight: 600;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.25rem;
}

.service-form input,
.service-form select,
.service-form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  font: inherit;
  background: var(--bg);
  color: var(--ink);
}

.service-form textarea { min-height: 6.5rem; resize: vertical; }

.service-form input:focus,
.service-form select:focus,
.service-form textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.service-form button {
  justify-self: start;
  cursor: pointer;
  border: none;
  font: inherit;
}

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

.site-footer {
  background: var(--brand-dark);
  color: #dbe7f2;
  padding: 2.25rem 0 1.5rem;
  margin-top: 0;
  font-size: 0.95rem;
}

.site-footer a { color: #fff; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-cols h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin-bottom: 0.35rem; }
.footer-cols a { text-decoration: none; }
.footer-cols a:hover { text-decoration: underline; }

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  font-size: 0.85rem;
  color: #b7c9da;
}

/* ---------- Hero grid + form card ---------- */

.hero-grid { display: grid; gap: 2rem; }

.form-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem 1.5rem;
  box-shadow: 0 2px 12px rgba(16, 42, 67, 0.07);
}

.form-card h2 { font-size: 1.3rem; margin-bottom: 0.35rem; }
.form-card > p { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 0; }
.form-card .service-form { margin-top: 1rem; gap: 0.75rem; max-width: none; }

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
    gap: 3rem;
  }

  /* Form card sits beside the hero on desktop, so the anchor-jump
     button is redundant there; it still shows on mobile where the
     form stacks below. Homepage only — .hero-grid exists nowhere else. */
  .hero-grid .cta-row .btn-outline { display: none; }
}

/* ---------- Imagery ---------- */

.hero-img,
.section-img img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.hero-img { margin-top: 1.5rem; }

.section-img { margin: 1.5rem 0 0; }

/* ---------- Sticky mobile call bar ---------- */

.sticky-call {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: var(--cta);
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom));
  text-decoration: none;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.18);
}
.sticky-call:hover { background: var(--cta-dark); color: #fff; }

@media (max-width: 47.9rem) {
  .sticky-call { display: block; }
  body { padding-bottom: 4.25rem; }
  .header-call { display: none; }
  .hero { padding: 2.25rem 0 2rem; }
  .section { padding: 2rem 0; }
}
