/* ===================================
   Tree Service Canmore - page components
   Builds on base.css tokens. Zero radius throughout.
   =================================== */

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--s-2);
  top: -100px;
  z-index: 200;
  padding: var(--s-1) var(--s-2);
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
}
.skip-link:focus { top: var(--s-1); }

:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.0625rem;
  line-height: 1.1;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}
.brand svg { width: 34px; height: 34px; flex: none; }
.brand small { display: block; font-weight: 600; font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); }

/* Header layout + mobile nav */
.header-actions { display: flex; align-items: center; gap: var(--s-1); }
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 2px solid var(--color-ink);
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--color-ink); }
@media (min-width: 768px) { .nav-toggle { display: none; } }

.site-header nav.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  padding: var(--s-3);
  gap: var(--s-2);
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-ink);
  font-size: 1.125rem;
}
body.nav-open { overflow: hidden; }
@media (min-width: 768px) {
  .site-header nav.open { position: static; flex-direction: row; padding: 0; border: 0; font-size: inherit; }
  body.nav-open { overflow: auto; }
}
.site-header nav a[aria-current="page"] { color: var(--color-accent); }

/* Hero variants */
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
.hero .lead-form { margin-top: var(--s-4); }
@media (min-width: 768px) { .hero .lead-form { margin-top: 0; } }
.hero-compact .container { display: block; }
.hero-compact .subhead { max-width: 64ch; }

/* Image placeholder (replace with real, optimized photography before launch) */
.media-placeholder {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 4 / 3;
  padding: var(--s-2);
  background:
    linear-gradient(160deg, rgba(26,26,26,0.05), rgba(26,26,26,0.35)),
    repeating-linear-gradient(135deg, #e7e5df 0 14px, #dedbd3 14px 28px);
  border: 2px solid var(--color-ink);
  color: var(--color-ink);
  font-size: 0.8125rem;
  font-weight: 600;
}
.media-placeholder span { background: var(--color-bg); padding: 0.25rem 0.5rem; }

/* Section headings */
.section-head { max-width: 62ch; margin-bottom: var(--s-4); }
.section-head h2 { margin-bottom: var(--s-2); }
.section-alt { background: var(--color-bg-alt); }

/* Long-form content */
.prose { max-width: 70ch; }
.prose h2 { margin-top: var(--s-5); margin-bottom: var(--s-2); font-size: clamp(1.5rem, 2.6vw, 2rem); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--s-3); margin-bottom: var(--s-1); }
.prose p, .prose ul, .prose ol { margin-bottom: var(--s-2); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.375rem; }

.content-layout { display: grid; gap: var(--s-5); }
@media (min-width: 1024px) { .content-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.sidebar { display: grid; gap: var(--s-3); }
@media (min-width: 1024px) { .sidebar { position: sticky; top: calc(var(--header-h) + var(--s-3)); } }
.sidebar-box { border: 2px solid var(--color-ink); padding: var(--s-3); background: #fff; }
.sidebar-box h2, .sidebar-box h3 { font-size: 1.125rem; margin-bottom: var(--s-2); }
.sidebar-box ul { list-style: none; padding: 0; }
.sidebar-box li { padding-block: 0.375rem; border-bottom: 1px solid var(--color-line); }
.sidebar-box li:last-child { border-bottom: 0; }

/* Process steps */
.process-list { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 0; }
.process-list li {
  counter-increment: step;
  position: relative;
  padding: var(--s-2) 0 var(--s-2) 3.25rem;
  border-bottom: 1px solid var(--color-line);
  font-weight: 600;
  color: var(--color-ink);
}
.process-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: var(--s-2);
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  background: var(--color-ink);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 900;
}

/* Split feature (why us) */
.split { display: grid; gap: var(--s-5); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; align-items: center; } }
.check-list { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.check-list li { position: relative; padding-left: 2rem; }
.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 1.1rem;
  height: 0.6rem;
  border-left: 3px solid var(--color-accent);
  border-bottom: 3px solid var(--color-accent);
  transform: rotate(-45deg);
}
.check-list strong { color: var(--color-ink); }

/* Area list */
.area-grid { display: grid; gap: var(--s-2); grid-template-columns: 1fr; }
@media (min-width: 640px) { .area-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .area-grid { grid-template-columns: repeat(5, 1fr); } }
.area-card { display: block; padding: var(--s-3) var(--s-2); border: 2px solid var(--color-ink); text-decoration: none; background: #fff; }
.area-card:hover { background: var(--color-ink); color: #fff; }
.area-card:hover h3 { color: #fff; }
.area-card h3 { font-size: 1.125rem; margin-bottom: 0.25rem; }
.area-card p { font-size: var(--fs-small); }

.tag-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-1); }
.tag-list li { border: 1px solid var(--color-ink); padding: 0.25rem 0.625rem; font-size: var(--fs-small); background: #fff; }

/* Map embed */
.map-embed { border: 2px solid var(--color-ink); aspect-ratio: 16 / 10; width: 100%; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Notice for placeholder content */
.notice {
  border-left: 4px solid var(--color-accent);
  background: #fff;
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-small);
  color: var(--color-body);
}

/* Contact page */
.contact-grid { display: grid; gap: var(--s-5); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.1fr; align-items: start; } }
.contact-list { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.contact-list strong { display: block; font-family: var(--font-heading); color: var(--color-ink); }

/* Form status */
.form-status { margin-top: var(--s-2); font-weight: 600; min-height: 1.5em; }
.form-status.success { color: var(--color-success); }
.form-status.error { color: var(--color-error); }
.lead-form .form-row.two { grid-template-columns: 1fr; }
@media (min-width: 560px) { .lead-form .form-row.two { grid-template-columns: 1fr 1fr; } }

/* Footer extras */
.site-footer .brand { color: #fff; margin-bottom: var(--s-2); }
.site-footer .brand small { color: rgba(255,255,255,0.7); }
.site-footer p { color: rgba(255,255,255,0.85); margin-bottom: var(--s-1); }
.footer-bottom a { color: rgba(255,255,255,0.85); }

/* Mobile CTA leaves room at page bottom */
@media (max-width: 767px) { body { padding-bottom: 56px; } }

/* 404 */
.not-found { text-align: center; padding-block: var(--s-8); }
.not-found h1 { margin-bottom: var(--s-2); }
.not-found p { margin-bottom: var(--s-3); }
