/* ═══════════════════════════════════════════════════════════
   CLEARFORK AUTOMATION — Design System
   Ranch-modern: cream / espresso / copper, drawn from the brand mark
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --cream:      #F7F1E6;
  --cream-2:    #EFE6D5;
  --paper:      #FDFBF6;
  --espresso:   #2B2118;
  --espresso-2: #3C2E20;
  --ink:        #241C13;
  --copper:     #A65A24;
  --copper-2:   #C87A33;
  --copper-soft:rgba(166,90,36,0.1);
  --sage:       #6B7A5E;
  --gray:       #7A6F62;
  --line:       rgba(43,33,24,0.12);
  --line-soft:  rgba(43,33,24,0.07);
  --line-dark:  rgba(247,241,230,0.14);
  --shadow-lg:  0 24px 60px rgba(43,33,24,0.14);
  --shadow-sm:  0 6px 20px rgba(43,33,24,0.08);
}

html { scroll-behavior: smooth; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--espresso);
  color: var(--cream);
  padding: 0.8rem 1.4rem;
  border-radius: 0 0 8px 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Fraunces', serif; font-weight: 560; letter-spacing: -0.015em; }

a { color: inherit; }
img { max-width: 100%; }

/* ── NAV ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 300;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 5vw;
  background: rgba(253,251,246,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.nav-logo { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.nav-logo img { height: 44px; width: auto; display: block; }
.nav-logo .wordmark {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--espresso);
  letter-spacing: 0.06em;
  line-height: 1;
}
.nav-logo .wordmark small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  color: var(--copper);
  margin-top: 0.25rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--espresso);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a {
  color: rgba(36,28,19,0.72);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--copper); }

.btn-primary {
  background: var(--espresso);
  color: var(--cream);
  padding: 0.8rem 1.7rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  display: inline-block;
  border: 0;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.btn-primary:hover { background: var(--copper); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.btn-copper {
  background: linear-gradient(135deg, var(--copper) 0%, var(--copper-2) 100%);
  color: #fff;
  padding: 0.9rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  display: inline-block;
  border: 0;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.btn-copper:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(166,90,36,0.35); filter: brightness(1.05); }

.btn-ghost {
  color: var(--espresso);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.9rem 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: color 0.2s, gap 0.2s;
}
.btn-ghost:hover { color: var(--copper); gap: 0.7rem; }

.nav-cta { padding: 0.6rem 1.3rem !important; font-size: 0.85rem; }
.nav-links a.nav-cta { color: var(--cream); }
.nav-links a.nav-cta:hover { color: #fff; }

/* ── SECTION COMMON ── */
section { padding: 6.5rem 5vw; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--copper);
  display: block;
  margin-bottom: 1rem;
}

.title {
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.08;
  margin-bottom: 1.4rem;
  max-width: 24ch;
  color: var(--espresso);
}
.title em { font-style: italic; color: var(--copper); }

.intro {
  color: var(--gray);
  font-size: 1.05rem;
  max-width: 58ch;
  line-height: 1.8;
  margin-bottom: 3rem;
}

.center { text-align: center; }
.center .title, .center .intro { margin-left: auto; margin-right: auto; }

.dark { background: var(--espresso); color: var(--cream); }
.dark .title { color: var(--cream); }
.dark .intro { color: rgba(247,241,230,0.65); }

.tinted { background: var(--cream); }

/* ── CARDS ── */
.card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 2.2rem;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(166,90,36,0.25); }

/* ── FOOTER ── */
footer {
  background: var(--espresso);
  color: rgba(247,241,230,0.62);
  padding: 4rem 5vw 2rem;
}
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1.1fr; gap: 2.4rem; margin-bottom: 3rem; }
.footer-brand img { height: 54px; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.875rem; line-height: 1.75; max-width: 30ch; }
.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--copper-2);
  margin-bottom: 1.1rem;
  font-weight: 700;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { color: rgba(247,241,230,0.6); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--cream); }
.footer-bottom {
  border-top: 1px solid var(--line-dark);
  padding-top: 1.6rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: rgba(247,241,230,0.4);
}

/* ── ANIMATIONS ── */
@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
  }
  .fade-up.visible { opacity: 1; transform: none; }
}

/* ── BREADCRUMBS ── */
.crumbs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--gray);
  padding: 1.1rem 5vw 0;
}
.crumbs li { display: flex; align-items: center; gap: 0.5rem; }
.crumbs li + li::before { content: '›'; color: var(--copper); }
.crumbs a { color: var(--gray); text-decoration: none; transition: color 0.2s; }
.crumbs a:hover { color: var(--copper); }
.crumbs [aria-current] { color: var(--espresso); font-weight: 600; }

/* ── PAGE HERO (interior pages) ── */
.page-hero {
  padding: 4rem 5vw 3.5rem;
  background: radial-gradient(900px 400px at 85% -15%, rgba(200,122,51,0.09), transparent 60%), var(--paper);
}
.page-hero .title { font-size: clamp(2.2rem, 4.2vw, 3.4rem); max-width: 20ch; }
.page-hero .intro { margin-bottom: 2rem; }
.page-hero .hero-actions { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }

/* ── PROSE (long-form article body) ── */
.prose { max-width: 720px; margin: 0 auto; }
.prose p, .prose li { color: #4A4036; font-size: 1.02rem; line-height: 1.9; }
.prose p { margin-bottom: 1.5rem; }
.prose h2 { font-size: 1.7rem; color: var(--espresso); margin: 2.8rem 0 1.1rem; line-height: 1.2; }
.prose h3 { font-size: 1.25rem; color: var(--espresso); margin: 2.2rem 0 0.8rem; }
.prose ul, .prose ol { margin: 0 0 1.5rem 1.3rem; display: flex; flex-direction: column; gap: 0.55rem; }
.prose a { color: var(--copper); text-decoration-color: rgba(166,90,36,0.4); }
.prose a:hover { text-decoration-color: var(--copper); }
.prose strong { color: var(--espresso); }
.prose .callout {
  background: var(--copper-soft);
  border-left: 3px solid var(--copper);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  margin: 2rem 0;
  font-size: 0.95rem;
  color: var(--espresso-2);
  line-height: 1.75;
}
.prose .pullquote {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--espresso);
  border-left: 3px solid var(--copper);
  padding-left: 1.6rem;
  margin: 2.4rem 0;
}

/* ── ARTICLE META / AUTHOR ── */
.post-meta { font-size: 0.85rem; color: var(--gray); margin-bottom: 2.5rem; }
.post-meta strong { color: var(--espresso); }
.author-box {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 1.5rem 1.7rem;
  margin-top: 3.5rem;
}
.author-box img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box .ab-name { font-family: 'Fraunces', serif; font-size: 1.05rem; color: var(--espresso); }
.author-box p { font-size: 0.85rem; color: var(--gray); line-height: 1.65; margin: 0.25rem 0 0; }

/* ── FAQ (shared) ── */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 1.4rem 0.25rem; }
.faq summary {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  color: var(--espresso);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; color: var(--copper); transition: transform 0.25s; flex-shrink: 0; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--gray); font-size: 0.95rem; line-height: 1.8; padding-top: 0.9rem; max-width: 65ch; }

/* ── CTA BAND ── */
.cta-band { text-align: center; }
.cta-band .title { margin-left: auto; margin-right: auto; }
.cta-band .intro { margin: 0 auto 2.4rem; }
.cta-band .cta-alt { margin-top: 1.4rem; font-size: 0.85rem; color: rgba(247,241,230,0.5); }
.cta-band .cta-alt a { color: var(--copper-2); }

/* ── FEATURE LIST (service pages) ── */
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.feature-item {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 1.8rem;
}
.feature-item .fi-num { font-family: 'Fraunces', serif; color: var(--copper); font-size: 0.85rem; letter-spacing: 0.1em; display: block; margin-bottom: 0.7rem; }
.feature-item h3 { font-size: 1.12rem; color: var(--espresso); margin-bottom: 0.55rem; }
.feature-item p { font-size: 0.9rem; color: var(--gray); line-height: 1.75; }

/* ── RELATED LINKS ── */
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; }
.related-grid a.card { text-decoration: none; display: block; }
.related-grid h3 { font-size: 1.1rem; color: var(--espresso); margin-bottom: 0.5rem; }
.related-grid p { font-size: 0.87rem; color: var(--gray); line-height: 1.7; }
.related-grid .rg-go { display: inline-block; margin-top: 1rem; font-size: 0.85rem; font-weight: 600; color: var(--copper); }

/* ── RESPONSIVE ── */
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feature-list { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 0.6rem 5vw 1.2rem;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--line-soft); }
  .nav-links li:last-child { border-bottom: 0; padding-top: 0.9rem; }
  .nav-links a { display: block; padding: 0.95rem 0.2rem; font-size: 1rem; }
  .nav-links a.nav-cta { text-align: center; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  section { padding: 4.5rem 6vw; }
}
