/* ==========================================================================
   BIMYOURSELF — Official Theme Stylesheet
   Release 0.5 — Design Tokens & Compact Editorial Layout (M3.1 / M3.3 Spec)
   ========================================================================== */

:root {
  /* Colors */
  --paper: #F8F6F2;
  --surface: #FFFFFF;
  --graphite: #202522;
  --text-soft: #526058;
  --form-boundary: #526058;
  --soft-mint: #BFDCCF;
  --mint-ui: #365E4D;
  --mint-ui-hover: #294C3E;
  --soft-pink: #F8E1E8;
  --raspberry: #B94768;
  --raspberry-hover: #9E3754;
  --powder-blue: #BBD7E8;
  --berry-plum: #8C3F6B;
  --border: #DDD8D1;
  --border-mint: #AFCDBE;
  --border-light: #EBE7E0;
  --error: #A63C50;
  --success: #365E4D;

  /* Typography */
  --font-ui: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "DM Mono", "Courier New", Courier, monospace;

  /* Spacing - Compact & Balanced */
  --xs: 4px;
  --s: 8px;
  --m: 14px;
  --l: 20px;
  --xl: 32px;
  --2xl: 48px;
  --section: clamp(32px, 4.5vw, 60px);
  --gutter: clamp(16px, 3.5vw, 48px);
  --wide: 1200px;
  --reading: 740px;

  /* Radii & Controls */
  --rs: 6px;
  --rm: 10px;
  --rl: 14px;
  --rb: 10px;
  --shadow: 0 2px 10px rgba(32, 37, 34, 0.05);
  --shadow-hover: 0 6px 20px rgba(32, 37, 34, 0.08);
  --control: 44px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);

  /* Admin bar offset */
  --wp-admin--admin-bar--height: 0px;
}

body.admin-bar {
  --wp-admin--admin-bar--height: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar {
    --wp-admin--admin-bar--height: 46px;
  }
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--paper);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button, input, textarea, select {
  font: inherit;
}

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

/* Accessibility Focus States */
:focus-visible {
  outline: 3px solid var(--mint-ui);
  outline-offset: 3px;
}

/* Layout Containers */
.wrap {
  width: min(calc(100% - 2 * var(--gutter)), var(--wide));
  margin-inline: auto;
}

.read {
  width: min(calc(100% - 2 * var(--gutter)), var(--reading));
  margin-inline: auto;
}

.section {
  padding-block: var(--section);
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-ui);
  line-height: 1.12;
  margin: 0;
  color: var(--graphite);
}

h1 {
  font-size: clamp(2.2rem, 3.8vw, 3rem);
  letter-spacing: -0.04em;
  font-weight: 700;
}

h2 {
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  letter-spacing: -0.03em;
  font-weight: 600;
}

h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  letter-spacing: -0.02em;
  font-weight: 600;
}

p {
  margin: 0 0 1.1em;
}

.eyebrow, .meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mint-ui);
}

.muted {
  color: var(--text-soft);
}

.em {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  color: var(--mint-ui);
}

/* Buttons and Links */
.btn {
  min-height: var(--control);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--rb);
  border: 1px solid transparent;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--mint-ui);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--mint-ui-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #FFFFFF;
  border-color: var(--border-mint);
  color: var(--graphite);
}

.btn-secondary:hover {
  background: rgba(191, 220, 207, 0.35);
  border-color: var(--mint-ui);
}

.btn-pink {
  background: var(--soft-pink);
  color: var(--graphite);
}

.btn-pink:hover {
  background: #F4CDDA;
}

.btn-raspberry {
  background: var(--raspberry);
  color: #FFFFFF;
}

.btn-raspberry:hover {
  background: var(--raspberry-hover);
  color: #FFFFFF;
}

.text-link {
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mint-ui);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid transparent;
}

.text-link:hover {
  border-bottom-color: var(--mint-ui);
}

.text-link.raspberry {
  color: var(--raspberry);
}

.text-link.raspberry:hover {
  border-bottom-color: var(--raspberry);
}

/* HEADER */
/* Make the outer WordPress template-part wrapper sticky (runtime fix) */
header.wp-block-template-part {
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 999;
}

.site-header {
  background: rgba(248, 246, 242, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--graphite);
}

.brand span {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--mint-ui);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
}

.nav a {
  color: var(--graphite);
}

.nav a:hover, .nav a.active {
  color: var(--mint-ui);
  font-weight: 600;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--rs);
  padding: 6px 12px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
}

/* HERO SECTION - COMPACT & ELEGANT */
.hero {
  padding-block: clamp(32px, 5vw, 64px);
}

.home-hero {
  background: linear-gradient(180deg, var(--paper) 0%, rgba(191, 220, 207, 0.14) 100%);
  padding-block: 0;
}

.home-hero .hero-grid {
  align-items: stretch;
  min-height: 450px;
}

.home-hero .hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(40px, 6vw, 72px);
}

.home-hero .hero-img {
  align-self: stretch;
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  display: block;
  overflow: hidden;
}

.home-hero .hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.hero h1 {
  margin: 10px 0 16px;
}

.hero-copy {
  font-size: 18px;
  color: var(--text-soft);
  max-width: 50ch;
  line-height: 1.55;
}

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

.hero-img {
  border-radius: var(--rl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--soft-mint);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 10;
  max-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* AXIS BADGES & PILLS */
.axis-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.axis-badge.survive {
  background: #E8F3EE;
  color: #275641;
}

.axis-badge.think {
  background: #E6EEF5;
  color: #2C5270;
}

.axis-badge.evolve {
  background: #FCEEF3;
  color: #92294B;
}

/* AXES OVERVIEW GRID WITH LINKED ILLUSTRATIONS */
.axes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 28px;
}

.axis-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.axis-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-mint);
}

.axis-card-survive {
  background: var(--soft-mint);
  border-color: rgba(191, 220, 207, 0.6);
}

.axis-card-think {
  background: var(--soft-pink);
  border-color: rgba(247, 213, 222, 0.8);
}

.axis-card-evolve {
  background: #F2F7F5;
  border-color: rgba(191, 220, 207, 0.4);
}

.axis-card-bg-visual {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.axis-card-bg-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.axis-card-top, .axis-card > .text-link {
  position: relative;
  z-index: 1;
}

.axis-card-top {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.axis-card-img-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--rs);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.axis-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.axis-card:hover .axis-card-img-wrap img {
  transform: scale(1.03);
}

.axis-card-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.axis-card h3 {
  font-size: 20px;
  margin: 2px 0 0;
}

.axis-card p {
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.48;
  margin: 0;
}

/* JOURNAL CARDS & GRID */
.journal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

@media screen and (min-width: 960px) {
  .home-featured-journal .journal-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card-journal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.card-journal:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-mint);
}

.card-journal-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--soft-mint);
}

.card-journal-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card-journal:hover .card-journal-img img {
  transform: scale(1.03);
}

.card-journal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 10px;
}

.card-journal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-soft);
}

.card-journal-title {
  font-size: 19px;
  line-height: 1.25;
  min-height: 2.8em;
  margin: 0;
}

.card-journal-excerpt {
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.48;
  margin-bottom: auto;
}

/* Dynamic archive cards: equal-height rows and aligned CTAs */
.wp-block-post-template.journal-grid > li { display: flex; min-width: 0; }
.wp-block-post-template.journal-grid > li > .card-journal,
.wp-block-post-template.journal-grid > li > .wp-block-group.card-journal { width: 100%; height: 100%; }
.wp-block-post-template.journal-grid .card-journal-body { height: 100%; }
.wp-block-post-template.journal-grid .wp-block-read-more { margin-top: auto; }
.wp-block-post-template.journal-grid .card-journal-title { min-height: 2.5em; }

/* Keep canonical editorial covers visually consistent across Journal and Axis archives */
.wp-block-post-template.journal-grid .card-journal-img .wp-block-post-featured-image,
.wp-block-post-template.journal-grid .card-journal-img .wp-block-post-featured-image a { width: 100%; height: 100%; display: block; }
.wp-block-post-template.journal-grid .card-journal-img .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; }

/* BIM BERRY SHOWCASE */
.berry-showcase {
  background: var(--soft-pink);
  border: 1px solid rgba(185, 71, 104, 0.2);
  border-radius: var(--rl);
  padding: clamp(24px, 4vw, 48px);
}

.berry-showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.berry-quote-box {
  font-family: var(--font-body);
  font-size: clamp(20px, 2.2vw, 25px);
  font-style: italic;
  line-height: 1.38;
  color: var(--graphite);
  margin: 12px 0 18px;
}

.berry-img-wrapper {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--rm);
  padding: 12px;
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;
  max-width: 380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.berry-img-wrapper img {
  max-height: 100%;
  object-fit: contain;
}

/* PRACTICE SECTION */
.practice-section {
  background: #EDF5F8;
  border: 1px solid rgba(187, 215, 232, 0.6);
  border-radius: var(--rl);
  padding: clamp(28px, 4vw, 48px);
}

.practice-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.practice-badge-tag {
  background: var(--powder-blue);
  color: #1F4259;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 10px;
}

/* NEWSLETTER / BREVO FORM */
.newsletter-box {
  background: var(--surface);
  border: 1px solid var(--border-mint);
  border-radius: var(--rl);
  padding: clamp(28px, 4.5vw, 48px);
  box-shadow: var(--shadow);
}

.newsletter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.form-row {
  display: flex;
  gap: 8px;
}

.form-input {
  flex-grow: 1;
  min-height: var(--control);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--rb);
  background: #FFFFFF;
  color: var(--graphite);
  font-size: 14.5px;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--mint-ui);
  outline: none;
  box-shadow: 0 0 0 3px rgba(54, 94, 77, 0.15);
}

.form-disclaimer {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
}

/* SHOP PREVIEW / MUG SECTION */
.shop-section {
  padding-block: var(--section);
  scroll-margin-top: 80px;
}

.shop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.shop-img-box {
  background: transparent;
  border-radius: 0;
  padding: 0;
  overflow: hidden;
  min-height: 300px;
}

.shop-img-box img, .shop-mug-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-content {
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.shop-specs-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14.5px;
  color: var(--text-soft);
}

.shop-specs-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-specs-list li::before {
  content: "•";
  color: var(--mint-ui);
  font-weight: bold;
}

/* GAIA BIO CARD - PROPORTIONAL & CONTAINED */
.gaia-bio-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: clamp(24px, 3.5vw, 40px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.gaia-bio-img-box {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--soft-mint);
  border: 2px solid var(--border-mint);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.gaia-bio-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* MIDDLE SHOWCASE (BIM BERRY + BIM BREATHING SPACE) */
.home-middle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.showcase-card {
  border-radius: var(--rl);
  padding: 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 240px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.showcase-card-berry {
  background: var(--soft-pink);
  border: 1px solid rgba(185, 71, 104, 0.2);
}

.showcase-card-breath {
  background: #EDF5F8;
  border: 1px solid rgba(187, 215, 232, 0.6);
}

.showcase-card-body {
  padding: clamp(24px, 3.5vw, 36px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.showcase-card-img {
  width: 100%;
  max-width: none;
  height: 100%;
  align-self: stretch;
  overflow: hidden;
}

.showcase-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* BEHIND BIMYOURSELF WIDE CARD */
.gaia-bio-card.gaia-bio-card-wide {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr;
  gap: 0;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.gaia-bio-card.gaia-bio-card-wide .gaia-bio-content {
  padding: clamp(28px, 4vw, 44px);
}

.gaia-bio-card-wide .gaia-bio-content {
  display: flex;
  flex-direction: column;
}

.gaia-bio-card-wide .gaia-bio-hands-box {
  width: 100%;
  height: 100%;
  border-radius: 0 var(--rl) var(--rl) 0;
  overflow: hidden;
  min-height: 260px;
}

.gaia-bio-card-wide .gaia-bio-hands-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* SINGLE ARTICLE STYLES */
.article-header {
  padding-block: clamp(32px, 4vw, 56px) 24px;
  text-align: left;
}

.article-header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.article-lead {
  font-size: clamp(19px, 2vw, 22px);
  font-style: italic;
  color: var(--text-soft);
  line-height: 1.45;
  margin: 18px 0 24px;
}

.article-featured-image {
  width: 100%;
  display: block;
  border-radius: var(--rl);
  overflow: hidden;
  margin: 0 0 36px 0;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.article-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.article-content {
  font-size: 18.5px;
  line-height: 1.68;
}

.article-content p {
  margin-bottom: 1.4em;
}

.pullquote {
  font-size: clamp(22px, 2.5vw, 28px);
  font-style: italic;
  color: var(--mint-ui);
  line-height: 1.35;
  padding: 24px 0;
  margin: 32px 0;
  border-block: 1px solid var(--border);
}

.author-bio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rm);
  padding: 24px;
  margin-top: 48px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* RELATED CONTENT SECTION IN SINGLE POST */
.article-related-section {
  margin-top: 30px;
  margin-bottom: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.article-related-section h3 {
  margin-bottom: 12px;
}

.related-grid {
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 245px);
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scroll-padding-inline: 2px;
  padding: 2px 2px 14px;
  margin-top: 14px;
  scrollbar-width: thin;
}

.related-grid > * {
  scroll-snap-align: start;
  min-width: 0;
}

.related-grid .card-journal {
  height: 100%;
}

.related-grid .card-journal-img {
  aspect-ratio: 16 / 8;
}

.related-grid .card-journal-body {
  padding: 13px;
  gap: 7px;
}

.related-grid .card-journal-title {
  font-size: 15px;
  min-height: 0;
}

.related-grid .card-journal-excerpt {
  display: none;
}

.related-grid .text-link {
  font-size: 12.5px;
}


/* UNIFIED ACCESSIBLE CAROUSEL (Related Content) */
.by-carousel {
  position: relative;
  width: 100%;
}

.by-carousel-track.related-grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 4px 16px;
  margin: 0;
}

.by-carousel-track.related-grid::-webkit-scrollbar {
  display: none;
}

.by-carousel-item {
  flex: 0 0 calc((100% - 40px) / 3);
  min-width: 0;
  scroll-snap-align: start;
  box-sizing: border-box;
}

.by-carousel-nav {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--graphite);
  transition: all 0.2s ease;
}

.by-carousel-nav:hover:not(:disabled) {
  background: var(--mint-ui);
  color: #FFFFFF;
  border-color: var(--mint-ui);
}

.by-carousel-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.by-carousel-nav:focus-visible {
  outline: 2px solid var(--mint-ui);
  outline-offset: 2px;
}

.by-carousel-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.by-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.by-carousel-dot.active, .by-carousel-dot[aria-current="true"] {
  background: var(--mint-ui);
  transform: scale(1.25);
}

.by-carousel-dot:hover:not(.active) {
  background: var(--text-soft);
}

.by-carousel-dot:focus-visible {
  outline: 2px solid var(--mint-ui);
  outline-offset: 2px;
}

/* QUERY PAGINATION */
.wp-block-query-pagination {
  margin-top: clamp(32px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .wp-block-query-pagination-numbers span,
.wp-block-query-pagination .wp-block-query-pagination-previous,
.wp-block-query-pagination .wp-block-query-pagination-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--rs);
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--graphite);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.wp-block-query-pagination a:hover {
  background: rgba(191, 220, 207, 0.35);
  border-color: var(--mint-ui);
  color: var(--graphite);
}

.wp-block-query-pagination .wp-block-query-pagination-numbers span.current,
.wp-block-query-pagination .wp-block-query-pagination-numbers .page-numbers.current {
  background: var(--mint-ui);
  color: #FFFFFF;
  border-color: var(--mint-ui);
  font-weight: 600;
}

/* FOOTER */
.site-footer {
  background: #FFFFFF;
  border-top: 1px solid var(--border);
  padding-top: clamp(36px, 5vw, 60px);
  padding-bottom: 28px;
  margin-top: var(--section);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 32px;
  margin-bottom: 36px;
}

.footer-col h4 {
  font-size: 14.5px;
  margin-bottom: 14px;
  color: var(--graphite);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  font-family: var(--font-ui);
}

.footer-links a {
  color: var(--text-soft);
}

.footer-links a:hover {
  color: var(--mint-ui);
}

.footer-legal-bar {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-soft);
  font-family: var(--font-ui);
  flex-wrap: wrap;
  gap: 14px;
}

/* ==========================================================================
   HOMEPAGE SCOPED RHYTHM (.home modifier)
   ========================================================================== */

.home .hero { padding-block: clamp(22px, 2.8vw, 36px); }
.home .section { padding-block: clamp(16px, 2.25vw, 28px); }
.home .shop-section { padding-block: clamp(16px, 2.25vw, 28px); }
.home .hero-grid { gap: clamp(18px, 2.6vw, 34px); }
.home .hero-img { max-height: 480px; }
.home .hero-copy { font-size: 16.5px; line-height: 1.48; }
.home .hero-actions { margin-top: 16px; }
.home .home-section-heading h2,
.home .home-axes-intro h2 { margin-top: 4px; }
.home .journal-grid { gap: 14px; margin-top: 12px; }
.home .card-journal-img { aspect-ratio: 16 / 7; }
.home .card-journal-body { padding: 12px 14px 14px; gap: 6px; }
.home .card-journal-title { font-size: 16.5px; }
.home .card-journal-excerpt { font-size: 13px; line-height: 1.38; }
.home .card-journal-meta { font-size: 10.5px; }
.home .axes-grid { gap: 14px; margin-top: 14px; }
.home .axis-card { padding: 14px; }
.home .axis-card-top { gap: 8px; }
.home .axis-card h3 { font-size: 17px; }
.home .axis-card p { font-size: 13px; line-height: 1.36; }
.home .berry-showcase { padding: clamp(18px, 2.3vw, 26px); }
.home .berry-showcase-grid { gap: clamp(16px, 2.5vw, 28px); grid-template-columns: 1.35fr .65fr; }
.home .berry-quote-box { font-size: clamp(18px, 1.8vw, 22px); margin: 8px 0 12px; }
.home .berry-img-wrapper { max-width: 205px; }
.home .practice-section { padding: clamp(18px, 2.3vw, 26px); }
.home .gaia-bio-card:not(.gaia-bio-card-wide) { grid-template-columns: 104px 1fr; padding: 18px 22px; gap: 20px; }

.home .gaia-bio-card.gaia-bio-card-wide {
  grid-template-columns: 1.1fr 1.2fr;
  padding: 0;
  gap: 0;
  border-radius: var(--rl);
  align-items: stretch;
}
.home .gaia-bio-img-box:not(.gaia-bio-hands-box) { width: 96px; height: 96px; }

.home .gaia-bio-hands-box {
  width: 100%;
  height: 100%;
  border-radius: 0 var(--rl) var(--rl) 0;
  overflow: hidden;
  min-height: 260px;
}

.home .gaia-bio-hands-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.home .newsletter-box { padding: 18px 22px; }
.home .newsletter-grid { gap: 22px; }
.home .site-footer { margin-top: 18px; padding-top: 26px; }
.home .footer-grid { margin-bottom: 24px; }

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */


@media (max-width: 1023px) {
  .by-carousel-item {
    flex: 0 0 calc((100% - 20px) / 2);
  }
}

@media (max-width: 639px) {
  .by-carousel-item {
    flex: 0 0 100%;
  }
}

@media (max-width: 960px) {
  .home-middle-grid { grid-template-columns: 1fr; gap: 24px; }
  .gaia-bio-card.gaia-bio-card-wide { grid-template-columns: 1fr; }
  .showcase-card { grid-template-columns: 1fr; min-height: auto; }
  .showcase-card-img { min-height: 200px; height: 200px; }
  .home-hero .hero-grid { min-height: auto; }
  .shop-grid { grid-template-columns: 1fr; }
  .shop-img-box { min-height: 220px; height: 220px; }
  .hero-grid,
  .berry-showcase-grid,
  .practice-grid,
  .newsletter-grid,
  .shop-grid,
  .gaia-bio-card {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .home .berry-showcase-grid {
    grid-template-columns: 1fr;
  }

  .home .berry-img-wrapper {
    max-width: 220px;
  }

  .gaia-bio-img-box {
    margin: 0 auto;
  }

  .journal-grid,
  .axes-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav {
    display: none;
  }

  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    padding: 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .mobile-menu-btn {
    display: block;
  }
}

@media (max-width: 720px) {
  .home .section,
  .home .shop-section {
    padding-block: 18px;
  }

  .home .hero {
    padding-block: 20px;
  }

  .home .hero-img {
    max-height: 260px;
  }

  .home .gaia-bio-card:not(.gaia-bio-card-wide) { grid-template-columns: 78px 1fr; padding: 16px; gap: 14px; }

  .home .gaia-bio-img-box:not(.gaia-bio-hands-box) { width: 72px; height: 72px; }

  .related-grid {
    grid-auto-columns: minmax(210px, 82vw);
  }
}

@media (max-width: 640px) {
  .journal-grid,
  .axes-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
  }

  .author-bio-card {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   MODAL — Mug Reservation Accessible Dialog
   v0.5.1: hidden by default (aria-hidden + CSS), shown via .is-open class
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 38, 34, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;

  /* Hidden by default — both visually and from AT */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.modal-overlay[aria-hidden="false"],
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Prevent body scroll while modal is open */
body.modal-open {
  overflow: hidden;
}

.modal-box {
  background: #FFFFFF;
  border-radius: var(--rl);
  padding: clamp(24px, 4vw, 40px);
  width: 100%;
  max-width: 480px;
  max-height: 92dvh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  transform: translateY(12px);
  transition: transform 0.22s ease;
}

.modal-overlay.is-open .modal-box {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--graphite);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
  padding: 0;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: var(--soft-mint);
  border-color: var(--mint-ui);
  color: var(--forest);
  outline: none;
}

/* ==========================================================================
   FORM FIELD PATTERNS — v0.5.1
   ========================================================================== */

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 13.5px;
  font-family: var(--font-ui);
  color: var(--graphite);
  font-weight: 500;
}

.form-error {
  font-size: 12.5px;
  color: var(--raspberry);
  min-height: 1.2em;
}

.form-checkbox-field {
  gap: 6px;
}

.form-checkbox-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.45;
  cursor: pointer;
}

.form-checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--mint-ui);
  cursor: pointer;
}

/* Status message region (AJAX response) */
#mug-form-status {
  min-height: 1.4em;
  font-size: 13.5px;
  color: var(--mint-ui);
  font-family: var(--font-ui);
}

/* ==========================================================================
   ACTIVE AXIS INDICATOR — taxonomy archive
   ========================================================================== */

.axis-badge[aria-current="page"],
.axis-badge.is-active {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

/* ==========================================================================
   BERRY CARD IMAGE PLACEHOLDER — shown when no Featured Image set
   ========================================================================== */

.card-journal-img-placeholder,
.berry-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sage-light, #e8f0eb);
  color: var(--forest);
  border-radius: var(--rm);
}
