/* ============================================================
   Nexwald — shared stylesheet
   Layout rhythm: same component set and proportions as FairAscent
   (sticky header, centred hero, overlapping category cards,
   alternating section bands, 4-column footer).
   Identity: Nexwald green / gold, Cormorant Garamond + DM Sans.
   ============================================================ */

:root {
  --green-deep: #16382d;
  --green-mid: #23503f;
  --green: #2d5f4f;
  --green-pale: #eaf1ec;
  --gold: #b8973a;
  --gold-light: #e3c266;
  --gold-dark: #8a6c24;
  --ink: #16201b;
  --muted: #56645c;
  --muted-light: #85928a;
  --bg: #f7faf8;
  --white: #ffffff;
  --border: #dbe5de;
  --success-bg: #eef6ef;
  --success-text: #2c6e49;
  --unit: 16px;
  --radius: 8px;
  --max-width: 1120px;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-width: 320px;
}

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

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--gold-dark); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  color: var(--green-deep);
  line-height: 1.2;
}
h1, h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.005em;
}
h3, h4 {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.5rem); line-height: 1.1; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-top: 1.9em; margin-bottom: 0.5em; }
h3 { font-size: 1.25rem; margin-top: 1.8em; margin-bottom: 0.5em; }
h4 { font-size: 1.05rem; margin-bottom: 0.4em; }

h1 em, h2 em { font-style: italic; }

p { margin-bottom: 1.1em; color: var(--ink); }
ul, ol { margin: 0 0 1.1em 1.3em; }
li { margin-bottom: 0.4em; }

.lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 640px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  transition: all .15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--gold); color: var(--green-deep); }
.btn-primary:hover { background: var(--gold-dark); color: var(--white); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.35); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: var(--white); color: var(--white); }
.btn-outline { background: transparent; border-color: var(--green); color: var(--green); }
.btn-outline:hover { background: var(--green); color: var(--white); }
.btn-small { padding: 9px 18px; font-size: 13px; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--green-deep);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 300;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  margin-bottom: -44px;       /* circle hangs below the slim header bar */
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 4px 14px rgba(0,0,0,0.28);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.logo img { width: 68px; height: auto; }
.footer-col a.logo-footer {
  display: flex;              /* .footer-col a sets display:block, which un-centres the logo */
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  margin: 0 0 16px;
  overflow: hidden;
  box-shadow: none;
}
.footer-col a.logo-footer img { width: 70px; }

.nav-links {
  display: flex;
  gap: 26px;
  align-items: center;
}
.nav-links a {
  color: rgba(255,255,255,0.82);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--gold-light); }
.nav-links a.blog-link {
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 16px;
  border-radius: 6px;
}
.nav-links a.blog-link:hover { border-color: var(--gold); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.burger span { width: 24px; height: 2px; background: var(--white); display: block; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 13px;
  color: var(--muted-light);
  padding: 18px 0 0;
}
.breadcrumb a { color: var(--muted-light); }
.breadcrumb a:hover { color: var(--green-deep); }

/* ---------- Hero (homepage) ---------- */
.hero {
  background:
    linear-gradient(180deg, rgba(22,56,45,0.93) 0%, rgba(35,80,63,0.88) 100%),
    url('../img/hero-bamboo.jpg') center 40% / cover no-repeat;
  color: var(--white);
  padding: 72px 0 88px;
  text-align: center;
}
.hero h1 { color: var(--white); max-width: 780px; margin: 0 auto 20px; }
.hero h1 em { color: var(--gold-light); }
.hero .lede { color: rgba(255,255,255,0.8); max-width: 620px; margin: 0 auto 8px; }
.hero-trust {
  margin-top: 28px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
}

/* ---------- Category tiles ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: -48px;
  position: relative;
  z-index: 2;
}
.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: 0 8px 24px rgba(22,56,45,0.09);
  transition: transform .15s ease, box-shadow .15s ease;
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(22,56,45,0.14);
}
.category-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--green-pale);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-dark);
  margin-bottom: 16px;
}
.category-icon svg { width: 22px; height: 22px; }
.category-card h3 { margin-top: 0; font-size: 1.05rem; }
.category-card p { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.category-card a.card-link { font-size: 13.5px; font-weight: 700; color: var(--green); }
.category-card a.card-link:hover { color: var(--gold-dark); }

/* ---------- Section ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 40px; }

/* ---------- Article / pillar page ---------- */
.page-header {
  background: var(--green-deep);
  color: var(--white);
  padding: 56px 0 40px;
}
.page-header h1 { color: var(--white); }
.page-header .lede { color: rgba(255,255,255,0.78); margin-top: 14px; }
.page-header .breadcrumb { color: rgba(255,255,255,0.5); padding-top: 0; margin-bottom: 18px; }
.page-header .breadcrumb a { color: rgba(255,255,255,0.65); }
.page-header .breadcrumb a:hover { color: var(--gold-light); }

.article-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-top: 18px;
}

article.pillar {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 24px;
}
article.pillar h2:first-child { margin-top: 0; }

.pillar-figure {
  margin: 0 0 36px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.pillar-figure img { width: 100%; height: 320px; object-fit: cover; }
.pillar-figure.figure-inline { margin: 28px 0; }

.callout {
  background: var(--green-pale);
  border-left: 4px solid var(--green);
  border-radius: 0 6px 6px 0;
  padding: 18px 22px;
  margin: 28px 0;
  font-size: 14.5px;
}
.callout strong { color: var(--green-deep); }
.callout a { text-decoration: underline; }
.callout p:last-child { margin-bottom: 0; }

.checklist { list-style: none; margin-left: 0; }
.checklist li { padding-left: 28px; position: relative; }
.checklist li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--success-text);
  font-weight: 700;
}

.article-footer-disclosure {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding-top: 24px;
  font-size: 12.5px;
  color: var(--muted-light);
  line-height: 1.6;
}

/* ---------- Comparison / facts table ---------- */
.compare-table-wrap { overflow-x: auto; margin: 28px 0; }
table.compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
table.compare th, table.compare td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: top;
}
table.compare th { background: var(--green-pale); color: var(--green-deep); font-weight: 700; }
table.compare tr:last-child td { border-bottom: none; }
table.compare td:first-child { font-weight: 600; color: var(--green-deep); }
table.compare td:last-child { color: var(--muted); white-space: nowrap; }

.verdict-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 28px 0;
}
.verdict-grid-3 { grid-template-columns: repeat(3, 1fr); }
.verdict-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.verdict-card h4 { color: var(--gold-dark); }
.verdict-card p { margin-bottom: 0; font-size: 14px; color: var(--muted); }
.verdict-card a.card-link { display: inline-block; margin-top: 12px; font-size: 13.5px; font-weight: 700; }

/* ---------- Founder card ---------- */
.founder-card {
  display: flex;
  align-items: center;
  gap: 26px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 28px 0 0;
}
.founder-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--green-pale);
}
.founder-card h4 { margin-top: 0; margin-bottom: 2px; color: var(--green-deep); font-size: 1.05rem; }
.founder-card .founder-title { font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; color: var(--gold-dark); text-transform: uppercase; margin-bottom: 10px; }
.founder-card p { font-size: 14px; color: var(--muted); margin-bottom: 0; }
.founder-card p + p { margin-top: 10px; }
.founder-card .founder-quote { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; color: var(--green); }

/* ---------- Blog widget ---------- */
.blog-widget-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.blog-post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: box-shadow .15s ease;
}
.blog-post-card:hover { box-shadow: 0 8px 20px rgba(22,56,45,0.1); }
.blog-post-card .post-date { font-size: 12px; color: var(--muted-light); margin-bottom: 8px; }
.blog-post-card h4 { margin-top: 0; font-size: 1rem; }
.blog-post-card h4 a { color: var(--green-deep); }
.blog-post-card h4 a:hover { color: var(--gold-dark); }
.blog-post-card p { font-size: 13.5px; color: var(--muted); margin-bottom: 0; }
.blog-widget-status { font-size: 13.5px; color: var(--muted-light); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-deep);
  color: rgba(255,255,255,0.6);
  padding: 48px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h5 {
  color: var(--white);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.footer-col a { display: block; color: rgba(255,255,255,0.6); font-size: 13.5px; margin-bottom: 9px; }
.footer-col a:hover { color: var(--gold-light); }
.footer-disclaimer { font-size: 12.5px; line-height: 1.7; color: rgba(255,255,255,0.45); max-width: 720px; }
.footer-disclaimer a, .footer-bottom a { color: rgba(255,255,255,0.75); text-decoration: underline; }
.footer-disclaimer a:hover, .footer-bottom a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  margin-top: 24px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.4);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Legal pages ---------- */
.legal-page { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.legal-page h1 { margin-bottom: 6px; }
.legal-sub { font-size: 13px; color: var(--muted-light); margin-bottom: 32px; }
.legal-page h3 { color: var(--green-deep); }

/* ---------- Cookie consent gate (blocking, same pattern as FairAscent) ---------- */
.cookie-banner {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100%; inset: 0; z-index: 900;
  background: rgba(10,20,14,0.78);
  align-items: center; justify-content: center;
  padding: var(--unit);
  overflow-y: auto;
}
.cookie-banner.open { display: flex; }
.cookie-inner {
  max-width: 560px; width: 100%;
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: calc(var(--unit) * 2.2) calc(var(--unit) * 2);
  display: flex; flex-direction: column; gap: calc(var(--unit) * 1.1);
  margin: auto;
  max-height: calc(100% - var(--unit) * 2);
  overflow-y: auto;
}
.cookie-inner h4 { margin-top: 0; }
.cookie-text { font-size: 14px; line-height: 1.7; color: var(--muted); }
.cookie-text a { color: var(--gold-dark); text-decoration: underline; }
.cookie-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cookie-btn {
  font-family: var(--font);
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  padding: 12px 20px; cursor: pointer; border: 1px solid var(--border); background: none; color: var(--muted);
  border-radius: 6px;
  transition: all 0.2s;
}
.cookie-btn:hover { border-color: var(--gold); color: var(--gold-dark); }
.cookie-btn.primary { background: var(--gold); border-color: var(--gold); color: var(--green-deep); }
.cookie-btn.primary:hover { background: var(--gold-dark); color: var(--white); }
body.cookie-lock { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 13.5px; }
}
@media (max-width: 900px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); margin-top: -32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .blog-widget-grid { grid-template-columns: 1fr; }
  .verdict-grid, .verdict-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-links { position: fixed; top: 60px; left: 0; right: 0; background: var(--green-deep); flex-direction: column; align-items: flex-start; padding: 44px 24px 20px; gap: 16px; display: none; border-top: 1px solid rgba(255,255,255,0.1); }
  .nav-links.open { display: flex; }
  .burger { display: flex; }
  .logo { width: 76px; height: 76px; margin-bottom: -36px; }
  .logo img { width: 56px; }
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; }
}
@media (max-width: 680px) {
  .category-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 72px; }
  .section { padding: 52px 0; }
  article.pillar { padding: 40px 18px 16px; }
  .pillar-figure img { height: 220px; }
  .founder-card { flex-direction: column; text-align: center; }
}
