/*
Theme Name:   Rootworth Child
Theme URI:    https://rootworth.org
Description:  Child theme for Rootworth on astra. Generated by spidey-wp-theme v0.1.0 from domain/rootworth/DESIGN.md. Do not hand-edit — regenerate via `python3 skills/spidey-wp-theme/scripts/generate.py --brand rootworth`.
Author:       Voodoo (via Spidey)
Template:     astra
Version:      20260515-1
License:      MIT
Text Domain:  rootworth-child
*/

:root {
  --forest: #2E4732;
  --bark: #3E2C1F;
  --oxblood: #5C2A2A;
  --brass: #8A7E54;
  --parchment: #F4F1E8;
  --bone: #F8F4EC;
  --charcoal: #1A1A1A;
  --moss: #5A6E47;
  --ash: #555555;
}

/* Token-aware baseline overrides. Extend in Elementor / Customizer; this file
   only exposes the brand palette + a few minimal anchor styles so the design
   tokens are reachable from any stylesheet via `var(--forest)` etc. */

body {
  background-color: var(--parchment, #ffffff);
  color: var(--charcoal, #1a1a1a);
}

a {
  color: var(--oxblood, #5C2A2A);
}

a:hover,
a:focus {
  color: var(--forest, #2E4732);
}

::selection {
  background-color: var(--brass, #8A7E54);
  color: var(--bone, #F8F4EC);
}

/* ============================================================
   Chamber layout — side-by-side image/text with alternation
   Applied 2026-05-16 via spidey image pass.
   ============================================================ */

/* Hero: text left, cover image right */
.rw-chamber-hero:has(.rw-chamber-cover) {
  display: grid;
  grid-template-columns: 1fr 280px;
  column-gap: 2rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

.rw-chamber-hero > .rw-chamber-cover {
  grid-column: 2;
  grid-row: 1 / span 5;
  margin: 0;
}

.rw-chamber-hero > .rw-chamber-cover img {
  width: 100%;
  height: auto;
  display: block;
}

/* Body sections: CSS grid, figure left by default */
.rw-chamber-body,
.rw-chamber-pivot {
  display: grid;
  grid-template-columns: minmax(360px, 42%) 1fr;
  column-gap: 2.5rem;
  align-items: start;
  margin: 2rem 0;
}

/* Sections with no image collapse to single column */
.rw-chamber-body:not(:has(figure)),
.rw-chamber-body.rw-alt:not(:has(figure)) {
  display: block;
}

/* h2 sits in the text column at row 1, flush with the top of the figure */
.rw-chamber-body > h2,
.rw-chamber-pivot > h2 {
  grid-column: 2;
  grid-row: 1;
  margin-top: 0;
}

/* Figure spans from row 1 downward so it stays alongside h2 + all text rows */
.rw-chamber-body > figure,
.rw-chamber-pivot > figure {
  grid-column: 1;
  grid-row: 1 / span 20;
  margin: 0;
}

.rw-chamber-body > figure img,
.rw-chamber-pivot > figure img {
  width: 100%;
  height: auto;
  display: block;
}

.rw-chamber-body > p,
.rw-chamber-body > ul,
.rw-chamber-body > table,
.rw-chamber-body > blockquote,
.rw-chamber-pivot > p,
.rw-chamber-pivot > ul,
.rw-chamber-pivot > blockquote {
  grid-column: 2;
}

/* rw-alt: flip — figure right, text left */
.rw-chamber-body.rw-alt,
.rw-chamber-pivot.rw-alt {
  grid-template-columns: 1fr minmax(360px, 42%);
}

.rw-chamber-body.rw-alt > h2,
.rw-chamber-pivot.rw-alt > h2 {
  grid-column: 1;
  grid-row: 1;
  margin-top: 0;
}

.rw-chamber-body.rw-alt > figure,
.rw-chamber-pivot.rw-alt > figure {
  grid-column: 2;
  grid-row: 1 / span 20;
}

.rw-chamber-body.rw-alt > p,
.rw-chamber-body.rw-alt > ul,
.rw-chamber-body.rw-alt > table,
.rw-chamber-body.rw-alt > blockquote,
.rw-chamber-pivot.rw-alt > p,
.rw-chamber-pivot.rw-alt > ul,
.rw-chamber-pivot.rw-alt > blockquote {
  grid-column: 1;
}

/* ============================================================
   Nav page imagery utilities
   ============================================================ */

/* Float-right pull image (Movement declaration poster, Forest monogram) */
.rw-pull-right {
  float: right;
  margin: 0 0 1.5rem 2rem;
  max-width: 260px;
  clear: right;
}

.rw-pull-right img {
  width: 100%;
  height: auto;
  display: block;
}

/* Centered inline figure (Intake tongue mark) */
.rw-inline-figure {
  margin: 1.5rem auto;
  max-width: 200px;
}

.rw-inline-figure img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Tree signature — ghost watermark behind hero text on Home / Movement / Forest */
.rw-hero {
  position: relative;
  overflow: visible;
}

/* Prevent horizontal scroll from tree right-bleed */
body {
  overflow-x: hidden;
}

.rw-tree-accent {
  position: absolute;
  right: -4%;
  top: 0;
  width: 42%;
  max-width: 360px;
  opacity: 0.09;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}

/* Juniper on Movement — narrow tree sits left to balance loud right-aligned headline */
.rw-hero-movement .rw-tree-accent {
  right: auto;
  left: -3%;
  top: 0;
  width: 28%;
  max-width: 240px;
}

/* Mustard on Forest — right side, slightly lower, open branching suits the generative register */
.rw-hero-forest .rw-tree-accent {
  right: -2%;
  top: 0;
  width: 38%;
  max-width: 320px;
}

.rw-hero > *:not(.rw-tree-accent) {
  position: relative;
  z-index: 1;
}

/* ============================================================
   Gallery — centered, enlarged captions
   Applied 2026-05-16
   ============================================================ */

.rw-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2.5rem;
  margin: 2rem 0;
}

.rw-gallery-piece {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rw-gallery-piece img {
  width: 100%;
  height: auto;
  display: block;
}

.rw-gallery-piece figcaption {
  text-align: center;
  padding: 0.75rem 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rw-gallery-title {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.rw-gallery-caption {
  display: block;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ash, #555555);
}

/* ============================================================
   Tree watermark — increased visibility, forest repositioned
   Applied 2026-05-16
   ============================================================ */

/* Boost opacity on all pages so the tree reads through content */
.rw-tree-accent {
  opacity: 0.18;
}

/* Forest: move tree to left so it does not compete with right-side monogram */
.rw-hero-forest .rw-tree-accent {
  right: auto;
  left: -3%;
  top: 0;
  width: 44%;
  max-width: 360px;
}

/* Seeds: mustard tree — right side, similar to original forest */
.rw-hero-seeds .rw-tree-accent {
  right: -2%;
  top: 0;
  width: 38%;
  max-width: 320px;
}

/* Mobile: scale up opacity slightly since tree is smaller */
@media (max-width: 768px) {
  .rw-tree-accent {
    opacity: 0.12;
  }
}

/* ============================================================
   Home oak — full figure, centered, in all its glory
   Applied 2026-05-16
   ============================================================ */

.rw-home-oak {
  margin: 2rem auto 2rem;
  max-width: 560px;
  text-align: center;
}

.rw-home-oak img {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  opacity: 1;
}

@media (max-width: 768px) {
  .rw-home-oak {
    max-width: 80vw;
    margin: 1.5rem auto;
  }
}

/* ============================================================
   Header — logo size + site title
   Chop was oversized (~40% header width), collapsing nav to two rows
   and wrapping the site title text. Logo constrained to 85px; site
   title hidden (chop already carries the brand name).
   Applied 2026-05-16
   ============================================================ */

.site-header .custom-logo,
.site-header img.custom-logo,
.ast-site-identity .custom-logo {
  max-width: 85px;
  height: auto;
}

/* Chop already shows "ROOT WORTH apothecary" — hide duplicate text */
.ast-site-identity .site-title,
.site-branding .site-title {
  display: none;
}

/* Mobile overrides */
@media (max-width: 768px) {
  .rw-chamber-hero:has(.rw-chamber-cover),
  .rw-chamber-body,
  .rw-chamber-body.rw-alt,
  .rw-chamber-pivot,
  .rw-chamber-pivot.rw-alt {
    display: block;
  }

  .rw-chamber-hero > .rw-chamber-cover,
  .rw-chamber-body > figure,
  .rw-chamber-pivot > figure {
    margin: 1rem 0;
  }

  .rw-pull-right {
    float: none;
    margin: 1rem auto;
    max-width: 180px;
    display: block;
  }

  .rw-tree-accent {
    opacity: 0.05;
    width: 65%;
    right: -8%;
    top: 0;
  }
}

/* ── Rootworth Radio ─────────────────────────────────────────── */
#rw-radio {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 50px;
  background: var(--charcoal, #1A1A1A);
  border-top: 1px solid var(--brass, #8A7E54);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  z-index: 9999;
  box-sizing: border-box;
}

#rw-radio-btn {
  background: none;
  border: 1px solid var(--brass, #8A7E54);
  color: var(--parchment, #F4F1E8);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  line-height: 34px;
  text-align: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
  padding: 0;
}
#rw-radio-btn:hover,
#rw-radio-btn.playing { background: var(--brass, #8A7E54); color: var(--charcoal, #1A1A1A); }

.rw-radio-label {
  color: var(--parchment, #F4F1E8);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
}

.rw-radio-track {
  margin-left: auto;
  color: var(--brass, #8A7E54);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
}

body { padding-bottom: 52px !important; }

/* ---------------------------------------------------------------------------
   Cinnabar intake CTA — launch-week intake-findability (2026-05-18 evening).
   Surfaces a prominent 'Begin an intake' button at the top of every page
   except /intake-process itself, output via astra_primary_content_top action.
   Cinnabar #A04020 chosen to visually pop against the parchment/oxblood palette
   without competing with body oxblood text.
   --------------------------------------------------------------------------- */

/* Hide Astra's rendered WP post_title on pages — every Rootworth page has its
   own styled hero heading (rw-eyebrow + h1), making the entry-header a duplicate. */
.page .entry-header {
  display: none;
}

.rw-intake-button-wrap {
  text-align: center;
  margin: 20px auto 16px;
  padding: 0 24px;
}
.rw-intake-button {
  display: inline-block;
  padding: 14px 32px;
  background: #A04020;
  color: #F4F1E8 !important;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none !important;
  border-radius: 4px;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 2px 6px rgba(160, 64, 32, 0.20);
}
.rw-intake-button:hover {
  background: #8B3618;
  color: #F4F1E8 !important;
  transform: translateY(-1px);
}
@media (max-width: 640px) {
  .rw-intake-button {
    display: block;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    padding: 16px 24px;
  }
}

/* Cinnabar nav highlight for the Intake menu item (custom class cta-intake) */
.cta-intake > a.menu-link,
.menu-item.cta-intake > a {
  color: #A04020 !important;
  font-weight: 700;
}

/* ── Conditions page featured image hero (added 2026-05-19) ── */
.rw-condition-hero {
    margin: 0 0 2.5rem;
    padding: 0;
    line-height: 0;
}
.rw-condition-hero-img {
    display: block;
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
}
@media (max-width: 768px) {
    .rw-condition-hero-img {
        max-height: 280px;
    }
}
/* ── Chamber card accent images + inline numeral (updated 2026-05-19) ── */
.rw-chamber-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 0.6rem;
}
.rw-chamber-accent {
    width: 150px;
    height: 150px;
    object-fit: cover;
    object-position: center;
    border-radius: 3px;
    flex-shrink: 0;
    opacity: 0.93;
}
.rw-chamber-heading .rw-chamber-numeral {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #8A7E54;
    flex-shrink: 0;
    margin: 0;
    line-height: 1;
}
.rw-chamber-heading h2 {
    margin: 0;
}


/* ── Nav alignment — left-anchor after logo, remove far-right push (2026-06-02) ── */
/* Astra header builder uses space-between on ast-builder-grid-row; switch to flex-start */
.ast-builder-grid-row-has-sides.ast-builder-grid-row-no-center {
  justify-content: flex-start !important;
}
.site-header-primary-section-left.site-header-section-left {
  flex: 0 0 auto !important;
}
.site-header-primary-section-right.ast-grid-right-section {
  flex: 1 !important;
  justify-content: flex-start !important;
  margin-left: 2rem !important;
}
.site-header-primary-section-right .main-header-menu {
  justify-content: flex-start;
}

