/* =====================================================
   CleanFormulation- Brand UI System v2 (HOME)
   Purpose: Professional, calm, reference-grade UI
   Scope: Header + Homepage sections + Footer harmony
   Philosophy: Academic authority × Modern clarity
   ===================================================== */

/* -----------------------------
   1. DESIGN TOKENS
----------------------------- */
:root {
  --font-main: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --bg-main: #f7faf9;
  --bg-card: #ffffff;
  --bg-soft: #eef6f3;

  --text-main: #0b1220;
  --text-muted: #5f6b72;
  --text-light: #7b8790;

  --brand: #0b8454;
  --brand-soft: #e6f4ef;
  --brand-accent: #00a79d;

  --border: #dde6e9;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-soft: 0 6px 20px rgba(11,18,32,0.06);
  --shadow-card: 0 10px 30px rgba(11,18,32,0.08);

  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 36px;
  --space-xl: 64px;
}

/* -----------------------------
   2. BASE RESET
----------------------------- */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

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

/* -----------------------------
   3. TYPOGRAPHY
----------------------------- */
h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: var(--space-md);
}

h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
}

p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

ul {
  padding-left: 18px;
}
li {
  color: var(--text-muted);
  margin-bottom: 6px;
}

section + section {
  margin-top: var(--space-xl);
}
@media (max-width: 768px) {
  section + section {
    margin-top: var(--space-lg);
  }
}
.cf-domain ul li:first-child a {
  font-weight: 600;
  color: var(--brand);
}

.cf-domain ul li:not(:first-child) a {
  font-weight: 500;
  color: var(--text-muted);
}
@media (max-width: 768px) {
  #cf-orientation {
    padding: 28px 22px;
    border-radius: 16px;
  }

  #cf-orientation h1 {
    font-size: 1.65rem;
    line-height: 1.25;
  }

  #cf-orientation p {
    font-size: 0.95rem;
    line-height: 1.55;
  }
}
@media (max-width: 768px) {
  p {
    margin-bottom: 14px;
  }
}
#cf-knowledge-domains {
  display: grid;
  gap: 20px;
}

.cf-domain {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: 0 6px 16px rgba(11,18,32,0.04);
}

.cf-domain h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--text-main);
}

.cf-domain p {
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.cf-domain a {
  font-weight: 600;
  font-size: 0.95rem;
}
#cf-primary-search {
  border: 1px solid rgba(11,132,84,0.15);
}

#cf-primary-search h2 {
  font-size: 1.4rem;
}
@media (max-width: 768px) {
  section {
    margin-bottom: 42px;
  }
}
#site-footer {
  background: linear-gradient(
    180deg,
    #f7faf9 0%,
    #0b1220 25%
  );
}

/* -----------------------------
   4. LAYOUT
----------------------------- */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
}

section {
  margin-bottom: var(--space-xl);
}

/* -----------------------------
   5. HEADER
----------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
}

.top-nav a {
  margin-left: 18px;
  font-weight: 600;
  color: var(--text-main);
}

/* -----------------------------
   6. ORIENTATION / HERO
----------------------------- */
#cf-orientation {
  background: linear-gradient(160deg, var(--brand-soft), #ffffff);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

#cf-orientation p {
  max-width: 780px;
}

.sa-method-note {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-soft);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

/* -----------------------------
   7. SEARCH
----------------------------- */
#cf-primary-search {
  background: var(--bg-card);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

#cf-primary-search form {
  margin-top: var(--space-sm);
}

#cf-primary-search input[type="search"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 1rem;
}

.submit-btn {
  margin-top: var(--space-sm);
  padding: 12px 18px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
}

.submit-btn:hover {
  background: var(--brand-accent);
}

/* -----------------------------
   8. KNOWLEDGE DOMAINS
----------------------------- */
#cf-knowledge-domains {
  background: var(--bg-card);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
@media (max-width: 768px) {
  #cf-knowledge-domains {
    padding: var(--space-md);
  }
   #cf-knowledge-domains h2 {
    font-size: 1.45rem;
  }

  .cf-domain h3 {
    font-size: 1.05rem;
  }
}
.cf-domain-intro {
  max-width: 720px;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}
.cf-domain-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.cf-domain {
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

.cf-domain:first-child {
  border-top: none;
}
.cf-domain h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}
.cf-domain p {
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}
.cf-domain ul {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
}

.cf-domain li {
  margin-bottom: 4px;
}

.cf-domain a {
  font-size: 0.9rem;
  font-weight: 500;
}


/* -----------------------------
   9. GOVERNANCE / METHOD SECTIONS
----------------------------- */
#cf-methodology,
#cf-claim-analysis,
#cf-governance,
#cf-boundaries {
  background: var(--bg-card);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* -----------------------------
   10. FOOTER (HARMONIZED)
----------------------------- */
#site-footer {
  background: #0b1220;
  color: #e6edf3;
  margin-top: var(--space-xl);
}

#site-footer a {
  color: #a7f3d0;
}

.footer-inner {
  max-width: 1120px;
  margin: auto;
  padding: var(--space-xl) var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
}
/* Lower legal section */
.footer-bottom {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
/* Newsletter area */
.newsletter p {
  color: #c1cdcd;
  font-size: .95rem;
  margin-bottom: 12px;
  line-height: 1.6;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.newsletter-form input[type="email"] {
  padding: 10px 12px;
  border: 1px solid #506b6b;
  border-radius: 6px;
  background: #e9efef;
  font-size: .95rem;
  min-width: 220px;
  color: #122;
}

.subscribe-btn {
  background: #0b8454;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 600;
  transition: background .25s ease;
}

.subscribe-btn:hover {
  background: #096b44;
}


.footer-legal {
  margin-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 20px;
}

.footer-legal p {
  color: #b9c7c7;
  font-size: .9rem;
  margin: 6px 0;
}

.footer-legal a {
  color: #9fe0e0;
}

/* Utility */
.muted {
  color: #c7d4d4;
}
.footer-nav h4, .newsletter h4, .mini-sitemap h4{
color: #ffffff;
  margin-bottom: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .5px;
}

/* Responsive */
@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  #site-footer {
    padding: 36px 0 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input[type="email"] {
    width: 100%;
  }

  .subscribe-btn {
    width: 100%;
  }
}
.footer-nav h4 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
}

.footer-nav li {
  margin-bottom: 6px;
}

.footer-legal {
  margin-top: var(--space-lg);
  font-size: 0.85rem;
  color: #9aa4af;
}

/* -----------------------------
   11. ACCESSIBILITY
----------------------------- */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}


/* -----------------------------
   12. RESPONSIVE
----------------------------- */
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  .site-header { flex-direction: column; align-items: flex-start; }
  .top-nav { margin-top: var(--space-sm); }
  #cf-orientation { padding: var(--space-lg); }
}

.cf-domain-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.cf-domain-card {
  background: var(--bg-card);
  padding: 1.2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.cf-domain-card h3 {
  margin-top: 0;
}

.cf-domain-card a {
  text-decoration: none;
  color: var(--brand);
  font-weight: 600;
}