/* ============================================================
   NOAH IP — MAIN STYLES
   Uniform components used across every page.
   Reads its values from tokens.css — avoid hardcoding colors
   or sizes here; use the var(--…) tokens instead.
   ============================================================ */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* --- LAYOUT WRAPPER --- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

section { padding: var(--space-5) 0; }
section.alt { background: var(--bg-alt); }

/* --- TYPOGRAPHY --- */
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; color: var(--ink); }
h1 { font-size: var(--t-hero); margin: 0 0 var(--space-2); }
h2 { font-size: var(--t-h2); margin: 0 0 var(--space-3); }
h3 { font-size: var(--t-h3); margin: 0 0 var(--space-1); font-family: var(--font-body); font-weight: 700; }
p  { margin: 0 0 var(--space-2); color: var(--ink-soft); }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.lead { font-size: 1.2rem; color: var(--ink); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: var(--t-small); color: var(--accent); font-weight: 700; margin: 0 0 var(--space-1); }
.center { text-align: center; }

/* --- BUTTON (one uniform style) --- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--t-body);
  transition: background 0.2s ease;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn-outline { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }

/* --- HEADER / NAV --- */
.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(255,255,255,0.97); backdrop-filter: blur(6px); z-index: 100; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: var(--space-2); padding-bottom: var(--space-2); }
.site-header img { height: 46px; width: auto; }
.nav { display: flex; gap: var(--space-3); align-items: center; }
.nav a { color: var(--ink); font-size: 0.98rem; font-weight: 500; }
.nav a:hover { color: var(--accent); text-decoration: none; }
.nav .has-sub { position: relative; }
.nav .submenu { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); min-width: 240px; padding: var(--space-1) 0; box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.nav .has-sub:hover .submenu { display: block; }
.nav .submenu a { display: block; padding: 0.5rem var(--space-2); font-size: 0.92rem; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; }

/* --- HERO --- */
.hero { padding: var(--space-5) 0; }
.hero .wrap { max-width: 820px; text-align: center; }

/* --- CARD GRID (uniform card) --- */
.grid { display: grid; gap: var(--space-3); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.card h3 { color: var(--accent); }

/* --- PRICING CARD --- */
.price-card { display: flex; flex-direction: column; }
.price-card .price { font-family: var(--font-head); font-size: 1.9rem; color: var(--ink); margin: var(--space-1) 0; }
.price-card .price small { display: block; font-family: var(--font-body); font-size: var(--t-small); color: var(--ink-soft); font-weight: 400; }
.price-card ul { padding-left: 1.1rem; margin: var(--space-2) 0; }
.price-card li { margin-bottom: 0.4rem; color: var(--ink-soft); }
.price-card .btn { margin-top: auto; text-align: center; }

/* --- STAT ROW --- */
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-3); text-align: center; }
.stat .num { font-family: var(--font-head); font-size: 2.4rem; color: var(--accent); display: block; }
.stat .lbl { font-size: var(--t-small); color: var(--ink-soft); }

/* --- LOGO STRIP --- */
.logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-3); }
.logos img { height: 64px; width: auto; filter: grayscale(100%); opacity: 0.7; transition: all 0.2s ease; }
.logos img:hover { filter: grayscale(0); opacity: 1; }

/* --- FOOTER --- */
.site-footer { background: var(--accent); color: #cdd8e2; padding: var(--space-4) 0 var(--space-2); }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: var(--space-3); }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: var(--t-small); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 var(--space-2); }
.site-footer a { color: #cdd8e2; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; font-size: 0.92rem; }
.site-footer img { height: 54px; margin-bottom: var(--space-2); }
.footer-bar { border-top: 1px solid rgba(255,255,255,0.15); margin-top: var(--space-3); padding-top: var(--space-2); font-size: var(--t-small); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-1); }

/* --- FADE-IN (subtle, conservative) --- */
.fade { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade.in { opacity: 1; transform: none; }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); padding: var(--space-2); gap: var(--space-2); }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4, .stats { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}

/* ============================================================
   PAGE-SPECIFIC: ARTICLES & INNER PAGES
   ============================================================ */
.page-hero { background: var(--accent-soft); padding: var(--space-4) 0; text-align: center; }
.page-hero h1 { margin-bottom: var(--space-1); }
.breadcrumb { font-size: var(--t-small); color: var(--ink-soft); margin-bottom: var(--space-2); }
.breadcrumb a { color: var(--ink-soft); }

/* Article */
.article { max-width: 760px; margin: 0 auto; }
.article-hero { width: 100%; max-width: 760px; margin: 0 auto var(--space-3); display: block; border-radius: var(--radius); }
.article-meta { font-size: var(--t-small); color: var(--ink-soft); margin-bottom: var(--space-3); padding-bottom: var(--space-2); border-bottom: 1px solid var(--line); }
.article-intro { font-size: 1.2rem; color: var(--ink); font-style: italic; margin-bottom: var(--space-3); }
.article h2 { margin-top: var(--space-4); }
.article ul, .article ol { color: var(--ink-soft); padding-left: 1.3rem; }
.article li { margin-bottom: 0.5rem; }
.article table { width: 100%; border-collapse: collapse; margin: var(--space-3) 0; font-size: 0.95rem; }
.article th, .article td { border: 1px solid var(--line); padding: 0.7rem 0.9rem; text-align: left; vertical-align: top; }
.article th { background: var(--accent-soft); font-family: var(--font-body); }
.faq { background: var(--bg-alt); border-left: 3px solid var(--accent); padding: var(--space-3); border-radius: var(--radius); margin: var(--space-3) 0; }
.faq p { margin-bottom: var(--space-2); }
.faq strong { color: var(--ink); }
.author-box { display: flex; gap: var(--space-3); align-items: flex-start; margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.author-box img { width: 80px; height: 80px; border-radius: 50%; flex-shrink: 0; }
.author-box h3 { color: var(--accent); }

/* Related posts + blog index cards */
.related h2, .index-head h1 { text-align: center; }
.post-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-3); }
.post-card { display: flex; flex-direction: column; }
.post-card h3 { font-size: 1.05rem; }
.post-card .date { font-size: var(--t-small); color: var(--ink-soft); margin-bottom: var(--space-1); }
.post-card p { font-size: 0.95rem; }

/* Footer logo + text overrides */
.footer-logo { height: 54px; margin-bottom: var(--space-2); filter: brightness(0) invert(1); }
.site-footer p { color: #cdd8e2; }

/* Contact blocks */
.contact-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-3); text-align: center; }
.contact-card { padding: var(--space-3); }
.contact-card h3 { color: var(--accent); margin-bottom: var(--space-1); }

/* Legal / prose pages */
.prose { max-width: 800px; margin: 0 auto; }
.prose h2 { margin-top: var(--space-4); }
.prose h3 { margin-top: var(--space-3); }
.prose ul { color: var(--ink-soft); }

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

/* Featured client tier on Clients page — larger, full-color */
.logos-featured img { height: 110px; filter: none; opacity: 1; }
.logos-featured { gap: var(--space-4); }

/* Logo is a square emblem (not a wide wordmark) — size up for legibility */
.site-header img { height: 60px; }
.footer-logo { height: 70px; }

/* Footer logo: black emblem needs a light backing on navy (was wrongly inverted) */
.footer-logo { filter: none; background: #fff; border-radius: 50%; padding: 6px; }
