/* Bhuchi Horizon Premium 4.0 — depth studio.
   Compositor-friendly 3D, no WebGL, no external fonts, no layout-shifting animation.
   Every interactive effect respects keyboard and reduced-motion preferences. */
:root { --bh4-ease:cubic-bezier(.18,.78,.24,1); --bh4-surface:#fffefa; }

/* A slightly more tactile, highly legible editorial typography system. */
.bh3-hero-copy { position:relative; z-index:2; }
.bh3-display { text-wrap:balance; }
.bh3-display em { display:inline-block; line-height:1.12; padding-right:.06em; background:linear-gradient(140deg,#ff8908 8%,#f06b13 48%,#cb4217 96%); -webkit-background-clip:text; background-clip:text; color:transparent; filter:drop-shadow(0 6px 12px rgba(255,137,8,.07)); }
.bh4-depth-word { position:relative; display:inline-block; color:var(--bh-navy); text-shadow:1px 1px 0 #b8e9ed,2px 2px 0 #b8e9ed,3px 3px 0 rgba(13,184,218,.25); }
.bh4-depth-word::after { content:""; display:block; position:absolute; left:6%; bottom:-.085em; width:81%; height:.085em; border-radius:40px; transform:rotate(-2deg); background:linear-gradient(90deg,var(--bh-cyan),var(--bh-green)); opacity:.8; }
.bh3-heading { text-wrap:balance; }
.bh3-heading em { position:relative; color:var(--bh-green); text-decoration:underline; text-decoration-thickness:.065em; text-decoration-color:rgba(41,158,53,.26); text-underline-offset:.15em; }
.bh3-kicker { display:inline-flex; align-items:center; gap:.25rem; }
.bh3-manifesto-quote { text-wrap:balance; }
.bh3-manifesto-quote span { color:var(--bh-orange); text-shadow:2px 2px 0 rgba(9,46,95,.18); }

body.bh4-type-modern .bh3-display em,body.bh4-type-modern .bh3-heading em { font-family:inherit!important; font-weight:840!important; font-style:normal; letter-spacing:-.07em; }
body.bh4-type-modern .bh3-heading em { color:var(--bh-orange); text-decoration-color:rgba(255,137,8,.28); }
body.bh4-type-modern .bh3-manifesto-quote { font-family:var(--wp--preset--font-family--sans,system-ui)!important; font-style:normal; font-weight:800!important; }
body.bh4-type-display .bh3-display em,body.bh4-type-display .bh3-heading em { font-family:var(--wp--preset--font-family--sans,system-ui)!important; font-weight:930!important; font-style:normal; text-transform:uppercase; letter-spacing:-.09em; }
body.bh4-type-display .bh3-display { letter-spacing:-.075em!important; }
body.bh4-type-display .bh4-depth-word { -webkit-text-stroke:1px var(--bh-navy); color:transparent; text-shadow:2px 3px 0 rgba(13,184,218,.45); }

/* A real CSS-rendered 3D-feeling globe, not an image that blocks page editing. */
.bh3-feature { perspective:1200px; transform-style:preserve-3d; isolation:isolate; }
.bh4-globe-stage { --bh4-orb-size:clamp(142px,14.2vw,202px); position:absolute; right:4%; top:-64px; width:var(--bh4-orb-size); height:var(--bh4-orb-size); z-index:5; pointer-events:none; transform-style:preserve-3d; filter:drop-shadow(0 20px 23px rgba(5,39,71,.15)); }
.bh4-globe { position:absolute; inset:10%; border-radius:50%; overflow:hidden; isolation:isolate; background:radial-gradient(circle at 29% 22%,#7fe8fa 0%,#0db8da 29%,#0b6cae 63%,#06305c 100%); border:1px solid rgba(255,255,255,.64); box-shadow:inset -17px -8px 27px rgba(1,17,49,.38),inset 10px 12px 24px rgba(255,255,255,.26),0 15px 25px rgba(5,29,60,.16); transform:translateZ(35px); }
.bh4-globe-map { position:absolute; inset:0 auto 0 0; width:200%; background: url('../images/globe-map.svg') left center / 50% 100% repeat-x; opacity:.9; mix-blend-mode:screen; transform:translate3d(0,0,0); }
.bh4-globe-shine { position:absolute; inset:0; z-index:2; border-radius:50%; background:radial-gradient(circle at 27% 19%,rgba(255,255,255,.65),transparent 33%),linear-gradient(88deg,rgba(255,255,255,.11) 4%,transparent 49%,rgba(0,13,45,.36) 95%); }
.bh4-globe-grid { position:absolute; inset:0; z-index:1; border-radius:50%; opacity:.32; background:repeating-linear-gradient(to bottom,transparent 0,transparent 20%,rgba(255,255,255,.48) 20.4%,transparent 20.8%); transform:perspective(250px) rotateY(-15deg); }
.bh4-orbital-ring { position:absolute; z-index:3; left:-15%; right:-15%; top:39%; height:29%; border:7px solid rgba(255,137,8,.82); border-top-color:rgba(255,185,86,.96); border-bottom-color:rgba(0,145,175,.75); border-radius:50%; transform:rotate(-27deg) rotateX(67deg) translateZ(55px); box-shadow:0 3px 8px rgba(12,71,88,.12); }
.bh4-orbit-dot { position:absolute; display:block; z-index:4; top:29%; right:5%; width:13px; height:13px; border-radius:50%; background:var(--bh-orange); box-shadow:0 0 0 7px rgba(255,137,8,.12),0 0 25px rgba(255,137,8,.45); }

/* The photo rises and tilts slightly; headings and links remain click-safe. */
.bh3-featured-query .wp-block-post { transform-style:preserve-3d; backface-visibility:hidden; transform:perspective(1200px) rotateX(var(--bh4-rx,0deg)) rotateY(var(--bh4-ry,0deg)) translate3d(0,var(--bh4-rise,0px),0); transition:transform .65s var(--bh4-ease),box-shadow .45s ease; will-change:auto; }
.bh3-featured-query .wp-block-post-featured-image img { transition:transform .9s var(--bh4-ease); }
.bh3-featured-query .wp-block-post:hover { --bh4-rise:-5px; box-shadow:0 37px 84px rgba(7,29,58,.24); }
.bh3-featured-query .wp-block-post:hover .wp-block-post-featured-image img { transform:scale(1.045); }
.bh3-featured-query .bh3-feature-caption { transform:translateZ(18px); }

/* 3D paper stacks for the editorial cards: subtle and purposeful depth. */
.bh3-discovery-query .wp-block-post,.bh3-post-grid .wp-block-post { position:relative; transform:perspective(900px) rotateX(var(--bh4-rx,0deg)) rotateY(var(--bh4-ry,0deg)) translateY(var(--bh4-rise,0px)); transition:transform .56s var(--bh4-ease),box-shadow .56s ease,border-color .3s ease; transform-style:preserve-3d; }
.bh3-discovery-query .wp-block-post:hover,.bh3-post-grid .wp-block-post:hover { --bh4-rise:-7px; box-shadow:0 24px 60px rgba(9,46,95,.13); border-color:rgba(13,184,218,.24); }
.bh3-discovery-query .wp-block-post::after,.bh3-post-grid .wp-block-post::after { content:""; position:absolute; left:11px; right:11px; bottom:-9px; height:18px; z-index:-1; border-radius:0 0 20px 20px; background:linear-gradient(110deg,#e6f7f3,#b8e9ed); opacity:0; transition:opacity .32s ease; }
.bh3-discovery-query .wp-block-post:hover::after,.bh3-post-grid .wp-block-post:hover::after { opacity:.85; }
.bh3-topic-index li { transform:perspective(850px) rotateX(var(--bh4-rx,0deg)) rotateY(var(--bh4-ry,0deg)) translateY(var(--bh4-rise,0px)); transition:transform .55s var(--bh4-ease),box-shadow .55s ease,border-color .3s ease; transform-style:preserve-3d; }
.bh3-topic-index li:hover { --bh4-rise:-6px; box-shadow:0 18px 38px rgba(9,46,95,.12); }

/* A dimensional kinetic badge for the Arcade, created with CSS only. */
.bh3-arcade { perspective:1000px; }
.bh3-orbit { border:1px solid rgba(255,255,255,.24); background:radial-gradient(circle at 32% 28%,rgba(13,184,218,.35),rgba(0,34,75,.15) 63%,rgba(1,14,33,.44)); box-shadow:inset -22px -17px 40px rgba(0,9,31,.27),inset 11px 12px 25px rgba(255,255,255,.12),0 27px 55px rgba(0,4,14,.22); transform-style:preserve-3d; transform:rotate(-9deg) rotateY(-18deg) rotateX(11deg); }
.bh3-orbit::before { inset:-3%; border:2px solid rgba(154,240,233,.53); transform:rotateX(67deg) rotate(-34deg) translateZ(24px); box-shadow:0 0 11px rgba(13,184,218,.1); }
.bh3-orbit::after { transform:translateZ(52px); text-shadow:0 0 20px rgba(255,137,8,.3); }
.bh3-orbit-letter { position:relative; z-index:2; color:#fff; transform:translateZ(47px); text-shadow:1px 2px 0 #0b8291,3px 6px 0 rgba(4,33,65,.5),0 13px 23px rgba(2,10,31,.44); }

/* Reduced-distance entrance effects, opt-in JS enhancement with accessible fallback. */
@media (prefers-reduced-motion:no-preference) {
  body.bh4-motion-immersive .bh4-globe-map { animation:bh4-earth-turn 38s linear infinite; }
  body.bh4-motion-immersive .bh4-globe-stage { animation:bh4-orb-float 7s ease-in-out infinite; }
  body.bh4-motion-immersive .bh3-orbit { animation:bh4-orbit-float 10s ease-in-out infinite; }
  body.bh4-motion-immersive.bh4-motion-ready .bh4-reveal:not(.bh4-is-visible),
  body.bh4-motion-subtle.bh4-motion-ready .bh4-reveal:not(.bh4-is-visible) { opacity:0; transform:translate3d(0,26px,0); }
  body.bh4-motion-immersive .bh4-reveal,body.bh4-motion-subtle .bh4-reveal { transition:opacity .72s ease,transform .86s var(--bh4-ease); }
  body.bh4-motion-immersive .bh4-reveal.bh4-is-visible,body.bh4-motion-subtle .bh4-reveal.bh4-is-visible { opacity:1; transform:translate3d(0,0,0); }
}
@keyframes bh4-earth-turn { from{transform:translate3d(0,0,0)} to{transform:translate3d(-50%,0,0)} }
@keyframes bh4-orb-float { 0%,100%{transform:translate3d(0,0,0) rotate(-4deg)} 50%{transform:translate3d(0,-9px,0) rotate(4deg)} }
@keyframes bh4-orbit-float { 0%,100%{transform:rotate(-9deg) rotateY(-18deg) rotateX(11deg) translateY(0)} 50%{transform:rotate(-6deg) rotateY(5deg) rotateX(8deg) translateY(-9px)} }
body.bh4-motion-off .bh4-globe-stage,body.bh4-motion-off .bh3-orbit { animation:none!important; }
body.bh4-motion-off .bh4-globe-map { animation:none!important; }
body.bh4-motion-off .bh3-featured-query .wp-block-post,body.bh4-motion-off .bh3-topic-index li,body.bh4-motion-off .bh3-post-grid .wp-block-post,body.bh4-motion-off .bh3-discovery-query .wp-block-post { transform:none!important; transition:none!important; }
body.bh4-motion-off .bh4-reveal { opacity:1!important;transform:none!important; }

/* Keyboard focus is always stronger than the motion language. */
a:focus-visible,button:focus-visible { outline:3px solid var(--bh-orange); outline-offset:4px; }
@media(hover:none),(pointer:coarse) {
  .bh3-featured-query .wp-block-post,.bh3-topic-index li,.bh3-post-grid .wp-block-post,.bh3-discovery-query .wp-block-post { transform:none!important; }
  .bh4-globe-stage { right:0; }
}
@media(max-width:1050px){ .bh4-globe-stage { --bh4-orb-size:142px; right:0; top:-45px; } }
@media(max-width:781px){ .bh4-globe-stage { --bh4-orb-size:130px; right:-7px; top:-35px; } .bh3-feature { padding-top:1.6rem; } }
@media(max-width:600px){ .bh4-globe-stage { --bh4-orb-size:104px; right:0; top:-24px; } .bh3-display { max-width:12ch; } .bh4-depth-word { text-shadow:1px 2px 0 rgba(13,184,218,.3); } .bh3-feature-tag { max-width:calc(100% - 112px); } .bh3-orbit { animation:none!important; } }
@media(prefers-reduced-motion:reduce){
  .bh4-globe-stage,.bh4-globe-map,.bh3-orbit { animation:none!important; }
  .bh4-reveal { opacity:1!important;transform:none!important;transition:none!important; }
  .bh3-featured-query .wp-block-post,.bh3-topic-index li,.bh3-post-grid .wp-block-post,.bh3-discovery-query .wp-block-post { transform:none!important;transition:none!important; }
  .bh3-featured-query .wp-block-post-featured-image img { transition:none!important; }
}

/* Selectable per-block heading treatments in the WordPress editor. */
.is-style-bh4-gradient { background:linear-gradient(112deg,var(--bh-navy),#0b78a3 60%,var(--bh-green)); -webkit-background-clip:text; background-clip:text; color:transparent!important; }
.is-style-bh4-extruded { color:var(--bh-navy)!important; text-shadow:1px 1px 0 #b8e9ed,2px 2px 0 #b8e9ed,3px 3px 0 rgba(13,184,218,.34); }
.is-style-bh4-editorial { font-family:var(--bh3-serif,Georgia,serif)!important; font-weight:500!important; font-style:italic; color:var(--bh-green)!important; letter-spacing:-.055em; }

.bh4-story-invitation { position:relative; background:linear-gradient(125deg,#f7faf9,#e5f8f6)!important; border:1px solid rgba(13,184,218,.18);padding:clamp(2rem,4vw,4rem); overflow:hidden; }
.bh4-story-invitation::after { content:""; position:absolute; right:-40px; top:-40px; width:150px; height:150px; border:22px solid rgba(13,184,218,.10); border-radius:50%;pointer-events:none; }
.bh4-story-invitation h2 { max-width:17ch; line-height:1.05; }

/* Pause offscreen looping effects; no layout observers or expensive scroll handlers. */
@media(prefers-reduced-motion:no-preference){
 body.bh4-motion-immersive.bh4-motion-ready .bh4-globe-stage:not(.bh4-active),
 body.bh4-motion-immersive.bh4-motion-ready .bh4-globe-stage:not(.bh4-active) .bh4-globe-map,
 body.bh4-motion-immersive.bh4-motion-ready .bh3-orbit:not(.bh4-active) { animation-play-state:paused; }
}

/* Progressive reveal never hides offscreen content (screenshots, crawlers and JS-less readers see all stories). */
@media(prefers-reduced-motion:no-preference){
 body.bh4-motion-immersive.bh4-motion-ready .bh4-reveal:not(.bh4-is-visible),
 body.bh4-motion-subtle.bh4-motion-ready .bh4-reveal:not(.bh4-is-visible) { opacity:1!important;transform:none!important; }
 body.bh4-motion-immersive.bh4-motion-ready .bh4-reveal.bh4-is-visible,
 body.bh4-motion-subtle.bh4-motion-ready .bh4-reveal.bh4-is-visible { animation:bh4-arrive .82s cubic-bezier(.18,.78,.24,1) both; }
}
@keyframes bh4-arrive { from{opacity:.72;transform:translate3d(0,15px,0)}to{opacity:1;transform:translate3d(0,0,0)} }
body.bh4-motion-off .bh4-reveal { animation:none!important; }
@media(prefers-reduced-motion:reduce){ .bh4-reveal{animation:none!important;} }

/* 5.0 performance guardrails: no constantly running 3D motion on small screens or low-data connections. */
@media (max-width:900px) {
 body.bh4-motion-immersive .bh4-globe-map,
 body.bh4-motion-immersive .bh4-globe-stage,
 body.bh4-motion-immersive .bh3-orbit { animation:none!important; }
}
body.bh5-save-data .bh4-globe-map,
body.bh5-save-data .bh4-globe-stage,
body.bh5-save-data .bh3-orbit,
body.bh5-page-hidden .bh4-globe-map,
body.bh5-page-hidden .bh4-globe-stage,
body.bh5-page-hidden .bh3-orbit { animation-play-state:paused!important; }
body.bh4-motion-subtle .bh3-featured-query .wp-block-post,
body.bh4-motion-subtle .bh3-topic-index li,
body.bh4-motion-subtle .bh3-post-grid .wp-block-post,
body.bh4-motion-subtle .bh3-discovery-query .wp-block-post { transform:none!important; }
