/*
Theme Name: Agrei Consulting
Theme URI: https://agreiconsulting.com
Author: Agrei Consulting Inc.
Description: Corporate identity theme for Agrei Consulting Inc. — navy filing layout. Responsive and light/dark adaptive. Front page plus Privacy, Terms, and Cookies page templates.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: agrei
*/

/* ============================================================
   Tokens — adaptive light / dark
   ============================================================ */
:root {
  --paper: #fdfdfb;
  --surface: #1b2a44;
  --heading: #1b2a44;
  --edge: #1b2a44;
  --body: #4a5266;
  --muted: #98a0b0;
  --slate: #6f7d98;
  --accent: #7e8eaa;
  --hair: rgba(27, 42, 68, 0.14);
  --tint: #eef1f7;
  --on-surface: #ffffff;
  --band-sub: #aeb9d1;
  --band-sub-2: #8492ad;
  --pad: 104px;
  --maxw: 1180px;
  color-scheme: light;
  font-family: "Libre Franklin", system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1726;
    --surface: #16243d;
    --heading: #e9eef7;
    --edge: #93a3c6;
    --body: #b9c2d4;
    --muted: #818da4;
    --slate: #9aa7c0;
    --accent: #93a3c6;
    --hair: rgba(255, 255, 255, 0.13);
    --tint: rgba(255, 255, 255, 0.045);
    --on-surface: #f3f6fc;
    --band-sub: #aab6cf;
    --band-sub-2: #8493ae;
    color-scheme: dark;
  }
}

/* ============================================================
   Base
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--body);
  font-family: "Libre Franklin", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }

.band { background: var(--surface); }
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ============================================================
   Masthead (shared)
   ============================================================ */
.masthead {
  padding-top: 34px;
  padding-bottom: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.wordmark {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--on-surface);
  margin: 0;
  text-decoration: none;
}
.wordmark:hover { opacity: 0.85; }
.subline {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--band-sub);
  white-space: nowrap;
}

/* ============================================================
   Home (front page) — filing layout
   ============================================================ */
.home-main { padding-top: 56px; padding-bottom: 8px; }

.intro {
  display: grid;
  grid-template-columns: 204px 1fr;
  gap: 32px;
  background: var(--tint);
  border-left: 3px solid var(--edge);
  padding: 28px 32px;
  margin-bottom: 60px;
}
.collabel {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
}
.lead {
  font-size: 16px;
  line-height: 1.75;
  color: var(--body);
  margin: 0;
  max-width: 720px;
}

.thead, .row, .contact {
  display: grid;
  grid-template-columns: 54px 150px 1fr 200px;
  gap: 32px;
}
.thead { padding-bottom: 12px; }
.thead .right { text-align: right; }
.row {
  align-items: start;
  padding: 26px 0;
  border-top: 1px solid var(--hair);
}
.row.dim { opacity: 0.5; }
.num {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
  padding-top: 4px;
}
.seg {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--slate);
  padding-top: 5px;
}
.name {
  font-size: 19px;
  font-weight: 600;
  color: var(--heading);
  letter-spacing: -0.2px;
}
.desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--body);
  margin: 8px 0 0;
  max-width: 540px;
}
.prop { text-align: right; padding-top: 4px; }
.prop a {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-decoration: none;
  white-space: nowrap;
  color: var(--heading);
}
.prop a .arr { color: var(--accent); }
.prop a:hover { text-decoration: underline; text-underline-offset: 3px; }
.status {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.contact {
  padding-top: 26px;
  border-top: 1px solid var(--hair);
  align-items: baseline;
}
.contact .email {
  font-size: 15px;
  font-weight: 500;
  color: var(--heading);
  text-decoration: none;
}
.contact .email:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   Legal pages — document layout
   ============================================================ */
.doc-main { padding-top: 60px; padding-bottom: 24px; }
.crumb {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.crumb:hover { color: var(--heading); }
.doc-title {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.6px;
  color: var(--heading);
  margin: 20px 0 0;
}
.doc-meta {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin: 14px 0 0;
}
.rule { height: 1px; background: var(--hair); margin: 34px 0 0; }

.doc {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  margin-top: 44px;
}
.toc { position: sticky; top: 40px; align-self: start; }
.toc-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin-bottom: 11px; }
.toc a {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--slate);
  text-decoration: none;
  display: flex;
  gap: 10px;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.toc a:hover { color: var(--heading); }

.prose { max-width: 680px; }
.prose section { scroll-margin-top: 28px; }
.prose section + section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--hair);
}
.prose h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 6px;
}
.prose h2 .n { color: var(--muted); margin-right: 10px; font-variant-numeric: tabular-nums; }
.prose h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--heading);
  margin: 0 0 16px;
}
.prose p { font-size: 15.5px; line-height: 1.75; color: var(--body); margin: 0 0 16px; }
.prose p:last-child { margin-bottom: 0; }
.prose ul { margin: 0 0 16px; padding: 0; list-style: none; }
.prose li {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--body);
  padding-left: 24px;
  position: relative;
  margin-bottom: 11px;
}
.prose li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  background: var(--accent);
}
.prose li strong, .prose p strong { color: var(--heading); font-weight: 600; }
.prose a {
  color: var(--heading);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--accent);
}
.callout {
  background: var(--tint);
  border-left: 3px solid var(--edge);
  padding: 20px 24px;
  margin: 0 0 16px;
}
.callout p { margin: 0; font-size: 14.5px; }

/* ============================================================
   Footer (shared)
   ============================================================ */
footer.band { margin-top: 48px; }
.doc-main + footer.band, .single footer.band { margin-top: 56px; }
.foot {
  padding-top: 26px;
  padding-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.foot .legalese { font-size: 12px; line-height: 1.7; color: var(--band-sub); margin: 0; }
.foot .legalese .second { color: var(--band-sub-2); }
.foot .links { display: flex; gap: 20px; }
.foot .links a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--band-sub);
  text-decoration: none;
}
.foot .links a[aria-current="page"] { color: var(--on-surface); }
.foot .links a:hover { color: var(--on-surface); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1040px) {
  :root { --pad: 56px; }
  .doc { grid-template-columns: 200px 1fr; gap: 40px; }
}
@media (max-width: 760px) {
  :root { --pad: 24px; }
  .wordmark { font-size: 23px; }
  .subline { font-size: 11px; letter-spacing: 1.5px; }
  .doc-title { font-size: 30px; }

  /* Home filing rows reflow */
  .intro { grid-template-columns: 1fr; gap: 14px; padding: 22px 22px; margin-bottom: 44px; }
  .thead { display: none; }
  .row, .contact {
    grid-template-columns: auto 1fr;
    grid-template-areas: "num seg" "main main" "prop prop";
    gap: 10px 14px;
    padding: 22px 0;
  }
  .num { grid-area: num; padding-top: 0; }
  .seg { grid-area: seg; padding-top: 1px; }
  .main { grid-area: main; }
  .prop { grid-area: prop; text-align: left; padding-top: 2px; }
  .contact { grid-template-areas: "seg seg" "main main"; align-items: center; }
  .contact .seg { grid-area: seg; }
  .contact .email { grid-area: main; }

  /* Legal doc reflow */
  .doc { grid-template-columns: 1fr; gap: 0; margin-top: 32px; }
  .toc { position: static; margin-bottom: 36px; padding-bottom: 32px; border-bottom: 1px solid var(--hair); }

  .foot { flex-direction: column; align-items: flex-start; gap: 18px; }
}
