/*
Theme Name: Income Toolkit Child
Theme URI: https://theincometoolkit.com/
Description: Child theme of Astra for The Income Toolkit. Holds brand-aligned CSS, shortcodes, and PHP overrides. Palette + typography track the Brand Bible.
Author: The Income Toolkit
Template: astra
Version: 0.2.0
Text Domain: income-toolkit-child
*/

/* =============================================================
   Brand tokens — The Income Toolkit (April 2026 palette refresh)
   Five-colour palette: navy / cerulean / burnt orange / pale lavender / mint cream.
   Three pillars: EARN (cerulean), SPEND (navy, grounded), LIVE (burnt orange).
   Pale lavender is the light accent — eyebrows on dark bg, hover tints.
   ============================================================= */
:root {
  --itk-navy:     #0D1821;   /* primary dark — body text, dark sections, SPEND accent */
  --itk-teal:     #007BA7;   /* EARN — CTAs, links, highlights (kept var name for back-compat) */
  --itk-coral:    #C04000;   /* LIVE — warm accent, emphasis */
  --itk-lavender: #D8DCFF;   /* light accent — eyebrows on dark bg, hover tints */
  --itk-cream:    #EEF4ED;   /* page + section background */
  --itk-charcoal: #0D1821;   /* alias for body text */
  --itk-white:    #FFFFFF;
  --itk-border:   rgba(13,24,33,0.12);  /* subtle hairline from navy */
  --itk-muted:    #6b7280;

  /* Aliases used across the site */
  --itk-primary:  var(--itk-navy);
  --itk-accent:   var(--itk-teal);
  --itk-ink:      var(--itk-charcoal);
  --itk-bg:       var(--itk-cream);
  --itk-card:     var(--itk-white);

  --itk-font-head: "Poppins", "Montserrat", system-ui, -apple-system, sans-serif;
  --itk-font-body: "DM Sans", "Source Sans 3", system-ui, -apple-system, sans-serif;
  --itk-font-accent: "Playfair Display", Georgia, serif;
}

/* Base typography */
body,
.ast-container {
  font-family: var(--itk-font-body);
  color: var(--itk-ink);
}
h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
  font-family: var(--itk-font-head);
  letter-spacing: -0.01em;
  color: var(--itk-navy);
}
.itk-lede,
blockquote {
  font-family: var(--itk-font-accent);
  font-style: italic;
}

/* Page background */
body {
  background: var(--itk-cream);
}
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post,
.site-content .ast-container {
  background: transparent;
}

/* =============================================================
   Pillar accent classes — apply to any block, Astra col, etc.
   Usage: <section class="itk-pillar itk-pillar--earn">…</section>
   ============================================================= */
.itk-pillar { border-top: 4px solid var(--itk-navy); padding-top: 1rem; }
.itk-pillar--earn  { border-color: var(--itk-teal); }
.itk-pillar--spend { border-color: var(--itk-navy); }
.itk-pillar--live  { border-color: var(--itk-coral); }

.itk-pillar h3,
.itk-pillar .itk-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 .5rem;
}
.itk-pillar--earn  h3, .itk-pillar--earn  .itk-eyebrow { color: var(--itk-teal);  }
.itk-pillar--spend h3, .itk-pillar--spend .itk-eyebrow { color: var(--itk-navy);  }
.itk-pillar--live  h3, .itk-pillar--live  .itk-eyebrow { color: var(--itk-coral); }

/* =============================================================
   Resources Library grid
   ============================================================= */
.itk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.itk-card {
  background: var(--itk-card);
  border: 1px solid var(--itk-border);
  border-radius: 12px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.itk-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -20px rgba(27,42,74,.35);
}
.itk-card h3 {
  margin: 0;
  font-family: var(--itk-font-head);
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--itk-navy);
}
.itk-card p.itk-desc {
  color: var(--itk-muted);
  font-size: .92rem;
  margin: 0;
  flex: 1;
  font-family: var(--itk-font-body);
  font-style: normal;
}
.itk-badge {
  display: inline-block;
  padding: .2rem .6rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 999px;
  font-family: var(--itk-font-head);
}
.itk-badge--free   { background: rgba(42,157,143,.12);  color: #147568; border: 1px solid rgba(42,157,143,.35); }
.itk-badge--member { background: rgba(233,196,106,.2);  color: #7a5b15; border: 1px solid rgba(233,196,106,.5); }
.itk-badge--locked { background: rgba(107,144,128,.12); color: var(--itk-muted); border: 1px solid rgba(107,144,128,.35); }
.itk-badge--format { background: transparent; color: var(--itk-muted); border: 1px solid var(--itk-border); font-weight: 500; }

.itk-card .itk-meta { display: flex; gap: .4rem; flex-wrap: wrap; }

.itk-card .itk-cta {
  margin-top: .5rem;
  display: inline-block;
  text-align: center;
  padding: .6rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  font-family: var(--itk-font-head);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.itk-card .itk-cta--primary { background: var(--itk-teal); color: var(--itk-white); }
.itk-card .itk-cta--primary:hover { background: #1f7f74; color: var(--itk-white); }
.itk-card .itk-cta--ghost   { background: transparent; color: var(--itk-navy); border: 1px solid var(--itk-navy); }
.itk-card .itk-cta--ghost:hover { background: var(--itk-navy); color: var(--itk-white); }
.itk-card .itk-cta--locked  { background: transparent; color: var(--itk-muted); border: 1px dashed var(--itk-border); pointer-events: none; }

/* Filter bar */
.itk-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.5rem 0;
  font-family: var(--itk-font-head);
}
.itk-filter button {
  background: var(--itk-card);
  border: 1px solid var(--itk-border);
  border-radius: 999px;
  padding: .45rem 1.1rem;
  cursor: pointer;
  font-size: .9rem;
  color: var(--itk-ink);
  font-family: inherit;
  transition: all .15s ease;
}
.itk-filter button:hover { border-color: var(--itk-navy); }
.itk-filter button[aria-pressed="true"] {
  background: var(--itk-navy);
  border-color: var(--itk-navy);
  color: var(--itk-white);
}

/* =============================================================
   Hero + pillar showcase sections
   ============================================================= */
.itk-hero {
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(42,157,143,0.08), transparent 60%),
    linear-gradient(180deg, var(--itk-cream), var(--itk-white));
  border-radius: 16px;
  margin: 2rem 0 3rem;
}
.itk-hero .itk-eyebrow {
  display: inline-block;
  font-family: var(--itk-font-head);
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--itk-teal);
  margin-bottom: 1rem;
}
.itk-hero h1 {
  margin: 0 0 1rem;
  font-family: var(--itk-font-head);
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.1;
  color: var(--itk-navy);
}
.itk-hero p.itk-lede {
  color: var(--itk-ink);
  opacity: .85;
  max-width: 44rem;
  margin: 0 auto 2rem;
  font-size: 1.2rem;
  font-family: var(--itk-font-accent);
  line-height: 1.5;
}
.itk-hero .itk-tagline {
  font-family: var(--itk-font-head);
  font-weight: 600;
  letter-spacing: .02em;
  font-size: 1rem;
  color: var(--itk-muted);
  margin-top: 2rem;
}

/* Pillars showcase (4-up) */
.itk-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 3rem;
}
.itk-pillars .itk-pillar {
  background: var(--itk-card);
  border: 1px solid var(--itk-border);
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  text-align: left;
}
.itk-pillars .itk-pillar h3 {
  font-size: 1.1rem;
  margin-top: .25rem;
  color: var(--itk-navy);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 700;
}
.itk-pillars .itk-pillar p {
  margin: .25rem 0 0;
  font-size: .95rem;
  color: var(--itk-muted);
}

/* Buttons (core Gutenberg + Astra) recoloured */
.wp-block-button__link,
.wp-element-button,
.ast-button {
  font-family: var(--itk-font-head);
  font-weight: 600;
  border-radius: 8px;
}
.wp-block-button:not(.is-style-outline) > .wp-block-button__link {
  background-color: var(--itk-teal);
  color: var(--itk-white);
}
.wp-block-button.is-style-outline > .wp-block-button__link {
  border-color: var(--itk-navy);
  color: var(--itk-navy);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
  background-color: var(--itk-navy);
  color: var(--itk-white);
}

/* Link colour across body */
.ast-container a { color: var(--itk-teal); }
.ast-container a:hover { color: var(--itk-navy); }

/* =============================================================
   Header — clean, compact, logo-only
   ============================================================= */
/* Force the logo to a consistent, compact size on every page.
   Constrain BOTH dimensions so a circular/square placeholder can't
   balloon the header. The native asset may be square or wide. */
.site-header .site-branding .custom-logo-link img,
.site-header .ast-header-break-point .custom-logo-link img,
.main-header-bar .custom-logo-link img,
header .custom-logo-link img,
.custom-logo-link img {
  max-width: 140px !important;
  max-height: 56px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}
/* Trim Astra's header padding so the logo breathes but doesn't float */
.ast-primary-header-bar .main-header-bar {
  padding-top: .9rem !important;
  padding-bottom: .9rem !important;
}

/* Kill any lingering site title / tagline from Astra even if the
   theme option flips back on — Logo.png already contains the wordmark */
.site-header .site-title,
.site-header .site-description,
.ast-site-identity .site-title,
.ast-site-identity .site-description {
  display: none !important;
}

/* Header shell: cream-matching, subtle border, tighter padding */
.site-header,
.ast-primary-header-bar {
  background-color: var(--itk-cream) !important;
  border-bottom: 1px solid var(--itk-border);
  box-shadow: none !important;
}
.ast-primary-header-bar .main-header-bar {
  padding-top: .75rem;
  padding-bottom: .75rem;
}

/* Primary nav: use brand font, navy ink, clear spacing */
.main-header-menu,
.main-navigation ul.main-header-menu {
  font-family: var(--itk-font-head) !important;
}
.main-header-menu > li > a,
.ast-builder-menu .menu-item > a {
  color: var(--itk-navy) !important;
  font-weight: 500;
  letter-spacing: .01em;
  padding: .5rem 1rem !important;
}
.main-header-menu > li > a:hover,
.main-header-menu > li.current-menu-item > a,
.ast-builder-menu .menu-item.current-menu-item > a,
.ast-builder-menu .menu-item > a:hover {
  color: var(--itk-teal) !important;
}

/* =============================================================
   Page-level polish — gutters + no duplicate titles
   ============================================================= */
/* Hide entry-title on static pages; content provides its own branded
   heading. Leaves post titles intact on /blog/ and single posts. */
body.page .entry-header .entry-title,
body.page .ast-single-post .entry-header .entry-title,
body.home .entry-header {
  display: none !important;
}

/* Give page content breathing room on the sides.
   Astra's site-content wraps all page output; clamp() keeps a sensible
   gutter on narrow screens and a wider one on desktop. */
.site-content {
  padding-left: clamp(1rem, 3vw, 2rem);
  padding-right: clamp(1rem, 3vw, 2rem);
}

/* Hero: pull top padding up now that the page title is gone */
.home .itk-hero { margin-top: 0; }

/* Inner pages: the first H1/H2 sits too close to the header without the
   entry-title above it. Give it a touch of top room. */
body.page .entry-content > h1:first-child,
body.page .entry-content > h2:first-child {
  margin-top: 1.5rem;
}

/* =============================================================
   Footer — replaces Astra's default copyright with our menu + line
   ============================================================= */
.itk-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.itk-footer-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin: 0;
  padding: 0;
  font-family: var(--itk-font-head);
  font-size: .9rem;
}
.itk-footer-menu a {
  color: var(--itk-ink);
  text-decoration: none;
}
.itk-footer-menu a:hover {
  color: var(--itk-teal);
}
.itk-footer-copy {
  margin: 0;
  color: var(--itk-muted);
  font-size: .85rem;
  font-family: var(--itk-font-body);
}
@media (max-width: 640px) {
  .itk-footer { flex-direction: column; text-align: center; }
  .itk-footer-menu { justify-content: center; }
}

/* Proof / founder teaser block */
.itk-proof {
  background: var(--itk-navy);
  color: var(--itk-white);
  padding: 3rem 1.5rem;
  border-radius: 16px;
  margin: 2rem 0;
  text-align: center;
}
.itk-proof h2 { color: var(--itk-white); }
.itk-proof p  { opacity: .9; max-width: 40rem; margin: 0 auto 1.5rem; }
.itk-proof .wp-block-button__link { background: var(--itk-lavender); color: var(--itk-navy); }
.itk-proof .wp-block-button__link:hover { background: var(--itk-white); color: var(--itk-navy); }

/* =============================================================
   Shop — brand-styled EDD purchase buttons
   Each .itk-buy wrapper re-skins the [purchase_link] shortcode's
   output so only the JS add-to-cart button is shown, the no-JS
   fallback is hidden, and the "already-in-cart" checkout link
   honours its inline display:none.
   ============================================================= */
.itk-buy { margin-top: 8px; }
.itk-buy .edd_download_purchase_form,
.itk-buy .edd_purchase_submit_wrapper,
.itk-buy form { margin: 0; padding: 0; }

/* Hide EDD's no-JS fallback (we target modern browsers; JS is assumed available) */
.itk-buy input.edd-no-js { display: none !important; }
/* The edd_go_to_checkout link comes with style="display:none;" — respect it */
.itk-buy a.edd_go_to_checkout { display: none !important; }

/* The only button we actually show: the primary add-to-cart */
.itk-buy button.edd-add-to-cart {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 14px 28px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  border-radius: 4px !important;
  border: none !important;
  color: var(--itk-white) !important;
  cursor: pointer;
  text-decoration: none !important;
  transition: opacity .15s ease;
  box-shadow: none !important;
  text-shadow: none !important;
}
.itk-buy button.edd-add-to-cart:hover { opacity: 0.9; }
.itk-buy .edd-loading { color: inherit !important; }

/* Pillar tints */
.itk-buy--earn  button.edd-add-to-cart { background: var(--itk-teal)  !important; }
.itk-buy--spend button.edd-add-to-cart { background: var(--itk-navy)  !important; }
.itk-buy--live  button.edd-add-to-cart { background: var(--itk-coral) !important; }
