/* ============================================================
   SELENE BUILDS THINGS — text colour fixes
   Replaces the earlier caption-only block. Paste the whole thing.

   Kadence assigns several TEXT colours to palette slots that hold
   LIGHT colours, which makes them invisible on a bone page:
     archive post titles -> palette8 (Bone)   1.06:1 on white
     category links      -> palette6 (Blush)  1.13:1 on bone
     captions            -> palette5 (Lime)   1.10:1 on bone
   ============================================================ */


/* --- 1. CAPTIONS -> Drift ---------------------------------- */
/* Kadence's rule also covers .wp-block-table figcaption, which the
   previous version of this block missed — that's the lime caption
   that survived. */

.wp-block-image figcaption,
.wp-block-kadence-image figcaption,
.wp-block-table figcaption,
.wp-block-gallery figcaption,
.blocks-gallery-caption figcaption,
.wp-block-embed figcaption,
.wp-caption-text,
.wp-element-caption {
  color: #57544D;
}

/* Slideshow captions sit on a dark overlay — leave them light. */
.wp-block-jetpack-slideshow figcaption,
.wp-block-jetpack-slideshow_caption {
  color: #FFFFFF;
}


/* --- 2. BLOG ARCHIVE POST TITLES -> Charcoal --------------- */
/* These are headings, so they take full charcoal. Deep Sea on hover
   rather than rust: rust is the urgency colour and stops meaning
   anything if it becomes a general hover state. */

.loop-entry.type-post h2.entry-title,
.loop-entry.type-post h2.entry-title a,
.loop-entry .entry-title a {
  color: #131313;
}

.loop-entry.type-post h2.entry-title a:hover,
.loop-entry .entry-title a:hover {
  color: #0A5250;
}


/* --- 3. CATEGORY & TAG LINKS -> Drift ---------------------- */
/* Categories are metadata, and Drift is the metadata colour. */

.post-title .entry-taxonomies,
.post-title .entry-taxonomies a,
.loop-entry.type-post .entry-taxonomies,
.loop-entry.type-post .entry-taxonomies a,
.entry-taxonomies .category-links a,
.entry-taxonomies .term-links a {
  color: #57544D;
}

.post-title .entry-taxonomies a:hover,
.loop-entry.type-post .entry-taxonomies a:hover,
.entry-taxonomies .category-links a:hover,
.entry-taxonomies .term-links a:hover {
  color: #131313;
}

/* The "#" before tag names was lime too. */
.tag-hash {
  color: #57544D;
}


/* --- 4. PILL-STYLE CATEGORIES ------------------------------ */
/* If a category ever renders as a filled pill, its text is white on
   an unknown fill. Force charcoal-on-lime, which is 14.7:1. */

.entry-taxonomies .category-style-pill a,
.loop-entry.type-post .entry-taxonomies .category-style-pill a {
  color: #131313;
  background-color: #D6F24B;
}

/* --- 5. HOME HERO OVERLAY ------------------------------------ */
/* The Deep Sea strip only clears the text at full desktop width.
   Below 1024px the hero columns stack full width and body copy
   runs over the teal, so hide the overlay there. */

@media (max-width: 1024px) {
  .kb-row-layout-id6988_268f62-1f > .kt-row-layout-overlay {
    display: none !important;
  }
}

/* --- 6. SIDEBAR CATEGORY LIST ------------------------------- */
/* The categories block already outputs a real hierarchy, the theme
   just renders every level flush left, so it reads as one long list.
   Indent the sub-levels, and hide the five ORC year archives.
   One Room Challenge (cat 23846) stays and still holds all 52 posts. */

.wp-block-categories-list ul.children {
  padding-left: 1.1em;
}

.wp-block-categories-list .cat-item-23846 > ul.children {
  display: none;
}


/* ============================================================
   Palette 5 (Lime #d6f24b) leaking into muted text
   ============================================================
   Kadence uses palette slot 5 for muted secondary text. This
   palette puts the lime accent in slot 5, so muted elements
   render lime on a light page. The caption rule above already
   covers image, gallery, table and embed captions. These are the
   ones it missed.

   Tag links were confirmed rendering lime on white on the live
   site. Audio captions, video captions and blockquote citations
   come from the same Kadence rule, so they are covered here too.
   Added 13 Sep 2026. */

.entry-tags a.tag-link,
.wp-block-audio figcaption,
.wp-block-video figcaption,
blockquote cite,
blockquote .wp-block-pullquote__citation {
  color: #57544d;
}

.entry-tags a.tag-link:hover {
  color: #131313;
}

/* ---------- Projects ---------- */

/* The project title runs as a full width banner inside the content card.
   The negative margins match Kadence's .entry-content-wrap padding exactly:
   4rem desktop, 2rem to 1024, 1.5rem to 767. Figtree 900 centred on
   charcoal, with a lime rule under it. Added 16 Sep 2026. */

body.single-project .entry-header.project-title {
  margin: -4rem -4rem 3rem;
  padding: 4rem 2.5rem;
  background-color: #131313;
  border-bottom: 6px solid #d6f24b;
  text-align: center;
}

body.single-project .entry-header.project-title .entry-title {
  font-family: Figtree, sans-serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 5vw, 4rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: #f2efe9;
  text-align: center;
  margin: 0;
}

@media (max-width: 1024px) {
  body.single-project .entry-header.project-title {
    margin: -2rem -2rem 2.25rem;
    padding: 3rem 1.75rem;
  }
}

@media (max-width: 767px) {
  body.single-project .entry-header.project-title {
    margin: -1.5rem -1.5rem 2rem;
    padding: 2.5rem 1.25rem;
  }
}

/* Links sitting on a dark ground. Kadence colours links Deep Sea with a
   rust hover, and rust on Deep Sea is 1.53 to 1, which is invisible.
   Bone at rest and lime on hover clear AA on Deep Sea, charcoal and rust
   alike. Scoped to projects. The same leak exists site wide.
   Added 16 Sep 2026. */

body.single-project .has-theme-palette1-background-color a:not(.wp-block-button__link),
body.single-project .has-theme-palette2-background-color a:not(.wp-block-button__link),
body.single-project .has-theme-palette3-background-color a:not(.wp-block-button__link) {
  color: #f2efe9;
}

body.single-project .has-theme-palette1-background-color a:not(.wp-block-button__link):hover,
body.single-project .has-theme-palette2-background-color a:not(.wp-block-button__link):hover,
body.single-project .has-theme-palette3-background-color a:not(.wp-block-button__link):hover {
  color: #d6f24b;
}

/* The video card on a project page. Everything inside the cover is
   centred, because the heading's alignment attribute does not survive
   the save on this theme. Added 16 Sep 2026. */

body.single-project .wp-block-cover .wp-block-cover__inner-container,
body.single-project .wp-block-cover .wp-block-cover__inner-container > * {
  text-align: center;
}

/* Build plan products on a project page. Woo renders the plan drawing at
   500px square, which makes a secondary section taller than the project
   itself. Kadence sets width 100% on the loop image, so the cap has to
   match that selector's weight. Added 16 Sep 2026. */

body.single-project .wp-block-handpicked-products .wc-block-grid__products .woocommerce-loop-image-link img {
  width: auto;
  max-height: 220px;
  margin-inline: auto;
}

body.single-project .wp-block-handpicked-products .wc-block-grid__product-title {
  font-size: 1.05rem;
}

/* Hero titles on landing pages like Portfolio. Instrument Serif is the
   blog h1. A page hero is a statement, so it takes Figtree 900, same as
   the project banner. Added 17 Sep 2026. */

.sbt-hero-title {
  font-family: Figtree, sans-serif;
  font-weight: 900;
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
}

/* Portfolio build notes: visible to Selene only, never to visitors.
   Always visible inside the block editor so pages are editable. */
.sbt-todo { display: none !important; }
body.logged-in .sbt-todo,
.editor-styles-wrapper .sbt-todo,
.block-editor-iframe__body .sbt-todo { display: block !important; }
body.logged-in .sbt-todo::before {
  content: "ONLY YOU CAN SEE THIS";
  display: block;
  font-family: Figtree, sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
  color: #d6f24b;
}
.editor-styles-wrapper .sbt-todo::before,
.block-editor-iframe__body .sbt-todo::before { content: none; }