@charset "utf-8";

/* =========================================================
   Crestfield Public Accounting — styles.css
   ---------------------------------------------------------
   Purpose:
   • Brand-consistent, professional, document-style layout
   • Static HTML site (Dreamweaver + SSI)
   • Organized for long-term maintainability

   Palette:
   • Navy:        #00294E
   • Deep Blue:   #004F7A
   • Accent Blue: #0086B3
   • Warm Neutral:#F5ECE0
   ========================================================= */


/* =========================================================
   1. CSS VARIABLES (Brand + Shared Tokens)
   ========================================================= */

:root {
  --brand-primary: #00294E;
  --brand-secondary: #004F7A;
  --brand-accent: #0086B3;
  --brand-warm: #F5ECE0;

  --text-primary: #222;
  --text-secondary: #555;

  --border-light: #e2e2e2;
  --border-med: #ddd;
}


/* =========================================================
   2. BASE RESET & TYPOGRAPHY
   ========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  background-color: #ffffff;
}

p {
  margin-bottom: 15px;
}

h1, h2, h3 {
  color: var(--brand-primary);
  line-height: 1.25;
}

h1 {
  font-size: 2rem;
  margin-bottom: 15px;
}

h2 {
  font-size: 1.4rem;
  margin: 30px 0 10px;
}


/* =========================================================
   3. GLOBAL LAYOUT
   ========================================================= */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}


/* =========================================================
   4. HEADER & NAVIGATION
   ========================================================= */

header {
  border-bottom: 2px solid var(--brand-primary);
  margin-bottom: 30px;
  background-color: #fff;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.1rem;
  color: var(--brand-primary);
}

.logo img {
  height: 100px;
  width: auto;
  display: block;
}

nav a {
  text-decoration: none;
  color: var(--brand-primary);
  margin-left: 15px;
  font-weight: 500;
}

nav a:hover {
  color: var(--brand-accent);
  text-decoration: underline;
}


/* =========================================================
   5. BUTTONS
   ========================================================= */

.button {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--brand-primary);
  border-radius: 4px;
  background: transparent;
  color: var(--brand-primary);
  font-weight: 500;
  text-decoration: none;
}

.button:hover {
  background-color: var(--brand-primary);
  color: #fff;
}

.button.secondary {
  border-color: var(--brand-secondary);
  color: var(--brand-secondary);
}

.button.secondary:hover {
  background-color: var(--brand-warm);
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}


/* =========================================================
   Footer
   ---------------------------------------------------------
   Purpose:
   • Center footer content for readability and emphasis
   • Maintain professional, document-style presentation
   • Ensure CTA and legal text are visually distinct

   Layout Notes:
   • Text is centered for scanability
   • Max-width prevents overly wide lines on large screens
   • Footer remains visually separate from page content
   ========================================================= */

footer {
  border-top: 1px solid var(--border-med);
  margin-top: 40px;
  padding: 30px 20px;
  background-color: #fafafa;
  text-align: center;
}

/* Call-to-action block in footer */
footer .cta {
  max-width: 700px;
  margin: 0 auto 28px;
}

footer .cta h2 {
  margin-bottom: 8px;
}

footer .cta p {
  margin-bottom: 16px;
  color: #444;
}

/* Footer metadata / legal text */
.footer-meta {
  max-width: 900px;
  margin: 0 auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-meta p {
  margin-bottom: 8px;
}


/* =========================================================
   7. HOME PAGE
   ========================================================= */

.hero {
  padding: 28px 0 18px;
}

.hero h1 {
  margin-bottom: 12px;
  line-height: 1.15;
}

.lead {
  font-size: 1.1rem;
  max-width: 850px;
  margin-bottom: 18px;
  color: #333;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 10px;
}

.micro {
  font-size: 0.9rem;
  color: #4b6278;
  margin-top: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.card {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 16px;
  background: #fff;
}

.card h2 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.checklist,
.steps {
  padding-left: 18px;
}


/* =========================================================
   8. ABOUT PAGE
   ========================================================= */

.about-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  margin-top: 20px;
}

.about-photo img {
  width: 160px;
  border-radius: 4px;
  border: 1px solid var(--border-med);
  display: block;
  margin-bottom: 8px;
}

.photo-caption {
  font-size: 0.85rem;
  color: #4b6278;
  text-align: center;
}

.about-text {
  flex: 1;
}


/* =========================================================
   9. SERVICES PAGE
   ========================================================= */

.services-intro {
  max-width: 850px;
  margin-bottom: 24px;
}

.services-section {
  margin-top: 28px;
}

.services-section h2 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.services-section ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.services-section li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.services-section li:last-child {
  border-bottom: none;
}

.service-note {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* =========================================================
   Services Page — Inline Service Links
   ---------------------------------------------------------
   Purpose:
   • Styles contextual service links within service sections
   • Used for inline links to the Service Definitions page
   • Keeps links visually distinct without appearing promotional
   • Avoids global <a> styling to prevent site-wide side effects

   Scope:
   • Applies ONLY to anchors inside .services-section blocks
   • Does NOT affect navigation, footer, or TOC links

   Notes:
   • Underline retained for clarity and accessibility
   • Color aligns with primary/secondary brand palette
   ========================================================= */

.services-section a {
  color: var(--brand-primary);
  text-decoration: underline;
}

.services-section a:hover {
  color: var(--brand-accent);
}

/* =========================================================
   Services Page — Anchor Offset Control
   ---------------------------------------------------------
   Purpose:
   • Prevents section headings from being hidden behind
     the fixed header when using in-page anchor links
   • Applies to Services TOC navigation and deep links
   • Ensures consistent scroll positioning across browsers

   Notes:
   • Uses scroll-margin-top (modern, standards-based)
   • Safe fallback: ignored by older browsers
   • Value aligned to header height (~120px)
   ========================================================= */

.services-section {
  scroll-margin-top: 120px;
}


/* =========================================================
   Table of Contents (Services + Definitions pages)
   ========================================================= */

.services-toc {
  display: block;              /* force vertical flow */
  clear: both;
  width: 100%;
  margin: 40px 0;
  padding: 24px;
  background: #f9f9f9;
  border-left: 4px solid var(--brand-primary);
}

.services-toc h2 {
  margin: 0 0 16px;
}

.services-toc ul {
  display: block;
  margin: 0;
  padding-left: 20px;
  list-style: disc;
}

.services-toc li {
  margin-bottom: 10px;
}

.services-toc a {
  text-decoration: none;
}

.services-toc a:hover {
  text-decoration: underline;
}


/* =========================================================
   10. INSIGHTS / ARTICLES
   ========================================================= */

.insights-list {
  margin-top: 18px;
}

.insight-item {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 14px;
  background: #fff;
}

.insight-item h2 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.insight-meta {
  font-size: 0.9rem;
  color: #4b6278;
  margin-bottom: 10px;
}

.insight-excerpt {
  color: var(--text-secondary);
}

.insight-item a {
  color: var(--brand-primary);
  text-decoration: none;
}

.insight-item a:hover {
  color: var(--brand-accent);
  text-decoration: underline;
}


/* =========================================================
   11. TOOLTIP
   ========================================================= */

.tip {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted var(--brand-accent);
}

.tip .tip-box {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.15s ease;
  position: absolute;
  top: 1.6em;
  left: 0;
  z-index: 50;

  width: 260px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  font-size: 0.9rem;
}

.tip:hover .tip-box {
  visibility: visible;
  opacity: 1;
}


/* =========================================================
   12. RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .about-layout {
    flex-direction: column;
    align-items: center;

  }
}

@media (max-width: 600px) {
  .logo img {
    height: 40px;
  }

  .tip .tip-box {
    width: 220px;
  }
}

/* Contain third-party widget layout so it can't shove following content around */
.widget-wrap {
  display: block;
  width: 100%;
  clear: both;
  overflow: hidden; /* contains floats the widget might inject */
}

/* If the widget injects iframes or tables, prevent overflow */
.widget-wrap iframe,
.widget-wrap table {
  max-width: 100%;
}
/* Contain third-party widget layout so it can't affect content below */
.widget-wrap{
  display:block;
  width:100%;
  clear:both;
  overflow:hidden; /* contains floats the widget might inject */
}

.widget-wrap iframe,
.widget-wrap table{
  max-width:100%;
}

.widget-clear { clear: both; }