/*
Theme Name: Klean Sweepz
Theme URI: https://kleansweepz.com
Author: Klean Sweepz
Description: Custom theme for Klean Sweepz — chimney sweeping and inspection in Fairfield and New Haven Counties, CT. Soot, brick, and ember palette with a brick-coursework signature motif. SEO-ready with LocalBusiness schema.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kleansweepz
Tags: one-column, custom-menu, custom-logo, featured-images, local-business
*/

/* ---------------------------------------------------------------------------
   Tokens
--------------------------------------------------------------------------- */
:root {
  --soot: #211c19;          /* deep flue charcoal */
  --soot-soft: #3a322d;
  --brick: #993526;         /* hearth brick */
  --brick-dark: #7c2a1e;
  --ember: #e59a3c;         /* ember amber */
  --limewash: #f7f2e9;      /* interior plaster white */
  --mortar: #d8d0c2;        /* mortar line */
  --smoke: #786f67;         /* muted text */
  --paper: #fffdf9;

  --font-display: "Zilla Slab", Rockwell, "Roboto Slab", serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;

  --maxw: 1120px;
  --radius: 6px;
}

/* ---------------------------------------------------------------------------
   Base
--------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--soot);
  background: var(--paper);
}

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

a { color: var(--brick); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brick-dark); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--soot);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--soot); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------------------
   Signature: brick coursework band
   Used under the header and above the footer — offset brick courses drawn
   with layered gradients, mortar lines in limewash.
--------------------------------------------------------------------------- */
.brick-band {
  height: 18px;
  background-color: var(--brick);
  background-image:
    linear-gradient(var(--mortar) 2px, transparent 2px),
    linear-gradient(90deg, var(--mortar) 2px, transparent 2px),
    linear-gradient(90deg, var(--mortar) 2px, transparent 2px);
  background-size:
    100% 9px,
    64px 18px,
    64px 18px;
  background-position:
    0 0,
    0 0,
    32px 9px;
}

/* ---------------------------------------------------------------------------
   Header
--------------------------------------------------------------------------- */
.site-header { background: var(--limewash); border-bottom: 0; }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: 1rem;
  flex-wrap: wrap;
}
.site-branding { display: flex; align-items: center; gap: .9rem; }
.site-branding img.custom-logo { max-height: 64px; width: auto; }
.site-title {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 700; margin: 0;
}
.site-title a { color: var(--soot); text-decoration: none; }
.site-tagline { margin: 0; font-size: .85rem; color: var(--smoke); }

.main-nav ul { list-style: none; display: flex; gap: 1.6rem; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a {
  text-decoration: none; color: var(--soot);
  font-weight: 600; font-size: .95rem; letter-spacing: .02em;
  border-bottom: 3px solid transparent; padding-bottom: 4px;
}
.main-nav a:hover, .main-nav .current-menu-item > a { border-bottom-color: var(--ember); color: var(--soot); }

.menu-toggle { display: none; }

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-block; background: none; border: 2px solid var(--soot);
    border-radius: var(--radius); padding: .35rem .8rem;
    font: 600 .9rem var(--font-body); color: var(--soot); cursor: pointer;
  }
  .main-nav { width: 100%; display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: .2rem; padding-block: .5rem; }
  .main-nav a { display: block; padding: .55rem 0; border-bottom: 1px solid var(--mortar); }
}

/* ---------------------------------------------------------------------------
   Hero (front page)
--------------------------------------------------------------------------- */
.hero {
  background: var(--soot);
  color: var(--limewash);
  position: relative;
  overflow: hidden;
}
.hero::after { /* faint ember glow rising from the bottom edge */
  content: "";
  position: absolute; inset: auto 0 0 0; height: 45%;
  background: radial-gradient(60% 100% at 50% 100%, rgba(229,154,60,.18), transparent 70%);
  pointer-events: none;
}
.hero .wrap { padding-block: 4.5rem 4rem; position: relative; z-index: 1; }
.hero h1 { color: var(--limewash); max-width: 18ch; }
.hero .eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ember);
  margin-bottom: .9rem;
}
.hero p.lede { max-width: 56ch; font-size: 1.15rem; color: #d9d2c8; }

.btn, .btn:visited {
  display: inline-block; background: var(--ember); color: var(--soot);
  font-weight: 700; text-decoration: none;
  padding: .8rem 1.6rem; border-radius: var(--radius);
  border: 0; cursor: pointer; font-size: 1rem;
}
.btn:hover { background: #f0ab53; color: var(--soot); }
.btn--ghost, .btn--ghost:visited {
  background: transparent; color: var(--limewash);
  border: 2px solid var(--limewash); margin-left: .8rem;
}
.btn--ghost:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ---------------------------------------------------------------------------
   Sections
--------------------------------------------------------------------------- */
.section { padding-block: 3.5rem; }
.section--lime { background: var(--limewash); }
.section .kicker {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brick); margin-bottom: .4rem;
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.4rem; margin-top: 1.6rem; }
.card {
  background: #fff; border: 1px solid var(--mortar); border-radius: var(--radius);
  padding: 1.5rem; border-top: 4px solid var(--brick);
}
.card h3 { margin-top: 0; }
.card p { color: var(--smoke); margin-bottom: 0; }

.towns { columns: 2; gap: 2.5rem; margin: 1rem 0 0; padding-left: 1.2rem; }
@media (min-width: 700px) { .towns { columns: 4; } }
.towns li { break-inside: avoid; padding-block: .15rem; }

.cta-strip { background: var(--brick); color: #fff; }
.cta-strip .wrap { padding-block: 2.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta-strip h2 { color: #fff; margin: 0; }
.cta-strip .btn { background: var(--limewash); color: var(--brick-dark); }
.cta-strip .btn:hover { background: #fff; }

/* ---------------------------------------------------------------------------
   Content / posts / pages
--------------------------------------------------------------------------- */
.content-area { padding-block: 3rem; }
.entry { max-width: 760px; margin-inline: auto; }
.entry-header { margin-bottom: 1.5rem; }
.entry-meta { color: var(--smoke); font-size: .9rem; }
.entry-content h2 { margin-top: 2rem; }
.entry-content blockquote {
  border-left: 4px solid var(--ember); margin-left: 0; padding-left: 1.2rem; color: var(--smoke);
}
.post-thumb img { border-radius: var(--radius); }

.archive-list { display: grid; gap: 2rem; max-width: 760px; margin-inline: auto; }
.archive-item { border-bottom: 1px solid var(--mortar); padding-bottom: 1.6rem; }
.archive-item h2 { margin-bottom: .2rem; font-size: 1.5rem; }
.archive-item h2 a { text-decoration: none; color: var(--soot); }
.archive-item h2 a:hover { color: var(--brick); }

.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 2.5rem; }
.pagination .page-numbers {
  padding: .4rem .85rem; border: 1px solid var(--mortar); border-radius: var(--radius);
  text-decoration: none; color: var(--soot);
}
.pagination .current { background: var(--soot); color: #fff; border-color: var(--soot); }

/* ---------------------------------------------------------------------------
   Forms
--------------------------------------------------------------------------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], textarea {
  width: 100%; padding: .7rem .9rem; border: 1px solid var(--mortar);
  border-radius: var(--radius); font: inherit; background: #fff;
}
.search-form { display: flex; gap: .6rem; max-width: 480px; }
.search-form .btn { white-space: nowrap; }

/* ---------------------------------------------------------------------------
   Footer
--------------------------------------------------------------------------- */
.site-footer { background: var(--soot); color: #cfc7bc; }
.site-footer .wrap {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem; padding-block: 3rem 2rem;
}
.site-footer h3 { color: var(--limewash); font-size: 1.05rem; }
.site-footer a { color: var(--ember); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding-block: .2rem; }
.footer-credit { border-top: 1px solid var(--soot-soft); }
.footer-credit .wrap { display: block; padding-block: 1.1rem; font-size: .85rem; color: var(--smoke); }

/* ---------------------------------------------------------------------------
   Utility
--------------------------------------------------------------------------- */
.screen-reader-text {
  clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; overflow: hidden; position: absolute;
}
.alignwide { max-width: var(--maxw); }
.alignfull { width: 100%; max-width: none; }
