/* ==========================================================================
   Independence Home Services
   One stylesheet for the whole site. Edit colours and fonts in :root below.
   ========================================================================== */

:root {
  /* Brand */
  --navy:            #001F44;
  --navy-deep:       #001129;
  --navy-card:       #0B2E5A;
  --navy-card-2:     #14406F;
  --navy-line:       #1B3355;
  --green:           #4A8226;
  --green-dark:      #2F5518;
  --green-light:     #7FB246;
  --green-tint:      #EDF2E6;
  --green-ink:       #3C6B1C;

  /* Surfaces */
  --cream:           #F6F3EE;
  --paper:           #FFFFFF;
  --line:            #E2DCD2;
  --line-soft:       #EFE9DF;
  --border-strong:   #C8C0B2;
  --slot:            #E9E4DA;
  --slot-line:       #D8D0C3;

  /* Text */
  --ink:             #14243F;
  --body:            #3C4A63;
  --muted:           #52607A;
  --on-dark:         #DDE4EE;
  --on-dark-muted:   #B6C2D6;
  --on-dark-faint:   #8D9BB5;

  /* Type */
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Shape */
  --r:    12px;
  --r-sm: 6px;
  --container: 1200px;
  --gutter: 24px;
}

/* --------------------------------------------------------------- Reset ---- */

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.015em;
  color: var(--navy);
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; }
img { height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
  border-radius: 3px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff;
  padding: 14px 20px; font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

/* ----------------------------------------------------------- Scaffolding -- */

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

.section { padding: 84px 0; }
.section--tight  { padding: 64px 0; }
.section--cream  { background: var(--cream); }
.section--paper  { background: var(--paper); border-top: 1px solid var(--line); }
.section--navy   { background: var(--navy); }
.section--green  { background: var(--green); }

.section--navy  h1, .section--navy  h2, .section--navy  h3,
.section--green h1, .section--green h2, .section--green h3 { color: #fff; }

.stack        { display: flex; flex-direction: column; gap: 22px; }
.stack--tight { gap: 14px; }

/* Two-column split: a narrower text column beside a wider content column */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.split--top     { align-items: start; }
.split--narrow  { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.split--wide    { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.split--sidebar { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 72px; }

.grid { display: grid; gap: var(--gutter); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 44px;
}
.section-head__text { max-width: 720px; display: flex; flex-direction: column; gap: 16px; }

/* ------------------------------------------------------------ Typography -- */

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  line-height: 1.5;
}
.section--navy .eyebrow,
.section--green .eyebrow { color: var(--green-light); }

.display   { font-size: clamp(2.3rem, 5.2vw, 3.875rem); line-height: 1.05; }
.h2        { font-size: clamp(1.85rem, 3.6vw, 2.75rem); line-height: 1.12; }
.h3        { font-size: clamp(1.5rem, 2.8vw, 2.375rem); line-height: 1.14; }
.h4        { font-size: 1.5rem; line-height: 1.2; }
.h5        { font-size: 1.3125rem; line-height: 1.25; }

.lede     { font-size: 1.1875rem; line-height: 1.65; color: var(--body); }
.body     { font-size: 1.0625rem; line-height: 1.7;  color: var(--body); }
.body--sm { font-size: 1rem;      line-height: 1.65; color: var(--body); }
.fine     { font-size: 0.9375rem; line-height: 1.6;  color: var(--muted); }

.section--navy .lede, .section--navy .body, .section--navy .body--sm { color: var(--on-dark); }
.section--navy .fine { color: var(--on-dark-muted); }
.section--green .lede, .section--green .body { color: #fff; }

/* ---------------------------------------------------------------- Topbar -- */

.topbar {
  background: var(--navy);
  color: var(--on-dark-muted);
  font-size: 0.875rem;
}
.topbar__inner {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar__right { display: flex; align-items: center; gap: 28px; }
.topbar a { color: #fff; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.topbar a:hover { color: var(--green-light); }

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

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.site-header__inner {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo { display: inline-flex; align-items: center; gap: 14px; flex-shrink: 0; }
.logo:hover { color: inherit; }
.logo__mark { width: 42px; height: 42px; flex-shrink: 0; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name {
  font-family: var(--serif);
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  color: var(--navy);
}
.logo__sub {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--green);
  margin-top: 6px;
}

/* Menu button: hidden until the nav collapses */
.nav-toggle {
  display: none;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  cursor: pointer;
}

.nav { display: flex; align-items: center; gap: 30px; }
.nav__link { font-size: 1rem; font-weight: 500; color: var(--ink); }
.nav__link[aria-current="page"] {
  font-weight: 600;
  color: var(--green);
  border-bottom: 2px solid var(--green);
  padding-bottom: 3px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
}
.btn--sm { min-height: 48px; padding: 10px 22px; font-size: 1rem; }

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

.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-deep); color: #fff; }

.btn--ghost { background: var(--paper); color: var(--navy); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--green); color: var(--green); }

.btn--light { background: #fff; color: var(--green-dark); font-weight: 700; }
.btn--light:hover { background: var(--cream); color: var(--green-dark); }

.btn--outline-light { border-color: #fff; color: #fff; background: transparent; }
.btn--outline-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.btn--outline-navy { border-color: #6F80A0; color: #fff; background: transparent; }
.btn--outline-navy:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

.service-cta { margin-top: 28px; display: flex; width: fit-content; margin-left: auto; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 2px solid var(--green);
  align-self: flex-start;
}
.link-arrow:hover { color: var(--green); }

/* ------------------------------------------------------------------ Cards -- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card--navy { background: var(--navy-card); border-color: transparent; padding: 28px; }
.card--navy h3, .card--navy h4 { color: #fff; }
.card--navy p { color: var(--on-dark); }
.card--quiet { background: var(--cream); border-color: var(--line); }
.card--compact { padding: 26px; gap: 14px; }

.icon-tile {
  width: 54px; height: 54px;
  border-radius: 10px;
  background: var(--green-tint);
  color: var(--green-ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-tile--lg { width: 58px; height: 58px; }
.icon-tile--sm { width: 46px; height: 46px; border-radius: 9px; }
.icon-tile--dark { background: var(--navy-card-2); color: var(--green-light); }

.numeral {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* --------------------------------------------------------------- Lists ----- */

.checklist { display: flex; flex-direction: column; gap: 10px; }
.checklist li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--body);
}
.checklist svg { flex-shrink: 0; margin-top: 3px; color: var(--green); }
.checklist--lg li { font-size: 1.0625rem; line-height: 1.55; }
.section--navy .checklist li { color: #fff; }
.section--navy .checklist svg { color: var(--green-light); }

.plain-list { display: flex; flex-direction: column; gap: 12px; }
.plain-list li { font-size: 1rem; line-height: 1.55; color: var(--body); }
.card--navy .plain-list li { color: #fff; }

/* Two-column ruled list of services */
.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  align-content: start;
}
.service-list li {
  font-size: 1.03125rem;
  line-height: 1.5;
  color: var(--ink);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.section--paper .service-list li { border-bottom-color: var(--line-soft); }

.town-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 24px; }
.town-list li { font-size: 1rem; color: #fff; }

/* ------------------------------------------------------------ Components -- */

/* Photo / embed placeholder. Delete the whole element once a real image is in. */
.slot {
  border-radius: var(--r);
  background: var(--slot);
  border: 1px solid var(--slot-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  min-height: 300px;
}
.slot--tall { min-height: 460px; }
.slot--dark { background: var(--navy-card); border-color: #23456F; color: var(--on-dark-muted); }
.slot--dashed { background: var(--cream); border-style: dashed; border-color: var(--border-strong); }
.slot__label { font-size: 0.875rem; font-weight: 700; letter-spacing: 0.1em; }
.slot__note { max-width: 320px; font-size: 0.9375rem; line-height: 1.55; }

.trust {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gutter);
  padding: 34px 0;
}
.trust__item { display: flex; flex-direction: column; gap: 6px; }
.trust__item + .trust__item { border-left: 1px solid var(--line); padding-left: 24px; }
.trust__title { font-size: 1.0625rem; font-weight: 700; color: var(--navy); }
.trust__note { font-size: 0.9375rem; line-height: 1.5; color: var(--muted); }

.step { display: flex; gap: 14px; align-items: flex-start; }
.step__body { display: flex; flex-direction: column; gap: 5px; }

.qa { display: flex; flex-direction: column; gap: 6px; }
.qa__q { font-size: 1rem; font-weight: 700; color: var(--ink); }
.qa__a { font-size: 1rem; line-height: 1.6; color: var(--body); }

.price-note {
  grid-column: 1 / -1;
  margin-top: 18px;
  background: var(--cream);
  border-radius: 10px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--body);
}
.price-note strong { color: var(--navy); }
.section--cream .price-note { background: var(--paper); border: 1px solid var(--line); }

.contact-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.contact-card__value { font-size: 1.1875rem; font-weight: 700; color: var(--navy); }
.contact-card__note  { font-size: 0.9375rem; color: var(--muted); }

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  border-top: 1px solid var(--navy-line);
  padding-top: 28px;
  margin-top: 12px;
}
.stat__label { font-size: 0.9375rem; color: var(--on-dark-muted); }
.stat__value { font-family: var(--serif); font-size: 1.625rem; color: #fff; display: block; margin-top: 6px; }

/* ------------------------------------------------------------------ Forms -- */

.form-card {
  background: var(--paper);
  border-radius: 14px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-card--bordered { border: 1px solid var(--line); }

.form { display: flex; flex-direction: column; gap: 18px; }
.form__row { display: flex; flex-wrap: wrap; gap: 16px; }
.form__row > .field { flex: 1 1 200px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 0.875rem; font-weight: 600; color: var(--ink); }

input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 13px 14px;
  min-height: 50px;
}
textarea { line-height: 1.55; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); }
::placeholder { color: #9AA3B2; }

.checkbox { display: flex; gap: 11px; align-items: flex-start; }
.checkbox input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--green); }
.checkbox label { font-size: 0.875rem; line-height: 1.5; color: var(--muted); }

.form-footnote { font-size: 0.8125rem; line-height: 1.5; color: var(--muted); text-align: center; }

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

.site-footer { background: var(--navy-deep); padding: 64px 0 40px; color: var(--on-dark); }
.site-footer h2 { color: #fff; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}
.site-footer .logo__name { color: #fff; }
.site-footer .logo__sub  { color: var(--green-light); }
.site-footer__tagline {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.4;
  color: #fff;
}
.site-footer__blurb { font-size: 0.9375rem; line-height: 1.65; color: var(--on-dark-muted); }
.site-footer__col { display: flex; flex-direction: column; gap: 14px; }
.site-footer__heading {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-light);
}
.site-footer__col a, .site-footer__col span { font-size: 0.9375rem; color: var(--on-dark); }
.site-footer__col a:hover { color: var(--green-light); }
.site-footer__line { display: flex; align-items: flex-start; gap: 10px; }
.site-footer__line svg { flex-shrink: 0; margin-top: 4px; color: var(--on-dark-muted); }
.site-footer__legal {
  border-top: 1px solid var(--navy-line);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--on-dark-faint);
}

/* Sticky call bar on phones only */
.call-bar { display: none; }

/* ============================================================ Responsive == */

@media (max-width: 1080px) {
  .split--sidebar { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 48px; }
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1.2fr; }
  .site-footer__grid > :nth-child(3) { display: none; } /* fold Company into Pages */
}

@media (max-width: 980px) {
  .section { padding: 64px 0; }
  .section--tight { padding: 52px 0; }
  .split, .split--narrow, .split--wide, .split--sidebar {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .trust__item + .trust__item { border-left: 0; padding-left: 0; }
  .town-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .slot--tall { min-height: 340px; }
}

@media (max-width: 900px) {
  /* Collapse the nav behind a button */
  .nav-toggle { display: flex; }
  .js .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(0, 31, 68, 0.12);
    padding: 8px 0 20px;
  }
  .js .nav[hidden] { display: none; }
  .nav__link {
    padding: 15px var(--gutter);
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav__link[aria-current="page"] { border-bottom-color: var(--green); }
  /* width:auto is required: the narrow-screen rule below makes buttons
     full-width, which overflows once these side margins are added. */
  .nav .btn { width: auto; margin: 16px var(--gutter) 0; }
  /* Without JS the links simply sit below the logo, still usable */
  .nav { flex-wrap: wrap; gap: 18px; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  :root { --gutter: 20px; }
  .section { padding: 48px 0; }
  .section--tight { padding: 40px 0; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .service-list { grid-template-columns: minmax(0, 1fr); }
  .town-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 26px; }
  .form-card { padding: 26px; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .price-note { flex-direction: column; align-items: flex-start; }
  .site-header__inner { min-height: 72px; }
  .logo__mark { width: 36px; height: 36px; }
  .logo__name { font-size: 1.0625rem; letter-spacing: 0.12em; }
  .logo__sub { font-size: 0.5625rem; letter-spacing: 0.22em; }
  .topbar__inner { font-size: 0.8125rem; }
  .topbar__right { gap: 16px; }
  .site-footer { padding: 44px 0 110px; }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-bottom: 32px; }
  .site-footer__grid > :nth-child(3) { display: flex; }
  .stat-row { gap: 24px; }

  /* Tap-to-call bar pinned to the bottom of the screen */
  .call-bar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 60;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 58px;
    background: var(--green);
    color: #fff;
    font-size: 1.0625rem;
    font-weight: 700;
    box-shadow: 0 -4px 16px rgba(0, 31, 68, 0.18);
  }
  .call-bar:hover { color: #fff; }
}

@media (max-width: 420px) {
  .topbar__inner > span:first-child { display: none; }
}

/* ------------------------------------------------------------------ Print -- */

@media print {
  .topbar, .nav, .nav-toggle, .call-bar, .skip-link { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .section { padding: 18pt 0; }
  .section--navy, .section--green { background: #fff !important; }
  .section--navy *, .section--green * { color: #000 !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
