:root {
  --header-height: 88px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  padding-top: var(--header-height);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-surface-strong);
  margin: 0 0 0.5em;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-strong); }

p { margin: 0 0 1em; }

.lead { font-size: 1.15rem; color: var(--color-text-muted); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.button {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-small);
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
}
.button--primary { background: var(--color-accent); color: #fff; }
.button--primary:hover { background: var(--color-accent-strong); color: #fff; }
.button--secondary { background: transparent; border-color: var(--color-accent); color: var(--color-accent); }
.button--secondary:hover { background: var(--color-accent); color: #fff; }
.button--gold { background: var(--color-gold); color: var(--color-surface-strong); }
.button--gold:hover { filter: brightness(0.92); }
.button--small { padding: 0.55rem 1.1rem; font-size: 0.9rem; }

/* ---------------------------------------------------------------------- */
/* Header / nav                                                           */
/* ---------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.site-header__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1.5rem;
}

.site-logo a {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--color-surface-strong);
}
.site-logo__tagline {
  margin: 0;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.site-nav { flex: 1; }
.site-nav > ul { list-style: none; display: flex; gap: 1.75rem; margin: 0; padding: 0; }
.site-nav__item { position: relative; }
.site-nav__item > a {
  display: flex; align-items: center; gap: 0.35rem;
  color: var(--color-text); font-weight: 600; font-size: 0.92rem;
  padding: 0.5rem 0;
}
.site-nav__item > a:hover { color: var(--color-accent); }
.nav-chevron {
  width: 0; height: 0; margin-top: 2px;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

/* Dropdown: padding-top bridges the gap so hover-intent never sees a dead zone */
.nav-dropdown {
  list-style: none;
  margin: 0; padding: 0.75rem 0 0.5rem;
  position: absolute; top: 100%; left: -1rem;
  min-width: 240px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-card);
  display: none;
}
.nav-dropdown::before {
  content: '';
  position: absolute; top: -0.75rem; left: 0; right: 0; height: 0.75rem;
}
.nav-dropdown li a {
  display: block; padding: 0.55rem 1.25rem; color: var(--color-text); font-size: 0.9rem;
}
.nav-dropdown li a:hover { background: var(--color-panel-soft); color: var(--color-accent); }

.site-nav__item--has-dropdown.is-open .nav-dropdown,
.site-nav__item--has-dropdown:focus-within .nav-dropdown { display: block; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none; border: 0; cursor: pointer; padding: 0.4rem;
}
.nav-hamburger span {
  display: block; width: 24px; height: 2px; background: var(--color-surface-strong);
}
.nav-hamburger__label {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; color: var(--color-surface-strong);
  margin-top: 2px;
}

.nav-cta { white-space: nowrap; }

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-cta { display: none; }

  .site-nav {
    display: none;
    position: fixed;
    top: var(--header-height); left: 0; right: 0; bottom: 0;
    background: var(--color-surface);
    overflow-y: auto;
    padding: 1rem 1.5rem 2rem;
    z-index: 99;
  }
  .site-nav.is-open { display: block; }
  .site-nav > ul { flex-direction: column; gap: 0; }
  .site-nav__item { border-bottom: 1px solid var(--color-border); }
  .site-nav__item > a { font-size: 1.3rem; padding: 0.85rem 0; justify-content: space-between; }

  .nav-dropdown {
    position: static; display: none; box-shadow: none; border: none;
    background: var(--color-panel-soft); border-radius: var(--radius-small);
    margin: 0 0 0.5rem;
  }
  .site-nav__item--has-dropdown.is-open .nav-dropdown { display: block; }
  .nav-dropdown li a { font-size: 1.1rem; padding: 0.6rem 1rem; }
}

/* ---------------------------------------------------------------------- */
/* Breadcrumbs                                                            */
/* ---------------------------------------------------------------------- */

.breadcrumbs { max-width: var(--content-width); margin: 1.25rem auto 0; padding: 0 1.5rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; font-size: 0.85rem; color: var(--color-text-muted); }
.breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: 0.4rem; }

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */

.hero {
  max-width: var(--content-width);
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}
.hero .eyebrow { color: var(--color-accent); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.85rem; }
.hero h1 { font-size: 3.2rem; }
.hero .buttons { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero__art svg { width: 100%; height: auto; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero__art { order: -1; max-width: 280px; margin: 0 auto; }
}

/* ---------------------------------------------------------------------- */
/* Trust strip                                                            */
/* ---------------------------------------------------------------------- */

.trust-strip {
  max-width: var(--content-width);
  margin: 0 auto 3rem;
  padding: 1.75rem;
  background: var(--color-surface);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.trust-strip__title { font-weight: 700; color: var(--color-surface-strong); margin-bottom: 0.25rem; }
.trust-strip__item p:last-child { margin-bottom: 0; color: var(--color-text-muted); font-size: 0.92rem; }

@media (max-width: 700px) {
  .trust-strip { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------------- */
/* Shared section layout                                                  */
/* ---------------------------------------------------------------------- */

.section-intro, .topic-cards, .latest-articles, .checklist-cta {
  max-width: var(--content-width);
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
}
.section-intro { text-align: center; max-width: 760px; }
.section-heading { text-align: left; margin-bottom: 1.5rem; }

.latest-articles__heading-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.5rem; }
.latest-articles__heading-row .section-heading { margin: 0; }

/* ---------------------------------------------------------------------- */
/* Topic cards                                                            */
/* ---------------------------------------------------------------------- */

.topic-cards__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.topic-card {
  display: block;
  background: var(--color-surface);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
  color: var(--color-text);
}
.topic-card__title { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; color: var(--color-surface-strong); }
.topic-card__link { color: var(--color-accent); font-weight: 600; }

@media (max-width: 900px) { .topic-cards__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .topic-cards__grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------- */
/* Article cards                                                          */
/* ---------------------------------------------------------------------- */

.latest-articles__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.article-card {
  background: var(--color-surface);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
}
.article-card__tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; color: var(--color-accent); }
.article-card a h3 { margin: 0.35rem 0; }
.read-more { font-weight: 600; }

@media (max-width: 900px) { .latest-articles__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .latest-articles__grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------- */
/* Checklist CTA banner                                                   */
/* ---------------------------------------------------------------------- */

.checklist-cta {
  background: var(--color-surface-strong);
  color: #f4f1e8;
  border-radius: var(--radius-large);
  padding: 2.5rem;
  text-align: center;
}
.checklist-cta h2 { color: #fff; }
.checklist-cta p { color: rgba(244,241,232,0.8); }

.email-optin { display: flex; gap: 0.75rem; max-width: 460px; margin: 1.25rem auto 0.5rem; flex-wrap: wrap; justify-content: center; }
.email-optin input[type="email"] {
  flex: 1; min-width: 220px; padding: 0.85rem 1rem; border-radius: var(--radius-small);
  border: 1px solid var(--color-border);
}
.email-optin__note { font-size: 0.8rem; color: rgba(244,241,232,0.6); }
.form-success { color: #b8e0a8; font-weight: 600; }
.form-error { color: #f0a8a8; font-weight: 600; }

/* ---------------------------------------------------------------------- */
/* Content layout (article/category with sidebar)                         */
/* ---------------------------------------------------------------------- */

.content-layout {
  max-width: var(--content-width);
  margin: 2.5rem auto 4rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 3rem;
  align-items: start;
}
.page, .faq-page, .glossary-index, .glossary-term, .directory-index, .directory-listing, .library {
  max-width: 840px;
  margin: 2.5rem auto 4rem;
  padding: 0 1.5rem;
}

.article__category { text-transform: uppercase; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; }
.article__meta { color: var(--color-text-muted); font-size: 0.9rem; }
.article__body h2 { margin-top: 2rem; }

.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar__block {
  background: var(--color-panel-soft);
  border-radius: var(--radius-medium);
  padding: 1.25rem;
}
.sidebar__block-title { font-weight: 700; color: var(--color-surface-strong); margin-bottom: 0.5rem; }
.sidebar__block--links ul { padding-left: 1.1rem; margin: 0; }

.author-bio {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border);
}
.author-bio__name { font-weight: 700; margin-bottom: 0; }
.author-bio__role { color: var(--color-text-muted); font-size: 0.85rem; margin-top: 0; }

.related-articles { margin-top: 2.5rem; }
.related-articles ul { padding-left: 1.1rem; }

@media (max-width: 900px) {
  .content-layout { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------- */
/* FAQ                                                                     */
/* ---------------------------------------------------------------------- */

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}
.faq-item summary { font-weight: 600; cursor: pointer; }
.faq-item__answer { margin-top: 0.75rem; color: var(--color-text-muted); }

/* ---------------------------------------------------------------------- */
/* Glossary                                                                */
/* ---------------------------------------------------------------------- */

.glossary-index__list { list-style: none; padding: 0; }
.glossary-index__list li { padding: 0.9rem 0; border-bottom: 1px solid var(--color-border); }
.callout {
  background: var(--color-panel-soft); border-left: 4px solid var(--color-accent);
  padding: 1rem 1.25rem; border-radius: 0 var(--radius-small) var(--radius-small) 0;
  font-weight: 600;
}
.glossary-term__eyebrow { margin-bottom: 1rem; }
.glossary-term__aka { color: var(--color-text-muted); font-style: italic; }
.glossary-term__section { margin-top: 1.5rem; }

/* ---------------------------------------------------------------------- */
/* Library                                                                 */
/* ---------------------------------------------------------------------- */

.library__section { margin-bottom: 2.5rem; }
.library__topic-list, .library__article-list { columns: 2; padding-left: 1.1rem; }
@media (max-width: 600px) { .library__topic-list, .library__article-list { columns: 1; } }

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer {
  background: var(--color-surface-strong);
  color: rgba(244,241,232,0.85);
  padding: 3.5rem 2rem 2rem;
}
.site-footer__inner { max-width: var(--content-width); margin: 0 auto; }
.site-footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(244,241,232,0.15);
}
.site-footer__brand-name { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; color: #fff; }
.site-footer__tagline { color: rgba(244,241,232,0.65); font-size: 0.9rem; }
.site-footer__col-heading { font-weight: 700; color: #fff; margin-bottom: 0.75rem; }
.site-footer__links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.site-footer__links a { color: rgba(244,241,232,0.75); }
.site-footer__links a:hover { color: var(--color-gold); }
.site-footer__bottom { padding-top: 1.5rem; font-size: 0.85rem; color: rgba(244,241,232,0.55); }

@media (max-width: 900px) {
  .site-footer__top { grid-template-columns: 1fr 1fr; }
  .site-footer__top > *:first-child { grid-column: 1 / -1; }
}

/* Mobile footer: single column, all text/links at ~2x size */
@media (max-width: 640px) {
  .site-footer { padding: 2.5rem 1rem 1.5rem; }
  .site-footer__top { grid-template-columns: 1fr; gap: 2rem; }
  .site-footer__brand-name { font-size: 2rem; }
  .site-footer__tagline { font-size: 1.6rem; }
  .site-footer__col-heading { font-size: 1.9rem; }
  .site-footer__links a { font-size: 1.8rem; }
  .site-footer__bottom { font-size: 1.6rem; }
}
