/* Auto-Flow Automations Inc. — shared site styles.
   Human design — warm, light, readable. WCAG 2.2 AA compliant throughout.
   Used by index.html section pages and all service pages. */

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

:root {
  /* ── Backgrounds ── */
  --bg:          #faf8f4;
  --bg-warm:     #f3ece0;
  --bg-card:     #ffffff;

  /* ── Borders ── */
  --border:      #e0d4c0;
  --border-2:    #c4ae90;

  /* ── Text — all WCAG AA on --bg ── */
  --text:        #1c1208;
  --text-2:      #5a4030;
  --text-3:      #786050;

  /* ── Accent (orange-amber) ── */
  --yellow:       #FFC93C;
  --yellow-deep:  #e6a800;
  --accent:       #c96200;
  --accent-deep:  #8f4200;
  --accent-bg:    #fff4e6;
  --accent-border:#f0b870;

  /* ── Shadows ── */
  --shadow-sm: 0 1px 3px rgba(28,18,8,.07), 0 1px 2px rgba(28,18,8,.05);
  --shadow-md: 0 4px 16px rgba(28,18,8,.08), 0 2px 6px rgba(28,18,8,.05);
  --shadow-lg: 0 8px 32px rgba(28,18,8,.10), 0 4px 8px rgba(28,18,8,.06);

  /* ── Typography ── */
  --font-display: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --font-body:    'Atkinson Hyperlegible', system-ui, sans-serif;

  /* ── Misc ── */
  --radius:    8px;
  --radius-lg: 14px;
  --transition: 0.18s ease;
  --touch-min:  44px;
  --header-h:   64px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
@media (max-width: 480px) { html { font-size: 15px; } }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Focus — WCAG 2.4.7 / 2.4.11 / 2.4.12 ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ── SR utility ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Skip link — WCAG 2.4.1 ── */
.skip-link {
  position: absolute; top: -100%; left: 0;
  background: var(--accent); color: #fff;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  z-index: 9999; text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { top: 0; }

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* ══ HEADER ══ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 2rem; width: 100%; height: 100%;
}
.site-logo {
  display: flex; align-items: center;
  text-decoration: none; flex-shrink: 0;
}
.logo-img {
  height: 40px; width: auto; display: block;
}
/* hide old text logo elements */
.logo-af, .logo-sep, .logo-sub { display: none; }
.nav-links {
  display: flex; align-items: center;
  gap: 0.1rem; list-style: none;
}
.nav-links a {
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 400;
  color: var(--text-2); text-decoration: none;
  padding: 0.4rem 0.9rem; border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  min-height: var(--touch-min);
  display: inline-flex; align-items: center;
}
.nav-links a:hover { color: var(--text); background: var(--bg-warm); }
.nav-links a[aria-current="page"],
.nav-links a[aria-current="location"] { color: var(--accent-deep); background: var(--accent-bg); }

.nav-cta {
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 700;
  color: #1c1208 !important; background: var(--yellow) !important;
  border-radius: var(--radius); text-decoration: none;
  padding: 0.45rem 1.15rem;
  min-height: var(--touch-min); display: inline-flex; align-items: center;
  transition: background var(--transition);
  box-shadow: var(--shadow-sm);
}
.nav-cta:hover { background: var(--yellow-deep) !important; }

.nav-toggle {
  display: none; background: none;
  border: 1px solid var(--border); color: var(--text-2);
  cursor: pointer; border-radius: var(--radius);
  font-size: 1rem;
  min-height: var(--touch-min); min-width: var(--touch-min);
  align-items: center; justify-content: center;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle[aria-expanded="true"]  .icon-open  { display: none; }
.nav-toggle[aria-expanded="false"] .icon-close { display: none; }

/* ══ BUTTONS ══ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; font-family: var(--font-body);
  font-size: 0.95rem; font-weight: 600; text-decoration: none;
  color: #fff; background: var(--accent-deep);
  padding: 0.8rem 1.75rem; border: none;
  border-radius: var(--radius); cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  min-height: var(--touch-min); box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: #6f3200; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:focus-visible { outline-offset: 4px; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; font-family: var(--font-body);
  font-size: 0.95rem; font-weight: 500; text-decoration: none;
  color: var(--accent-deep); background: transparent;
  padding: 0.8rem 1.75rem;
  border: 1.5px solid #8a6840;
  border-radius: var(--radius); cursor: pointer;
  transition: all var(--transition); min-height: var(--touch-min);
}
.btn-ghost:hover { background: var(--accent-bg); border-color: var(--accent-deep); }
.btn-ghost:focus-visible { outline-offset: 4px; }

/* ══ SECTION COMMONS ══ */
section { position: relative; }

.section-label {
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  color: var(--accent-deep); letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 0.65rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.section-label::before {
  content: ''; display: block; width: 16px; height: 2px;
  background: var(--accent); flex-shrink: 0;
}
.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.9rem, 3.5vw, 2.9rem);
  line-height: 1.1; letter-spacing: -0.025em;
  color: var(--text); margin-bottom: 1.25rem;
}
.section-body {
  font-size: 1.05rem; color: var(--text-2);
  max-width: 54ch; line-height: 1.8;
}
.glass {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}

/* ══ TAGS ══ */
.tag {
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 500;
  color: var(--accent-deep); background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  padding: 0.2rem 0.65rem; border-radius: 999px;
}

/* ══ SERVICE PAGE — HERO ══ */
.page-hero {
  padding: calc(var(--header-h) + 5rem) 0 3.5rem;
  background: var(--bg);
}
.breadcrumb {
  font-family: var(--font-body); font-size: 0.82rem; color: var(--text-3);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-deep); }
.breadcrumb span[aria-hidden] { margin: 0 0.4rem; color: var(--border-2); }
.page-hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05; letter-spacing: -0.03em;
  color: var(--text); margin-bottom: 1.25rem; max-width: 18ch;
}
.page-hero .lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--text-2);
  max-width: 58ch; line-height: 1.8; margin-bottom: 2rem;
}
.page-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ══ SERVICE PAGE — BODY ══ */
.page-section { padding: 4rem 0; }
.page-section--warm { background: var(--bg-warm); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.prose { max-width: 62ch; }
.prose p { font-size: 1.05rem; color: var(--text-2); line-height: 1.85; margin-bottom: 1.25rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 700; }

.payoff-callout {
  background: var(--accent-bg); border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg); padding: 1.75rem 2rem;
  max-width: 62ch; margin-top: 2rem;
}
.payoff-callout .payoff-label {
  display: block; font-family: var(--font-body);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--accent-deep);
  margin-bottom: 0.5rem;
}
.payoff-callout p { font-size: 1.02rem; color: var(--text-2); line-height: 1.8; margin: 0; }

/* ══ FEATURE GRID ══ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem; list-style: none; padding: 0;
}
.feature-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.feature-item h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  color: var(--text); margin-bottom: 0.55rem;
}
.feature-item p { font-size: 0.92rem; color: var(--text-2); line-height: 1.7; }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 2rem; list-style: none; padding: 0; }

/* ══ CTA BAND ══ */
.cta-band { padding: 5rem 0; background: var(--bg-warm); border-top: 1px solid var(--border); }
.cta-inner { display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: center; }
.cta-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.7rem, 3.5vw, 2.6rem); color: var(--text);
  letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 0.85rem;
}
.cta-sub { font-size: 1.05rem; color: var(--text-2); max-width: 52ch; line-height: 1.7; }
.cta-actions { display: flex; flex-direction: column; gap: 0.75rem; flex-shrink: 0; min-width: 180px; }
.cta-fine { font-size: 0.72rem; color: var(--text-3); text-align: center; margin-top: 0.2rem; }

/* ══ RELATED SERVICES ══ */
.related-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem; list-style: none; padding: 0;
}
.related-card {
  display: block; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; text-decoration: none;
  box-shadow: var(--shadow-sm); transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.related-card:hover { border-color: var(--accent-border); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.related-card .r-name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: 0.35rem; }
.related-card .r-desc { font-size: 0.85rem; color: var(--text-2); line-height: 1.6; }

/* ══ FOOTER ══ */
.site-footer { padding: 2.5rem 0; border-top: 1px solid var(--border); background: var(--bg); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-copy { font-size: 0.82rem; color: var(--text-3); line-height: 1.6; }
.footer-copy strong { color: var(--text-2); font-weight: 500; }
.footer-copy a { color: var(--text-2); text-decoration: none; }
.footer-copy a:hover { color: var(--accent-deep); }
.footer-links { display: flex; gap: 0.15rem; list-style: none; padding: 0; align-items: center; }
.footer-links a {
  font-size: 0.82rem; color: var(--text-3); text-decoration: none;
  transition: color var(--transition);
  min-height: var(--touch-min); display: inline-flex; align-items: center; padding: 0 0.65rem;
}
.footer-links a:hover { color: var(--accent-deep); }
.footer-links svg { display: block; }
.footer-wcag {
  font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-3);
  border: 1px solid var(--border); padding: 0.25rem 0.6rem;
  border-radius: var(--radius); letter-spacing: 0.1em;
}

/* ══ TOUCH TARGETS — WCAG 2.5.5 / 2.5.8 ══ */
a, button, [role="button"], input, select, textarea { min-height: 24px; }

/* ══ HIGH CONTRAST ══ */
@media (prefers-contrast: more) {
  :root {
    --text:         #000000;
    --text-2:       #2a1a00;
    --text-3:       #5a3a00;
    --accent:       #7a3a00;
    --accent-deep:  #5a2a00;
    --border:       #8a7060;
    --bg-card:      #ffffff;
  }
}

/* ══ FORCED COLORS ══ */
@media (forced-colors: active) {
  .glass, .feature-item, .related-card, .payoff-callout {
    border: 2px solid ButtonText;
  }
  .btn-primary { background: ButtonText; color: ButtonFace; forced-color-adjust: none; }
  .tag { border: 1px solid ButtonText; }
}

/* ══ REDUCED MOTION ══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ══ RESPONSIVE ══ */
@media (max-width: 900px) {
  .cta-inner { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; }
  .nav-links.open {
    display: flex; position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 1rem; gap: 0.25rem; z-index: 99;
  }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .cta-actions { flex-direction: row; flex-wrap: wrap; }
}
                                                                                                                                                                                                                