/* ============================================================
   Meet Gurdy page (page-id-1506) — birdiechaser.com/meet-gurdy/
   Scoped entirely to body.page-id-1506.

   Zig-zag editorial layout, playful motion. Default WordPress
   block markup; the_content filter (functions.php) additionally:
     - wraps the hero Gurdy sprite in a coin-flip card (.bc-flip)
     - wraps the "One birdie at a time" image+text in a .bc-row
       flex row (so text vertically centers beside the image)
     - gold-accents keywords in headings (.bc-hl)
   Reveal classes (.bc-reveal/.bc-in) + floating balls come from
   js/meet-gurdy.js. No JS = everything still renders normally.
   ============================================================ */

body.page-id-1506 {
  --bc-brown:       #412818;
  --bc-brown-soft:  #5a3a25;
  --bc-card:        #fffdf9;
  --bc-cream:       #fbe8c6;
  --bc-gold:        #b8860b;
  --bc-gold-bright: #d4a017;
  --bc-rust:        #c4824c;
  --bc-line:        rgba(65, 40, 24, 0.14);
}

/* ── Canvas — brand rust + vignette ───────────────────────── */
body.page-id-1506 {
  background: #c4824c !important;
  background-image: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(0, 0, 0, 0.25) 80%,
    rgba(0, 0, 0, 0.45) 100%
  ) !important;
  background-attachment: fixed !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
}
body.page-id-1506 .site-content {
  background-color: transparent;
}

/* ── Content sheet ────────────────────────────────────────── */
body.page-id-1506 .inside-article {
  max-width: 880px;
  margin: 40px auto;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  overflow: visible;
}

/* Section panels — the single sheet is split into these so the rust (with
   the floating Gurdys behind it) shows through the gaps between sections. */
body.page-id-1506 .bc-panel {
  background: var(--bc-card);
  border: 1px solid var(--bc-line);
  border-radius: 22px;
  box-shadow: 0 16px 50px rgba(40, 22, 12, 0.28);
  padding: clamp(28px, 5vw, 56px) clamp(24px, 5vw, 60px);
  margin: 0 0 28px;
  overflow: hidden;
}
body.page-id-1506 .bc-panel:last-child {
  margin-bottom: 0;
}
body.page-id-1506 .entry-content {
  font-family: var(--font-body), 'Outfit', sans-serif;
  color: var(--bc-brown-soft);
}
body.page-id-1506 .entry-content p {
  font-size: 1.075rem;
  line-height: 1.78;
  margin: 0 0 1.25em;
}
body.page-id-1506 .entry-content a:not(.bc-shop-btn) {
  color: var(--bc-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── HERO: title ──────────────────────────────────────────── */
/* The theme's bare title (on the rust) is hidden; we inject an H1 into the
   hero panel via the_content filter instead. */
body.page-id-1506 .entry-header {
  display: none;
}
body.page-id-1506 .bc-hero-title {
  font-family: var(--font-heading), 'Libre Baskerville', serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
  color: var(--bc-brown);
  text-align: center;
  margin: 0 0 0.3em;
  letter-spacing: -0.015em;
}

/* ── HERO panel: full-width title row, then two columns ──────
   (Gurdy + subtitle | "Wait…" intro) ── */
body.page-id-1506 .bc-hero-panel {
  display: block;
}
body.page-id-1506 .bc-hero-cols {
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
}
body.page-id-1506 .bc-hero-col {
  flex: 0 0 40%;
  text-align: center;
}
body.page-id-1506 .bc-intro-col {
  flex: 1 1 auto;
}
body.page-id-1506 .bc-intro-col h2 {
  margin-top: 0;
  text-align: left;
}

/* ── HERO: Gurdy coin-flip badge (wrapped by the_content filter) ── */
body.page-id-1506 .entry-content figure:has(.bc-flip) {
  width: auto;
  margin: 0.4em auto 0.5em;
  text-align: center;
  background: transparent;
}
body.page-id-1506 .bc-flip {
  display: inline-block;
  width: clamp(150px, 30vw, 215px);
  perspective: 1000px;
  animation: bcGurdyBob 3.2s ease-in-out infinite;
  cursor: pointer;
}
body.page-id-1506 .bc-flip-inner {
  display: block;
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.page-id-1506 .bc-flip:hover .bc-flip-inner,
body.page-id-1506 .bc-flip:focus-within .bc-flip-inner {
  transform: rotateY(180deg);
}
body.page-id-1506 .bc-flip-face {
  display: block;
  border-radius: 50%;
  overflow: hidden;
  box-sizing: border-box;
  background: radial-gradient(circle at 50% 38%, #ffffff 0%, #fbe7c7 70%, #f3d8a4 100%);
  border: 5px solid var(--bc-gold);
  box-shadow: 0 14px 34px rgba(40, 22, 12, 0.32), 0 0 0 10px rgba(251, 232, 198, 0.4);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
/* front is in-flow + aspect-ratio so it establishes the card's height */
body.page-id-1506 .bc-flip-front {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}
body.page-id-1506 .bc-flip-back {
  display: block;
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
}
body.page-id-1506 .bc-flip-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  box-sizing: border-box;
  border-radius: 50%;
}
@keyframes bcGurdyBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-13px); }
}
@media (prefers-reduced-motion: reduce) {
  body.page-id-1506 .bc-flip { animation: none; }
}

/* Subtitle: the h3 right after the hero figure */
body.page-id-1506 .entry-content figure:has(.bc-flip) + h3 {
  font-family: var(--font-body), 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--bc-gold);
  margin: 0 0 0.4em;
}

/* Divider removed per design */
body.page-id-1506 .entry-content hr.wp-block-separator {
  display: none;
}

/* ── Section headings ─────────────────────────────────────── */
body.page-id-1506 .entry-content h2 {
  font-family: var(--font-body), 'Outfit', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: 28px;
  line-height: 1.14;
  color: var(--bc-brown);
  margin: 1.5em 0 0.55em;
}
/* gold-accent keyword(s) inside section headings */
body.page-id-1506 .entry-content h2 .bc-hl {
  color: #c5811c;
}
/* closing "Catch Gurdy. Catch the birdie." — centered (only the CTA panel,
   not every panel's lone heading) */
body.page-id-1506 .bc-panel:has(.bc-shop-btn) h2 {
  text-align: center;
}

/* ── img 2 (More than a mascot) — floats right ────────────── */
body.page-id-1506 .entry-content figure.size-large {
  width: min(46%, 430px);
  margin: 0.5em 0 1.5em;
  border-radius: 22px;
  background: transparent;
  --rot: 0deg;
}
body.page-id-1506 .entry-content figure.size-large img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  border: 6px solid #fff;
  box-shadow: 0 16px 38px rgba(40, 22, 12, 0.34);
}
body.page-id-1506 .entry-content figure:has(img[src*="Gurdy-Driver-Cover"]) {
  clear: both;
  float: right;
  margin-left: clamp(24px, 4vw, 48px);
  --rot: 2.2deg;
  transform: rotate(var(--rot));
}

/* ── "One birdie at a time" — single column (image over full-width text) ── */
body.page-id-1506 .entry-content .bc-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(20px, 3vw, 34px);
  clear: both;
  margin: 0;
}
body.page-id-1506 .entry-content .bc-row figure {
  float: none !important;
  margin: 0 auto !important;
  width: min(100%, 460px);
  flex: 0 0 auto;
  transform: rotate(-2.2deg);
}
body.page-id-1506 .entry-content .bc-row .bc-row-text {
  width: 100%;
}
body.page-id-1506 .entry-content .bc-row .bc-row-text h2 {
  margin-top: 0;
}
body.page-id-1506 .entry-content .bc-row .bc-row-text p {
  margin-bottom: 0;
}

/* ── Pull-quote (blockquote #1) — off-white callout, 18px ──── */
body.page-id-1506 .entry-content blockquote {
  clear: both;
}
body.page-id-1506 .bc-panel blockquote:not(:has(.bc-shop-btn)) {
  position: relative;
  margin: 1.8em auto;
  max-width: 760px;
  padding: 22px 28px;
  border: 1px solid var(--bc-line);
  border-left: 5px solid var(--bc-gold);
  border-radius: 14px;
  background: #f5ecda;
}
body.page-id-1506 .bc-panel blockquote:not(:has(.bc-shop-btn)) p {
  font-family: var(--font-heading), 'Libre Baskerville', serif;
  font-size: 18px;
  line-height: 1.5;
  font-style: italic;
  color: var(--bc-brown);
  margin: 0;
}

/* ── "GURDY IS FOR EVERYONE" statement (blockquote #2) ─────── */
body.page-id-1506 .entry-content > blockquote {
  margin: 0 0 28px;
  padding: clamp(30px, 6vw, 58px) clamp(24px, 5vw, 48px);
  background: linear-gradient(135deg, #412818 0%, #5a3a25 100%);
  text-align: center;
  /* top + bottom strokes via inset shadow — no border-corner mitering,
     so the left/right edges can't render diagonal notches */
  border: 0;
  border-radius: 0;
  box-shadow: inset 0 20px 0 0 #2d1910, inset 0 -20px 0 0 #2d1910;
}
body.page-id-1506 .entry-content > blockquote p {
  font-family: var(--font-heading), 'Libre Baskerville', serif;
  font-weight: 700;
  font-style: normal;
  font-size: clamp(1.52rem, 4.8vw, 2.72rem);
  line-height: 1.05;
  margin: 0;
  background: linear-gradient(180deg, #f5cd84, #b8860b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.01em;
}

/* ── "Join the chase…" lead-in (last h3) → 18px ───────────── */
body.page-id-1506 .entry-content h3:last-of-type {
  clear: both;
  font-family: var(--font-heading), 'Libre Baskerville', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--bc-brown);
  text-align: center;
  margin: 1.6em auto 0.3em;
}

/* ── Shop button (blockquote #3, via the_content filter) ──── */
body.page-id-1506 .entry-content blockquote:has(.bc-shop-btn) {
  border: 0;
  padding: 0;
  margin: 0.5em 0 0;
  background: none;
  text-align: center;
}
body.page-id-1506 .entry-content .bc-shop-btn {
  display: inline-block;
  font-family: var(--font-body), 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  line-height: 1;
  color: #2d1810;
  text-decoration: none;
  background: linear-gradient(180deg, #e8c14e 0%, #d4a017 55%, #b8860b 100%);
  padding: 18px 50px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(45, 24, 16, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
body.page-id-1506 .entry-content .bc-shop-btn:hover,
body.page-id-1506 .entry-content .bc-shop-btn:focus {
  color: #2d1810;
  transform: translateY(-3px) rotate(-1.5deg);
  box-shadow: 0 12px 28px rgba(45, 24, 16, 0.36);
  filter: brightness(1.05);
  animation: bcWiggle 0.5s ease;
}
@keyframes bcWiggle {
  0%, 100% { transform: translateY(-3px) rotate(-1.5deg); }
  40%      { transform: translateY(-3px) rotate(2deg); }
  70%      { transform: translateY(-3px) rotate(-1deg); }
}

/* ── Scroll-reveal (classes added by JS) ──────────────────── */
body.page-id-1506 .entry-content > .bc-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
body.page-id-1506 .entry-content > .bc-reveal.bc-in {
  opacity: 1;
  transform: none;
}
body.page-id-1506 .entry-content > figure.size-large.bc-reveal {
  transform: translateY(26px) rotate(var(--rot));
}
body.page-id-1506 .entry-content > figure.size-large.bc-reveal.bc-in {
  transform: rotate(var(--rot));
}
@media (prefers-reduced-motion: reduce) {
  body.page-id-1506 .entry-content > .bc-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ── Floating Gurdys (layer added by JS) — sits BEHIND the card,
   header and footer (z-index:-1) so it only peeks through the rust ── */
.bc-float-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.bc-float-ball {
  position: absolute;
  bottom: -90px;
  width: var(--sz, 38px);
  height: var(--sz, 38px);
  background: url('https://birdiechaser.com/wp-content/uploads/2026/05/gurdy-sprite-square-300px-new.png') center / contain no-repeat;
  opacity: 0.55;
  animation: bcFloatUp var(--d, 9s) linear var(--delay, 0s) infinite;
}
@keyframes bcFloatUp {
  0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.5; }
  50%  { transform: translateY(-55vh) translateX(20px) rotate(180deg); }
  90%  { opacity: 0.45; }
  100% { transform: translateY(-110vh) translateX(-12px) rotate(360deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bc-float-layer { display: none; }
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  body.page-id-1506 .inside-article {
    margin: 18px 12px;
  }
  body.page-id-1506 .bc-panel {
    padding: 24px 20px;
    border-radius: 16px;
    margin-bottom: 18px;
  }
  body.page-id-1506 .bc-hero-cols {
    flex-direction: column;
    gap: 20px;
  }
  body.page-id-1506 .bc-hero-col {
    flex: none;
    width: 100%;
  }
  body.page-id-1506 .bc-intro-col h2 {
    text-align: center;
  }
  body.page-id-1506 .entry-content figure:has(img[src*="Gurdy-Driver-Cover"]) {
    float: none !important;
    width: 100%;
    margin: 0.6em 0 1.4em;
    transform: none;
  }
  body.page-id-1506 .entry-content .bc-row {
    flex-direction: column;
    gap: 18px;
  }
  body.page-id-1506 .entry-content .bc-row figure {
    width: 100%;
    transform: none;
  }
  body.page-id-1506 .entry-content > blockquote {
    padding: 32px 24px;
  }
}
