:root {
  --text: #606060;
  --text-muted: #6a6a6a;
  --white: #ffffff;
  --grey: #f6f6f6;
  --grey-border: #0e0e0e;
  --navy: #153d64;
  --navy-dark: #0e2840;
}

/* ── Reset & base ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; height: 100%; }

body {
  font-family: 'Outfit', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

button, input { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ── Layout helpers ── */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-dark);
  color: var(--white);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Narrow centered block — for use inside .section-content (no padding of its own) */
.narrow {
  max-width: 740px;
  margin: 0 auto;
}

/* Generic content pages (about, privacy, terms, etc.) */
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 64px 24px;
}
.page-content h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
}
.page-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* ── Header ── */
header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
}
.logo:hover { color: rgba(255,255,255,0.8); }

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
}
.nav-links a:hover { color: var(--white); }

.nav-cta {
  background: var(--white);
  color: var(--navy) !important;
  padding: 8px 18px;
  border-radius: 4px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--grey) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--white);
}

/* ── Footer ── */
footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  font-size: 0.82rem;
  gap: 12px;
}

.footer-links { display: flex; gap: 20px; }

.footer-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.82rem;
}
.footer-links a:hover { color: var(--white); }

/* ── Content sections — shared by every page (home, learn, tools, templates) ── */
.section-content {
  padding: 72px 0;
}

.section-content + .section-content {
  border-top: 1px solid var(--grey-border);
}

.section-navy { background: var(--navy); }
.section-grey { background: var(--grey); }

/* ── Section typography ── */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-navy .eyebrow { color: rgba(255,255,255,0.45); }
.section-grey .eyebrow { color: var(--text-muted); }

/* Filled "pill" eyebrow treatment — reusable on any page (was homepage-only before) */
.eyebrow.eyebrow-pill {
  display: inline-block;
  padding: 8px 14px;
  background: var(--navy);
  color: var(--white);
  border-radius: 4px;
}

.section-content h1,
.section-content h2 {
  font-weight: 800;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.section-navy h1,
.section-navy h2 { color: var(--white); }

.section-grey h1,
.section-grey h2 { color: var(--text); }

.lead {
  font-size: 1rem;
  line-height: 1.65;
  max-width: 52ch;
  margin-bottom: 40px;
}

.section-navy .lead { color: rgba(255,255,255,0.6); }
.section-grey .lead { color: var(--text-muted); }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.93rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-light {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}
.btn-light:hover { background: var(--grey); border-color: var(--grey); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn-outline:hover { border-color: var(--white); }

.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-navy:hover { background: var(--navy-dark); border-color: var(--navy-dark); }

/* ── Cards & grids (templates, tools) ── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: 5px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.card-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 10px;
}
.card-tag.free { color: var(--text-muted); }

.card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 8px;
}

.card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 18px;
}

.card-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--grey-border);
  padding-top: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.card-price a {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--navy);
  border: 1px solid var(--navy);
  padding: 6px 14px;
  border-radius: 4px;
  text-decoration: none;
}
.card-price a:hover { background: var(--navy); color: var(--white); }

/* ── Series sub-headings within a category listing (e.g. "CRE 101") ── */
.section-content .series-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 16px;
}
.section-content .series-heading + .post-list { margin-bottom: 8px; }

/* ── Post list (teasers — used on home and learn index pages) ── */
.post-list { display: grid; }

.post {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--grey-border);
  align-items: start;
}
.post:first-child { padding-top: 0; }
.post:last-child { border-bottom: none; padding-bottom: 0; }

.post-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  padding-top: 3px;
}

.post h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.35;
}

.post h3 a { color: var(--text); text-decoration: none; }
.post h3 a:hover { color: var(--navy); }

.post p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.55; }

.more-link { margin-top: 28px; }
.more-link a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}
.more-link a:hover { text-decoration: underline; }

/* ── Individual blog post pages (e.g. /learn/cre/101/what-is-cre/) ── */
.post-body {
  background: var(--white);
  padding-bottom: 80px;
}

.post-wrap { max-width: 740px; }

.post-header {
  padding: 56px 0 36px;
  border-bottom: 1px solid var(--grey-border);
  margin-bottom: 44px;
}

.post-meta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.post-header h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 16px;
}

.post-lead {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.post-body h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 44px 0 12px;
}

.post-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 10px;
}

.post-body p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 22px;
}

.post-body ul,
.post-body ol {
  margin: 0 0 22px 24px;
  color: var(--text);
  line-height: 1.8;
}

.post-body li { margin-bottom: 6px; }
.post-body strong { font-weight: 700; color: var(--text); }
.post-body a { color: var(--navy); }

.callout {
  background: var(--grey);
  border-left: 3px solid var(--navy);
  padding: 18px 22px;
  margin: 32px 0;
}
.callout p { margin-bottom: 0; font-size: 0.97rem; }

.post-back {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 20px 0 0;
  text-decoration: none;
}
.post-back:hover { color: var(--navy); }

.post-cta {
  background: var(--navy);
  border-radius: 5px;
  padding: 28px 32px;
  margin: 56px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.post-cta h3 { font-size: 1.05rem; font-weight: 700; color: var(--white); margin: 0 0 4px; }
.post-cta p { font-size: 0.9rem; color: rgba(255,255,255,0.65); margin: 0; }
.post-cta .btn-light { flex-shrink: 0; }

/* ── Forms (contact form, etc.) ── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.section-navy .form-group label {
  color: rgba(255, 255, 255, 0.85);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--grey-border);
  border-radius: 4px;
  font-size: 0.93rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--navy);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form {
  max-width: 480px;
}

.form-success {
  display: none;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: 5px;
  padding: 24px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.form-success.visible { display: block; }
.contact-form.hidden { display: none; }

/* ── Coming soon ── */
.coming-soon {
  max-width: 700px;
  margin: 80px auto;
  padding: 0 24px;
}
.coming-soon h1 { margin-bottom: 1rem; }
.coming-soon .lead { margin-bottom: 1.5rem; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .grid-3 { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; gap: 4px; }
  .post-date { order: 2; }
}

@media (max-width: 680px) {
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--navy-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 20px;
    gap: 14px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-cta { width: 100%; text-align: center; }
  .section-content { padding: 52px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}