/* The Residential Guide — antonresidential.com
   Mobile-first, no external dependencies. */

:root {
  --ink: #1d2a25;
  --ink-soft: #4a5a53;
  --paper: #fbf8f2;
  --sand: #f2ebdd;
  --line: #e2d8c5;
  --green: #1f4d3a;
  --green-deep: #163a2c;
  --clay: #b85a32;
  --clay-soft: #f6e3d8;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 42, 37, .06), 0 8px 24px rgba(29, 42, 37, .06);
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

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

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

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

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

a { color: var(--green); text-underline-offset: .18em; }
a:hover { color: var(--clay); }

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

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

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

/* Independence notice */
.notice-bar {
  background: var(--green-deep);
  color: #e8efe9;
  font-size: .875rem;
  line-height: 1.45;
  padding: .55rem 0;
  text-align: center;
}
.notice-bar a { color: #ffd9c4; }
.notice-bar a:hover { color: var(--white); }

/* Header */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; }
.brand-name small { display: block; white-space: nowrap; font-family: var(--font); font-size: .72rem; font-weight: 500; color: var(--ink-soft); letter-spacing: .02em; }

@media (max-width: 560px) { .brand-name small { display: none; } }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .4rem;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  padding: .5rem .75rem; font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

.site-nav { display: none; }
.site-nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.site-nav ul { list-style: none; margin: 0; padding: .5rem 16px 1rem; }
.site-nav a {
  display: block; padding: .7rem .25rem; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--line); font-weight: 500;
}
.site-nav li:last-child a { border-bottom: 0; }
.site-nav a[aria-current="page"] { color: var(--clay); }

@media (min-width: 1080px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: block; position: static; box-shadow: none; border: 0; background: none; }
  .site-nav ul { display: flex; gap: 1.4rem; padding: 0; }
  .site-nav a { border: 0; padding: .4rem 0; font-size: .95rem; white-space: nowrap; }
  .site-nav a:hover { color: var(--clay); }
  .site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--clay); }
}

/* Hero */
.hero { padding: 2.5rem 0 2rem; background: linear-gradient(180deg, var(--sand) 0%, var(--paper) 100%); }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--clay); margin: 0 0 .5rem; }
.hero h1, .page-hero h1 {
  font-family: var(--serif); font-weight: 700; letter-spacing: -.02em; line-height: 1.12;
  font-size: clamp(2rem, 6vw, 3.1rem); margin: 0 0 1rem;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 1.5rem; max-width: 40rem; }
.hero-art { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--white); }

@media (min-width: 900px) {
  .hero { padding: 4rem 0 3.5rem; }
  .hero-grid { grid-template-columns: 1.15fr 1fr; gap: 3rem; }
}

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-block; padding: .8rem 1.25rem; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: .98rem; border: 2px solid var(--green); transition: background .15s, color .15s;
}
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-deep); border-color: var(--green-deep); color: var(--white); }
.btn-ghost { color: var(--green); background: transparent; }
.btn-ghost:hover { background: var(--green); color: var(--white); }

/* Page hero (inner pages) */
.page-hero { padding: 2rem 0 1.5rem; background: var(--sand); border-bottom: 1px solid var(--line); }
.page-hero .lead { margin-bottom: 0; }
.breadcrumbs { font-size: .85rem; color: var(--ink-soft); margin-bottom: .75rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: .35rem; color: var(--line); }
.breadcrumbs a { color: var(--ink-soft); }

/* Sections */
.section { padding: 3rem 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 {
  font-family: var(--serif); font-size: clamp(1.55rem, 4vw, 2.1rem); line-height: 1.2;
  letter-spacing: -.01em; margin: 0 0 1rem;
}
.section-intro { color: var(--ink-soft); max-width: 44rem; margin: 0 0 2rem; }

.cards { display: grid; gap: 1.25rem; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.section-alt .card { background: var(--paper); }
.card h3 { font-size: 1.2rem; margin: .75rem 0 .5rem; line-height: 1.3; }
.card p { margin: 0 0 1rem; color: var(--ink-soft); }
.card .more { margin-top: auto; font-weight: 600; }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--clay-soft);
  display: grid; place-items: center; color: var(--clay);
}
.card-icon svg { width: 24px; height: 24px; }

/* Article layout */
.article-layout { display: grid; gap: 2.5rem; padding: 2.5rem 0 3.5rem; }
@media (min-width: 1000px) { .article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 3.5rem; } }

.prose { max-width: 46rem; }
.prose h2 { font-family: var(--serif); font-size: 1.6rem; line-height: 1.25; margin: 2.5rem 0 .75rem; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin: 1.75rem 0 .5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .45rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--sand); font-weight: 600; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.callout {
  border-left: 4px solid var(--clay); background: var(--clay-soft);
  padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout-green { border-left-color: var(--green); background: #e6efe9; }

.meta-line { font-size: .88rem; color: var(--ink-soft); margin: 0 0 1.5rem; }

.aside-box {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; margin-bottom: 1.25rem;
}
.aside-box h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .75rem; color: var(--ink-soft); font-family: var(--font); }
.aside-box ul { list-style: none; margin: 0; padding: 0; }
.aside-box li { padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.aside-box li:last-child { border-bottom: 0; }
@media (min-width: 1000px) { .aside-sticky { position: sticky; top: 90px; } }

.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { position: relative; padding-left: 1.9rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .3rem; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 70% no-repeat;
}

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.steps li {
  counter-increment: step; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem 1.25rem 1.25rem 4rem; position: relative;
}
.section-alt .steps li { background: var(--paper); }
.steps li::before {
  content: counter(step); position: absolute; left: 1.1rem; top: 1.1rem; width: 2rem; height: 2rem;
  border-radius: 50%; background: var(--green); color: var(--white); font-weight: 700; display: grid; place-items: center;
}
.steps strong { display: block; margin-bottom: .25rem; }

.split { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 3rem; } }

.faq details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 2rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: -.1rem; font-size: 1.4rem; color: var(--clay); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: .75rem 0 0; color: var(--ink-soft); }

/* Footer */
.site-footer { background: var(--green-deep); color: #d7e2dc; padding: 3rem 0 1.5rem; font-size: .95rem; }
.site-footer a { color: #f3e7dc; }
.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-title { font-family: var(--serif); font-size: 1.2rem; color: var(--white); margin: 0 0 .5rem; }
.site-footer h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: #a9c0b4; margin: 0 0 .75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 2.5rem; padding-top: 1.25rem;
  font-size: .85rem; color: #a9c0b4; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
}

/* Utility */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.center { text-align: center; }
.mt-0 { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .notice-bar, .site-header, .site-footer, .aside-box { display: none; }
  body { background: #fff; }
}
