/* ============================================
   HYDROSEEDING.INFO — Design System
   ============================================ */

:root {
  /* Brand palette — aligned with 1-800-NEW-TURF / Turf Blaster family.
     Primary wordmark colors: forest green (#276502) → deep teal (#025067) gradient,
     with cyan accent (#09A6DB) and brand orange (#FF8100). */
  --green-deep: #276502;          /* Wordmark "Turf" green */
  --green-mid: #409D07;           /* Mid-range brand green */
  --green-light: #4DC704;         /* Bright accent green */
  --green-pale: #e8f3de;          /* Pale tint for backgrounds */
  --teal-deep: #025067;           /* Wordmark "Blaster" teal */
  --teal-mid: #09A6DB;            /* Cyan brand accent */
  --teal-pale: #e0f0ed;           /* Pale teal tint */
  --earth-dark: #1a1a1a;          /* Brand black (deep dark) */
  --earth-mid: #4a4641;           /* Body text neutral */
  --earth-light: #a89882;
  --cream: #faf8f5;
  --white: #ffffff;
  --gray-100: #f5f4f2;
  --gray-200: #e8e6e3;
  --gray-300: #d1cec9;
  --gray-500: #8a8580;
  --gray-700: #4a4641;
  --gray-900: #1a1816;
  --accent: #FF8100;              /* Brand orange — for CTAs and tagline */
  --accent-bright: #FF7900;       /* Bright orange variant */

  /* Typography */
  --font-display: 'Lora', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --sidebar-w: 280px;
  --content-max: 760px;
  --gutter: 2rem;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--gray-900); background: var(--cream); line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-mid); text-decoration: none; transition: color .15s; }
a:hover { color: var(--green-mid); }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #000;
  border-bottom: 3px solid var(--teal-mid);
  padding: 0 var(--gutter);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.site-logo { display: flex; flex-direction: column; gap: 0; text-decoration: none; }
.logo-main {
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem;
  letter-spacing: -0.01em; line-height: 1.2;
  padding-bottom: 2px;
  /* Brand wordmark gradient: forest green → deep teal */
  background: linear-gradient(90deg, var(--green-deep) 0%, var(--green-mid) 40%, var(--teal-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.logo-dot { color: var(--teal-mid); -webkit-text-fill-color: var(--teal-mid); }
.logo-sub {
  font-size: 0.62rem; color: var(--teal-mid); text-transform: uppercase;
  letter-spacing: 0.12em; margin-top: 4px; font-weight: 600;
}
.header-phone {
  font-size: 0.85rem; font-weight: 700; color: var(--white);
  background: var(--green-mid); padding: 8px 18px; border-radius: 6px;
  transition: background .15s;
  box-shadow: 0 2px 6px rgba(64,157,7,0.3);
}
.header-phone:hover { background: var(--green-deep); color: var(--white); }

/* Mobile menu button */
.mobile-menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  width: 32px; height: 24px; position: relative; z-index: 110;
}
.mobile-menu-btn span {
  display: block; width: 100%; height: 2px; background: var(--white);
  position: absolute; left: 0; transition: .2s;
}
.mobile-menu-btn span:nth-child(1) { top: 2px; }
.mobile-menu-btn span:nth-child(2) { top: 11px; }
.mobile-menu-btn span:nth-child(3) { top: 20px; }

/* ============================================
   LAYOUT
   ============================================ */
.layout {
  display: flex; max-width: 1200px; margin: 0 auto;
  min-height: calc(100vh - 60px);
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  position: sticky; top: 60px; height: calc(100vh - 60px);
  overflow-y: auto; padding: 1.25rem 0;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }

.nav-section { border-bottom: 1px solid var(--gray-100); }
.nav-section-title {
  display: flex; align-items: center; width: 100%;
  padding: 10px 20px; border: none; background: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gray-500); transition: color .15s;
}
.nav-section-title:hover { color: var(--green-mid); }
.nav-section-title::after {
  content: '▸'; margin-left: auto; font-size: 0.6rem;
  transition: transform .2s;
}
.nav-section.open .nav-section-title::after { transform: rotate(90deg); }
.nav-section.open .nav-section-title { color: var(--green-deep); }
.nav-pages { display: none; list-style: none; padding: 0 0 8px; }
.nav-section.open .nav-pages { display: block; }
.nav-pages li a {
  display: block; padding: 5px 20px 5px 28px;
  font-size: 0.82rem; color: var(--gray-700);
  border-left: 3px solid transparent;
  transition: all .1s;
}
.nav-pages li a:hover { color: var(--green-mid); background: var(--green-pale); }
.nav-pages li a.active {
  color: var(--green-deep); font-weight: 600;
  border-left-color: var(--green-mid); background: var(--green-pale);
}
.pillar-badge { color: var(--green-mid); font-size: 0.55rem; margin-left: 4px; vertical-align: middle; }

/* ---- Content ---- */
.content {
  flex: 1; min-width: 0;
  padding: var(--gutter);
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  font-size: 0.78rem; color: var(--gray-500);
  margin-bottom: 1.5rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--green-mid); }
.breadcrumb span { margin: 0 4px; }
.breadcrumb .current { color: var(--gray-700); font-weight: 500; }

/* ============================================
   ARTICLE BODY — Typography
   ============================================ */
.article-body { max-width: var(--content-max); }

.article-body h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: 2.1rem; line-height: 1.15; color: var(--green-deep);
  margin-bottom: 1.5rem; letter-spacing: -0.02em;
}
.article-body h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.45rem; line-height: 1.25; color: var(--earth-dark);
  margin: 2.5rem 0 1rem; padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}
.article-body h3 {
  font-weight: 700; font-size: 1.1rem; color: var(--gray-900);
  margin: 2rem 0 0.75rem;
}
.article-body p { margin-bottom: 1.15rem; }
.article-body p + p { margin-top: 0; }

.article-body strong { font-weight: 700; color: var(--gray-900); }
.article-body em { font-style: italic; }

.article-body ul, .article-body ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
}
.article-body li { margin-bottom: 0.4rem; }

.article-body blockquote {
  border-left: 4px solid var(--green-mid);
  background: var(--green-pale); padding: 1rem 1.25rem;
  margin: 1.25rem 0; border-radius: 0 6px 6px 0;
  font-size: 0.95rem;
}

.article-body img {
  border-radius: 8px; margin: 1.5rem 0 0.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
/* Captions: an <em> directly following an <img> in the same paragraph.
   (Do NOT use em:only-child — :only-child ignores text nodes, so it
   wrongly matches inline emphasis like "just *placed*; ...".) */
.article-body img + em {
  display: block; font-size: 0.82rem; color: var(--gray-500);
  margin: 0.25rem 0 1.5rem; line-height: 1.4; font-style: italic;
}

/* Tables */
.article-body table {
  width: 100%; border-collapse: collapse;
  margin: 1.25rem 0; font-size: 0.9rem;
}
.article-body th {
  text-align: left; font-weight: 700; color: var(--green-deep);
  border-bottom: 2px solid var(--green-mid);
  padding: 8px 12px; background: var(--green-pale);
}
.article-body td {
  padding: 8px 12px; border-bottom: 1px solid var(--gray-200);
  vertical-align: top;
}
.article-body tr:hover td { background: var(--gray-100); }

/* Definition lists (glossary) */
.article-body dt {
  font-weight: 700; color: var(--green-deep);
  margin-top: 1.25rem; font-size: 1rem;
  padding-top: 0.75rem; border-top: 1px solid var(--gray-100);
}
.article-body dt:first-of-type { border-top: none; padding-top: 0; }
.article-body dd { margin: 0.25rem 0 0 0; color: var(--gray-700); }

/* Links within articles */
.article-body a { color: var(--teal-mid); text-decoration: underline; text-decoration-color: rgba(42,122,106,0.3); text-underline-offset: 2px; }
.article-body a:hover { color: var(--green-mid); text-decoration-color: var(--green-mid); }

/* Definition links: bold terms that link to the glossary.
   Distinct from regular links — they keep the dark body color
   and use a subtle dotted underline (the classic "definition" cue). */
.article-body a.def-link {
  color: var(--gray-900);
  text-decoration: underline dotted;
  text-decoration-color: var(--green-mid);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: help;
}
.article-body a.def-link:hover {
  color: var(--green-deep);
  text-decoration-style: solid;
  background: var(--green-pale);
}
.article-body a.def-link strong { color: inherit; }

/* Horizontal rules */
.article-body hr {
  border: none; border-top: 1px solid var(--gray-200);
  margin: 2rem 0;
}

/* ============================================
   FOOTER
   ============================================ */
.page-footer {
  margin-top: 3rem; padding: 2rem 0;
  border-top: 2px solid var(--gray-200);
}
.footer-inner { max-width: var(--content-max); }
.footer-brand { font-size: 0.85rem; color: var(--gray-700); margin-bottom: 1rem; line-height: 1.6; }
.footer-brand strong { color: var(--green-deep); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-bottom: 1rem; }
.footer-links a { font-size: 0.82rem; color: var(--gray-500); }
.footer-links a:hover { color: var(--green-mid); }
.footer-legal { font-size: 0.72rem; color: var(--gray-500); line-height: 1.6; }

/* ============================================
   HOMEPAGE
   ============================================ */
body.home { background: var(--white); }
body.home .home-content { max-width: 1000px; margin: 0 auto; padding: 0 var(--gutter); }

.hero {
  text-align: center; padding: 3.5rem 0 2.5rem;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 2.8rem; line-height: 1.2;
  padding-bottom: 4px;
  background: linear-gradient(90deg, var(--green-deep) 0%, var(--green-mid) 40%, var(--teal-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  letter-spacing: -0.02em; margin-bottom: 1rem;
}
.hero-sub {
  font-size: 1.05rem; color: var(--gray-700); max-width: 640px;
  margin: 0 auto 2rem; line-height: 1.6;
}
.hero-paths {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  max-width: 780px; margin: 0 auto;
}
.path-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 1.5rem 1rem; border-radius: 10px;
  background: var(--white); border: 2px solid var(--green-pale);
  text-align: center; transition: all .2s; text-decoration: none;
}
.path-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(2,80,103,0.12); border-color: var(--teal-mid); }
.path-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.path-card strong {
  display: block; font-size: 1rem; margin-bottom: 0.25rem;
  background: linear-gradient(90deg, var(--green-deep) 0%, var(--teal-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.path-card span:last-child { font-size: 0.8rem; color: var(--gray-500); line-height: 1.4; }

.home-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
  padding: 2rem 0;
}
.home-section {
  background: var(--gray-100); border-radius: 8px; padding: 1.25rem;
}
.home-section h3 {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gray-500); font-weight: 700; margin-bottom: 0.75rem;
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--gray-200);
}
.home-section ul { list-style: none; }
.home-section li { margin-bottom: 0.3rem; }
.home-section li a { font-size: 0.85rem; color: var(--gray-700); }
.home-section li a:hover { color: var(--green-mid); }
.home-section li.pillar a { font-weight: 600; color: var(--green-deep); }
.home-section li.pillar a::before { content: '◆ '; font-size: 0.5rem; color: var(--green-mid); vertical-align: middle; }

.home-about {
  text-align: center; padding: 2rem 0 3rem;
  font-size: 0.9rem; color: var(--gray-700);
}
.home-about p { margin-bottom: 0.5rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .home-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 2.2rem; }
}

@media (max-width: 768px) {
  :root { --gutter: 1.25rem; }
  
  .mobile-menu-btn { display: block; }
  .header-phone { display: none; }
  
  .sidebar {
    position: fixed; left: -100%; top: 60px; width: 85%; max-width: 320px;
    height: calc(100vh - 60px); z-index: 99;
    transition: left .25s ease; background: var(--white);
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  }
  body.nav-open .sidebar { left: 0; }
  body.nav-open::after {
    content: ''; position: fixed; inset: 60px 0 0; background: rgba(0,0,0,0.3);
    z-index: 98;
  }
  
  .article-body h1 { font-size: 1.65rem; }
  .article-body h2 { font-size: 1.2rem; }
  
  .hero-paths { grid-template-columns: 1fr; max-width: 340px; }
  .hero h1 { font-size: 1.9rem; }
  .home-grid { grid-template-columns: 1fr; }
  
  .article-body table { font-size: 0.82rem; }
  .article-body th, .article-body td { padding: 6px 8px; }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  .site-header, .sidebar, .mobile-menu-btn, .breadcrumb, .footer-links { display: none; }
  .content { padding: 0; }
  .article-body { max-width: 100%; }
  .article-body a::after { content: ' (' attr(href) ')'; font-size: 0.8em; color: #666; }
  .article-body a[href^="/"]::after { content: ' (hydroseeding.info' attr(href) ')'; }
  body { background: white; font-size: 11pt; }
}
